<?php

use yii\bootstrap\ActiveForm;
use unclead\widgets\TabularInput;
use yii\helpers\Html;
use unclead\widgets\examples\models\Item;
/* @var $this \yii\web\View */
/* @var $models Item[] */
?>

<?php 
$form = \yii\bootstrap\ActiveForm::begin(['id' => 'tabular-form', 'enableAjaxValidation' => true, 'enableClientValidation' => false, 'validateOnChange' => false, 'validateOnSubmit' => true, 'validateOnBlur' => false, 'options' => ['enctype' => 'multipart/form-data']]);
?>

<?php 
echo TabularInput::widget(['models' => $models, 'attributeOptions' => ['enableAjaxValidation' => true, 'enableClientValidation' => false, 'validateOnChange' => false, 'validateOnSubmit' => true, 'validateOnBlur' => false], 'columns' => [['name' => 'title', 'title' => 'Title', 'type' => \unclead\widgets\MultipleInputColumn::TYPE_TEXT_INPUT], ['name' => 'description', 'title' => 'Description'], ['name' => 'file', 'title' => 'File', 'type' => \vova07\fileapi\Widget::className(), 'options' => ['settings' => ['url' => ['site/fileapi-upload']]]], ['name' => 'date', 'type' => \kartik\date\DatePicker::className(), 'title' => 'Day', 'options' => ['pluginOptions' => ['format' => 'dd.mm.yyyy', 'todayHighlight' => true]], 'headerOptions' => ['style' => 'width: 250px;', 'class' => 'day-css-class']]]]);
?>


<?php 
echo Html::submitButton('Update', ['class' => 'btn btn-success']);
ActiveForm::end();
 /**
  * выполняет запуск widget.
  *
  * @inheritdoc
  */
 public function run()
 {
     parent::run();
     if ($this->enableMaskedInput) {
         $this->registerClientScript();
     }
 }
Example #3
0
 public function init()
 {
     // $id = $this->form_id ?: uniqid();
     // $this->options['id'] = $id . '_timestamp';
     if ($this->model) {
         $value = $this->model->{$this->attribute};
         if (is_numeric($value)) {
             $this->options['value'] = Yii::$app->formatter->asDate($value);
         }
     }
     if (!empty($this->value) && is_numeric($this->value)) {
         $this->value = Yii::$app->formatter->asDate($this->value);
     }
     if (empty($this->options['placeholder'])) {
         $this->options['placeholder'] = __('Select date');
     }
     $this->pluginOptions['autoclose'] = true;
     $this->pluginOptions['format'] = strtolower(Yii::$app->formatter->dateFormat);
     parent::init();
 }
Example #4
0
 public function init()
 {
     if (empty($this->attribute2)) {
         $this->attribute2 = $this->attribute . '_to';
     }
     if (empty($this->options)) {
         $this->options = ['placeholder' => __('Start date')];
     }
     if (empty($this->options2)) {
         $this->options2 = ['placeholder' => __('End date')];
     }
     $value = $this->model->{$this->attribute};
     if (is_numeric($value)) {
         $this->options['value'] = Yii::$app->formatter->asDate($value);
     }
     $value = $this->model->{$this->attribute2};
     if (is_numeric($value)) {
         $this->options2['value'] = Yii::$app->formatter->asDate($value);
     }
     $this->separator = sprintf('← %s →', __('between'));
     $this->pluginOptions['format'] = strtolower(Yii::$app->formatter->dateFormat);
     parent::init();
 }
Example #5
0
?>

<div class="priskhead-form">

    <?php 
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>
    
    
 <?php 
echo $form->field($model, 'ref')->hiddenInput(['maxlength' => 50])->label(false);
?>
    <div class="row">
            <div class="col-sm-6 col-md-6">
             <?php 
echo $form->field($model, 'risk_date')->widget(DatePicker::className(), ['language' => 'th', 'options' => ['placeholder' => 'Select issue date ...'], 'pluginOptions' => ['format' => 'yyyy-mm-dd', 'todayHighlight' => true]]);
?>
            </div>
 
        <div class="col-xs-4 col-sm-2 col-md-2">
    <?php 
echo $form->field($model, 'risk_time')->textInput(['maxlength' => true]);
?>
    
    </div>

    <div class="col-xs-6 col-sm-4 col-md-6">
    

    <?php 
echo $form->field($model, 'department')->widget(Select2::classname(), ['data' => ArrayHelper::map(Adddep::find()->all(), 'ADDDEP_ID', 'DEP_NAME'), 'options' => ['placeholder' => 'เลือกแแผนก ...'], 'pluginOptions' => ['allowClear' => true]]);
Example #6
0

    <?php 
echo $form->field($model, 'location')->textInput(['class' => 'placepicker form-control']);
?>

    <?php 
echo $form->field($model, 'eopen_date')->widget(DateTimePicker::className(), ['name' => 'eopen_date', 'options' => ['placeholder' => 'Select Entries open time ...'], 'convertFormat' => true, 'pluginOptions' => ['orientation' => 'top', 'format' => 'd-M-y hh:i ', 'startDate' => date('yyyy-MM-dd hh:ii:ss'), 'autoclose' => true, 'todayHighlight' => true]]);
?>

    <?php 
