/** * Поле выбора даты * @return string * @throws \Exception */ public function date() { if ($this->model->getIsNewRecord()) { $this->model->{$this->attribute} = time(); } $this->model->{$this->attribute} = date('d.m.Y', $this->model->{$this->attribute}); return $this->widget(DatePicker::className(), ['model' => $this->model, 'attribute' => $this->attribute, 'clientOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy']]); }
<?php echo $form->field($model, 'name')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'author_id')->dropDownList(ArrayHelper::map(Author::find()->orderBy(['lastname' => SORT_ASC])->asArray()->all(), 'id', function ($model, $defaultValue) { return $model['lastname'] . ' ' . $model['firstname']; }), ['prompt' => '---выберите автора---']); ?> <?php $model->date = preg_replace('/(\\d{4})-(\\d{2})-(\\d{2})/', '\\3.\\2.\\1', $model->date); ?> <?php echo $form->field($model, 'date')->hint('пример: 04.12.1975 (число.месяц.год)')->widget(DatePicker::className(), ['template' => '{addon}{input}', 'language' => 'ru', 'clientOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy', 'todayHighlight' => true]]); ?> <?php if ($model->preview != null) { ?> <div class="form-group"> <?php echo Html::img(Yii::$app->params['frontendAbsoluteURL'] . $model->preview, ['id' => 'preview', 'class' => 'img-rounded']); ?> </div> <?php } ?> <?php
?> <?php echo $form->field($model, 'company_name')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'company_email')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'company_address')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'company_start_date')->widget(DatePicker::className(), ['inline' => false, 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]); ?> <?php echo $form->field($model, 'file')->fileInput(); ?> <?php echo $form->field($model, 'company_status')->dropDownList(['active' => 'Active', 'inactive' => 'Inactive'], ['prompt' => '- Status -']); ?> <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 echo $form->field($model, 'numPeriodo')->textInput(['style' => 'width:130px']); ?> <?php echo $form->field($model, 'anoPeriodo')->textInput(['style' => 'width:130px']); ?> <?php echo $form->field($model, 'dataInicioPeriodo')->widget(DatePicker::className(), ['inline' => false, 'language' => 'pt', 'template' => '{addon}{input}', 'options' => ['style' => 'width:130px'], 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]); ?> <?php echo $form->field($model, 'dataFimPeriodo')->widget(DatePicker::className(), ['inline' => false, 'language' => 'pt', 'template' => '{addon}{input}', 'options' => ['style' => 'width:130px'], 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]); ?> <?php echo $form->field($model, 'usaLaboratorio')->checkbox(); ?> <?php echo $form->field($model, 'qtdVagas')->textInput(['style' => 'width:130px']); ?> <?php echo $form->field($model, 'qtdMonitorBolsista')->textInput(['style' => 'width:130px']); ?> <?php
<?= $form->field($model, 'allowance_amount')->textInput() ?> <?= $form->field($model, 'allowance_remark')->textInput(['maxlength' => true]) ?> <?= $form->field($model,'allowance_school_id')->widget(Select2::classname(), [ 'data'=>ArrayHelper::map(Schools::find()->all(), 'School_id','school_name'), 'language'=>'en', 'options'=>['placeholder'=>'Select School Name'], 'pluginOptions'=>['allowClear'=>true], ]) ?> <?= $form->field($model, 'allowance_payStatus')->dropDownList([ 'paid' => 'Paid', 'not paid' => 'Not paid', ], ['prompt' => 'Select Payment Status']) ?> <?= $form->field($model, 'allowance_paidDate')->widget( DatePicker::className(), [ // inline too, not bad 'inline' => false, // modify template for custom rendering // 'template' => '<div class="well well-sm" style="background-color: #fff; width:250px">{input}</div>', 'clientOptions' => [ 'autoclose' => true, 'format' => 'yyyy-mm-dd' ] ]);?> <div class="form-group"> <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> </div> <?php ActiveForm::end(); ?>
if ($profile->photo) { ?> <?php echo "<img width='100'src='http://wemamastest.ru.mastertest.ru/web/" . $profile->photo . "' />"; ?> <?php } ?> <?php echo $form->field($profile, 'file')->fileInput(); ?> <?php echo $form->field($profile, 'location'); ?> <?php echo $form->field($profile, 'birthday')->widget(DatePicker::className(), ['inline' => false, 'clientOptions' => ['autoclose' => false, 'format' => 'yyyy-mm-dd']]); ?> <?php echo $form->field($profile, 'subscribe')->widget(CheckboxX::classname()); ?> <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>
<div > <label class="col-lg-2 control-label">Nouveau Bureau:</label> <?php echo $form->field($bureau, 'codebureau', ['horizontalCssClasses' => ['wrapper' => 'col-sm-3']])->dropDownList(ArrayHelper::map(Bureau::find()->asArray()->all(), 'codebureau', 'codebureau'), ['prompt' => '----------Choisir le bureau----------'])->label(false); ?> </div> <div> <label for="DateTrans" class="col-lg-2 control-label">Date de transfert:</label> <?php echo $form->field($trans, 'dt')->widget(DatePicker::className(), ['template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'dd/mm/yyyy']])->label(false); ?> </div> <div > <label for="motif" class="col-lg-2 control-label">Motif du transfert:</label> <?php echo $form->field($trans, 'motif')->textarea()->label(false); ?> </div>
<div class="book-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')->fileInput(); ?> <?php echo $form->field($model, 'date')->widget(DatePicker::className(), ['inline' => true, 'template' => '<div class="well well-sm" style="background-color: #fff; width:250px">{input}</div>', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]); ?> <?php $authors = \app\models\Author::find()->all(); foreach ($authors as $author) { $data[$author->id] = $author->lastname . ' ' . $author->firstname; } echo $form->field($model, 'author_id')->widget(\kartik\select2\Select2::className(), ['data' => $data, 'options' => ['placeholder' => 'Выберите автора']]); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div>
use yii\widgets\ActiveForm; use auction\components\helpers\DatabaseHelper; use dosamigos\datepicker\DatePicker; /* @var $this yii\web\View */ /* @var $model auction\models\Auctions */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="auctions-form"> <?php $form = ActiveForm::begin(); ?> <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'start_date')->widget(DatePicker::className(),[ 'template' => '{addon}{input}', 'clientOptions' => [ 'autoclose' => true, 'format' => 'yyyy-mm-dd', 'disableEntry'=>true, ], 'options' => [ 'data-pjax' => false ] ]) ?> <?= $form->field($model, 'duration')->textInput() ?> <?= $form->field($model, 'amount')->textInput() ?>
?> <?php echo $form->field($model, 'company_email')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'company_address')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'logo')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'company_created_date')->widget(DatePicker::className(), ['inline' => false, 'clientOptions' => ['autoclose' => true, 'format' => 'dd-M-yyyy']]); ?> <?php echo $form->field($model, 'company_status')->dropDownList(['active' => 'Active', 'inactive' => 'Inactive'], ['prompt' => '']); ?> <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(); ?>
?> <?php echo $form->field($model, 'id_role')->dropDownList(ArrayHelper::map(Role::find()->all(), 'id', 'title'))->label('Должность сотрудника'); ?> <?php echo $form->field($model, 'birthday')->widget(DatePicker::className(), ['inline' => false, 'language' => 'ru', 'clientOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy']]); ?> <?php echo $form->field($model, 'date_start')->widget(DatePicker::className(), ['inline' => false, 'language' => 'ru', 'clientOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy']]); ?> <?php echo $form->field($model, 'date_end')->widget(DatePicker::className(), ['inline' => false, 'language' => 'ru', 'clientOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy']]); ?> <?php echo $form->field($model, 'id_phone_code')->dropDownList(ArrayHelper::map(PhoneCode::find()->all(), 'id', 'code'))->label('Код телефона'); ?> <?php echo $form->field($model, 'phone_number')->widget(MaskedInput::className(), ['name' => 'phone_number', 'mask' => '999-99-99', 'clientOptions' => ['removeMaskOnSubmit' => true]]); ?> <?php echo $form->field($model, 'id_department')->dropDownList(ArrayHelper::map(Deparment::find()->all(), 'id', 'title'))->label('Секция'); ?>
<div class="panel panel-primary"> <div class="panel-heading"><h4><i class="glyphicon glyphicon-shopping-cart"></i> Input Transaksi</h4></div> <div class="panel-body"> <?php $form = ActiveForm::begin(['id' => 'dynamic-form']); ?> <div class="row"> <div class="col-sm-6"> <?php // $form->field($modelTransaksi, 'kode_transaksi')->textInput()->label('No Faktur') ?> </div> <div class="col-sm-6"> <?php echo $form->field($modelTransaksi, 'tanggal')->widget(DatePicker::className(), ['clientOptions' => ['autoclose' => true, 'format' => 'dd-M-yyyy']])->label('Tanggal Transaksi'); ?> </div> </div> <div class="row"> <div class="col-sm-6"> <?php echo $form->field($modelTransaksi, 'id_pelanggan')->dropDownList($modelTransaksi->KodePelanggan(), ['prompt' => 'Select...'])->label('Nama Pelanggan'); ?> </div> <div class="col-sm-6"> <?php echo $form->field($modelTransaksi, 'id_teknisi')->dropDownList($modelTransaksi->Pegawai(), ['prompt' => 'Select...'])->label('Nama Teknisi');
/* @var $this yii\web\View */ /* @var $model backend\models\searches\NewsSearch */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="news-search"> <?php $form = ActiveForm::begin(['action' => ['index'], 'method' => 'get']); ?> <?php echo $form->field($model, 'created_at')->widget(DatePicker::className(), ['language' => 'zh-CN', 'clientOptions' => ['format' => 'yyyy-MM-dd']]); ?> <?php echo $form->field($model, 'updated_at')->widget(DatePicker::className(), ['language' => 'zh-CN', 'clientOptions' => ['format' => 'yyyy-MM-dd']]); ?> <?php //echo $form->field($model, 'created_at') ?> <?php //echo $form->field($model, 'updated_at') ?> <div class="form-group"> <?php echo Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']); ?> <?php echo Html::resetButton(Yii::t('app', 'Reset'), ['class' => 'btn btn-default']);
<div class="form-group search_box_right"> <?php echo Html::a(Yii::t('app', 'Create Books'), ['create'], ['class' => 'btn btn-success', 'data-pjax' => '0', 'data-toggle' => 'modal', 'data-target' => '#create_modal']); ?> <div class="modal fade" id="create_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"><div class="modal-content"></div></div> </div> </div> <div style="clear:both;"> <?php echo $form->field($model, 'book_date_from')->label('Дата выхода книги:', ['class' => 'search_author_date_label'])->widget(DatePicker::className(), ['addon' => '', 'language' => 'ru', 'clientOptions' => ['autoclose' => true, 'format' => 'dd/mm/yyyy']])->textInput(['class' => 'form-control search_author_date_input', 'placeholder' => '31/12/2014']); ?> <?php echo $form->field($model, 'book_date_to')->label('до', ['class' => 'search_author_date_label_two'])->widget(DatePicker::className(), ['addon' => '', 'language' => 'ru', 'clientOptions' => ['autoclose' => true, 'format' => 'dd/mm/yyyy']])->textInput(['class' => 'form-control search_author_date_input', 'placeholder' => '31/02/2015']); ?> </div> <div class="form-group search_box_right"> <?php echo Html::submitButton(Yii::t('app', 'Искать'), ['class' => 'btn btn-primary search_btn']); ?> </div> <div style="clear:both;"></div> <?php ActiveForm::end(); ?> </div>
$form = ActiveForm::begin(); ?> <div class="col-lg-4"> <?php echo $form->field($affect, 'numAffectation')->textInput(); ?> </div> <div class="col-lg-4"> <?php echo $form->field($dat, 'dt')->widget(DatePicker::className(), ['template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'dd/mm/yyyy']])->label("Date d'affectation"); ?> </div> <div class="col-lg-4"> <?php echo $form->field($bureau, 'codebureau', ['horizontalCssClasses' => ['wrapper' => 'col-sm-3']])->dropDownList(ArrayHelper::map(Bureau::find()->asArray()->all(), 'codebureau', 'codebureau'), ['prompt' => '----------Choisir le bureau----------']); ?> </div> <div class="col-lg-12"> <?php
</div> <div class="col-lg-3"> <?php echo $form->field($model, 'email'); ?> </div> <div class="col-lg-2"> <?php echo $form->field($model, 'created_at_from_date')->widget(DatePicker::className(), ['clientOptions' => $DatePicker_clientOptions]); ?> </div> <div class="col-lg-2"> <?php echo $form->field($model, 'created_at_to_date')->widget(DatePicker::className(), ['clientOptions' => $DatePicker_clientOptions]); ?> </div> <div class="col-lg-2"> <div style="height: 25px;"></div> <?php echo Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']); ?> <?php echo Html::a(Yii::t('app', 'Reset'), ['index'], ['class' => 'btn btn-default']); ?> </div> </div> <?php ActiveForm::end(); ?>
<?php $form = ActiveForm::begin(); ?> <div class="col-lg-12"> <label class=" control-label">Code bien :</label> <label class="control-label " > <?php echo $codeBien; ?> </label> </div> </br> </br> <label class="col-lg-2 control-label">Date mise en instance:</label> <?php // with an ActiveForm instance echo $form->field($dat, 'dt')->widget(DatePicker::className(), ['inline' => false, 'clientOptions' => ['autoclose' => true, 'format' => 'dd/mm/yyyy']])->label(false); ?> </div> <div> <?php echo Html::SubmitButton('mettre en instance', ['class' => 'btn btn-primary col-lg-offset-3', 'name' => '']); ?> <a href="#" class="btn btn-primary" data-dissmiss="modal">Annuler</a> </div>
?> <?php if (!empty($model->publish_date)) { $model->publish_date = date('d.m.Y', strtotime($model->publish_date)); } ?> <?php //datapicker language issue; $language = Yii::$app->language; if ($language == 'en') { $language = 'en-GB'; } ?> <?php echo $form->field($model, 'publish_date')->widget(\yii\widgets\MaskedInput::className(), ['clientOptions' => ['alias' => 'dd.mm.yyyy']])->widget(DatePicker::className(), ['template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy', 'minView' => 1], 'language' => $language]); ?> <?php echo $form->field($model, 'is_active')->checkbox(['label' => Yii::t('backend', 'Active')]); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?>
<?php $form = ActiveForm::begin(); ?> <div class="col-lg-4"> <?php echo $form->field($instance, 'codestructure')->dropDownList(['siege' => 'Siège central', 'Succursale Cheraga' => 'Succursale Chéraga', 'Succursale Annaba' => 'Succursale Annaba', 'Succursale Oran' => 'Succursale Oran', 'Succursale Constantine' => 'Succursale Constantine', 'Succursale Bouzareah' => 'Succursale Bouzareah'])->label('Structure:'); ?> </div> <div class="col-lg-4"> <?php echo $form->field($dat, 'dt')->widget(DatePicker::className(), ['template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'dd/mm/yyyy']])->label('Date mise en instance:'); ?> </div> <div class="col-lg-12"> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'codebien', 'designationbien', 'codesousfamille', 'numfacture', 'dateacquisition', 'statutbien', ['class' => 'yii\\grid\\CheckboxColumn']]]); ?> </div> <div class="col-lg-12"> <?php
use dosamigos\datepicker\DatePicker; use kartik\widgets\DateControl; use yii\widgets\MaskedInput; /* @var $this yii\web\View */ /* @var $model frontend\models\Datasindisponiveis */ /* @var $form yii\widgets\ActiveForm */ $time = new \DateTime('now', new \DateTimeZone('UTC')); ?> <div class="datasindisponiveis-form"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'dataindisponivel')->widget(DatePicker::className(), ['options' => ['value' => date("Y-m-d")], 'language' => 'pt', 'inline' => true, 'template' => '<div class="well well-sm" style="background-color: #fff; width:250px">{input}</div>', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']])->label('Data Indisponível'); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Cancelar Data' : 'Atualizar', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?> </div>
</div> <div class="col-lg-3"> <?php echo $form->field($searchModel, 'name')->textInput(); ?> </div> </div> <div class="col-lg-12"> <div class="col-lg-3"> <?php echo $form->field($searchModel, 'dateFrom')->widget(DatePicker::className(), ['template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'dd/mm/yyyy']]); ?> </div> <div class="col-lg-3"> <?php echo $form->field($searchModel, 'dateTo')->widget(DatePicker::className(), ['template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'dd/mm/yyyy']]); ?> </div> <div class="col-lg-2"> <?php echo Html::submitButton('Поиск', ['class' => 'btn btn-success', 'style' => 'margin-top: 25px']); ?> </div> </div> <?php ActiveForm::end(); ?> <div class="site-index"> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => null, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'name', ['attribute' => 'preview', 'format' => 'raw', 'value' => function ($model) {
} else { echo $form->field($model, 'idLocal')->dropDownList($arrayLocal, ['prompt' => 'Selecione o Local da Ocorrência', 'onchange' => ' $.get("index.php?r=sublocal/lists&id=' . '" + $(this).val(), function(data){ $( "#denuncia-idsublocal").html(data); }); ', 'options' => [$model->idLocal => ['Selected' => true]], 'style' => 'width:300px']); echo $form->field($model, 'idSubLocal')->dropDownList($arraySubLocal, ['prompt' => 'Selecione o SubLocal da Ocorrência', 'options' => [$model->idSubLocalbkp => ['Selected' => true]], 'style' => 'width:300px']); } ?> <?php echo $form->field($model, 'detalheLocal')->textInput(['maxlength' => true, 'style' => 'width:300px']); ?> <?php echo $form->field($model, 'data')->widget(DatePicker::className(), ['inline' => false, 'language' => 'pt', 'clientOptions' => ['autoclose' => true, 'format' => 'dd/mm/yyyy', 'todayHighlight' => true, 'todayBtn' => true]]); ?> <?php echo $form->field($model, 'hora')->textInput(['maxlength' => true])->widget(MaskedInput::className(), ['mask' => '99:99']); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Salvar' : 'Atualizar', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?>
</div> <?php echo $form->field($model, 'date_set')->checkbox(); ?> <div id="date-set-control" class="<?php echo $model->date_set == '1' ? '' : 'hidden'; ?> "> <?php echo $form->field($model, 'start')->widget(DatePicker::className(), ['language' => 'pt', 'inline' => false, 'clientOptions' => ['autoclose' => true, 'todayBtn' => true, 'format' => 'yyyy-mm-dd']]); ?> <?php echo $form->field($model, 'end')->widget(DatePicker::className(), ['language' => 'pt', 'inline' => false, 'clientOptions' => ['autoclose' => true, 'todayBtn' => true, 'format' => 'yyyy-mm-dd']]); ?> </div> <?php echo $form->field($model, 'status')->dropDownList(app\enum\TaskStatus::getList(), ['onchange' => 'statusChanged();']); ?> <div id="status-control" class="<?php echo $model->status == '0' ? 'hidden' : ''; ?> "> <?php echo $form->field($model, 'done')->widget(RangeInput::classname(), ['width' => '70%', 'html5Options' => ['min' => 0, 'max' => 100, 'step' => 1], 'addon' => ['append' => ['content' => '%']]]); ?>
<?php echo $form->field($model, 'department_name')->textInput(['maxlength' => true]); ?> <!--<?php echo $form->field($model, 'department_create_data')->textInput(); ?> --> <?php echo $form->field($model, 'department_create_data')->widget(DatePicker::className(), ['inline' => false, 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]); ?> <?php echo $form->field($model, 'department_status')->dropDownList(['active' => 'Active', 'inactive' => 'Inactive'], ['prompt' => '']); ?> <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(); ?>
'labelField' => 'fullName', 'searchField' => ['fullName'], ], ]);*/ ?> <?php echo $form->field($model, 'series')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'num')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'date')->widget(\dosamigos\datepicker\DatePicker::className(), ['language' => 'ru', 'options' => ['class' => 'form-control', 'autocomplete' => 'off'], 'clientOptions' => ['forceParse' => true, 'todayBtn' => true, 'clearBtn' => true, 'autoclose' => true, 'todayHighlight' => true, 'format' => 'dd.mm.yyyy']]); ?> <?php echo $form->field($model, 'duration_months')->textInput(); ?> <?php echo $form->field($model, 'duration_days')->textInput(); ?> <?php echo $form->field($model, 'who_give')->widget(\dosamigos\selectize\SelectizeDropDownList::className(), ['items' => \yii\helpers\ArrayHelper::map(\app\models\DocMigration::find()->select(['who_give'])->active()->distinct()->orderBy('who_give asc')->asArray()->all(), 'who_give', 'who_give'), 'options' => ['multiple' => false, 'class' => 'form-control', 'prompt' => ''], 'clientOptions' => ['selectOnTab' => true, 'openOnFocus' => false, 'persist' => false, 'maxItems' => 1, 'create' => true, 'valueField' => 'who_give', 'labelField' => 'who_give', 'searchField' => ['who_give']]]); ?> <?php
?> <?php echo $form->errorSummary([$model, $fileModel]); ?> <?php echo $form->field($model, 'author_id')->dropDownList(ArrayHelper::map(Authors::getAllAuthors(), 'id', 'name'), ['prompt' => Yii::t('app', 'Выберите автора')]); ?> <?php echo $form->field($model, 'name')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'date_fabr')->widget(DatePicker::className(), ['language' => 'ru', 'clientOptions' => ['autoclose' => true, 'format' => 'dd/mm/yyyy'], 'options' => ['placeholder' => '12/31/2014']]); ?> <?php if ($model->preview) { ?> <img src="<?php echo Image::thumb($model->preview, 240); ?> "> <a href="<?php echo Url::to(['/books/admin/clear-image', 'id' => $model->primaryKey]); ?> " class="text-danger confirm-delete" title="<?php echo Yii::t('app', 'Clear image'); ?>
<div class="col col-sm-4"> <?php echo $form->field($model, 'name'); ?> </div> </div> <div class="row"> <div class="col col-sm-4"> <?php echo $form->field($model, 'date_published_from')->widget(DatePicker::className(), ['inline' => false, 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]); ?> </div> <div class="col col-sm-4"> <?php echo $form->field($model, 'date_published_to')->widget(DatePicker::className(), ['inline' => false, 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]); ?> </div> <div class="col col-sm-4"> <div> </div> <div class="form-group"> <?php echo Html::submitButton('Search', ['class' => 'btn btn-primary', 'id' => 'search']); ?> <?php echo Html::submitButton('Reset', ['class' => 'btn btn-default', 'name' => 'reset']); ?> </div> </div> </div>
$form = ActiveForm::begin(['action' => ['index'], 'method' => 'get']); ?> <div class="form-search-left"> <?php echo $form->field($model, 'order')->dropDownList(['author_id' => 'By author', 'date' => 'By publish date', 'name' => 'By book name']); ?> <?php echo $form->field($model, 'start')->widget(DatePicker::className(), ['template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]); ?> <?php echo $form->field($model, 'end')->widget(DatePicker::className(), ['template' => '{addon}{input}', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]); ?> </div> <div class="form-search-right"> <?php echo $form->field($model, 'name'); ?> <?php echo Html::submitButton('Search', ['class' => 'btn btn-primary']); ?> <?php echo Html::resetButton('Reset', ['class' => 'btn btn-default']); ?> </div>
</div> <div class="col-md-4"> <?php echo $form->field($model, 'apellido1')->textInput(['maxlength' => true]); ?> </div> <div class="col-md-4"> <?php echo $form->field($model, 'apellido2')->textInput(['maxlength' => true]); ?> </div> <div class="col-md-4"> <?php echo $form->field($model, 'rut')->textInput(['maxlength' => true]); ?> </div> <div class="col-md-4"> <?php echo $form->field($model, 'fechaNacimiento')->widget(DatePicker::className(), ['inline' => false, 'language' => 'es', 'options' => ['placeholder' => 'AÑO - MES - DIA'], 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd', 'startView' => 2]]); ?> </div> <div class="col-md-4"> <?php echo $form->field($model, 'entidad_id')->widget(Select2::classname(), ['data' => ArrayHelper::map(Entidad::find()->all(), 'id', 'nombre'), 'language' => 'en', 'hideSearch' => false, 'options' => ['placeholder' => 'Selecciona alguna entidad a la que pertenezcas'], 'pluginOptions' => ['allowClear' => true]]); ?> </div> <div class="col-md-4"> <?php echo $form->field($model, 'liceoCurso')->textInput(['maxlength' => true]); ?> </div> <div class="col-md-4"> <?php
?> </div> <?php } ?> <?php $f = ActiveForm::begin(['action' => 'index.php?r=book/form', 'options' => ['enctype' => 'multipart/form-data'], 'layout' => 'horizontal', 'fieldConfig' => ['horizontalCssClasses' => ['offset' => 'col-sm-offset-3', 'label' => 'col-sm-2 col-md-2', 'wrapper' => 'col-sm-9', 'error' => '', 'hint' => 'col-sm-3']]]); echo $f->field($book, 'category_id')->dropdownList($categoryIds, ['style' => 'width: 200px']); // echo $f->field($book, 'code') // ->textInput(['style' => 'width: 100px']); //echo $f->field($book, 'name') //->textInput(['style' => 'width: 300px']);; echo $f->field($book, 'id_book'); echo $f->field($book, 'date_book')->widget(DatePicker::className(), ['language' => 'th', 'template' => '{input}{addon}', 'clientOptions' => ['autoclose' => TRUE, 'format' => 'yyyy-mm-dd']]); echo $f->field($book, 'date_recieve')->widget(DatePicker::className(), ['language' => 'th', 'template' => '{input}{addon}', 'clientOptions' => ['autoclose' => TRUE, 'format' => 'yyyy-mm-dd']]); echo $f->field($book, 'begin_book')->textInput(['style' => 'width: 300px']); echo $f->field($book, 'target')->textInput(['style' => 'width: 300px']); echo $f->field($book, 'title'); // ->textInput(['style' => 'width: 100px']);; /*echo $f->field($book, 'person') ->textInput(['style' => 'width: 100px']); echo $f->field($book, 'status') ->textInput(['style' => 'width: 100px']);*/ $a = "ไฟล์เดิม"; echo $f->field($book, 'id_user')->dropdownList($userIds, ['style' => 'width:200px']); echo $f->field($book, 'id')->hiddenInput()->label(false); echo $f->field($book, 'img')->fileInput() . " \n . \n . \n . ไฟล์เดิม" . " " . " <a href=../uploads/{$book->img} >" . $book->img . "</br></br>"; ?> <?php // echo Html::img('../uploads/'.$book->img);