php yii-jui-DatePicker类(方法)实例源码

下面列出了php yii-jui-DatePicker 类(方法)源码代码实例,从而了解它的用法。

作者:frostiks2    项目:rzwebsys   
/**
  * Формирование Html кода поля для вывода в форме
  * @param ActiveForm $form объект форма
  * @param array $options массив html атрибутов поля
  * @param bool|int $index инднкс модели при табличном вводе
  * @return string
  */
 public function renderInput(ActiveForm $form, array $options = [], $index = false)
 {
     $options = ArrayHelper::merge($this->options, $options);
     $widgetOptions = ArrayHelper::merge(["options" => ["class" => "form-control"]], $this->widgetOptions, ["options" => $options]);
     $fieldOptions = ["options" => ["class" => "form-group col-xs-6"]];
     $html = Html::beginTag('div', ['class' => 'row']);
     $html .= $form->field($this->modelField->model, $this->fromAttr, $fieldOptions)->widget(DatePicker::className(), $widgetOptions);
     $html .= $form->field($this->modelField->model, $this->toAttr, $fieldOptions)->widget(DatePicker::className(), $widgetOptions);
     $html .= Html::endTag('div');
     return $html;
 }

作者:reenka    项目:yii2brai   
/**
  * Renders the DatePicker widget.
  * @return string the rendering result.
  */
 protected function renderWidget()
 {
     if ($this->hasModel()) {
         $this->model->{$this->attribute} = $this->model->{$this->attribute} ? Yii::$app->formatter->asDate($this->model->{$this->attribute}, 'medium') : null;
     }
     return parent::renderWidget();
 }

作者:roman444u    项目:yii   
/**
  * Renders a datepicker text input.
  * @see \yii\widgets\ActiveField::textInput()
  * @return static the field object itself
  */
 public function datepicker($options = [])
 {
     $datepickerOptions = isset($options['datepicker']) ? $options['datepicker'] : [];
     unset($options['datepicker']);
     $datepickerOptions['model'] = $this->model;
     $datepickerOptions['attribute'] = $this->attribute;
     $datepickerOptions['options'] = array_merge($this->inputOptions, $options);
     $this->adjustLabelFor($datepickerOptions['options']);
     $this->parts['{input}'] = DatePicker::widget($datepickerOptions);
     return $this;
 }

作者:pipekun    项目:yii2-widget   
public function run()
 {
     if (!empty($this->between)) {
         \yii\jui\DatePicker::widget(['model' => $this->model, 'attribute' => $this->between[0]]);
         echo $this->form->field($this->model, $this->between[0], ['addon' => ['prepend' => ['content' => '<i class="glyphicon glyphicon-calendar"></i>'], 'groupOptions' => ['class' => 'col-sm-4']]])->textInput(['readonly' => 'readonly', 'placeholder' => "คลิกเลือก {$this->label[0]}"]);
         \yii\jui\DatePicker::widget(['model' => $this->model, 'attribute' => $this->between[1]]);
         echo $this->form->field($this->model, $this->between[1], ['addon' => ['prepend' => ['content' => '<i class="glyphicon glyphicon-calendar"></i>'], 'groupOptions' => ['class' => 'col-sm-4']]])->textInput(['readonly' => 'readonly', 'placeholder' => "คลิกเลือก {$this->label[1]}"]);
     } else {
         \yii\jui\DatePicker::widget(['model' => $this->model, 'attribute' => $this->attr]);
         echo $this->form->field($this->model, $this->attr, ['addon' => ['prepend' => ['content' => '<i class="glyphicon glyphicon-calendar"></i>'], 'groupOptions' => ['class' => 'col-sm-4']]])->textInput(['readonly' => 'readonly', 'placeholder' => "คลิกเลือก {$this->label[0]}"]);
     }
     $this->js();
 }

作者:marsolty    项目:yii2use   
/**
  * @param $model - profile model
  * @param $field - profile fields model item
  * @param $htmlOptions - htmlOptions
  * @return string
  */
 public function editAttribute($model, $field, $htmlOptions = [])
 {
     if (!isset($htmlOptions['size'])) {
         $htmlOptions['size'] = 60;
     }
     if (!isset($htmlOptions['maxlength'])) {
         $htmlOptions['maxlength'] = $field->field_size ? $field->field_size : 10;
     }
     if (!isset($htmlOptions['id'])) {
         $htmlOptions['id'] = get_class($model) . '_' . $field->varname;
     }
     // $this->params['dateFormat'] = 'yy-mm-dd';
     $this->params['options']['class'] = 'form-control';
     /** @var $afield ActiveForm*/
     $field = $htmlOptions['formField'];
     unset($htmlOptions['formField']);
     return $field->widget(DatePicker::className(), $this->params);
 }