echo $form->field($model, 'eclose_date')->widget(DateTimePicker::className(), ['name' => 'eclose_date', 'options' => ['placeholder' => 'Select Entries close time ...'], 'convertFormat' => true, 'pluginOptions' => ['orientation' => 'top', 'format' => 'd-M-y hh:i ', 'autoclose' => true, 'startDate' => date('yyyy-MM-dd hh:ii:ss'), 'todayHighlight' => true]]);
?>

    <?php 
echo DatePicker::widget(['model' => $model, 'name' => 'from_date', 'attribute' => 'start_date', 'attribute2' => 'end_date', 'options' => ['placeholder' => 'Select Event start date ...'], 'options2' => ['placeholder' => 'Select Event end date ...'], 'value' => '01-Feb-1996', 'type' => DatePicker::TYPE_RANGE, 'name2' => 'to_date', 'value2' => '27-Feb-1996', 'pluginOptions' => ['autoclose' => true, 'format' => 'dd-M-yyyy']]);
?>


    <p></p>
    <h4>
    <span class="label label-info">By Clicking the Create button the Event will be automatically posted on HorseBuzz mobile app</span>
    </h4>
    <p></p>


    <di"form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-danger' : 'btn btn-primary']);
?>
    </div>
Example #7
0
use app\components\grid\LinkColumn;
use app\modules\admin\modules\users\models\User;
use kartik\date\DatePicker;
use app\modules\admin\modules\users\Module;
/* @var $this yii\web\View */
/* @var $searchModel \app\modules\admin\modules\users\models\search\UserSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Module::t('module', 'ADMIN_USERS');
$this->params['breadcrumbs'][] = ['label' => Module::t('module', 'ADMIN'), 'url' => ['/admin/default/index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="admin-users-default-index">

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

    <?php 
$gridColumn = [['class' => 'yii\\grid\\SerialColumn'], ['filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'date_from', 'attribute2' => 'date_to', 'type' => DatePicker::TYPE_RANGE, 'separator' => '<i class="glyphicon glyphicon-arrow-right"></i>', 'pluginOptions' => ['format' => 'yyyy-mm-dd', 'todayHighlight' => true]]), 'attribute' => 'created_at', 'format' => ['date', 'php:d M Y г., H:i:s']], ['class' => LinkColumn::className(), 'attribute' => 'username'], 'email:email', ['class' => SetColumn::className(), 'filter' => User::getStatusesArray(), 'attribute' => 'status', 'name' => 'statusName', 'cssCLasses' => [User::STATUS_ACTIVE => 'success', User::STATUS_WAIT => 'warning', User::STATUS_BLOCKED => 'default']], ['filter' => User::getRolesArray(), 'attribute' => 'role', 'value' => 'RoleName'], ['class' => ActionColumn::className()]];
?>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => $gridColumn, 'responsive' => true, 'hover' => true, 'pjax' => false, 'resizableColumns' => true, 'toolbar' => [['content' => Html::a('<i class="glyphicon glyphicon-repeat"></i>', ['index'], ['class' => 'btn btn-default', 'title' => Module::t('module', 'RESET_GRID')])], '{toggleData}'], 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-user"></i> ' . Html::encode($this->title) . '</h3>', 'type' => 'primary', 'before' => Html::a('<i class="glyphicon glyphicon-plus"></i> ' . Module::t('module', 'BUTTON_CREATE'), ['create'], ['class' => 'btn btn-success', 'data-pjax' => 0])]]);
?>

</div>
Example #8
0
?>

    <?php 
echo $form->field($model, 'administrador_id')->dropDownList(ArrayHelper::map(Administrador::find()->all(), 'id', 'Nombres'), ['prompt' => 'Seleccionar Administrador', 'style' => 'width:300px']);
?>

    <?php 
echo $form->field($model, 'hora_inicio')->widget(TimePicker::className(), ['pluginOptions' => ['format' => 'HH:MM', 'showMeridian' => false, 'minuteStep' => 1], 'options' => ['style' => 'width:260px'], 'addonOptions' => ['asButton' => true, 'inline-addon' => true]]);
?>

    <?php 
echo $form->field($model, 'tiempo_periodo')->textInput(['style' => 'width:300px']);
?>

    <?php 
echo $form->field($model, 'fecha')->widget(DatePicker::className(), ['removeButton' => false, 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd'], 'options' => ['style' => 'width:260px']]);
?>


    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Crear' : 'Actualizar', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>

</div>
Example #9
0
     ช่วง 1 เมษายน 2558 ถึง 31 มีนาคม 2559) เกณฑ์เป้าหมายน้อยกว่า 6.63 (รหัสที่ให้ J45-J46)</font></p></h6>
</div>
<?php 
$form = ActiveForm::begin(['layout' => 'inline']);
?>
<div class="form-group">
<label class="control-label"> เลือกวันที่ </label>
    <?php 
echo DatePicker::widget(['name' => 'date1', 'value' => $date1, 'language' => 'th', 'pluginOptions' => ['format' => 'yyyy-mm-dd', 'changeMonth' => true, 'changeYear' => true, 'todayHighlight' => true]]);
?>

</div>
<div class="form-group">
    <label class="control-label"> ถึง </label>
    <?php 
echo DatePicker::widget(['name' => 'date2', 'value' => $date2, 'language' => 'th', 'pluginOptions' => ['format' => 'yyyy-mm-dd', 'changeMonth' => true, 'changeYear' => true, 'todayHighlight' => true]]);
?>
</div>
<div class="form-group">
    <?php 
echo Html::submitButton('ประมวลผล', ['class' => 'btn btn-warning btn-flat']);
?>
</div><!-- /.input group -->
<?php 
ActiveForm::end();
?>
<br>

<?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'panel' => ['type' => GridView::TYPE_DEFAULT], 'responsive' => true, 'hover' => true, 'floatHeader' => true, 'pjax' => true, 'pjaxSettings' => ['neverTimeout' => true, 'beforeGrid' => '', 'afterGrid' => ''], 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'village_name', 'header' => 'หมู่บ้าน'], ['label' => 'เป้าหมาย (คน)', 'format' => 'raw', 'value' => function ($model) {
    return Html::a(Html::encode($model['b']), ['/qof/qof/goal202', 'id' => $model['village_id']]);
Example #10
0
<div class="books-form">

    <?php 
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>

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

    <?php 
echo $form->field($model, 'preview')->widget(FileInput::classname(), ['options' => ['accept' => 'image/*'], 'pluginOptions' => ['showPreview' => true, 'showCaption' => true, 'showRemove' => true, 'showUpload' => false]]);
?>

    <?php 
echo $form->field($model, 'date')->widget(DatePicker::classname(), ['value' => date('Y-m-d', strtotime('today')), 'options' => ['placeholder' => Yii::t('books', 'select Date')], 'pluginOptions' => ['hideInput' => true, 'format' => 'yyyy-mm-dd', 'todayHighlight' => true]]);
?>

    <?php 
echo $form->field($model, 'author_id')->dropDownList(ArrayHelper::map(Authors::find()->all(), 'id', 'fullName'), ['prompt' => Yii::t('books', 'select Author')]);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>
Example #11
0
<?php

use yii\grid\GridView;
use yii\helpers\Html;
use yii\widgets\Pjax;
use kartik\date\DatePicker;
$this->title = '学校列表';
?>
<p>
    <?php 
echo Html::a('<i class="fa fa-plus"></i> 添加学校', ['school/add'], ['class' => 'btn btn-primary']);
?>
</p>
<div class="row">
    <div class="col-lg-12">
        <?php 
Pjax::begin();
?>
        <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'tableOptions' => ['class' => 'table table-striped table-bordered table-center'], 'summaryOptions' => ['tag' => 'p', 'class' => 'text-right text-info'], 'columns' => [['class' => 'yii\\grid\\SerialColumn', 'headerOptions' => ['class' => 'col-md-1']], ['attribute' => 'name', 'headerOptions' => ['class' => 'col-md-7'], 'filterInputOptions' => ['class' => 'form-control input-sm']], ['attribute' => 'created_at', 'format' => ['date', 'php:Y-m-d H:i'], 'filter' => DatePicker::widget(['model' => $searchModel, 'type' => DatePicker::TYPE_COMPONENT_APPEND, 'attribute' => 'date', 'options' => ['class' => 'input-sm'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]), 'headerOptions' => ['class' => 'col-md-3']], ['class' => 'yii\\grid\\ActionColumn', 'header' => '操作', 'headerOptions' => ['class' => 'col-md-1'], 'template' => '{update}']]]);
?>
        <?php 
Pjax::end();
?>
    </div>
</div>
Example #12
0
?>

    <?php 
echo $form->field($model, 'status')->checkbox($options = ['status' => 1])->hint('Встановити після вказання вихідного номеру (після встановлення та збереження, редагування моніторигу буде неможливе)');
?>

<!--    --><?php 
//= $form->field($model, 'year_id')->dropDownList(ArrayHelper::map($years, 'id', 'year'), ['prompt' => 'Оберіть рік', 'onchange' => 'getMonthByYear(this.value);',  'disabled' => $model->isNewRecord ?   false : true ])
?>

<!--    --><?php 
//= $form->field($model, 'month_id')->dropDownList(ArrayHelper::map($months, 'id', 'month'), ['prompt' => 'Оберіть місяць', 'id' => 'month_id',  'disabled' => $model->isNewRecord ?   false : true ])
?>

    <?php 
echo $form->field($model, 'date')->widget(DatePicker::className(), ['disabled' => $model->isNewRecord ? false : true, 'attribute' => 'date', 'name' => 'date', 'value' => date('Y-m-d'), 'options' => ['placeholder' => 'Оберіть місяць ...'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm', 'viewMode' => 'Months', 'minViewMode' => 'months']]);
?>
<!--    --><?php 
// echo '<label>Check Issue Date</label>';
//    echo DatePicker::widget([
//    'attribute' => 'date',
//    'name' => 'date',
//    'value' => date('Y-m-d'),
//    'options' => ['placeholder' => 'Оберіть місяць ...'],
//    'pluginOptions' => [
//        'autoclose'=>true,
//        'format' => 'yyyy-mm-dd',
////        'viewMode' => 'Months',
////        'minViewMode' => 'months',
////        'todayHighlight' => true
//    ]
Example #13
0
<p>
    <?php 
echo Html::a('<i class="fa fa-plus"></i> 添加营业点', ['store/add'], ['class' => 'btn btn-primary']);
?>
</p>
<div class="row">
    <div class="col-lg-12">
        <?php 
Pjax::begin();
?>
        <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'tableOptions' => ['class' => 'table table-striped table-bordered table-center'], 'summaryOptions' => ['tag' => 'p', 'class' => 'text-right text-info'], 'columns' => [['class' => 'yii\\grid\\SerialColumn', 'headerOptions' => ['class' => 'col-md-1']], ['attribute' => 'name', 'headerOptions' => ['class' => 'col-md-2'], 'filterInputOptions' => ['class' => 'form-control input-sm']], ['attribute' => 'school_id', 'headerOptions' => ['class' => 'col-md-3'], 'filterInputOptions' => ['class' => 'form-control input-sm'], 'value' => function ($model, $key, $index, $column) {
    return $model->school->name;
}, 'filter' => Select2::widget(['model' => $searchModel, 'initValueText' => ($school = School::findOne($searchModel->school_id)) ? $school->name : '', 'attribute' => 'school_id', 'size' => Select2::SMALL, 'theme' => Select2::THEME_KRAJEE, 'options' => ['placeholder' => '搜索学校名称...'], 'pluginOptions' => ['allowClear' => true, 'minimumInputLength' => 3, 'ajax' => ['url' => Url::to(['/school/name-filter']), 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {q:params.term}; }')], 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'), 'templateResult' => new JsExpression('function (store) { return store.text; }'), 'templateSelection' => new JsExpression('function (store) { return store.text; }')]])], ['attribute' => 'address', 'headerOptions' => ['class' => 'col-md-2'], 'filterInputOptions' => ['class' => 'form-control input-sm']], ['attribute' => 'status', 'format' => 'raw', 'filter' => Store::getStatusList(), 'filterInputOptions' => ['class' => 'form-control input-sm'], 'headerOptions' => ['class' => 'col-md-1'], 'value' => function ($model, $key, $index, $column) {
    return Html::dropDownList('status', $model->status, Store::getStatusList(), ['data-id' => $model->id]);
}], ['attribute' => 'created_at', 'format' => ['date', 'php:Y-m-d H:i'], 'filter' => DatePicker::widget(['model' => $searchModel, 'type' => DatePicker::TYPE_COMPONENT_APPEND, 'attribute' => 'date', 'options' => ['class' => 'input-sm'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]), 'headerOptions' => ['class' => 'col-md-2']], ['class' => 'yii\\grid\\ActionColumn', 'header' => '操作', 'headerOptions' => ['class' => 'col-md-1'], 'template' => '{update} {view}']]]);
?>
        <?php 
Pjax::end();
?>
    </div>
</div>
<?php 
$url = Url::to(['/store/status']);
$js = <<<JS
var handle = function () {
    var id = \$(this).attr('data-id');
    var status = \$(this).val();
    \$.ajax({
        url: '{$url}?id=' + id ,
        type: 'post',
Example #14
0
            </p>
            <p class="pull-right">
                <?php 
echo Html::a('<i class="glyphicon glyphicon-th-large"></i> ' . Module::t('module', 'BUTTON_CATEGORIES'), ['category/index'], ['class' => 'btn btn-primary']);
?>
                <?php 
echo Html::a('<i class="glyphicon glyphicon-tags"></i> ' . Module::t('module', 'BUTTON_TAGS'), ['tags/index'], ['class' => 'btn btn-primary']);
?>
                <?php 
echo Html::a('<i class="glyphicon glyphicon-comment"></i> ' . Module::t('module', 'BUTTON_COMMENTS') . ' <span class="badge">' . $countPending . '</span>', ['comment/index'], ['class' => 'btn btn-primary']);
?>
            </p>
        </div>
    </div>

    <?php 
$gridColumn = [['class' => 'yii\\grid\\SerialColumn'], ['class' => LinkColumn::className(), 'attribute' => 'title'], ['attribute' => 'author_id', 'label' => Module::t('module', 'LABEL_AUTHOR'), 'format' => 'text', 'content' => function ($data) {
    return $data->getAuthorName();
}, 'filter' => Post::getAuthorList()], ['filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'date_from', 'attribute2' => 'date_to', 'type' => DatePicker::TYPE_RANGE, 'separator' => '-', 'pluginOptions' => ['format' => 'yyyy-mm-dd', 'todayHighlight' => true]]), 'attribute' => 'created_at', 'format' => ['date', 'php:d M Y г., H:i:s']], ['filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'dateUpd_from', 'attribute2' => 'dateUpd_to', 'type' => DatePicker::TYPE_RANGE, 'separator' => '-', 'pluginOptions' => ['format' => 'yyyy-mm-dd', 'todayHighlight' => true]]), 'attribute' => 'updated_at', 'format' => ['date', 'php:d M Y г., H:i:s']], ['class' => SetColumn::className(), 'attribute' => 'publish_status', 'filter' => Post::getStatusesArray(), 'name' => function ($model) {
    return Post::getStatusTitle($model->publish_status);
}, 'cssCLasses' => [Post::STATUS_PUBLISH => 'success', Post::STATUS_DRAFT => 'default', Post::STATUS_ARCHIVE => 'info']], ['attribute' => 'category_id', 'label' => Module::t('module', 'LABEL_CATEGORY'), 'format' => 'text', 'content' => function ($data) {
    return $data->getCategoryTitle();
}, 'filter' => Post::getCategoryList()], ['class' => ActionColumn::className()]];
?>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => $gridColumn, 'responsive' => true, 'hover' => true, 'pjax' => false, 'resizableColumns' => true, 'toolbar' => [['content' => Html::a('<i class="glyphicon glyphicon-repeat"></i>', ['index'], ['class' => 'btn btn-default', 'title' => Module::t('module', 'RESET_GRID')])], '{toggleData}'], 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-th-list"></i> ' . Html::encode($this->title) . '</h3>', 'type' => 'primary', 'before' => Html::a('<i class="glyphicon glyphicon-plus"></i> ' . Module::t('module', 'BUTTON_CREATE'), ['create'], ['class' => 'btn btn-success', 'data-pjax' => 0])]]);
?>

</div>
Example #15
0
use app\modules\admin\Module;
use app\components\grid\SetColumn;
use kartik\date\DatePicker;
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel \app\modules\admin\models\search\UserSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Module::t('module', 'ADMIN_USERS');
$this->params['breadcrumbs'][] = ['label' => Module::t('module', 'ADMIN'), 'url' => ['default/index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="users-index">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a(Module::t('module', 'ADMIN_USERS_ADD'), ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => ['id', ['filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'date_from', 'attribute2' => 'date_to', 'type' => DatePicker::TYPE_RANGE, 'separator' => '-', 'pluginOptions' => ['format' => 'yyyy-mm-dd']]), 'attribute' => 'created_at', 'format' => 'datetime', 'filterOptions' => ['style' => 'max-width: 180px']], ['class' => LinkColumn::className(), 'attribute' => 'username'], 'email:email', ['class' => SetColumn::className(), 'filter' => User::getStatusesArray(), 'attribute' => 'status', 'name' => 'statusName', 'cssCLasses' => [User::STATUS_ACTIVE => 'success', User::STATUS_WAIT => 'warning', User::STATUS_BLOCKED => 'default']], ['class' => ActionColumn::className()]]]);
?>

</div>
<?php

use yii\bootstrap\ActiveForm;
use unclead\multipleinput\TabularInput;
use yii\helpers\Html;
use unclead\multipleinput\examples\models\Item;
use unclead\multipleinput\TabularColumn;
/* @var $this \yii\web\View */
/* @var $models Item[] */
?>

