本文整理汇总了PHP中TbHtml::activeTextField方法的典型用法代码示例。如果您正苦于以下问题:PHP TbHtml::activeTextField方法的具体用法?PHP TbHtml::activeTextField怎么用?PHP TbHtml::activeTextField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TbHtml
的用法示例。
在下文中一共展示了TbHtml::activeTextField方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderFilterCellContent
/**
* Renders the filter cell content. Here we can provide HTML options for actual filter input
*/
protected function renderFilterCellContent()
{
if (is_string($this->filter)) {
echo $this->filter;
} else {
if ($this->filter !== false && $this->grid->filter !== null && $this->name !== null && strpos($this->name, '.') === false) {
if ($this->filterInputOptions) {
$filterInputOptions = $this->filterInputOptions;
if (empty($filterInputOptions['id'])) {
$filterInputOptions['id'] = false;
}
} else {
$filterInputOptions = array();
}
if (is_array($this->filter)) {
$filterInputOptions['prompt'] = '';
echo TbHtml::activeDropDownList($this->grid->filter, $this->name, $this->filter, $filterInputOptions);
} else {
if ($this->filter === null) {
echo TbHtml::activeTextField($this->grid->filter, $this->name, $filterInputOptions);
}
}
} else {
parent::renderFilterCellContent();
}
}
}
示例2: run
/**
* Runs the widget.
*/
public function run()
{
list($name, $id) = $this->resolveNameID();
$id = $this->resolveId($id);
if ($this->hasModel()) {
echo TbHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions);
} else {
echo TbHtml::textField($name, $this->value, $this->htmlOptions);
}
if ($this->assetPath !== false) {
$this->publishAssets($this->assetPath);
$this->registerCssFile('/css/bootstrap-datetimepicker.css');
if ($this->registerJs) {
$this->registerScriptFile('/js/' . $this->resolveScriptVersion('bootstrap-datetimepicker.js'), CClientScript::POS_END);
if (isset($this->locale)) {
$this->locale = str_replace('_', '-', $this->locale);
$this->registerScriptFile("/js/locales/bootstrap-datetimepicker.{$this->locale}.js", CClientScript::POS_END);
}
}
}
if ($this->bindPlugin) {
$options = !empty($this->pluginOptions) ? CJavaScript::encode($this->pluginOptions) : '';
$this->getClientScript()->registerScript(__CLASS__ . '#' . $id, "jQuery('#{$id}').datetimepicker({$options});");
}
}
示例3: renderField
/**
* Renders field
*/
public function renderField()
{
list($name, $id) = $this->resolveNameID();
TbArray::defaultValue('id', $id, $this->htmlOptions);
TbArray::defaultValue('name', $name, $this->htmlOptions);
if ($this->hasModel()) {
echo TbHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions);
} else {
echo TbHtml::textField($name, $this->value, $this->htmlOptions);
}
}
示例4: renderField
/**
* Renders the field if no selector has been provided
*/
public function renderField()
{
if (null === $this->selector) {
list($name, $id) = $this->resolveNameID();
if ($this->hasModel()) {
echo TbHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions);
} else {
echo TbHtml::textField($name, $this->value, $this->htmlOptions);
}
$this->setLocaleSettings();
}
}
示例5: renderField
/**
* Renders the field if no selector has been provided
*/
public function renderField()
{
if (null === $this->selector) {
$options = array();
list($name, $id) = $this->resolveNameID();
$options['id'] = $id . '_datetimepicker';
TbHtml::addCssClass('input-group date form_datetime', $options);
echo TbHtml::openTag('div', $options);
if ($this->hasModel()) {
echo TbHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions);
} else {
echo TbHtml::textField($name, $this->value, $this->htmlOptions);
}
echo TbHtml::openTag('span', array('class' => 'input-group-addon'));
echo '<i class="glyphicon glyphicon-th"' . '></i>';
echo TbHtml::closeTag('span');
echo TbHtml::closeTag('div');
}
}
示例6: renderField
/**
* Renders the field if no selector has been provided
*/
public function renderField()
{
if (null === $this->selector) {
$options = array();
list($name, $id) = $this->resolveNameID();
$options['id'] = $id . '_datetimepicker';
TbHtml::addCssClass('input-append', $options);
echo TbHtml::openTag('div', $options);
if ($this->hasModel()) {
echo TbHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions);
} else {
echo TbHtml::textField($name, $this->value, $this->htmlOptions);
}
echo TbHtml::openTag('span', array('class' => 'add-on'));
echo '<i data-time-icon="' . $this->iconTime . '" data-date-icon="' . $this->iconDate . '"></i>';
echo TbHtml::closeTag('span');
echo TbHtml::closeTag('div');
}
}
示例7: array
echo TbHtml::activeLabelEx($model, 'title', array('class' => 'control-label'));
?>
<div class="controls">
<?php
echo TbHtml::activeTextField($model, 'title', array());
?>
</div>
</div>
<div class="control-group">
<?php
echo TbHtml::activeLabelEx($model, 'link', array('class' => 'control-label'));
?>
<div class="controls">
<?php
echo TbHtml::activeTextField($model, 'link', array());
?>
</div>
</div>
<div class="control-group">
<?php
echo TbHtml::activeLabelEx($model, Yii::t('main', 'Portfolio'), array('for' => 'Posting_portfolio', 'class' => 'control-label'));
?>
<div class="controls">
<?php
$this->widget('application.modules.portfolio.widgets.PhotoPortfolio.PhotoPortfolioWidget', array('portfolio' => $portfolio, 'portfolioType' => 1, 'uploadAction' => Yii::app()->createUrl('portfolio/default/uploadMagazine'), 'photoCountMax' => 1, 'allowedExtensions' => array('jpg', 'png', 'swf', 'jpeg'), 'checkBoxClass' => 'hide', 'radiobuttonClass' => 'hide'));
?>
</div>
</div>
</fieldset>
示例8: array
<div class="form">
<?php
echo TbHtml::beginForm($request_url, 'post', array('enctype' => 'multipart/form-data'));
?>
<div class="form-group has-success clearfix">
<div class="wr col-sm-6">
<?php
echo TbHtml::activeTextField($model, 'reader_name', array('placeholder' => 'ФИО читателя', 'required' => 'true', 'autofocus' => 'true', 'class' => 'form-control', 'value' => isset($name) ? $name : ''));
?>
</div>
</div>
<div>
<?php
echo TbHtml::submitButton('Сохранить', array('color' => TbHtml::BUTTON_COLOR_PRIMARY));
?>
</div>
<?php
echo TbHtml::endForm();
?>
</div>
示例9: array
<?php
echo TbHtml::activeLabelEx($model, Yii::t('main', 'Portfolio'), array('for' => 'Posting_portfolio', 'class' => 'control-label'));
?>
<div class="controls">
<?php
$this->widget('application.modules.portfolio.widgets.PhotoPortfolio.PhotoPortfolioWidget', array('portfolio' => $portfolio, 'uploadAction' => Yii::app()->createUrl('portfolio/default/uploadfile'), 'photoCountMax' => 2, 'allowedExtensions' => array('gif', 'jpg', 'jpeg', 'png')));
?>
</div>
</div>
<div class="control-group">
<?php
echo TbHtml::activeLabelEx($model, 'order_nr', array('class' => 'control-label'));
?>
<div class="controls">
<?php
echo TbHtml::activeTextField($model, 'order_nr', array());
?>
</div>
</div>
</fieldset>
<div class="buttons">
<?php
echo TbHtml::submitButton($model->isNewRecord ? Yii::t('main', 'Create') : Yii::t('main', 'Save'), array('class' => 'fl-r'));
?>
</div>
<?php
$this->endWidget();
示例10: array
echo TbHtml::beginForm($request_url, 'post', array('enctype' => 'multipart/form-data'));
?>
<div class="form-group has-success clearfix">
<div class="wr col-sm-6">
<?php
echo TbHtml::dropDownList('reader_list', 'id', $reader_list, array('empty' => 'Выберите Пользователя', 'required' => 'true', 'options' => array(isset($reader_id_checked) ? $reader_id_checked : '' => array('selected' => true))));
?>
</div>
<div class="wr col-sm-6">
<?php
echo TbHtml::dropDownList('books_list', 'id', $books_list, array('empty' => 'Выберите Книгу', 'required' => 'true', 'options' => array(isset($book_id_checked) ? $book_id_checked : '' => array('selected' => true))));
?>
</div>
<div class="wr col-sm-6">
<?php
echo TbHtml::activeTextField($model, 'count_books', array('placeholder' => 'Количество', 'required' => true, 'pattern' => '[0-9]{1,2}', 'value' => isset($count) ? $count : ''));
?>
</div>
</div>
<div>
<?php
echo TbHtml::submitButton('Выдать', array('color' => TbHtml::BUTTON_COLOR_PRIMARY));
?>
</div>
<?php
echo TbHtml::endForm();
?>
</div>
示例11: array
<?php
echo CHtml::activeDropDownList($news, 'user_id', CHtml::listData(User::model()->findAll(), 'user_id', 'email'), array('size' => 1));
?>
<?php
//echo TbHtml::dropDownList($modelClass.'[user_id]', $news->user_id, CHtml::listData(User::model()->findAll(), 'user_id', 'email'), array('size'=>1));
?>
</div>
</div>
<div class="control-group">
<?php
echo TbHtml::activeLabelEx($post, 'title', array('class' => 'control-label'));
?>
<div class="controls">
<?php
echo TbHtml::activeTextField($post, 'title', array());
?>
</div>
</div>
<?php
echo $form->textFieldControlGroup($post, 'description', array('span' => 8));
?>
<div class="control-group">
<?php
echo TbHtml::activeLabelEx($news, 'anounce', array('class' => 'control-label'));
?>
<div class="controls">
<?php
$this->widget('application.widgets.imperaviRedactor.ImperaviRedactorWidget', array('model' => $news, 'attribute' => 'anounce', 'id' => $modelClass . '_anounce', 'name' => $modelClass . '[anounce]', 'options' => array('lang' => Yii::app()->language, 'direction' => 'ltr', 'minHeight' => 100, 'toolbar' => true, 'iframe' => false)));
示例12: array
<div class="form">
<?php
echo TbHtml::beginForm();
?>
<?php
echo TbHtml::errorSummary($form);
?>
<div class="row-fluid">
<?php
echo TbHtml::activeLabel($form, 'login_or_email');
?>
<?php
echo TbHtml::activeTextField($form, 'login_or_email');
?>
<p class="hint"><?php
echo UserModule::t("Please enter your login or email addres.");
?>
</p>
</div>
<div class="row-fluid submit">
<?php
echo TbHtml::button(UserModule::t('Restore'), array('color' => TbHtml::BUTTON_COLOR_PRIMARY, 'submit' => ''));
?>
</div>
<?php
echo TbHtml::endForm();
示例13: array
<div class="control-group">
<?php
echo Yii::t('main', 'Fields with <span class="required">*</span> are required.');
?>
</div>
<?php
echo $form->errorSummary(array($model));
?>
<div class="control-group">
<?php
echo TbHtml::activeLabelEx($model, 'title', array('class' => 'control-label'));
?>
<div class="controls">
<?php
echo TbHtml::activeTextField($model, 'title', array('style' => 'width:600px;'));
?>
</div>
</div>
<div class="buttons">
<?php
echo TbHtml::submitButton($model->isNewRecord ? Yii::t('main', 'Create') : Yii::t('main', 'Save'), array('class' => 'fl-r'));
?>
</div>
<?php
$this->endWidget();
?>
示例14: array
for ($i = 1; $i <= 12; $i++) {
$arrMonth[$i] = Magazine::getMonthName($i);
}
?>
<?php
echo $form->errorSummary(array($model, $portfolio), null, null, array('class' => 'alert-error'));
?>
<div class="control-group">
<?php
echo TbHtml::activeLabelEx($model, 'title', array('class' => 'control-label'));
?>
<div class="controls">
<?php
echo TbHtml::activeTextField($model, 'title', array());
?>
</div>
</div>
<?php
//echo $form->dropDownListControlGroup($model, 'publication_year', $arrYear);
?>
<?php
//echo $form->dropDownListControlGroup($model, 'publication_month', $arrMonth);
?>
<div class="control-group">
<?php
示例15: array
<div class="form">
<?php
echo TbHtml::beginForm($request_url, 'post', array('enctype' => 'multipart/form-data'));
?>
<div class="form-group has-success clearfix">
<div class="wr col-sm-6">
<?php
echo TbHtml::activeTextField($model, 'name', array('placeholder' => 'Наименование Книги', 'required' => 'true', 'autofocus' => 'true', 'class' => 'form-control', 'value' => isset($result) ? $result->name : ''));
?>
</div>
<div class="wr col-sm-6">
<?php
echo TbHtml::activeTextField($model, 'count_books', array('placeholder' => 'Количество', 'required' => 'true', 'autofocus' => 'true', 'class' => 'form-control', 'pattern' => '[0-9]{1,2}', 'value' => isset($result) ? $result->count_books : ''));
?>
</div>
<div class="wr col-sm-6">
<?php
echo TbHtml::dropDownList('author_list', 'id', $author_list, array('multiple' => true, 'required' => 'true'));
?>
</div>
</div>
<div>
<?php
echo TbHtml::submitButton('Сохранить', array('color' => TbHtml::BUTTON_COLOR_PRIMARY));
?>
</div>
<?php
echo TbHtml::endForm();