本文整理汇总了PHP中HtmlForm::addCustomContent方法的典型用法代码示例。如果您正苦于以下问题:PHP HtmlForm::addCustomContent方法的具体用法?PHP HtmlForm::addCustomContent怎么用?PHP HtmlForm::addCustomContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HtmlForm
的用法示例。
在下文中一共展示了HtmlForm::addCustomContent方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fread
// Foto aus PHP-Temp-Ordner einlesen
$user_image_data = fread(fopen($_FILES['userfile']['tmp_name'][0], 'r'), $_FILES['userfile']['size'][0]);
// Zwischenspeichern des neuen Fotos in der Session
$gCurrentSession->setValue('ses_binary', $user_image_data);
$gCurrentSession->save();
}
//Image-Objekt löschen
$user_image->delete();
if ($getItemId == $gCurrentUser->getValue('inv_id')) {
$headline = $gL10n->get('PRO_EDIT_MY_PROFILE_PICTURE');
} else {
$headline = $gL10n->get('PRO_EDIT_PROFILE_PIC_FROM', $inventory->getValue('FIRST_NAME'), $inventory->getValue('LAST_NAME'));
}
// create html page object
$page = new HtmlPage($headline);
$page->addJavascript('$("#btn_cancel").click(function() {
self.location.href=\'' . $g_root_path . '/adm_program/modules/inventory/item_photo_edit.php?mode=dont_save&inv_id=' . $getItemId . '\';
});', true);
// show form
$form = new HtmlForm('show_new_profile_picture_form', $g_root_path . '/adm_program/modules/inventory/item_photo_edit.php?mode=save&inv_id=' . $getItemId, $page);
$form->addCustomContent($gL10n->get('PRO_CURRENT_PICTURE'), '<img class="imageFrame" src="item_photo_show.php?inv_id=' . $getItemId . '" alt="' . $gL10n->get('PRO_CURRENT_PICTURE') . '" />');
$form->addCustomContent($gL10n->get('PRO_NEW_PICTURE'), '<img class="imageFrame" src="item_photo_show.php?inv_id=' . $getItemId . '&new_photo=1" alt="' . $gL10n->get('PRO_NEW_PICTURE') . '" />');
$form->addLine();
$form->openButtonGroup();
$form->addButton('btn_cancel', $gL10n->get('SYS_ABORT'), array('icon' => THEME_PATH . '/icons/error.png'));
$form->addSubmitButton('btn_update', $gL10n->get('SYS_APPLY'), array('icon' => THEME_PATH . '/icons/database_in.png'));
$form->closeButtonGroup();
// add form to html page and show page
$page->addHtml($form->show(false));
$page->show();
}
示例2: HtmlForm
// add back link to module menu
$ecardMenu = $page->getMenu();
$ecardMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
if ($gCurrentUser->isWebmaster()) {
// show link to system preferences of announcements
$ecardMenu->addItem('menu_item_preferences', $g_root_path . '/adm_program/modules/preferences/preferences.php?show_option=ecards', $gL10n->get('SYS_MODULE_PREFERENCES'), 'options.png', 'right');
}
// show form
$form = new HtmlForm('ecard_form', 'ecard_send.php', $page);
$form->addInput('submit_action', null, '', array('type' => 'hidden'));
$form->addInput('photo_id', null, $getPhotoId, array('type' => 'hidden'));
$form->addInput('photo_nr', null, $getPhotoNr, array('type' => 'hidden'));
$form->openGroupBox('gb_layout', $gL10n->get('ECA_LAYOUT'));
$form->addCustomContent($gL10n->get('SYS_PHOTO'), '
<a data-toggle="lightbox" data-type="image" data-title="' . $gL10n->get('SYS_PREVIEW') . '"
href="' . $g_root_path . '/adm_program/modules/photos/photo_show.php?pho_id=' . $getPhotoId . '&photo_nr=' . $getPhotoNr . '&max_width=' . $gPreferences['photo_show_width'] . '&max_height=' . $gPreferences['photo_show_height'] . '"><img
src="' . $g_root_path . '/adm_program/modules/photos/photo_show.php?pho_id=' . $getPhotoId . '&photo_nr=' . $getPhotoNr . '&max_width=' . $gPreferences['ecard_thumbs_scale'] . '&max_height=' . $gPreferences['ecard_thumbs_scale'] . '"
class="imageFrame" alt="' . $gL10n->get('ECA_VIEW_PICTURE_FULL_SIZED') . '" title="' . $gL10n->get('ECA_VIEW_PICTURE_FULL_SIZED') . '" />
</a>');
$templates = admFuncGetDirectoryEntries(THEME_SERVER_PATH . '/ecard_templates');
foreach ($templates as $key => $templateName) {
$templates[$key] = ucfirst(preg_replace('/[_-]/', ' ', str_replace('.tpl', '', $templateName)));
}
$form->addSelectBox('ecard_template', $gL10n->get('ECA_TEMPLATE'), $templates, array('defaultValue' => $template, 'property' => FIELD_REQUIRED, 'showContextDependentFirstEntry' => false));
$form->closeGroupBox();
$form->openGroupBox('gb_contact_details', $gL10n->get('SYS_CONTACT_DETAILS'));
// create list with all possible recipients
// list all roles where login users could send mails to
$arrayMailRoles = $gCurrentUser->getAllMailRoles();
$sql = 'SELECT rol_id, rol_name
FROM ' . TBL_ROLES . '
INNER JOIN ' . TBL_CATEGORIES . '
示例3: array
$form->addInput('usr_password', $gL10n->get('SYS_PASSWORD'), null, array('type' => 'password', 'property' => FIELD_REQUIRED, 'minLength' => 8, 'helpTextIdLabel' => 'PRO_PASSWORD_DESCRIPTION', 'class' => 'form-control-small'));
$form->addInput('password_confirm', $gL10n->get('SYS_CONFIRM_PASSWORD'), null, array('type' => 'password', 'property' => FIELD_REQUIRED, 'minLength' => 8, 'class' => 'form-control-small'));
// show selectbox with all organizations of database
if ($gPreferences['system_organization_select'] == 1) {
$sql = 'SELECT org_id, org_longname
FROM ' . TBL_ORGANIZATIONS . '
ORDER BY org_longname ASC, org_shortname ASC';
$form->addSelectBoxFromSql('reg_org_id', $gL10n->get('SYS_ORGANIZATION'), $gDb, $sql, array('property' => FIELD_REQUIRED, 'defaultValue' => $registrationOrgId));
}
} else {
// only show link if user is member of this organization.
// Password of own user could be changed.
// Webmasters are allowed to change password if no login was configured or no email is set to send a generated password.
if (isMember($user->getValue('usr_id')) && ($gCurrentUser->getValue('usr_id') == $user->getValue('usr_id') || $gCurrentUser->isWebmaster() && (strlen($user->getValue('usr_login_name')) === 0 || strlen($user->getValue('EMAIL')) === 0))) {
$form->addCustomContent($gL10n->get('SYS_PASSWORD'), '
<a id="password_link" class="btn" data-toggle="modal" data-target="#admidio_modal"
href="password.php?usr_id=' . $getUserId . '"><img src="' . THEME_PATH . '/icons/key.png"
alt="' . $gL10n->get('SYS_CHANGE_PASSWORD') . '" title="' . $gL10n->get('SYS_CHANGE_PASSWORD') . '" />' . $gL10n->get('SYS_CHANGE_PASSWORD') . '</a>');
}
}
$form->addLine();
}
}
}
// bei schneller Registrierung duerfen nur die Pflichtfelder ausgegeben werden
if ($showField) {
// add profile fields to form
$fieldProperty = FIELD_DEFAULT;
$helpId = '';
if ($gProfileFields->getProperty($field->getValue('usf_name_intern'), 'usf_disabled') == 1 && !$gCurrentUser->hasRightEditProfile($user, false) && $getNewUser === 0) {
// disable field if this is configured in profile field configuration
$fieldProperty = FIELD_DISABLED;
示例4: HtmlForm
</h4>
</div>
<div id="collapse_links" class="panel-collapse collapse">
<div class="panel-body">');
// show form
$form = new HtmlForm('links_preferences_form', $g_root_path . '/adm_program/modules/preferences/preferences_function.php?form=links', $page, array('class' => 'form-preferences'));
$selectBoxEntries = array('0' => $gL10n->get('SYS_DEACTIVATED'), '1' => $gL10n->get('SYS_ACTIVATED'), '2' => $gL10n->get('ORG_ONLY_FOR_REGISTERED_USER'));
$form->addSelectBox('enable_weblinks_module', $gL10n->get('ORG_ACCESS_TO_MODULE'), $selectBoxEntries, array('defaultValue' => $form_values['enable_weblinks_module'], 'showContextDependentFirstEntry' => false, 'helpTextIdInline' => 'ORG_ACCESS_TO_MODULE_DESC'));
$form->addInput('weblinks_per_page', $gL10n->get('ORG_NUMBER_OF_ENTRIES_PER_PAGE'), $form_values['weblinks_per_page'], array('type' => 'number', 'minNumber' => 0, 'maxNumber' => 9999, 'helpTextIdInline' => 'ORG_NUMBER_OF_ENTRIES_PER_PAGE_DESC'));
$selectBoxEntries = array('_self' => $gL10n->get('LNK_SAME_WINDOW'), '_blank' => $gL10n->get('LNK_NEW_WINDOW'));
$form->addSelectBox('weblinks_target', $gL10n->get('LNK_LINK_TARGET'), $selectBoxEntries, array('defaultValue' => $form_values['weblinks_target'], 'showContextDependentFirstEntry' => false, 'helpTextIdInline' => 'LNK_LINK_TARGET_DESC'));
$form->addInput('weblinks_redirect_seconds', $gL10n->get('LNK_DISPLAY_REDIRECT'), $form_values['weblinks_redirect_seconds'], array('type' => 'number', 'minNumber' => 0, 'maxNumber' => 9999, 'helpTextIdInline' => 'LNK_DISPLAY_REDIRECT_DESC'));
$html = '<a class="btn" href="' . $g_root_path . '/adm_program/modules/categories/categories.php?type=LNK"><img
src="' . THEME_PATH . '/icons/application_view_tile.png" alt="' . $gL10n->get('SYS_SWITCH_TO_CATEGORIES_ADMINISTRATION') . '" />' . $gL10n->get('SYS_SWITCH_TO_CATEGORIES_ADMINISTRATION') . '</a>';
$htmlDesc = $gL10n->get('DAT_MAINTAIN_CATEGORIES_DESC') . '<div class="alert alert-warning alert-small" role="alert"><span class="glyphicon glyphicon-warning-sign"></span>' . $gL10n->get('ORG_NOT_SAVED_SETTINGS_LOST') . '</div>';
$form->addCustomContent($gL10n->get('SYS_MAINTAIN_CATEGORIES'), $html, array('helpTextIdInline' => $htmlDesc));
$form->addSubmitButton('btn_save_links', $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_inventory">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion_modules" href="#collapse_inventory">
<img class="admidio-panel-heading-icon" src="'.THEME_PATH.'/icons/inventory.png" alt="'.$gL10n->get('INV_INVENTORY').'" />'.$gL10n->get('INV_INVENTORY').'
</a>
</h4>
</div>
<div id="collapse_inventory" class="panel-collapse collapse">
示例5: array
}
}
$htmlRoleSelection .= '
</select>
</div>
<div class="col-sm-2" style="text-align: center;">
<br /><br /><br />
<a class="admidio-icon-link" href="javascript:removeRoles()"><img
src="' . THEME_PATH . '/icons/back.png" alt="' . $gL10n->get('SYS_REMOVE_ROLE') . '" title="' . $gL10n->get('SYS_REMOVE_ROLE') . '" /></a>
<a class="admidio-icon-link" href="javascript:addRoles()"><img
src="' . THEME_PATH . '/icons/forward.png" alt="' . $gL10n->get('SYS_ADD_ROLE') . '" title="' . $gL10n->get('SYS_ADD_ROLE') . '" /></a>
</div>
<div class="col-sm-5 form-group">
<label for="adm_allowed_roles"><img class="admidio-icon-info" src="' . THEME_PATH . '/icons/ok.png" alt="' . $gL10n->get('DOW_ACCESS_ALLOWED') . '" title="' . $gL10n->get('DOW_ACCESS_ALLOWED') . '" />' . $gL10n->get('DOW_ACCESS_ALLOWED') . '</label>
<select id="adm_allowed_roles" name="AllowedRoles[]" class="form-control" multiple="multiple" size="8" style="max-width: 300px;">';
for ($i = 0; $i < count($roleSet); $i++) {
$nextRole = $roleSet[$i];
$htmlRoleSelection .= '<option value="' . $nextRole['rol_id'] . '">' . $nextRole['rol_name'] . '</option>';
}
$htmlRoleSelection .= '
</select>
</div>';
$form->addCheckbox('fol_public', $gL10n->get('DOW_NO_PUBLIC_ACCESS'), $checkboxValue, array('property' => $fieldMode, 'helpTextIdLabel' => 'DOW_PUBLIC_DOWNLOAD_FLAG', 'icon' => THEME_PATH . '/icons/lock.png'));
$form->openGroupBox('adm_roles_box', $gL10n->get('DOW_ROLE_ACCESS_PERMISSIONS'));
$form->addDescription($gL10n->get('DOW_ROLE_ACCESS_PERMISSIONS_DESC'));
$form->addCustomContent(null, $htmlRoleSelection);
$form->closeGroupBox();
$form->addSubmitButton('btn_save', $gL10n->get('SYS_SAVE'), array('icon' => THEME_PATH . '/icons/disk.png'));
// add form to html page and show page
$page->addHtml($form->show(false));
$page->show();