<?php 
$form = \yii\bootstrap\ActiveForm::begin(['id' => 'tabular-form', 'options' => ['enctype' => 'multipart/form-data']]);
?>

<?php 
echo TabularInput::widget(['models' => $models, 'attributeOptions' => ['enableAjaxValidation' => true, 'enableClientValidation' => false, 'validateOnChange' => false, 'validateOnSubmit' => true, 'validateOnBlur' => false], 'form' => $form, 'columns' => [['name' => 'id', 'type' => TabularColumn::TYPE_HIDDEN_INPUT], ['name' => 'title', 'title' => 'Title', 'type' => TabularColumn::TYPE_TEXT_INPUT, 'attributeOptions' => ['enableClientValidation' => true, 'validateOnChange' => true], 'defaultValue' => 'Test', 'enableError' => true], ['name' => 'description', 'title' => 'Description'], ['name' => 'date', 'type' => \kartik\date\DatePicker::className(), 'title' => 'Day', 'options' => ['pluginOptions' => ['format' => 'dd.mm.yyyy', 'todayHighlight' => true]], 'headerOptions' => ['style' => 'width: 250px;', 'class' => 'day-css-class']]]]);
?>


<?php 
echo Html::submitButton('Update', ['class' => 'btn btn-success']);
ActiveForm::end();
Example #17
0
}
?>

                <?php 