作者:yeesof    项目:yii2-yee-cor   
/**
  * Renders the filter cell content.
  * The default implementation simply renders a space.
  * This method may be overridden to customize the rendering of the filter cell (if any).
  * @return string the rendering result
  */
 protected function renderFilterCellContent()
 {
     if (is_string($this->filter)) {
         return $this->filter;
     }
     $model = $this->grid->filterModel;
     if ($this->filter !== false && $this->attribute !== null && $model->isAttributeActive($this->attribute)) {
         if ($model->hasErrors($this->attribute)) {
             Html::addCssClass($this->filterOptions, 'has-error');
             $error = ' ' . Html::error($model, $this->attribute, $this->grid->filterErrorOptions);
         } else {
             $error = '';
         }
         $filterOptions = ['=' => '=', '>' => '>', '<' => '<'];
         Html::addCssClass($this->filterInputOptions, 'date-filter-input');
         $dropDown = Html::activeDropDownList($model, $this->attribute . '_operand', $filterOptions, ['class' => 'form-control pull-left', 'style' => 'width: 32px; appearance: none; -moz-appearance: none; -webkit-appearance: none;']);
         $field = DatePicker::widget(['model' => $model, 'attribute' => $this->attribute, 'options' => $this->filterInputOptions, 'dateFormat' => 'yyyy-MM-dd']);
         return $dropDown . $field . $error;
     } else {
         return parent::renderFilterCellContent();
     }
 }

作者:EduSe    项目:EduSe   
<div class="col-xs-12 col-sm-4 col-lg-4">
			<?php 
echo $form->field($model, 'fees_pay_tran_bank_id')->dropDownList(ArrayHelper::map(app\modules\fees\models\BankMaster::find()->where(['is_status' => 0])->all(), 'bank_master_id', 'bank_master_name'), ['prompt' => 'Select Bank']);
?>
		</div>
		<div class="col-xs-12 col-sm-4 col-lg-4">
			<?php 
echo $form->field($model, 'fees_pay_tran_bank_branch')->textInput(['placeholder' => $model->getAttributeLabel('fees_pay_tran_bank_branch')]);
?>
		</div>
	</div>

	<div class="col-xs-12 col-sm-12 col-lg-12 no-padding cheque-data">
		<div class="col-xs-12 col-sm-4 col-lg-4">
			<?php 
echo $form->field($model, 'fees_pay_tran_cheque_date')->widget(yii\jui\DatePicker::className(), ['model' => $model, 'attribute' => 'fees_pay_tran_cheque_date', 'clientOptions' => ['dateFormat' => 'dd-mm-yyyy', 'changeMonth' => true, 'yearRange' => date('Y') - 5 . ':' . (date('Y') + 5), 'changeYear' => true, 'readOnly' => true, 'autoSize' => true, 'buttonImage' => Yii::$app->homeUrl . "images/calendar.png"], 'options' => ['class' => 'form-control', 'placeholder' => $model->getAttributeLabel('fees_pay_tran_cheque_date')]]);
?>
		</div>
		<div class="col-xs-12 col-sm-4 col-lg-4"></div>
		<div class="col-xs-12 col-sm-4 col-lg-4"></div>
	</div>
	<!--End cheque related field-->

</div><!---End box-body div---->
<div class="box-footer">
	<div class="<?php 
echo Yii::$app->language == 'ar' ? 'pull-left' : 'pull-right';
?>
" style="padding-bottom:10px">
	<?php 
