Mam problem, skrypt php który posiadam, pokazuje dodatkowe pola, tylko gdy wybiorę kategorię, jeśli kategoria nie jest wybrana, skrypt pokazuje komunikat "proszę wybrać kategorie".
Moją prośbą do Forumowiczy jest zmodyfikowanie kodu, tak aby dodatkowe pola zawsze się pokazywały, niezależnie czy wybrałem kategorię czy nie.
Część skryptu odpowiedzialna za tą akcję:
<div id="extraFieldsContainer"> <table class="admintable" id="extraFields"> <?php foreach($this->extraFields as $extraField): ?> <?php if($extraField->type == 'header'): ?> <tr> </tr> <?php else: ?> <tr> <td align="right" class="key"> </td> <td> </td> </tr> <?php endif; ?> <?php endforeach; ?> </table> <?php else: ?> <?php if (K2_JVERSION == '15'): ?> <dl id="system-message"> <dd class="notice message fade"> <ul> <li><?php echo JText::_('K2_PLEASE_SELECT_A_CATEGORY_FIRST_TO_RETRIEVE_ITS_RELATED_EXTRA_FIELDS'); ?></li> </ul> </dd> </dl> <?php elseif (K2_JVERSION == '25'): ?> <div id="system-message-container"> <dl id="system-message"> <dd class="notice message"> <ul> <li><?php echo JText::_('K2_PLEASE_SELECT_A_CATEGORY_FIRST_TO_RETRIEVE_ITS_RELATED_EXTRA_FIELDS'); ?></li> </ul> </dd> </dl> </div> <?php else: ?> <div class="alert"> <div> <p><?php echo JText::_('K2_PLEASE_SELECT_A_CATEGORY_FIRST_TO_RETRIEVE_ITS_RELATED_EXTRA_FIELDS'); ?></p> </div> </div> <?php endif; ?> <?php endif; ?> </div> <div class="itemPlugins"> <?php foreach($this->K2PluginsItemExtraFields as $K2Plugin): ?> <fieldset> </fieldset> <?php endif; ?> <?php endforeach; ?> </div> <?php endif; ?> <?php endif; ?>