$form = ActiveForm::begin();
?>
                    <div class="row">
                        <div class="col-sm-3">
                            <?php 
echo DatePicker::widget(['model' => $model, 'attribute' => 'startDate', 'readonly' => true, 'form' => $form, 'removeButton' => false, 'pluginOptions' => ['autoClose' => true, 'format' => 'yyyy-mm-dd']]);
?>
                       </div>

                       <div class="col-sm-3">
                            <?php 
echo DatePicker::widget(['model' => $model, 'attribute' => 'endDate', 'readonly' => true, 'form' => $form, 'removeButton' => false, 'pluginOptions' => ['autoClose' => true, 'format' => 'yyyy-mm-dd']]);
?>
                        </div>
                    </div>

                    <div class="form-group">
                        <?php 
echo Html::submitButton('View', ['class' => 'btn btn-success', 'id' => 'view_button']);
?>
                    </div>
                <?php 
ActiveForm::end();
?>

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

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

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'kartik\\grid\\SerialColumn'], ['attribute' => 'region', 'value' => 'monitoring1.user.profile.region.number', 'filter' => Html::activeDropDownList($searchModel, 'region', ArrayHelper::map(\app\models\Region::find()->asArray()->all(), 'id', 'number'), ['class' => 'form-control', 'prompt' => 'Оберіть код регіону'])], ['attribute' => 'date', 'value' => 'date', 'format' => 'raw', 'width' => '350px', 'filter' => DatePicker::widget(['model' => $searchModel, 'name' => 'date', 'attribute' => 'date', 'options' => ['placeholder' => 'Оберіть місяць ...'], 'pluginOptions' => ['format' => 'yyyy-mm-dd', 'viewMode' => 'months', 'minViewMode' => 'months']])], ['class' => 'yii\\grid\\ActionColumn']]]);
?>

    <?php 