if ($collectOn) {

作者:akula2    项目:fif   
<div class="post-index">
    <p>
        <?php 
echo Html::a('Создать запись', ['create'], ['class' => 'btn btn-success']);
?>
    </p>
    
    <?php 
Pjax::begin();
?>
    <?php 
echo himiklab\sortablegrid\SortableGridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'id' => 'post_tbl', 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['class' => CheckboxColumn::classname()], ['attribute' => 'title', 'format' => 'html', 'value' => function ($model) {
    return Html::a($model['title'], ['update', 'id' => $model['id']]);
}], ['attribute' => 'cat_id', 'content' => function ($data) {
    return $data->getCategoryName();
}, 'filter' => \yii\helpers\Arrayhelper::map(\app\modules\category\models\Category::find()->all(), 'id', 'title')], ['attribute' => 'created_at', 'format' => ['date', 'dd.MM.yyyy'], 'options' => array('width' => '225px'), 'filter' => \yii\jui\DatePicker::widget(['dateFormat' => 'dd.MM.yyyy', 'model' => $searchModel, 'attribute' => 'created_at', 'options' => ['class' => 'form-control'], 'clientOptions' => ['dateFormat' => 'dd.mm.yy']])], ['attribute' => 'status', 'format' => 'html', 'value' => function ($model) {
    $class = $model->status === 1 ? '<i class="icon-ok"></i>' : '<i class="icon-lock">';
    return $class;
}, 'options' => array('width' => '100px'), 'filter' => Html::activeDropDownList($searchModel, 'status', array(1 => 'On', 0 => 'Off'), ['class' => 'form-control', 'prompt' => 'Все'])], ['attribute' => 'main', 'format' => 'html', 'value' => function ($model) {
    $res = $model->main === 1 ? '<i class="icon-ok"></i>' : '<i class="icon-minus">';
    return $res;
}, 'options' => array('width' => '100px'), 'filter' => Html::activeDropDownList($searchModel, 'main', array(1 => 'Да', 0 => 'Нет'), ['class' => 'form-control', 'prompt' => 'Все'])], 'username', ['class' => 'yii\\grid\\ActionColumn', 'header' => 'Действия', 'headerOptions' => ['width' => '100']]]]);
?>

<p> 
  <?php 
echo Html::a('Удалить выбранные', ['massdelete'], ['class' => 'btn btn-danger', 'data' => ['confirm' => 'Вы уверены?', 'data-method' => 'post']]);
?>
  
</p>

作者:mrhat2    项目:site-for-p   
$form = ActiveForm::begin();
?>
    
    <?php 
foreach ($modelGS as $key => $gs) {
    ?>
        <div class="panel panel-primary">
            <div class="panel-heading">     
        <?php 
    echo 'Семестр : ' . $gs->semester_number;
    ?>
            </div>
            <div class="panel-body">
    <?php 
    echo $form->field($gs, "[{$key}]begin_date")->widget(DatePicker::className(), ['options' => ['class' => 'form-control'], 'dateFormat' => 'dd-MM-yyyy', 'language' => 'ru']);
    echo $form->field($gs, "[{$key}]end_date")->widget(DatePicker::className(), ['options' => ['class' => 'form-control'], 'dateFormat' => 'dd-MM-yyyy', 'language' => 'ru']);
    ?>
            </div>
        </div>
    <?php 
}
?>
    
    
    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php

作者:Viraddic    项目:testProjec   
echo $form->field($model, 'author_id')->dropDownList(ArrayHelper::map(Authors::find()->all(), 'id', 'Name'), ['prompt' => '---']);
?>
		</div>
		<div class="col-md-4">
			<?php 
echo $form->field($model, 'name');
?>
		</div>
    </div>
    <div class="row">
        <div class="col-md-6">
			Дата выхода от: <?php 
echo DatePicker::widget(['model' => $model, 'attribute' => 'date_ot', 'language' => 'ru', 'dateFormat' => 'yyyy-MM-dd']);
?>
			до <?php 
echo DatePicker::widget(['model' => $model, 'attribute' => 'date_do', 'language' => 'ru', 'dateFormat' => 'yyyy-MM-dd']);
?>
			
		</div>

	</div>
	<div class="row">	
		<div class="col-md-4">
			<?php 
echo Html::submitButton('Поиск', ['class' => 'btn btn-primary']);
?>
		</div>
	</div>
    <?php 
ActiveForm::end();
?>

作者:JohnRiver    项目:seed-testin   
?>

    <?php 
echo $form->field($model, 'chistota')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'masa_1000')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'klass')->textInput();
?>

    <?php 
echo $form->field($model, 'date_doc')->widget(DatePicker::classname(), ['value' => $model->date_doc ? $model->date_doc : (new DateTime())->format('Y-m-d'), 'dateFormat' => 'php:Y-m-d', 'options' => ['class' => 'form-control']]);
?>

    <?php 
echo $form->field($model, 'id_type')->dropDownList(ArrayHelper::map(TestType::find()->orderBy(['order' => SORT_ASC])->all(), 'id', 'type'))->label(Yii::t('test-type', 'Type'));
?>

    <?php 
echo $form->field($model, 'N_prev')->textInput();
?>

    <?php 
echo $form->field($model, 'v_rahunok')->textInput();
?>

    <div class="form-group">

