本文整理汇总了PHP中HTML::formInputText方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML::formInputText方法的具体用法?PHP HTML::formInputText怎么用?PHP HTML::formInputText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTML
的用法示例。
在下文中一共展示了HTML::formInputText方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
echo '<hr>';
HTML::bluditCoverImage();
echo '<hr>';
// --- BLUDIT QUICK IMAGES ---
HTML::bluditQuickImages();
// --- BLUDIT IMAGES V8 ---
HTML::bluditImagesV8();
echo '</li>';
// ---- ADVANCED TAB ----
echo '<li>';
// Status input
HTML::formSelect(array('name' => 'status', 'label' => $L->g('Status'), 'class' => 'uk-width-1-1 uk-form-medium', 'options' => array('published' => $L->g('Published'), 'draft' => $L->g('Draft')), 'selected' => 'published', 'tip' => ''));
// Date input
HTML::formInputText(array('name' => 'date', 'value' => Date::current(DB_DATE_FORMAT), 'class' => 'uk-width-1-1 uk-form-large', 'tip' => $L->g('To schedule the post just select the date and time'), 'label' => $L->g('Date')));
// Slug input
HTML::formInputText(array('name' => 'slug', 'value' => '', 'class' => 'uk-width-1-1 uk-form-large', 'tip' => $L->g('you-can-modify-the-url-which-identifies'), 'label' => $L->g('Friendly URL')));
echo '</li>';
echo '</ul>';
echo '</div>';
echo '</div>';
HTML::formClose();
?>
<script>
$(document).ready(function() {
$("#jsdate").datetimepicker({format:"<?php
echo DB_DATE_FORMAT;
?>
"});
示例2:
<?php
HTML::title(array('title' => $L->g('Language and timezone'), 'icon' => 'cogs'));
HTML::formOpen(array('class' => 'uk-form-horizontal'));
HTML::formInputHidden(array('name' => 'tokenCSRF', 'value' => $Security->getToken()));
HTML::formSelect(array('name' => 'language', 'label' => $L->g('Language'), 'options' => $Language->getLanguageList(), 'selected' => $Site->language(), 'class' => 'uk-width-1-3 uk-form-medium', 'tip' => $L->g('select-your-sites-language')));
HTML::formSelect(array('name' => 'timezone', 'label' => $L->g('Timezone'), 'options' => Date::timezoneList(), 'selected' => $Site->timezone(), 'class' => 'uk-width-1-3 uk-form-medium', 'tip' => $L->g('select-a-timezone-for-a-correct')));
HTML::formInputText(array('name' => 'locale', 'label' => $L->g('Locale'), 'value' => $Site->locale(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('you-can-use-this-field-to-define-a-set-off')));
echo '<div class="uk-form-row">
<div class="uk-form-controls">
<button type="submit" class="uk-button uk-button-primary">' . $L->g('Save') . '</button>
</div>
</div>';
HTML::formClose();
?>
<script>
$(document).ready(function() {
$("#jslanguage").change(function () {
var locale = $("#jslanguage option:selected").val();
$("#jslocale").attr("value",locale);
});
});
</script>
示例3:
<?php
HTML::title(array('title' => $L->g('General settings'), 'icon' => 'cogs'));
HTML::formOpen(array('class' => 'uk-form-horizontal'));
// Security token
HTML::formInputHidden(array('name' => 'tokenCSRF', 'value' => $Security->getTokenCSRF()));
HTML::legend(array('value' => $L->g('Site information'), 'class' => 'first-child'));
HTML::formInputText(array('name' => 'title', 'label' => $L->g('Site title'), 'value' => $Site->title(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('use-this-field-to-name-your-site')));
HTML::formInputText(array('name' => 'slogan', 'label' => $L->g('Site slogan'), 'value' => $Site->slogan(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('use-this-field-to-add-a-catchy-phrase')));
HTML::formInputText(array('name' => 'description', 'label' => $L->g('Site description'), 'value' => $Site->description(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('you-can-add-a-site-description-to-provide')));
HTML::formInputText(array('name' => 'footer', 'label' => $L->g('Footer text'), 'value' => $Site->footer(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('you-can-add-a-small-text-on-the-bottom')));
HTML::legend(array('value' => $L->g('Social networks links')));
HTML::formInputText(array('name' => 'twitter', 'label' => 'Twitter', 'value' => $Site->twitter(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'facebook', 'label' => 'Facebook', 'value' => $Site->facebook(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'googlePlus', 'label' => 'Google+', 'value' => $Site->googlePlus(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'instagram', 'label' => 'Instagram', 'value' => $Site->instagram(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'github', 'label' => 'Github', 'value' => $Site->github(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
echo '<div class="uk-form-row">
<div class="uk-form-controls">
<button type="submit" class="uk-button uk-button-primary">' . $L->g('Save') . '</button>
</div>
</div>';
HTML::formClose();
示例4: array
<?php
HTML::title(array('title' => $L->g('Advanced settings'), 'icon' => 'cogs'));
HTML::formOpen(array('class' => 'uk-form-horizontal'));
HTML::formInputHidden(array('name' => 'tokenCSRF', 'value' => $Security->getTokenCSRF()));
HTML::legend(array('value' => $L->g('General'), 'class' => 'first-child'));
HTML::formSelect(array('name' => 'postsperpage', 'label' => $L->g('Posts per page'), 'options' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8'), 'selected' => $Site->postsPerPage(), 'class' => 'uk-width-1-3 uk-form-medium', 'tip' => $L->g('number-of-posts-to-show-per-page')));
HTML::formSelect(array('name' => 'homepage', 'label' => $L->g('Default home page'), 'options' => $_homePageList, 'selected' => $Site->homepage(), 'class' => 'uk-width-1-3 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'url', 'label' => $L->g('Site URL'), 'value' => $Site->url(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('the-url-of-your-site')));
HTML::legend(array('value' => $L->g('Command Line Mode')));
HTML::formSelect(array('name' => 'cliMode', 'label' => $L->g('Cli Mode'), 'options' => array('true' => $L->g('Enabled'), 'false' => $L->g('Disabled')), 'selected' => $Site->cliMode(), 'class' => 'uk-width-1-3 uk-form-medium', 'tip' => $L->g('enable-the-command-line-mode-if-you-add-edit')));
HTML::legend(array('value' => $L->g('Email account settings')));
HTML::formInputText(array('name' => 'emailFrom', 'label' => $L->g('Sender email'), 'value' => $Site->emailFrom(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('Emails will be sent from this address')));
HTML::legend(array('value' => $L->g('URL Filters')));
HTML::formInputText(array('name' => 'uriPost', 'label' => $L->g('Posts'), 'value' => $Site->uriFilters('post'), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'uriPage', 'label' => $L->g('Pages'), 'value' => $Site->uriFilters('page'), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'uriTag', 'label' => $L->g('Tags'), 'value' => $Site->uriFilters('tag'), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
echo '<div class="uk-form-row">
<div class="uk-form-controls">
<button type="submit" class="uk-button uk-button-primary">' . $L->g('Save') . '</button>
</div>
</div>';
HTML::formClose();
示例5: array
HTML::formInputText(array('name' => 'lastName', 'label' => $L->g('Last name'), 'value' => $_User->lastName(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
echo '<div class="uk-form-row">
<label class="uk-form-label">Password</label>
<div class="uk-form-controls">
<a href="' . HTML_PATH_ADMIN_ROOT . 'user-password/' . $_User->username() . '">' . $L->g('Change password') . '</a>
</div>
</div>';
if ($Login->role() === 'admin') {
HTML::formSelect(array('name' => 'role', 'label' => $L->g('Role'), 'options' => array('editor' => $L->g('Editor'), 'admin' => $L->g('Administrator')), 'selected' => $_User->role(), 'tip' => ''));
}
HTML::formInputText(array('name' => 'email', 'label' => $L->g('Email'), 'value' => $_User->email(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('email-will-not-be-publicly-displayed')));
HTML::legend(array('value' => 'Social networks'));
HTML::formInputText(array('name' => 'twitterUsername', 'label' => 'Twitter username', 'value' => $_User->twitterUsername(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'facebookUsername', 'label' => 'Facebook username', 'value' => $_User->facebookUsername(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'googleUsername', 'label' => 'Google username', 'value' => $_User->googleUsername(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'instagramUsername', 'label' => 'Instagram username', 'value' => $_User->instagramUsername(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
echo '<div class="uk-form-row">
<div class="uk-form-controls">
<button type="submit" class="uk-button uk-button-primary">' . $L->g('Save') . '</button>
<a href="' . HTML_PATH_ADMIN_ROOT . 'users" class="uk-button">' . $L->g('Cancel') . '</a>
</div>
</div>';
if ($Login->role() === 'admin' && $_User->username() != 'admin') {
HTML::legend(array('value' => $L->g('Delete')));
echo '<div class="uk-form-row">
<div class="uk-form-controls">
<button type="submit" id="jsdelete-user-associate" class="delete-button" name="delete-user-associate"><i class="uk-icon-ban"></i> ' . $L->g('Delete the user and associate its posts to admin user') . '</button>
<button type="submit" id="jsdelete-user-all" class="delete-button" name="delete-user-all"><i class="uk-icon-ban"></i> ' . $L->g('Delete the user and all its posts') . '</button>
</div>
</div>';
}
示例6:
<?php
HTML::title(array('title' => $L->g('Language and timezone'), 'icon' => 'cogs'));
HTML::formOpen(array('class' => 'uk-form-horizontal'));
HTML::formInputHidden(array('name' => 'tokenCSRF', 'value' => $Security->getTokenCSRF()));
HTML::legend(array('value' => $L->g('General'), 'class' => 'first-child'));
HTML::formSelect(array('name' => 'language', 'label' => $L->g('Language'), 'options' => $Language->getLanguageList(), 'selected' => $Site->language(), 'class' => 'uk-width-1-3 uk-form-medium', 'tip' => $L->g('select-your-sites-language')));
HTML::formSelect(array('name' => 'timezone', 'label' => $L->g('Timezone'), 'options' => Date::timezoneList(), 'selected' => $Site->timezone(), 'class' => 'uk-width-1-3 uk-form-medium', 'tip' => $L->g('select-a-timezone-for-a-correct')));
HTML::formInputText(array('name' => 'locale', 'label' => $L->g('Locale'), 'value' => $Site->locale(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('you-can-use-this-field-to-define-a-set-off')));
HTML::legend(array('value' => $L->g('Date and time formats')));
HTML::formInputText(array('name' => 'dateFormat', 'label' => $L->g('Date format'), 'value' => $Site->dateFormat(), 'class' => 'uk-width-1-2 uk-form-medium'));
echo '<div class="uk-form-row">
<div class="uk-form-controls">
<button type="submit" class="uk-button uk-button-primary">' . $L->g('Save') . '</button>
</div>
</div>';
HTML::formClose();
?>
<script>
$(document).ready(function() {
$("#jslanguage").change(function () {
var locale = $("#jslanguage option:selected").val();
$("#jslocale").attr("value",locale);
});
});
</script>
示例7:
<?php
HTML::title(array('title' => $L->g('Change password'), 'icon' => 'key'));
HTML::formOpen(array('id' => 'edit-user-profile-form', 'class' => 'uk-form-horizontal'));
// Security token
HTML::formInputHidden(array('name' => 'tokenCSRF', 'value' => $Security->getTokenCSRF()));
// Hidden field username
HTML::formInputHidden(array('name' => 'username', 'value' => $_user['username']));
HTML::legend(array('value' => $L->g('New password')));
HTML::formInputText(array('name' => 'usernameDisable', 'label' => $L->g('Username'), 'value' => $_user['username'], 'class' => 'uk-width-1-2 uk-form-medium', 'disabled' => true, 'tip' => ''));
HTML::formInputPassword(array('name' => 'new_password', 'label' => $L->g('New password'), 'value' => '', 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputPassword(array('name' => 'confirm_password', 'label' => $L->g('Confirm password'), 'value' => '', 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
echo '<div class="uk-form-row">
<div class="uk-form-controls">
<button type="submit" class="uk-button uk-button-primary">' . $L->g('Save') . '</button>
<a href="' . HTML_PATH_ADMIN_ROOT . 'edit-user/' . $_user['username'] . '" class="uk-button">' . $L->g('Cancel') . '</a>
</div>
</div>';
HTML::formClose();
示例8:
<?php
HTML::title(array('title' => $L->g('General settings'), 'icon' => 'cogs'));
HTML::formOpen(array('class' => 'uk-form-horizontal'));
// Security token
HTML::formInputHidden(array('name' => 'tokenCSRF', 'value' => $Security->getTokenCSRF()));
HTML::legend(array('value' => $L->g('Site information'), 'class' => 'first-child'));
HTML::formInputText(array('name' => 'title', 'label' => $L->g('Site title'), 'value' => $Site->title(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('use-this-field-to-name-your-site')));
HTML::formInputText(array('name' => 'slogan', 'label' => $L->g('Site slogan'), 'value' => $Site->slogan(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('use-this-field-to-add-a-catchy-phrase')));
HTML::formInputText(array('name' => 'description', 'label' => $L->g('Site description'), 'value' => $Site->description(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('you-can-add-a-site-description-to-provide')));
HTML::formInputText(array('name' => 'footer', 'label' => $L->g('Footer text'), 'value' => $Site->footer(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('you-can-add-a-small-text-on-the-bottom')));
echo '<div class="uk-form-row">
<div class="uk-form-controls">
<button type="submit" class="uk-button uk-button-primary">' . $L->g('Save') . '</button>
</div>
</div>';
HTML::formClose();
示例9: isset
<?php
HTML::title(array('title' => $L->g('Add a new user'), 'icon' => 'user-plus'));
HTML::formOpen(array('id' => 'add-user-form', 'class' => 'uk-form-horizontal'));
// Security token
HTML::formInputHidden(array('name' => 'tokenCSRF', 'value' => $Security->getTokenCSRF()));
HTML::formInputText(array('name' => 'new_username', 'label' => $L->g('Username'), 'value' => isset($_POST['new_username']) ? $_POST['new_username'] : '', 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputPassword(array('name' => 'new_password', 'label' => $L->g('Password'), 'value' => '', 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputPassword(array('name' => 'confirm_password', 'label' => $L->g('Confirm Password'), 'value' => '', 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formSelect(array('name' => 'role', 'label' => $L->g('Role'), 'options' => array('editor' => $L->g('Editor'), 'admin' => $L->g('Administrator')), 'selected' => 'editor', 'tip' => ''));
HTML::formInputText(array('name' => 'email', 'label' => $L->g('Email'), 'value' => isset($_POST['email']) ? $_POST['email'] : '', 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
echo '<div class="uk-form-row">
<div class="uk-form-controls">
<button type="submit" class="uk-button uk-button-primary">' . $L->g('Save') . '</button>
<a href="' . HTML_PATH_ADMIN_ROOT . 'users" class="uk-button">' . $L->g('Cancel') . '</a>
</div>
</div>';
HTML::formClose();
示例10: array
// Security token
HTML::formInputHidden(array('name' => 'username', 'value' => $_user['username']));
HTML::legend(array('value' => $L->g('Profile'), 'class' => 'first-child'));
HTML::formInputText(array('name' => 'usernameDisable', 'label' => $L->g('Username'), 'value' => $_user['username'], 'class' => 'uk-width-1-2 uk-form-medium', 'disabled' => true, 'tip' => ''));
HTML::formInputText(array('name' => 'firstName', 'label' => $L->g('First name'), 'value' => $_user['firstName'], 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'lastName', 'label' => $L->g('Last name'), 'value' => $_user['lastName'], 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
echo '<div class="uk-form-row">
<label class="uk-form-label">Password</label>
<div class="uk-form-controls">
<a href="' . HTML_PATH_ADMIN_ROOT . 'user-password/' . $_user['username'] . '">' . $L->g('Change password') . '</a>
</div>
</div>';
if ($Login->role() === 'admin') {
HTML::formSelect(array('name' => 'role', 'label' => $L->g('Role'), 'options' => array('editor' => $L->g('Editor'), 'admin' => $L->g('Administrator')), 'selected' => $_user['role'], 'tip' => ''));
}
HTML::formInputText(array('name' => 'email', 'label' => $L->g('Email'), 'value' => $_user['email'], 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('email-will-not-be-publicly-displayed')));
echo '<div class="uk-form-row">
<div class="uk-form-controls">
<button type="submit" class="uk-button uk-button-primary">' . $L->g('Save') . '</button>
<a href="' . HTML_PATH_ADMIN_ROOT . 'users" class="uk-button">' . $L->g('Cancel') . '</a>
</div>
</div>';
if ($Login->role() === 'admin' && $_user['username'] != 'admin') {
HTML::legend(array('value' => $L->g('Delete')));
echo '<div class="uk-form-row">
<div class="uk-form-controls">
<button type="submit" id="jsdelete-user-associate" class="delete-button" name="delete-user-associate"><i class="uk-icon-ban"></i> ' . $L->g('Delete the user and associate its posts to admin user') . '</button>
<button type="submit" id="jsdelete-user-all" class="delete-button" name="delete-user-all"><i class="uk-icon-ban"></i> ' . $L->g('Delete the user and all its posts') . '</button>
</div>
</div>';
}
示例11:
<?php
HTML::title(array('title' => $L->g('General settings'), 'icon' => 'cogs'));
HTML::formOpen(array('class' => 'uk-form-horizontal'));
// Security token
HTML::formInputHidden(array('name' => 'tokenCSRF', 'value' => $Security->getTokenCSRF()));
HTML::legend(array('value' => $L->g('Site information'), 'class' => 'first-child'));
HTML::formInputText(array('name' => 'title', 'label' => $L->g('Site title'), 'value' => $Site->title(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('use-this-field-to-name-your-site')));
HTML::formInputText(array('name' => 'slogan', 'label' => $L->g('Site slogan'), 'value' => $Site->slogan(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('use-this-field-to-add-a-catchy-phrase')));
HTML::formInputText(array('name' => 'description', 'label' => $L->g('Site description'), 'value' => $Site->description(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('you-can-add-a-site-description-to-provide')));
HTML::formInputText(array('name' => 'footer', 'label' => $L->g('Footer text'), 'value' => $Site->footer(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('you-can-add-a-small-text-on-the-bottom')));
HTML::legend(array('value' => $L->g('Social networks links')));
HTML::formInputText(array('name' => 'twitter', 'label' => 'Twitter', 'value' => $Site->twitter(), 'class' => 'uk-width-1-2 uk-form-medium', 'placeholder' => 'https://twitter.com/USERNAME', 'tip' => ''));
HTML::formInputText(array('name' => 'facebook', 'label' => 'Facebook', 'value' => $Site->facebook(), 'class' => 'uk-width-1-2 uk-form-medium', 'placeholder' => 'https://www.facebook.com/USERNAME', 'tip' => ''));
HTML::formInputText(array('name' => 'googlePlus', 'label' => 'Google+', 'value' => $Site->googlePlus(), 'class' => 'uk-width-1-2 uk-form-medium', 'placeholder' => 'https://plus.google.com/+USERNAME', 'tip' => ''));
HTML::formInputText(array('name' => 'instagram', 'label' => 'Instagram', 'value' => $Site->googlePlus(), 'class' => 'uk-width-1-2 uk-form-medium', 'placeholder' => 'https://www.instagram.com/USERNAME', 'tip' => ''));
HTML::formInputText(array('name' => 'github', 'label' => 'Github', 'value' => $Site->github(), 'class' => 'uk-width-1-2 uk-form-medium', 'placeholder' => 'https://github.com/USERNAME', 'tip' => ''));
echo '<div class="uk-form-row">
<div class="uk-form-controls">
<button type="submit" class="uk-button uk-button-primary">' . $L->g('Save') . '</button>
</div>
</div>';
HTML::formClose();
示例12: array
HTML::formSelect(array('name' => 'role', 'label' => $L->g('Role'), 'options' => array('editor' => $L->g('Editor'), 'admin' => $L->g('Administrator')), 'selected' => $_User->role(), 'tip' => ''));
}
HTML::formInputText(array('name' => 'email', 'label' => $L->g('Email'), 'value' => $_User->email(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('email-will-not-be-publicly-displayed')));
HTML::legend(array('value' => $L->g('Social networks links')));
HTML::formInputText(array('name' => 'twitter', 'label' => 'Twitter', 'value' => $_User->twitter(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'facebook', 'label' => 'Facebook', 'value' => $_User->facebook(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'googlePlus', 'label' => 'Google+', 'value' => $_User->googlePlus(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
HTML::formInputText(array('name' => 'instagram', 'label' => 'Instagram', 'value' => $_User->instagram(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => ''));
echo '<div class="uk-form-row">
<div class="uk-form-controls">
<button type="submit" class="uk-button uk-button-primary">' . $L->g('Save') . '</button>
<a href="' . HTML_PATH_ADMIN_ROOT . 'users" class="uk-button">' . $L->g('Cancel') . '</a>
</div>
</div>';
HTML::legend(array('value' => $L->g('Status')));
HTML::formInputText(array('name' => 'status', 'label' => $L->g('сurrent status'), 'value' => $_User->enabled() ? $L->g('Enabled') : $L->g('Disabled'), 'class' => 'uk-width-1-2 uk-form-medium', 'disabled' => true, 'tip' => $_User->enabled() ? '' : $L->g('To enable the user you have to set a new password')));
if ($_User->enabled()) {
echo '<div class="uk-form-row">
<div class="uk-form-controls">
<button type="submit" id="jsdisable-user" class="delete-button" name="disable-user"><i class="uk-icon-ban"></i> ' . $L->g('Disable the user') . '</button>
</div>
</div>';
}
if ($Login->role() === 'admin' && $_User->username() != 'admin') {
HTML::legend(array('value' => $L->g('Delete')));
echo '<div class="uk-form-row">
<div class="uk-form-controls">
<button type="submit" id="jsdelete-user-associate" class="delete-button" name="delete-user-associate"><i class="uk-icon-ban"></i> ' . $L->g('Delete the user and associate its posts to admin user') . '</button>
<button type="submit" id="jsdelete-user-all" class="delete-button" name="delete-user-all"><i class="uk-icon-ban"></i> ' . $L->g('Delete the user and all its posts') . '</button>
</div>
</div>';
示例13:
<?php
HTML::title(array('title' => $L->g('Language and timezone'), 'icon' => 'globe'));
HTML::formOpen(array('class' => 'uk-form-horizontal'));
HTML::formInputHidden(array('name' => 'tokenCSRF', 'value' => $Security->getTokenCSRF()));
HTML::legend(array('value' => $L->g('General'), 'class' => 'first-child'));
HTML::formSelect(array('name' => 'language', 'label' => $L->g('Language'), 'options' => $Language->getLanguageList(), 'selected' => $Site->language(), 'class' => 'uk-width-1-3 uk-form-medium', 'tip' => $L->g('select-your-sites-language')));
HTML::formSelect(array('name' => 'timezone', 'label' => $L->g('Timezone'), 'options' => Date::timezoneList(), 'selected' => $Site->timezone(), 'class' => 'uk-width-1-3 uk-form-medium', 'tip' => $L->g('select-a-timezone-for-a-correct')));
HTML::formInputText(array('name' => 'locale', 'label' => $L->g('Locale'), 'value' => $Site->locale(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('you-can-use-this-field-to-define-a-set-of')));
HTML::legend(array('value' => $L->g('Date and time formats')));
HTML::formInputText(array('name' => 'dateFormat', 'label' => $L->g('Date format'), 'value' => $Site->dateFormat(), 'class' => 'uk-width-1-2 uk-form-medium', 'tip' => $L->g('Current format') . ': ' . Date::current($Site->dateFormat())));
echo '<div class="uk-form-row">
<div class="uk-form-controls">
<button type="submit" class="uk-button uk-button-primary">' . $L->g('Save') . '</button>
</div>
</div>';
HTML::formClose();
?>
<script>
$(document).ready(function() {
$("#jslanguage").change(function () {
var locale = $("#jslanguage option:selected").val();
$("#jslocale").attr("value",locale);
});
});
</script>