$m = Yii::$app->request->get();
$excel = ['excel'];
$arrayExcel = ArrayHelper::merge($excel, $m);
?>
    <p>
        <?php 
echo Html::a('Емпортувати в xls', $arrayExcel, ['class' => 'btn btn-success']);
?>
    </p>

</div>
Example #19
0
?>

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

    <?php 
echo $form->field($model, 'author_id')->dropDownList($authors, ['prompt' => 'Select author']);
?>

    <?php 
echo $form->field($model, 'date_from')->widget(DatePicker::className(), ['options' => ['placeholder' => Yii::t('app', 'Date from')], 'pluginOptions' => ['autoclose' => true, 'convertFormat' => false, 'format' => 'yyyy-mm-dd'], 'value' => $bookSearchFromDate]);
?>

    <?php 
echo $form->field($model, 'date_to')->widget(DatePicker::className(), ['options' => ['placeholder' => Yii::t('app', 'Date from')], 'pluginOptions' => ['autoclose' => true, 'convertFormat' => false, 'format' => 'yyyy-mm-dd'], 'value' => $bookSearchFromDate]);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton('Search', ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a('Reset', ['index'], ['class' => 'btn btn-info']);
?>
        <?php 
echo Html::button('Create Book', ['value' => '/book/create', 'id' => 'createSnippet', 'class' => 'btn btn-success']);
?>
    </div>

    <?php 
Example #20
0
                    }']]);