作者:picprofi    项目:yii   
use yii\helpers\Html;
use yii\grid\GridView;
use yii\jui;
/* @var $this yii\web\View */
/* @var $searchModel app\models\search\UserSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('app', 'Users');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="user-index">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

    <p>
        <?php 
echo Html::a(Yii::t('app', 'Create User'), ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', 'username', 'name', 'surname', ['attribute' => 'create_date', 'value' => 'create_date', 'filter' => \yii\jui\DatePicker::widget(['language' => 'ru', 'dateFormat' => 'dd-MM-yyyy']), 'format' => 'html'], ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>

作者:jibend    项目:shinda   
<!-- Modal -->
<div class="modal fade" id="appointModal" tabindex="-1" role="dialog" aria-labelledby="consentModal">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">Change appointment date</h4>
      </div>
      <div class="modal-body">
          <?php 
$model = new Participant();
?>
          
          <?php 
$form = ActiveForm::begin();
?>
          <?php 
echo $form->field($model, 'appoint_date')->widget(DatePicker::className(), ['dateFormat' => 'yyyy-MM-dd', 'options' => ['class' => 'form-control'], 'clientOptions' => ['changeMonth' => true, 'changeYear' => true, 'minDate' => 'today']]);
?>

      </div>
      <div class="modal-footer">
          <input type="hidden" value="" id="idparticipant2" />
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary" onClick="updateAppoint()">Submit</button>
      </div>
    </div>
  </div>
</div>

作者:tilho    项目:phonebook-yii   
<div class="subscriber-form">

    <?php 
$form = ActiveForm::begin(['id' => 'dynamic-form']);
?>

    <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'birth_date')->textInput();
?>

   <!-- <?php 
echo DatePicker::widget(['model' => $model, 'attribute' => 'birth_date', 'dateFormat' => 'yyyy-MM-dd']);
?>
 -->

    <?php 
echo $form->field($model, 'notes')->textarea(['rows' => 6]);
?>

<div class="row">
	<div class="panel panel-default">
        <div class="panel-heading"><h4><i class="glyphicon glyphicon-envelope"></i> Phones</h4></div>
        <div class="panel-body">
             <?php 
DynamicFormWidget::begin(['widgetContainer' => 'dynamicform_wrapper', 'widgetBody' => '.container-items', 'widgetItem' => '.item', 'limit' => 5, 'min' => 1, 'insertButton' => '.add-item', 'deleteButton' => '.remove-item', 'model' => $modelsPhone[0], 'formId' => 'dynamic-form', 'formFields' => ['number']]);
?>

作者:inamjun    项目:testupgithu   
echo $form->field($model, 'ampur')->widget(DepDrop::className(), ['data' => $amp, 'options' => ['placeholder' => '<--คลิกเลือกอำเภอ-->'], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['employees-chw'], 'url' => yii\helpers\Url::to(['/employees/get-amp']), 'loadingText' => 'กำลังค้นข้อมูล...']]);
?>
        </div>     
        <div class="col-xs-3 col-sm-3 col-md-3">
            <?php 
echo $form->field($model, 'tumbon')->widget(DepDrop::className(), ['data' => $tum, 'options' => ['placeholder' => '<--คลิกเลือกตำบล-->'], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['employees-chw', 'employees-ampur'], 'url' => yii\helpers\Url::to(['/employees/get-dist']), 'loadingText' => 'กำลังค้นข้อมูล...']]);
?>
        </div>
        <div class="col-xs-3 col-sm-3 col-md-3">
            <?php 
echo $form->field($model, 'tel')->widget(\yii\widgets\MaskedInput::classname(), ['mask' => '999-999-9999']);
?>
        </div>
        <div class="col-xs-3 col-sm-3 col-md-3">            
            <?php 
echo $form->field($model, 'comein')->widget(DatePicker::className(), ['language' => 'th', 'dateFormat' => 'yyyy-MM-dd', 'clientOptions' => ['changeMonth' => true, 'changeYear' => true], 'options' => ['class' => 'form-control']]);
?>
        </div>
        <div class="col-xs-3 col-sm-3 col-md-3">            
            <?php 
echo $form->field($model, 'department_id')->widget(Select2::classname(), ['data' => ArrayHelper::map(Departments::find()->all(), 'id', 'name'), 'language' => 'th', 'options' => ['placeholder' => 'เลือกแผนก ...'], 'pluginOptions' => ['allowClear' => true]]);
?>
        </div>
        <div class="col-xs-3 col-sm-3 col-md-3">
             <?php 
echo $form->field($model, 'education')->dropDownList(['ปริณญาตรี' => 'ปริณญาตรี', 'ปริณญาโท' => 'ปริณญาโท', 'สูงกว่าระดับปริณญาโทขึ้นไป' => 'สูงกว่าระดับปริณญาโทขึ้นไป', 'ปวส/อนุปริณญา' => 'ปวส/อนุปริณญา', 'มัธยมศึกษา6' => 'มัธยมศึกษา6', 'มัธยมศึกษา3' => 'มัธยมศึกษา3', 'ประถมศึกษา' => 'ประถมศึกษา'], ['prompt' => '']);
?>
        </div>
    </div>
    <div class="row">
        <div class="col-xs-6 col-sm-6col-md-6">

作者:bfyang513    项目:tuanlog   
<label for="sqllogsearch-sqltext">IP:</label>
                                                            <?php 
echo Html::activeTextInput($accLogErr, 'Ip1', ['class' => 'form-control', 'style' => 'width:200px']);
?>
                                                            <label for="sqllogsearch-sqltext">站点:</label>
                                                            <?php 
echo Html::activeTextInput($accLogErr, 'visitwebsite', ['class' => 'form-control', 'style' => 'width:200px']);
?>
                                                            <label for="sqllogsearch-sqltext">耗时:</label>
                                                            <?php 
echo Html::activeTextInput($accLogErr, 'request_time', ['class' => 'form-control', 'style' => 'width:200px']);
?>
                                                            
                                                            <label for="exampleInputEmail2">访问日期:</label>
                                                            <?php 
echo \yii\jui\DatePicker::widget(['options' => ['class' => 'form-control datepicker', 'readonly' => true], 'model' => $accLogErr, 'language' => 'zh-CN', 'attribute' => 'date_reg', 'value' => date('Y-m-d'), 'dateFormat' => 'php:Y-m-d', 'clientOptions' => ['autoclose' => true]]);
?>
                                                            <button type="submit" class="btn btn-default btn-primary btn-sm">查询</button>
                                                        </div>
                                                    </div>
                                                </div>
                                                <?php 
ActiveForm::end();
?>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                                <div class="summary">第<b><?php 
echo $begin . '-' . $end;
?>

作者:4fns    项目:book   
</div>
    <div style="width: 30%; float: left">
        <?php 
echo $form->field($searchModel, 'name')->label(false)->textInput(['placeholder' => 'Название книги']);
?>
    </div>
    <div style="clear: both"></div>
    <div>
        <div style="width: 30%; float: left">
            <?php 
echo $form->field($searchModel, 'dateFrom')->widget(DatePicker::classname(), ['language' => 'ru'])->label(false)->textInput(['placeholder' => 'Дата выхода c']);
?>
        </div>
        <div style="width: 30%; float: left">
            <?php 
echo $form->field($searchModel, 'dateTo')->widget(DatePicker::classname(), ['language' => 'ru'])->label(false)->textInput(['placeholder' => 'Дата выхода по']);
?>
        </div>
        <div style="clear: both"></div>
    </div>
</div>
<?php 
echo Button::widget(['label' => 'search', 'options' => ['class' => 'btn-lg btn-primary']]);
ActiveForm::end();
?>


<?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => ['id', 'name', ['attribute' => 'preview', 'format' => 'html', 'value' => function ($data) {
    return Html::img(Yii::getAlias('@web') . '/images/' . $data['preview'], ['width' => '30px', 'class' => 'scalable']);
}], 'fullName', 'date:date', 'date_create:date', 'actions' => ['format' => 'raw', 'value' => function ($data) {

作者:Sheriye    项目:G5-CR   
?>
</h1>

    <p>
        <?php 
echo Html::a('Создать Проект', ['create'], ['class' => 'btn btn-success']);
?>
    </p>
    <div class="row">
        <div class="col-xs-3">
            <div class="alert alert-warning" role="alert">В обработке</div>
        </div>
        <div class="col-xs-3">
            <div class="alert alert-success">Одобрена/завершена</div>
        </div>
    </div>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'summary' => '', 'rowOptions' => function ($model, $index, $widget, $grid) {
    return ['style' => 'background-color:' . $model->getColor() . ';'];
}, 'columns' => [['attribute' => 'id', 'value' => 'id', 'contentOptions' => ['style' => 'width: 50px;']], 'name', ['attribute' => 'status', 'format' => 'raw', 'value' => function ($data) {
    return $data->getStatus();
}, 'filter' => R::PROJECT_STATUSES()], ['attribute' => 'deadline', 'value' => 'deadline', 'filter' => \yii\jui\DatePicker::widget(['model' => $searchModel, 'attribute' => 'deadline', 'language' => 'ru', 'dateFormat' => 'yyyy-MM-dd', 'options' => ['class' => 'form-control']]), 'format' => 'html'], ['attribute' => 'stages', 'format' => 'raw', 'value' => function ($data) {
    return $data->getStagesName();
}], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{view} {update} {done}', 'buttons' => ['done' => function ($url, $model, $key) {
    $options = ['data-confirm' => Yii::t('yii', 'Вы действительно желаете завершить проект?'), 'data-method' => 'post', 'data-pjax' => '0'];
    return Html::a('<span class="glyphicon glyphicon-ok"></span>', $url, $options);
}]]]]);
?>

</div>

作者:cmbi    项目:cmbi   
?>

<?php 
echo $this->render('_menu');
?>

<?php 
Pjax::begin();
?>

<?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'layout' => "{items}\n{pager}", 'columns' => ['username', 'email:email', ['attribute' => 'registration_ip', 'value' => function ($model) {
    return $model->registration_ip == null ? '<span class="not-set">' . Yii::t('user', '(not set)') . '</span>' : $model->registration_ip;
}, 'format' => 'html'], ['attribute' => 'created_at', 'value' => function ($model) {
    return Yii::t('user', '{0, date, MMMM dd, YYYY HH:mm}', [$model->created_at]);
}, 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'created_at', 'dateFormat' => 'php:Y-m-d', 'options' => ['class' => 'form-control']])], ['header' => Yii::t('user', 'Confirmation'), 'value' => function ($model) {
    if ($model->isConfirmed) {
        return '<div class="text-center"><span class="text-success">' . Yii::t('user', 'Confirmed') . '</span></div>';
    } else {
        return Html::a(Yii::t('user', 'Confirm'), ['confirm', 'id' => $model->id], ['class' => 'btn btn-xs btn-success btn-block', 'data-method' => 'post', 'data-confirm' => Yii::t('user', 'Are you sure you want to confirm this user?')]);
    }
}, 'format' => 'raw', 'visible' => Yii::$app->getModule('user')->enableConfirmation], ['header' => Yii::t('user', 'Block status'), 'value' => function ($model) {
    if ($model->isBlocked) {
        return Html::a(Yii::t('user', 'Unblock'), ['block', 'id' => $model->id], ['class' => 'btn btn-xs btn-success btn-block', 'data-method' => 'post', 'data-confirm' => Yii::t('user', 'Are you sure you want to unblock this user?')]);
    } else {
        return Html::a(Yii::t('user', 'Block'), ['block', 'id' => $model->id], ['class' => 'btn btn-xs btn-danger btn-block', 'data-method' => 'post', 'data-confirm' => Yii::t('user', 'Are you sure you want to block this user?')]);
    }
}, 'format' => 'raw'], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update} {delete}']]]);
?>

<?php

作者:kaihatsush    项目:kpimo   
?>

<?php 
if ($model) {
    ?>
<div class="row"><div class="col-md-12"><div class="box box-widget widget-detail">
	<div class="widget-detail-header bg-maroon"><h3 class="widget-detail-title"><?php 
    echo Yii::t('fin.form', 'Input Values');
    ?>
</h3></div>
	<div class="box-footer" id="finPaymentConfirmForm">
		<?php 
    $form = ActiveForm::begin(['requiredCssClass' => 'form-group-required']);
    ?>
			<?php 
    echo $form->field($model, 'entry_date')->widget(DatePicker::className(), ['inline' => false, 'dateFormat' => 'php:' . $phpFmShortDate, 'options' => ['class' => 'form-control']]);
    ?>
			<?php 
    echo $form->field($model, 'account_source')->dropDownList($arrFinAccount, ['prompt' => '']);
    ?>
			<?php 
    echo $form->field($model, 'account_target')->dropDownList($arrFinAccount, ['prompt' => '']);
    ?>
			<?php 
    echo $form->field($model, 'entry_value')->textInput(['type' => 'number', 'readonly' => 'readonly']);
    ?>
			<?php 
    echo $form->field($model, 'entry_adjust')->textInput(['type' => 'number']);
    ?>
			<?php 
    echo $form->field($model, 'arr_entry_log')->inline(true)->checkboxList($arrEntryLog);


问题


面经


文章

微信
公众号

扫码关注公众号