當前位置: 首頁>>代碼示例>>PHP>>正文


PHP HtmlForm::addSelectBoxFromXml方法代碼示例

本文整理匯總了PHP中HtmlForm::addSelectBoxFromXml方法的典型用法代碼示例。如果您正苦於以下問題:PHP HtmlForm::addSelectBoxFromXml方法的具體用法?PHP HtmlForm::addSelectBoxFromXml怎麽用?PHP HtmlForm::addSelectBoxFromXml使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在HtmlForm的用法示例。


在下文中一共展示了HtmlForm::addSelectBoxFromXml方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: HtmlForm

$page->addHtml('</div>
                </div>
            </div>
            <div class="panel panel-default" id="panel_regional_settings">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a data-toggle="collapse" data-parent="#accordion_common" href="#collapse_regional_settings">
                            <img class="admidio-panel-heading-icon" src="' . THEME_PATH . '/icons/world.png" alt="' . $gL10n->get('ORG_REGIONAL_SETTINGS') . '" />' . $gL10n->get('ORG_REGIONAL_SETTINGS') . '
                        </a>
                    </h4>
                </div>
                <div id="collapse_regional_settings" class="panel-collapse collapse">
                    <div class="panel-body">');
// show form
$form = new HtmlForm('regional_settings_preferences_form', $g_root_path . '/adm_program/modules/preferences/preferences_function.php?form=regional_settings', $page, array('class' => 'form-preferences'));
$form->addSelectBoxFromXml('system_language', $gL10n->get('SYS_LANGUAGE'), SERVER_PATH . '/adm_program/languages/languages.xml', 'ISOCODE', 'NAME', array('property' => FIELD_REQUIRED, 'defaultValue' => $form_values['system_language'], 'showContextDependentFirstEntry' => true));
$form->addSelectBox('default_country', $gL10n->get('PRO_DEFAULT_COUNTRY'), $gL10n->getCountries(), array('defaultValue' => $form_values['default_country'], 'helpTextIdInline' => 'PRO_DEFAULT_COUNTRY_DESC'));
$form->addInput('system_date', $gL10n->get('ORG_DATE_FORMAT'), $form_values['system_date'], array('maxLength' => 20, 'helpTextIdInline' => array('ORG_DATE_FORMAT_DESC', '<a href="http://www.php.net/date">date()</a>'), 'class' => 'form-control-small'));
$form->addInput('system_time', $gL10n->get('ORG_TIME_FORMAT'), $form_values['system_time'], array('maxLength' => 20, 'helpTextIdInline' => array('ORG_TIME_FORMAT_DESC', '<a href="http://www.php.net/date">date()</a>'), 'class' => 'form-control-small'));
$form->addInput('system_currency', $gL10n->get('ORG_CURRENCY'), $form_values['system_currency'], array('maxLength' => 20, 'helpTextIdInline' => 'ORG_CURRENCY_DESC', 'class' => 'form-control-small'));
$form->addSubmitButton('btn_save_regional_settings', $gL10n->get('SYS_SAVE'), array('icon' => THEME_PATH . '/icons/disk.png', 'class' => ' col-sm-offset-3'));
$page->addHtml($form->show(false));
$page->addHtml('</div>
                </div>
            </div>
            <div class="panel panel-default" id="panel_registration">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a data-toggle="collapse" data-parent="#accordion_common" href="#collapse_registration">
                            <img class="admidio-panel-heading-icon" src="' . THEME_PATH . '/icons/new_registrations.png" alt="' . $gL10n->get('SYS_REGISTRATION') . '" />' . $gL10n->get('SYS_REGISTRATION') . '
                        </a>
開發者ID:bash-t,項目名稱:admidio,代碼行數:31,代碼來源:preferences.php


注:本文中的HtmlForm::addSelectBoxFromXml方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。