?>

            <?php 
echo $form->field($model, 'toAmount')->textInput()->label('Величина (' . $firstValuta . ')*', ['id' => 'toAmountLabel']);
?>

        </div>
    </div>
</div>

<div class="row transfer-info-block">
    <div class="col-md-12">

        <?php 
echo $form->field($model, 'date')->label($model->getAttributeLabel('date') . '*')->widget(DatePicker::className(), ['type' => DatePicker::TYPE_INPUT, 'pluginOptions' => ['autoclose' => true, 'format' => 'dd-mm-yyyy']]);
?>

        <div class="row additionally-date">
            <?php 
echo Html::a('Вчера', 'javascript:void(0);', ['class' => 'additionally-date-link', 'data-value' => Yii::$app->getFormatter()->asDate('yesterday', "php:d-m-Y")]);
?>
            <?php 
echo Html::a('Сегодня', 'javascript:void(0);', ['class' => 'additionally-date-link', 'data-value' => Yii::$app->getFormatter()->asDate('now', "php:d-m-Y")]);
?>
        </div>

        <?php 
echo $form->field($model, 'comment')->textInput([]);
?>
Example #21
0
                <div class="col-lg-5">
                    <label for="date_from">
                        Дата начала отчёта
                    </label>
                        <?php 
echo DatePicker::widget(['id' => 'date_from', 'name' => 'date_from', 'language' => 'ru', 'value' => date('Y-m-d', time()), 'options' => ['placeholder' => 'Выберите дату ...'], 'pluginOptions' => ['format' => 'yyyy-mm-dd', 'autoclose' => true, 'todayHighlight' => true]]);
?>
                    
                </div>
                
                <div class="col-lg-5">                
                 <label for="date_to">
                        Дата конца отчёта
                    </label>
                        <?php 
echo DatePicker::widget(['id' => 'date_to', 'name' => 'date_to', 'language' => 'ru', 'value' => date('Y-m-d', time()), 'options' => ['placeholder' => 'Выберите дату ...'], 'pluginOptions' => ['format' => 'yyyy-mm-dd', 'autoclose' => true, 'todayHighlight' => true]]);
?>
                </div>
                        <?php 
//                            $list = ArrayHelper::map(Occupations::find()->all(), 'id' , 'name');
//                            echo Select2::widget([
//                            'class' => "form-control",
//                            'id' => "occupation",
//                            'name' => "occupation",
//                            'value' => '',
//                            'data' => $list,
//                            'options' => ['multiple' => false, 'placeholder' => 'Выберите специальность ...']
//                        ]);
?>
                        <!--<select id="specialist" class="form-control"></select>-->
                        <?php 
Example #22
0
                    <?php 
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>
                    <?php 
echo $form->field($model, 'title');
?>

                    <?php 
echo $form->field($model, 'thumbnail')->fileInput(['accept' => 'image/*', 'maxSize' => 10097152]);
?>

                    <div class="form-group">
                        <?php 
echo '<label>Date</label>';
echo DatePicker::widget(['name' => 'PostEditForm[date]', 'type' => DatePicker::TYPE_COMPONENT_PREPEND, 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]);
?>
                    </div>

                    <?php 
echo $form->field($model, 'content')->widget(CKEditor::className(), ['options' => ['rows' => 10], 'preset' => 'basic']);
?>

                    <div class="form-group">
                        <label for="inputPermit">Permission</label>
                        <div class="row">
                            <div class="col-lg-2">
                                <select id="inputPermit" class="form-control" name="PostEditForm[permit][]">
                                    <option value="1">private</option>
                                    <option value="2">protected 1</option>
                                    <option value="3">protected 2</option>
/* @var $this \yii\web\View */
/* @var $model ExampleModel */
?>

<?php 
$form = ActiveForm::begin(['enableAjaxValidation' => true, 'enableClientValidation' => false, 'validateOnChange' => false, 'validateOnSubmit' => true, 'validateOnBlur' => false]);
?>

    <h3>Single column</h3>
<?php 
echo $form->field($model, 'emails')->widget(MultipleInput::className(), ['limit' => 5])->label(false);
?>

