本文整理汇总了PHP中Html::submitButton方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::submitButton方法的具体用法?PHP Html::submitButton怎么用?PHP Html::submitButton使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Html
的用法示例。
在下文中一共展示了Html::submitButton方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderContent
protected function renderContent()
{
$form = $this->beginWidget('ActiveForm', array('id' => 'simple-search-form', 'action' => array('search/index'), 'enableAjaxValidation' => false));
echo Html::textField('search', '', array('size' => 20, 'maxlength' => 50, 'class' => 'small-search-field'));
echo Html::hiddenField('choice', '0');
echo Html::hiddenField('type', '0');
echo Html::submitButton('', array('class' => 'small-search-button'));
$this->endWidget();
}
示例2:
<?php
echo $form->field($model, "id_departamento")->dropDownList(ArrayHelper::Map(DepartamentoTabla::find()->all(), "ID_DEPARTAMENTO", "NOMBRE_DEPARTAMENTO"), ["prompt" => "Sin informar"]);
?>
<?php
echo $form->field($model, "id_rol")->dropDownList(ArrayHelper::Map(ROL::find()->all(), "ID_ROL", "ROL"));
?>
<?php
echo $form->field($model, "EMAIL")->input("email");
?>
<?php
echo $form->field($model, "password")->input("password");
?>
<?php
echo $form->field($model, "password_repeat")->input("password");
?>
<?php
echo $form->field($model, 'reCaptcha')->widget(ReCaptcha::className());
?>
<?php
echo Html::submitButton("Crear usuario", ["class" => "btn btn-primary"]);
?>
<?php
$form->end();
示例3: submitButton
/**
* Creates a submit button
*
* @param string $message Text of the submit button, will be escaped
* @param array $attributes Attributes
* @return string HTML output for the submit button
*/
function submitButton($message, $attributes = [])
{
# Disable submit button if history has 1 revision only
if ($this->getNumRows() > 1) {
return Html::submitButton($message, $attributes);
} else {
return '';
}
}
示例4: array
<div class="form-group">
<div class="col-sm-4"><?php
echo $form->labelEx($model, 'alias', array('class' => 'control-label'));
?>
</div>
<div class="col-sm-8"><?php
echo $form->textField($model, 'alias', array('class' => 'form-control'));
?>
</div>
</div>
<div class="form-group">
<div class="col-sm-4"><?php
//= Html::activeLabelEx('UserGroup', 'access', array('class' => 'control-label'));
?>
</div>
<div class="col-sm-8"><?php
echo Html::checkBoxList('UserGroup[access_action][]', 'access', array('delete' => 'Удаление', 'create' => 'Создание', 'update' => 'Редактирование'), array('class' => ''));
?>
</div>
</div>
<div class="form-group buttons text-center">
<?php
echo Html::submitButton(Yii::t('app', 'SEND'), array('class' => 'btn btn-success'));
?>
</div>
<?php
$this->endWidget();
Yii::app()->tpl->closeWidget();
?>
示例5: getForm
/**
* Generates the namespace selector form with hidden attributes.
* @return string HTML fragment
*/
protected function getForm()
{
$this->opts['title'] = $this->getPageTitle()->getPrefixedText();
if (!isset($this->opts['target'])) {
$this->opts['target'] = '';
} else {
$this->opts['target'] = str_replace('_', ' ', $this->opts['target']);
}
if (!isset($this->opts['namespace'])) {
$this->opts['namespace'] = '';
}
if (!isset($this->opts['nsInvert'])) {
$this->opts['nsInvert'] = '';
}
if (!isset($this->opts['associated'])) {
$this->opts['associated'] = false;
}
if (!isset($this->opts['contribs'])) {
$this->opts['contribs'] = 'user';
}
if (!isset($this->opts['year'])) {
$this->opts['year'] = '';
}
if (!isset($this->opts['month'])) {
$this->opts['month'] = '';
}
if ($this->opts['contribs'] == 'newbie') {
$this->opts['target'] = '';
}
if (!isset($this->opts['tagfilter'])) {
$this->opts['tagfilter'] = '';
}
if (!isset($this->opts['topOnly'])) {
$this->opts['topOnly'] = false;
}
if (!isset($this->opts['newOnly'])) {
$this->opts['newOnly'] = false;
}
if (!isset($this->opts['hideMinor'])) {
$this->opts['hideMinor'] = false;
}
$form = Html::openElement('form', ['method' => 'get', 'action' => wfScript(), 'class' => 'mw-contributions-form']);
# Add hidden params for tracking except for parameters in $skipParameters
$skipParameters = ['namespace', 'nsInvert', 'deletedOnly', 'target', 'contribs', 'year', 'month', 'topOnly', 'newOnly', 'hideMinor', 'associated', 'tagfilter'];
foreach ($this->opts as $name => $value) {
if (in_array($name, $skipParameters)) {
continue;
}
$form .= "\t" . Html::hidden($name, $value) . "\n";
}
$tagFilter = ChangeTags::buildTagFilterSelector($this->opts['tagfilter']);
if ($tagFilter) {
$filterSelection = Html::rawElement('div', [], implode(' ', $tagFilter));
} else {
$filterSelection = Html::rawElement('div', [], '');
}
$this->getOutput()->addModules('mediawiki.userSuggest');
$labelNewbies = Xml::radioLabel($this->msg('sp-contributions-newbies')->text(), 'contribs', 'newbie', 'newbie', $this->opts['contribs'] == 'newbie', ['class' => 'mw-input']);
$labelUsername = Xml::radioLabel($this->msg('sp-contributions-username')->text(), 'contribs', 'user', 'user', $this->opts['contribs'] == 'user', ['class' => 'mw-input']);
$input = Html::input('target', $this->opts['target'], 'text', ['size' => '40', 'required' => '', 'class' => ['mw-input', 'mw-ui-input-inline', 'mw-autocomplete-user']] + ($this->opts['contribs'] === 'newbie' || $this->opts['target'] ? [] : ['autofocus' => true]));
$targetSelection = Html::rawElement('div', [], $labelNewbies . '<br>' . $labelUsername . ' ' . $input . ' ');
$namespaceSelection = Xml::tags('div', [], Xml::label($this->msg('namespace')->text(), 'namespace', '') . ' ' . Html::namespaceSelector(['selected' => $this->opts['namespace'], 'all' => ''], ['name' => 'namespace', 'id' => 'namespace', 'class' => 'namespaceselector']) . ' ' . Html::rawElement('span', ['class' => 'mw-input-with-label'], Xml::checkLabel($this->msg('invert')->text(), 'nsInvert', 'nsInvert', $this->opts['nsInvert'], ['title' => $this->msg('tooltip-invert')->text(), 'class' => 'mw-input']) . ' ') . Html::rawElement('span', ['class' => 'mw-input-with-label'], Xml::checkLabel($this->msg('namespace_association')->text(), 'associated', 'associated', $this->opts['associated'], ['title' => $this->msg('tooltip-namespace_association')->text(), 'class' => 'mw-input']) . ' '));
$filters = [];
if ($this->getUser()->isAllowed('deletedhistory')) {
$filters[] = Html::rawElement('span', ['class' => 'mw-input-with-label'], Xml::checkLabel($this->msg('history-show-deleted')->text(), 'deletedOnly', 'mw-show-deleted-only', $this->opts['deletedOnly'], ['class' => 'mw-input']));
}
$filters[] = Html::rawElement('span', ['class' => 'mw-input-with-label'], Xml::checkLabel($this->msg('sp-contributions-toponly')->text(), 'topOnly', 'mw-show-top-only', $this->opts['topOnly'], ['class' => 'mw-input']));
$filters[] = Html::rawElement('span', ['class' => 'mw-input-with-label'], Xml::checkLabel($this->msg('sp-contributions-newonly')->text(), 'newOnly', 'mw-show-new-only', $this->opts['newOnly'], ['class' => 'mw-input']));
$filters[] = Html::rawElement('span', ['class' => 'mw-input-with-label'], Xml::checkLabel($this->msg('sp-contributions-hideminor')->text(), 'hideMinor', 'mw-hide-minor-edits', $this->opts['hideMinor'], ['class' => 'mw-input']));
Hooks::run('SpecialContributions::getForm::filters', [$this, &$filters]);
$extraOptions = Html::rawElement('div', [], implode('', $filters));
$dateSelectionAndSubmit = Xml::tags('div', [], Xml::dateMenu($this->opts['year'] === '' ? MWTimestamp::getInstance()->format('Y') : $this->opts['year'], $this->opts['month']) . ' ' . Html::submitButton($this->msg('sp-contributions-submit')->text(), ['class' => 'mw-submit'], ['mw-ui-progressive']));
$form .= Xml::fieldset($this->msg('sp-contributions-search')->text(), $targetSelection . $namespaceSelection . $filterSelection . $extraOptions . $dateSelectionAndSubmit, ['class' => 'mw-contributions-table']);
$explain = $this->msg('sp-contributions-explain');
if (!$explain->isBlank()) {
$form .= "<p id='mw-sp-contributions-explain'>{$explain->parse()}</p>";
}
$form .= Xml::closeElement('form');
return $form;
}
示例6:
<?php
$form = ActiveForm::begin(['id' => 'form-signup']);
?>
<?php
echo $form->field($model, 'username');
?>
<?php
echo $form->field($model, 'email');
?>
<?php
echo $form->field($model, 'password')->passwordInput();
?>
<div class="form-group">
<?php
echo Html::submitButton('Signup', ['class' => 'btn btn-primary', 'name' => 'signup-button']);
?>
</div>
<?php
ActiveForm::end();
示例7:
// "moment().subtract('month',6)", "moment().subtract('month',6)"
// ], '1 мес' => [
// "moment().subtract('month',1)", "moment().subtract('month',1)"
// ],
// ], 'initRangeExpr' => true, 'presetDropdown' => true, 'hideInput' => true, 'opens' => 'left'
// ],
// ]);
echo $form->field($model, 'count')->input('input', ['type' => 'number', 'min' => 1]);
?>
<div class="form-group">
<div class="col-sm-3"><label class="control-label">Push me!</label>
</div>
<div class="col-sm-4">
<?php
echo Html::submitButton('Сгенерировать', ['class' => 'btn btn-primary']);
?>
</div>
</div>
<?php
?>
<div class="form-group">
<?php
if (!$new) {
echo Alert::widget(['options' => ['class' => 'col-sm-12 alert-' . $opstatus], 'body' => $message]);
}
?>
</div>
<?php
ActiveForm::end();
?>
示例8: userForm
/**
* Form to ask for target user name.
*
* @param string $name User name submitted.
* @return string Form asking for user name.
*/
protected function userForm($name)
{
$this->getOutput()->addModules('mediawiki.userSuggest');
$string = Html::openElement('form', ['method' => 'get', 'action' => wfScript(), 'id' => 'askusername']) . Html::hidden('title', $this->getPageTitle()->getPrefixedText()) . Html::openElement('fieldset') . Html::rawElement('legend', null, $this->msg('emailtarget')->parse()) . Html::label($this->msg('emailusername')->text(), 'emailusertarget') . ' ' . Html::input('target', $name, 'text', ['id' => 'emailusertarget', 'class' => 'mw-autocomplete-user', 'autofocus' => true, 'size' => 30]) . ' ' . Html::submitButton($this->msg('emailusernamesubmit')->text(), []) . Html::closeElement('fieldset') . Html::closeElement('form') . "\n";
return $string;
}
示例9:
?>
<div class="row">
<div class="col-lg-3 col-sm-4">
<?php
echo Html::dropDownList('price', '', ['150000-200000' => '$150,000 - $200,000', '200000-250000' => '$200,000 - $250,000', '250000-300000' => '$250,000 - $300,000', '300000' => '$300,000 - above'], ['class' => 'form-control', 'prompt' => 'Price']);
?>
</div>
<div class="col-lg-3 col-sm-4">
<?php
echo Html::dropDownList('apartment', '', ['Apartment', 'Building', 'Office Space'], ['class' => 'form-control', 'prompt' => 'Property']);
?>
</div>
<div class="col-lg-3 col-sm-4">
<?php
echo Html::submitButton('Find Now', ['class' => 'btn btn-success']);
?>
</div>
</div>
<?php
echo Html::endForm();
?>
</div>
<?
if(Yii::$app->user->isGuest):
?>
<div class="col-lg-5 col-lg-offset-1 col-sm-6 ">
<p>Join now and get updated with all the properties deals.</p>
<button class="btn btn-info" data-toggle="modal" data-target="#loginpop">Login</button> </div>
<?
示例10: array
?>
</div>
<div class = "row">
<?php
$this->widget($this->module->id . '.extensions.editMe.widgets.ExtEditMe', array('model' => $model, 'attribute' => 'body', 'autoLanguage' => false, 'height' => '300px', 'toolbar' => array(array('Bold', 'Italic', 'Underline', 'RemoveFormat'), array('TextColor', 'BGColor'), '-', array('Link', 'Unlink', 'Image'), '-', array('Blockquote')), 'skin' => $this->module->editorSkin, 'uiColor' => $this->module->editorUIColor, 'contentsCss' => $this->module->editorContentsCss));
?>
<?php
echo $form->error($model, 'body');
?>
</div>
<div class = "row buttons">
<?php
echo $form->hiddenField($model, 'member_id');
?>
<?php
echo $form->hiddenField($model, 'member_name');
?>
<?php
echo Html::submitButton(Yii::t('BbiiModule.bbii', 'Send'));
?>
</div>
<?php
$this->endWidget();
?>
</div><!-- form -->
</div>
示例11:
<?php
$form = ActiveForm::begin();
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
echo $form->field($model, 'description')->textInput(['maxlength' => true]);
?>
<div class="form-group">
<?php
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
</div>
<?php
ActiveForm::end();
示例12:
<?php
$form = ActiveForm::begin(['action' => $model->url('update'), 'options' => ['enctype' => 'multipart/form-data', 'class' => 'form-horizontal']]);
echo $form->field($model, 'username', $horizontalOptions)->textInput();
echo $form->field($model, 'email', $horizontalOptions)->textInput();
echo $form->field($model, 'preview', $horizontalOptions)->fileInput(['accept' => 'image/*']);
?>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<?php
echo Html::submitButton(Yii::t('app/user', 'Update'), ['class' => 'btn btn-primary']);
?>
</div>
</div>
<?php
ActiveForm::end();
示例13: array
/* @var $type Integer */
$this->title = Yii::t('forum', 'Forum');
$this->params['breadcrumbs'][] = $this->title;
$this->context->bbii_breadcrumbs = array(Yii::t('BbiiModule.bbii', 'Forum') => array('forum/index'), Yii::t('BbiiModule.bbii', 'Search'));
$approvals = BbiiPost::find()->unapproved()->count();
$reports = BbiiMessage::find()->report()->count();
$item = array(array('label' => Yii::t('BbiiModule.bbii', 'Forum'), 'url' => array('forum/index')), array('label' => Yii::t('BbiiModule.bbii', 'Members'), 'url' => array('member/index')), array('label' => Yii::t('BbiiModule.bbii', 'Approval') . ' (' . $approvals . ')', 'url' => array('moderator/approval'), 'visible' => $this->context->isModerator()), array('label' => Yii::t('BbiiModule.bbii', 'Reports') . ' (' . $reports . ')', 'url' => array('moderator/report'), 'visible' => $this->context->isModerator()), array('label' => Yii::t('BbiiModule.bbii', 'Posts'), 'url' => array('moderator/admin'), 'visible' => $this->context->isModerator()), array('label' => Yii::t('BbiiModule.bbii', 'Blocked IP'), 'url' => array('moderator/ipadmin'), 'visible' => $this->context->isModerator()));
?>
<div id = "bbii-wrapper" class="well clearfix">
<?php
echo $this->render('_header', array('item' => $item));
?>
<?php
$form = $this->beginWidget('ActiveForm', array('id' => 'bbii-search-form', 'action' => array('search/index'), 'enableAjaxValidation' => false));
echo Html::textField('search', $search, array('size' => 80, 'maxlength' => 100));
echo Html::submitButton(Yii::t('BbiiModule.bbii', 'Search')) . '<br>';
echo Html::radioButtonList('choice', $choice, array('1' => Yii::t('BbiiModule.bbii', 'Subject'), '2' => Yii::t('BbiiModule.bbii', 'Content'), '0' => Yii::t('BbiiModule.bbii', 'Both')), array('separator' => ' '));
echo ' | ';
echo Html::radioButtonList('type', $type, array('1' => Yii::t('BbiiModule.bbii', 'Any word'), '2' => Yii::t('BbiiModule.bbii', 'All words'), '0' => Yii::t('BbiiModule.bbii', 'Phrase')), array('separator' => ' '));
$this->endWidget();
?>
<?php
$this->widget('zii.widgets.CListView', array('id' => 'bbii-search-result', 'dataProvider' => $dataProvider, 'itemView' => '_post'));
?>
<?php
echo $this->render('_footer');
?>
</div>
示例14: array
<?php
echo Html::activeLabelEx($model, 'login', array('class' => 'info-title'));
?>
<?php
echo Html::activeTextField($model, 'login', array('class' => 'form-control unicase-form-control text-input'));
?>
</div>
<div class="form-group">
<?php
echo Html::activeLabelEx($model, 'password', array('class' => 'info-title'));
?>
<?php
echo Html::activePasswordField($model, 'password', array('class' => 'form-control unicase-form-control text-input'));
?>
</div>
<div class="radio outer-xs">
<label>
<?php
echo Html::activeCheckBox($model, 'rememberMe', array('class' => ''));
?>
<?php
echo Yii::t('UsersModule.default', 'REMEMBER_ME');
?>
</label>
<?php
echo Html::link(Yii::t('UsersModule.default', 'REMIN_PASS'), '/users/remind', array('class' => 'forgot-password pull-right'));
?>
</div>
<?php
echo Html::submitButton(Yii::t('UsersModule.default', 'BTN_LOGIN'), array('class' => 'btn-upper btn btn-primary checkout-page-button'));
echo Html::endForm();
示例15: File
<div id="file-upload-form">
<?php
roman444uk\jsAjaxFileUploader\JsAjaxFileUploader::widget(['id' => 'file-upload-form', 'clientOptions' => ['uploadUrl' => Url::to('/file/upload'), 'fileName' => Html::getInputName(new File(), 'file'), 'maxFileSize' => 512000, 'allowExt' => 'gif|jpg|jpeg|png', 'showProgress' => false, 'inputText' => 'Добавить файл']]);
?>
<?php
$form = ActiveForm::begin(['id' => 'advert-file-form', 'enableClientValidation' => false, 'fieldConfig' => ['template' => "{label}{input}"]]);
?>
<?php
echo $form->field(new File(), 'file')->fileInput(['name' => $directPopulating ? 'file' : null]);
?>
<?php
echo Html::submitButton('Загрузить', ['class' => '']);
?>
<?php
/* roman444uk\jqueryUpoadFilePlugin\JQueryUpoadFilePlugin::widget([
'id' => 'file-upload-form',
'renderContainer' => false,
'clientOptions' => [
'url' => Url::to('/file/upload'),
'fileName' => Html::getInputName(new File, 'file'),
]
]); */
?>
<?php