<h3>Multiple columns</h3>
<?php 
echo $form->field($model, 'schedule')->widget(MultipleInput::className(), ['id' => 'schedule-wrapper', 'limit' => 4, 'columns' => [['name' => 'user_id', 'type' => MultipleInputColumn::TYPE_DROPDOWN, 'enableError' => true, 'title' => 'User', 'defaultValue' => 33, 'items' => [31 => 'item 31', 32 => 'item 32', 33 => 'item 33', 34 => 'item 34', 35 => 'item 35', 36 => 'item 36']], ['name' => 'day', 'type' => DatePicker::className(), 'title' => 'Day', 'value' => function ($data) {
    return $data['day'];
}, 'items' => ['0' => 'Saturday', '1' => 'Monday'], 'options' => ['pluginOptions' => ['format' => 'dd.mm.yyyy', 'todayHighlight' => true]], 'headerOptions' => ['style' => 'width: 250px;', 'class' => 'day-css-class']], ['name' => 'priority', 'title' => 'Priority', 'defaultValue' => 1, 'enableError' => true, 'options' => ['class' => 'input-priority']], ['name' => 'comment', 'type' => MultipleInputColumn::TYPE_STATIC, 'value' => function ($data) {
    return Html::tag('span', 'static content', ['class' => 'label label-info']);
}, 'headerOptions' => ['style' => 'width: 70px;']], ['type' => MultipleInputColumn::TYPE_CHECKBOX_LIST, 'name' => 'enable', 'headerOptions' => ['style' => 'width: 80px;'], 'items' => [1 => 'Test 1', 2 => 'Test 2', 3 => 'Test 3', 4 => 'Test 4'], 'options' => ['unselect' => 2]]]]);
?>

<?php 
echo Html::submitButton('Update', ['class' => 'btn btn-success']);
ActiveForm::end();
?>


<?php 
$js = <<<JS
        \$('#schedule-wrapper').on('afterInit', function(){
Example #24
0
            ?>
</div><?php 
        }
        ?>
				</div>
			<?php 
    }
    ?>
			<?php 
    echo $form->field($model, 'count_completeness')->dropdownList(Visits::getCountCompletenessOptions());
    ?>
			<?php 
    echo $form->field($model, 'blur')->dropDownList(Projects::getBlurOptions());
    ?>
			<?php 
    echo $form->field($model, 'embargo')->widget(DatePicker::className(), ['type' => 1, 'options' => ['placeholder' => Yii::t('app', 'Selecteer datum')], 'pluginOptions' => ['format' => 'dd-mm-yyyy', 'todayHighlight' => true, 'autoclose' => true, 'weekStart' => 1]]);
    ?>
	    	<?php 
    echo $form->field($model, 'remarks')->widget(\yii\redactor\widgets\Redactor::className(), ['clientOptions' => ['buttons' => ['formatting', 'bold', 'italic', 'unorderedlist', 'orderedlist', 'outdent', 'indent', 'link', 'alignment', 'horizontalrule']]]);
    ?>
	    	<div class="form-group">
	            <?php 
    echo Html::submitButton(Yii::t('app', 'Opslaan'), ['class' => 'btn btn-primary pull-right']);
    ?>
	        </div>
	    <?php 
    ActiveForm::end();
    ?>
	    <?php 
    View::beginJs();
    ?>
Example #25
0
?>
    <?php 
echo $form->field($model, 'marital_status', ['options' => ['class' => 'col-xs-6']])->radioList(DictApplicant::$maritalStatus);
?>
    <?php 
echo $form->field($model, 'identification_number', ['options' => ['class' => 'col-xs-6']])->textInput(['maxlength' => true]);
?>
    <?php 
echo $form->field($model, 'social_security_number', ['options' => ['class' => 'col-xs-6']])->widget(MaskedInput::className(), ['mask' => '999-99-9999']);
?>

    <?php 
echo $form->field($model, 'identification_state', ['options' => ['class' => 'col-xs-6 padding-right0']])->widget(Select2::classname(), ['data' => ArrayHelper::map(State::find()->all(), 'abbreviation', 'abbreviation'), 'options' => ['placeholder' => 'Select a state ...'], 'pluginOptions' => ['allowClear' => true]]);
?>
    <?php 
echo $form->field($model, 'identification_expiration_date', ['options' => ['class' => 'col-xs-6']])->label('ID Expiration Date')->widget(DatePicker::classname(), ['type' => DatePicker::TYPE_COMPONENT_PREPEND, 'removeButton' => false, 'options' => ['value' => $model->identification_expiration_date ? date('m/d/Y', $model->identification_expiration_date) : ''], 'pluginOptions' => ['autoclose' => true, 'format' => 'mm/dd/yyyy']]);
?>
    <?php 
echo $form->field($model, 'occupation', ['options' => ['class' => 'col-xs-6']])->textInput(['maxlength' => true]);
?>
    <?php 
echo $form->field($model, 'employer', ['options' => ['class' => 'col-xs-6']])->textInput(['maxlength' => true]);
?>
    <?php 
echo $form->field($model, 'total_annual_income', ['options' => ['class' => 'col-xs-6']])->radioList(DictApplicant::$totalAnnualIncome);
?>
    <?php 
echo $form->field($model, 'years_with_advisor', ['options' => ['class' => 'col-xs-6']])->radioList(DictApplicant::$yearsWithAdvisor);
?>
    <?php 
echo $form->field($model, 'net_worth', ['options' => ['class' => 'col-xs-6']])->radioList(DictApplicant::$netWorth);
Example #26
0
 * @var dektrium\user\models\User 		$user
 * @var dektrium\user\models\Profile 	$profile
 */
?>

<?php 
$this->beginContent('@lnch/users/views/admin/update.php', ['user' => $user]);
?>

<?php 
$form = ActiveForm::begin(['layout' => 'horizontal', 'enableAjaxValidation' => true, 'enableClientValidation' => false, 'fieldConfig' => ['horizontalCssClasses' => ['wrapper' => 'col-sm-9']]]);
echo $form->field($profile, 'title')->dropDownList(Profile::$titles);
echo $form->field($profile, 'first_name');
echo $form->field($profile, 'middle_names');
echo $form->field($profile, 'surname', []);
echo $form->field($profile, 'date_of_birth')->widget(DatePicker::className(), ['options' => ['value' => gmdate("d/m/Y", strtotime($profile->date_of_birth))], 'layout' => "{picker}{input}{remove}", 'pluginOptions' => ['autoclose' => true, 'format' => "dd/mm/yyyy"]]);
echo $form->field($profile, 'website');
echo $form->field($profile, 'location');
echo $form->field($profile, 'job_title');
echo $form->field($profile, 'contact_number');
echo $form->field($profile, 'bio')->textarea();
?>


<div class="form-group">
    <div class="col-lg-offset-3 col-lg-9">
        <?php 
echo Html::submitButton(Yii::t('user', 'Update'), ['class' => 'btn btn-block btn-success']);
?>
    </div>
</div>
				    	senbox(e['date']);
				    }",
				],
			]);
	    ?>
		<br>

		<?Pjax::begin(['id'=>'secondtime']);?>
			<?
		    	// usage without model
				echo '<label class="control-label">Дата завершения кампании</label>';
				echo DatePicker::widget([
				    'name' => 'date_end',
					'value' => $time_end,
				    'pluginOptions' => [
				        'autoclose' => true,
						'format' => 'yyyy-mm-dd',
						'startDate' => $time_end,
				        'todayHighlight' => true
				    ],
				]);
		    ?>

		<?Pjax::end();?>


		<br>
	    <?php 
echo $form->field($model, 'link')->textinput();
?>
    
    <div class="form-group">
Example #28
0
/* @var $model app\models\Brood */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="brood-form">

    <?php 
$form = ActiveForm::begin();
?>

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

    <?php 
echo $form->field($model, 'date')->widget(DatePicker::classname(), ['options' => ['placeholder' => Yii::t('app', 'Enter birth date ...')], 'type' => DatePicker::TYPE_COMPONENT_APPEND, 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd'], 'removeButton' => false, 'language' => \app\models\Lang::getCurrent()['local']]);
?>

    <?php 
echo $form->field($model, 'breed_id')->dropDownList(\app\models\Breed::getAll());
?>

    <?php 
echo $form->field($model, 'common_status_id')->dropDownList(\app\models\CommonStatus::getAll());
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>
Example #29
0
use yii\helpers\Html;
use kartik\date\DatePicker;
$this->title = 'เด็กอายุ 1 ปีได้รับวัคซีน MMR';
$this->params['breadcrumbs'][] = ['label' => 'สร้างเสริมภูมิคุ้มกันโรค', 'url' => ['epi/index']];
$this->params['breadcrumbs'][] = 'เด็กอายุ 1 ปีได้รับวัคซีน MMR';
?>

<div class='well'>
    <form method="POST">
    <div class="col-sm-2">
        <h5>เกิดระหว่าง : </h5>
    </div>
    <div class="col-sm-4">
    <?php 
echo DatePicker::widget(['type' => DatePicker::TYPE_RANGE, 'name' => 'date1', 'value' => $date1, 'name2' => 'date2', 'value2' => $date2, 'separator' => '<i class="glyphicon glyphicon-resize-horizontal"></i>', 'addon' => ['part1' => '<span class="input-group-addon">From Date</span>', 'part2' => '<span class="input-group-addon">aft</span>', 'part3' => '<span class="input-group-addon">To Date</span>', 'part4' => '<span class="input-group-addon kv-date-remove">' . '<i class="glyphicon glyphicon-remove"></i></span>'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]);
?>
    </div>
        <button class='btn btn-danger'>ประมวลผล</button>
    </form>
</div>
<a href="#" id="btn_sql">ชุดคำสั่ง</a>
<div id="sql" style="display: none"><?php 
echo $sql;
?>
</div>
<?php 
if (isset($dataProvider)) {
    //$dev = Html::a('คุณศรศักดิ์ สีหะวงษ์', 'https://fb.com/sosplk', ['target' => '_blank']);
    //echo yii\grid\GridView::widget([
    $header = '<i class="glyphicon glyphicon-th-list"></i> เด็กอายุ 1 ปีได้รับวัคซีน MMR ';
Example #30
0
use yii\helpers\Html;
use yii\grid\GridView;
use kartik\date\DatePicker;
use app\models\Posts;
/* @var $this yii\web\View */
/* @var $searchModel app\models\PostsSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Posts';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="posts-index">
    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <p>
        <?php 
echo Html::a('Create Post', ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'title', ['attribute' => 'text', 'value' => function ($data) {
    return Posts::getPreviewText($data->text);
}], ['attribute' => 'date', 'value' => function ($data) {
    return date('d-M-Y', $data->date);
}, 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'date_from', 'attribute2' => 'date_to', 'options' => ['placeholder' => 'Start date'], 'options2' => ['placeholder' => 'End date'], 'type' => DatePicker::TYPE_RANGE, 'pluginOptions' => ['format' => 'dd-mm-yyyy', 'autoclose' => true]])], ['class' => 'yii\\grid\\ActionColumn']]]);
?>
</div>