<?php $title = isset($model->name) && !empty($model->name) ? $model->name : 'Advertise'; echo Html::img($model->getImageUrl(), ['class' => 'img-thumbnail center-block', 'alt' => $title, 'title' => $title]); ?> <?php echo $form->field($model, 'img')->widget(FileInput::classname(), ['name' => 'image-member', 'pluginOptions' => ['showCaption' => false, 'showRemove' => false, 'showUpload' => false, 'browseClass' => 'btn btn-primary btn-block', 'browseIcon' => '<i class="glyphicon glyphicon-camera"></i> ', 'browseLabel' => yii::t('advertise', 'Select Photo')], 'options' => ['accept' => 'image/*']]); ?> <?php echo $form->field($model, 'name')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'start_at')->widget(DateTimePicker::classname(), ['type' => DateTimePicker::TYPE_COMPONENT_PREPEND, 'options' => ['placeholder' => 'Enter event time ...'], 'value' => '23-Feb-1982 01:10', 'layout' => '{picker}{input}', 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'todayBtn' => true, 'format' => 'mm/dd/yyyy hh:ii:ss']]); ?> <?php echo $form->field($model, 'end_at')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Enter event time ...'], 'layout' => '{picker}{input}', 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'todayBtn' => true, 'format' => 'mm/dd/yyyy hh:ii:ss']]); ?> <?php echo $form->field($model, 'is_show')->widget(CheckboxX::classname(), ['autoLabel' => false, 'pluginOptions' => ['threeState' => false, 'size' => 'md']])->label("Is Show"); ?> <?php echo $form->field($model, 'link')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'body')->widget(CKEditor::className(), ['options' => ['rows' => 6], 'preset' => 'advanced']); ?> <?php $langues = BLanguecenter::find()->where(['is_show' => 1])->orderBy('ordinal_view ASC')->all(); $id = '';
echo $form->field($model, 'title')->textInput(['maxlength' => true]); ?> <?php //echo $form->field($model, 'intro')->textarea(['rows' => 6]) ?> <?php echo $form->field($model, 'url')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'start_time')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => '开始时间'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd hh:ii']]); ?> <?php echo $form->field($model, 'end_time')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => '到期时间'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd hh:ii']]); ?> <?php echo $form->field($model, 'status')->dropDownList(['1' => '启用', '0' => '禁用']); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? '添加' : '修改', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?>
<?php echo $form->field($model, 'title')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'description')->textarea(); ?> <?php echo $form->field($model, 'start')->widget(\kartik\datetime\DateTimePicker::classname(), ['options' => ['placeholder' => '请设置事件的起始时间...'], 'pluginOptions' => ['autoclose' => true]]); ?> <?php echo $form->field($model, 'end')->widget(\kartik\datetime\DateTimePicker::classname(), ['options' => ['placeholder' => '请设置事件的起始时间...'], 'pluginOptions' => ['autoclose' => true]]); ?> <?php echo $form->field($model, 'dow')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'url')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'className')->textInput(['maxlength' => true]); ?>
<?php $form = ActiveForm::begin(); ?> <?php echo $form->field($shift, 'title')->textInput(['maxlength' => 255]); ?> <div class="form-group"> <?php echo $form->field($shift, 'length')->textInput(); ?> <p class="help-block">In Hours</p> </div> <?php echo $form->field($shift, 'formStart')->widget(DateTimePicker::classname(), ['pluginOptions' => ['defaultTime' => false, 'format' => 'M d yyyy, H:ii P', 'startDate' => $model->event->formStart, 'endDate' => $model->event->formEnd]]); ?> <?php echo $form->field($shift, 'min_needed')->textInput(); ?> <?php echo $form->field($shift, 'max_needed')->textInput(); ?> <?php echo $form->field($shift, 'active')->checkbox(); ?> <?php echo $form->field($shift, 'requirement_id')->dropDownList(ArrayHelper::map($requirements, 'id', 'name'), ['prompt' => 'N/A']);
echo $form->field($model, 'name')->textInput(['maxlength' => true]); ?> <?php echo '<label class="control-label">Add Items</label>'; echo Select2::widget(['name' => 'meal_id', 'value' => $selected, 'data' => $data, 'options' => ['placeholder' => 'Select an item ...', 'multiple' => true], 'pluginOptions' => ['tags' => true, 'maximumInputLength' => 10]]); ?> <br /> <?php // Normal select with ActiveForm & model echo $form->field($model, 'day')->widget(Select2::classname(), ['data' => Yii::$app->params['lunchDays'], 'options' => ['placeholder' => 'Select a day of meal ...'], 'pluginOptions' => ['allowClear' => true]]); ?> <?php echo $form->field($model, 'deal_closing_time')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Enter deal closing time ...'], 'pluginOptions' => ['autoclose' => true, 'format' => 'mm/dd/yyyy hh:ii:ss']]); ?> <?php echo $form->field($model, 'meal_price')->textInput()->hint('')->label('Price'); ?> <?php echo $form->field($productImages, 'image')->widget(FileInput::classname(), ['options' => ['multiple' => false, 'accept' => 'image/*'], 'pluginOptions' => ['previewFileType' => 'image', 'showUpload' => false]]); ?> <!-- CHECKBOX BUTTON WITH LABEL OPTIONS, DISABLED AND STYLE PROPERTIES --> <?php echo $form->field($model, 'deal_status')->checkbox(array('label' => '', 'labelOptions' => array('style' => 'padding:5px;'), 'disabled' => false))->label('Active'); /*echo FileInput::widget([ 'name' => 'imageFile[]',
?> <?php echo $form->field($model, 'budzhet')->dropDownList(['1' => 'Относится', '0' => 'Не относится']); ?> <?php echo $form->field($model, 'date_zvit')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Выберите дату и время ...'], 'pluginOptions' => ['autoclose' => true, 'weekStart' => 1]]); ?> <br> <?php echo $form->field($model, 'date_zvit_us')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Выберите дату и время ...'], 'pluginOptions' => ['autoclose' => true, 'weekStart' => 1]]); ?> <br> <?php echo $form->field($model, 'key')->dropDownList(['0' => 'Не нужен', '1' => 'Нужен']); ?> <?php echo $form->field($model, 'zhurnal')->dropDownList(['1' => 'Внесено', '0' => 'Не Внесено']); ?> <?php echo $form->field($model, 'note')->textInput(['maxlength' => true]);
</li> <li><span>Stap 6</span><?php echo Html::a(Yii::t('request-project', 'Overview'), ['/request-project/overview']); ?> </li> </ul> <div class="col-sm-6"> <div class="row"> <div class="block"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'deadline')->widget(\kartik\datetime\DateTimePicker::classname(), ['pluginOptions' => ['minView' => 'month', 'format' => 'dd-mm-yyyy', 'weekStart' => 1, 'daysOfWeekDisabled' => [0, 6], 'todayHighlight' => true, 'startDate' => '+7d']]); ?> <?php echo $form->field($model, 'comment')->textArea(); ?> <?php echo Html::a(Yii::t('common', 'Last step'), ['step-2'], ['class' => 'btn btn-primary']); ?> <?php echo Html::submitButton(Yii::t('common', 'Next step'), ['class' => 'btn btn-primary']); ?> <?php ActiveForm::end();
<?php Modal::begin(['id' => 'edit-modal', 'header' => 'Edit', 'footer' => '<button type="button" class="confirm-btn btn btn-primary">Confirm</button>' . '<button type="button" class="btn btn-default undo-btn">Undo changes</button>' . '<button type="button" class="btn btn-default close-btn">Close</button>']); $form = ActiveForm::begin(['id' => 'edit-form', 'action' => ['connection/update'], 'enableAjaxValidation' => true]); ?> <input name="ConnectionForm[id]" value="<?php echo $conn->id; ?> " hidden> <?php $editForm = new ConnectionForm(); echo $form->field($editForm, 'acceptRelease')->widget(SwitchInput::classname(), ['pluginOptions' => ['onText' => 'Yes', 'offText' => 'No']]); echo $form->field($editForm, 'bandwidth')->widget(TouchSpin::classname(), ['pluginOptions' => ['postfix' => 'Mbps', 'verticalbuttons' => true, 'verticalupclass' => 'fa fa-plus', 'verticaldownclass' => 'fa fa-minus', 'min' => 10, 'max' => 1000000, 'step' => 10]]); echo $form->field($editForm, 'start')->widget(DateTimePicker::classname(), ['pluginOptions' => ['autoclose' => true, 'format' => 'dd/mm/yyyy hh:ii']]); echo $form->field($editForm, 'end')->widget(DateTimePicker::classname(), ['pluginOptions' => ['autoclose' => true, 'format' => 'dd/mm/yyyy hh:ii']]); ActiveForm::end(); ?> <?php Modal::end(); ?> <?php Modal::begin(['id' => 'cancel-modal', 'header' => 'Cancel', 'footer' => '<button type="button" class="btn btn-danger confirm-btn">Confirm</button>' . '<button type="button" class="btn btn-default close-btn">Close</button>']); ?> Do you want cancel this circuit? <?php Modal::end();
if ($(\'#contactmoment-customer_id\').val()) { existingContact(); } } ', View::POS_HEAD); $this->registerJs('$("document").ready(checkIfUpdating());'); ?> <div class="contact-moment-form block"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'moment')->widget(\kartik\datetime\DateTimePicker::classname(), ['pluginOptions' => ['format' => 'yyyy-mm-dd h:ii:00']]); ?> <?php echo $form->field($model, 'comment')->textInput(['maxlength' => true]); ?> <div id="existing-user" style="display:none;"> <fieldset> <legend><?php echo Yii::t('project', 'Existing user'); ?> </legend> <?php echo Html::button(Yii::t('user', 'New User'), ['onClick' => 'js:newContact()', 'class' => 'btn btn-default']); ?>
<div class="col-sm-6"> <?php $availableStadiums = []; if (!$model->isNewRecord) { $stadium = Stadium::findOne($model->stadium_id); if (isset($stadium->id)) { $availableStadiums = [$stadium->id => $stadium->name]; } } echo $form->field($model, 'stadium_id')->widget(SelectizeDropDownList::classname(), ['loadUrl' => Url::to(['stadium/stadium-list']), 'items' => $availableStadiums, 'options' => ['multiple' => false], 'clientOptions' => ['valueField' => 'value', 'labelField' => 'text', 'persist' => false]]); ?> </div> <div class="col-sm-6"> <?php echo $form->field($model, 'date')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Выберите дату матча'], 'removeButton' => false, 'language' => 'ru-RU', 'pluginOptions' => ['language' => 'ru', 'autoclose' => true, 'format' => 'dd.mm.yyyy hh:ii']]); ?> </div> </div> <div class="row"> <div class="col-sm-6"> <?php $availableTeams = []; if (!$model->isNewRecord) { $team = Team::findOne($model->command_home_id); if (isset($team->id)) { $availableTeams = [$team->id => $team->name]; } } echo $form->field($model, 'command_home_id')->widget(SelectizeDropDownList::classname(), ['loadUrl' => Url::to(['team/team-list']), 'items' => $availableTeams, 'options' => ['multiple' => false], 'clientOptions' => ['valueField' => 'value', 'labelField' => 'text', 'persist' => false]]);
//= $form->field($model, 'feature')->textInput() ?> <?php echo $form->field($model, 'subject')->textInput(['maxlength' => 50]); ?> <?php echo $form->field($model, 'summary')->textarea(['maxlength' => 200]); ?> <?php echo $form->field($model, 'start_time')->widget(DateTimePicker::classname(), ['name' => 'start_time', 'type' => 2, 'pickerButton' => ['icon' => 'calendar'], 'options' => ['class' => 'form-control input-sm'], 'size' => 'md', 'pluginOptions' => ['format' => 'yyyy-mm-dd hh:ii', 'todayHighlight' => true, 'autoclose' => true, 'minView' => 0]]); ?> <?php echo $form->field($model, 'end_time')->widget(DateTimePicker::classname(), ['name' => 'end_time', 'type' => 2, 'pickerButton' => ['icon' => 'calendar'], 'options' => ['class' => 'form-control input-sm'], 'size' => 'md', 'pluginOptions' => ['format' => 'yyyy-mm-dd hh:ii', 'todayHighlight' => true, 'autoclose' => true, 'minView' => 0]]); ?> <?php echo $form->field($model, 'config')->textInput(['maxlength' => 500]); ?> <?php //= $form->field($model, 'create_time')->textInput() ?> <?php //= $form->field($model, 'update_time')->textInput() ?> <?php
$form = ActiveForm::begin(['action' => ['index'], 'method' => 'get', 'type' => ActiveForm::TYPE_INLINE]); ?> <?php echo $form->field($model, 'serial'); ?> <?php echo $form->field($model, 'number'); ?> <?php echo $form->field($model, 'expires_date')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Enter expires date'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd hh:ii:ss']]); ?> <?php echo $form->field($model, 'release_date')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Enter release date'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd hh:ii:ss']]); ?> <?php $status_list = ['Активна', 'Неактивна', 'Просроченна']; ?> <?php echo $form->field($model, 'status')->dropDownList($status_list, ['prompt' => 'Выберете статус']); ?> <?php // echo $form->field($model, 'using_date') ?> <?php // echo $form->field($model, 'cash') ?>
echo $form->field($model, 'borderColor')->widget(\kartik\widgets\ColorInput::className(), ['options' => ['placeholder' => '请设置颜色...']]); ?> <?php echo $form->field($model, 'backgroundColor')->widget(\kartik\widgets\ColorInput::className(), ['options' => ['placeholder' => '请设置颜色...']]); ?> </div> <div class="col-md-12"> <?php echo $form->field($model, 'start')->widget(\kartik\datetime\DateTimePicker::classname(), ['options' => ['placeholder' => '请设置事件的开始时间...'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd hh:ii:ss']]); ?> <?php echo $form->field($model, 'end')->widget(\kartik\datetime\DateTimePicker::classname(), ['options' => ['placeholder' => '请设置事件的结束时间...'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd hh:ii:ss']]); ?> <?php echo $form->field($model, 'url')->textInput(['maxlength' => 50]); ?> <?php echo $form->field($model, 'dow')->textInput(['maxlength' => 20]); ?> <?php echo $form->field($model, 'allDay')->widget(\kartik\widgets\SwitchInput::className(), ['pluginOptions' => ['onText' => '是', 'offText' => '否', 'onColor' => 'success', 'offColor' => 'danger']]); ?> <?php echo $form->field($model, 'editable')->widget(\kartik\widgets\SwitchInput::className(), ['pluginOptions' => ['onText' => '是', 'offText' => '否', 'onColor' => 'success', 'offColor' => 'danger']]); ?>
<?php echo $form->field($model, 'password_repeat')->passwordInput(); ?> <?php foreach ($roles as $row) { $CT_IDS[$row['description']] = $row['description']; } ?> <?php echo $form->field($model, 'usermode')->dropDownList($CT_IDS, ['prompt' => 'Select Role']); ?> <?php echo $form->field($model, 'active_date')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Active Date'], 'pluginOptions' => ['autoclose' => true]]); ?> <?php echo $form->field($model, 'flag_multiple')->dropDownList(Yii::$app->params['flag_multiple']); ?> <?php echo $form->field($model, 'rtries_count', ['inputOptions' => ['value' => 3]])->textInput(); ?> <?php echo $form->field($model, 'passage1', ['inputOptions' => ['value' => 100]])->textInput(); ?> <?php echo $form->field($model, 'passage2', ['inputOptions' => ['value' => 100]])->textInput();
/* @var $this yii\web\View */ /* @var $model app\models\History */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="history-form"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'number')->widget(\yii\widgets\MaskedInput::className(), ['mask' => '9999 9999 9999 9999'])->textInput(['placeholder' => '9999 9999 9999 9999', 'value' => $number, 'readonly' => '']); ?> <?php echo $form->field($model, 'use_date')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Choose date and time'], 'convertFormat' => true, 'pluginOptions' => ['format' => 'yyyy-MM-dd HH:i', 'startDate' => date('yyyy-MM-dd HH:i'), 'todayHighlight' => true]]); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?> </div>
<div class="col-xs-12 col-sm-12 col-lg-12"> <?php echo $form->field($model, 'event_detail')->textArea(['maxlength' => 255]); ?> </div> <div class="col-xs-12 col-sm-12 col-lg-12"> <?php echo $form->field($model, 'event_start_date')->widget(DateTimePicker::classname(), ['type' => DateTimePicker::TYPE_INPUT, 'options' => ['placeholder' => '', 'readOnly' => true], 'pluginOptions' => ['autoclose' => true, 'maxView' => 0, 'startView' => 0, 'format' => 'dd-mm-yyyy hh:ii:ss']]); ?> </div> <div class="col-xs-12 col-sm-12 col-lg-12"> <?php echo $form->field($model, 'event_end_date')->widget(DateTimePicker::classname(), ['type' => DateTimePicker::TYPE_INPUT, 'options' => ['placeholder' => '', 'readOnly' => true], 'pluginOptions' => ['autoclose' => true, 'format' => 'dd-mm-yyyy hh:ii:ss']]); ?> </div> <div class="col-xs-12 col-sm-12 col-lg-12"> <?php echo $form->field($model, 'event_type')->dropDownList([1 => 'Holiday', 2 => 'Important Notice', 3 => 'Meeting', 4 => 'Messages'], ['prompt' => Yii::t('dash', '--- Select Type ---')]); ?> </div> <div class="form-group col-xs-12 col-sm-6 col-lg-5 no-padding edusecArLangCss"> <div class="col-xs-6"> <?php echo Html::submitButton($model->isNewRecord ? Yii::t('dash', 'Create') : Yii::t('dash', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success btn-block' : 'btn btn-info btn-block']); ?>
$form = ActiveForm::begin(['options' => ['class' => 'form-horizontal']]); ?> <?php echo $form->field($model, 'title')->multilingualTextInput(['maxlength' => 255]); ?> <?php echo $form->field($model, 'image_id')->widget(DropzoneWidget::className(), ['existingFile' => $model->image, 'options' => ['class' => 'col-md-3 col-sm-4 col-xs-6']]); ?> <?php echo $form->field($model, 'publish_date', ['inputColumnClass' => 'col-sm-4'])->widget(DateTimePicker::classname(), ['size' => 'sm', 'options' => ['placeholder' => 'Enter publish date ...'], 'pluginOptions' => ['todayHighlight' => true, 'format' => 'yyyy-mm-dd hh:ii:ss', 'autoclose' => true]]); ?> <?php echo $form->field($model, 'content')->widget(app\components\forms\RedactorWidget::className(), ['css' => ['@web/css/style-redactor.css' => ['depends' => ['app\\components\\assets\\bower\\AnimateCssAsset', 'app\\components\\assets\\bower\\WowJsAsset']]]]); ?> <div class="row"> <div class="col-sm-10 col-sm-offset-2"> <?php echo $form->beginSectionHider(['title' => 'Seo', 'key' => 'seo']); ?>
?> </div> <div class="col-xs-12 col-sm-6 col-md-3"> <?php echo $form->field($model, 'layout')->widget(\kartik\widgets\Select2::classname(), ['data' => Module::getInst()->pageLayouts]); ?> </div> <div class="col-xs-12 col-sm-6 col-md-3"> <?php echo $form->field($model, 'type')->widget(\kartik\widgets\Select2::classname(), ['data' => Module::getInst()->pageTypes]); ?> </div> <div class="col-xs-12 col-sm-6 col-md-3"> <?php echo $form->field($model, 'date')->widget(\kartik\datetime\DateTimePicker::classname(), ['pluginOptions' => ['todayHighlight' => true, 'todayBtn' => true, 'autoclose' => true, 'minuteStep' => 1, 'format' => 'yyyy-mm-dd hh:ii:00']]); ?> </div> </div> <section class="panel adm-langs-panel"> <header class="panel-heading bg-light"> <ul class="nav nav-tabs nav-justified text-uc"> <?php foreach (Yii::$app->getI18n()->getLanguages() as $id_language => $language) { ?> <li><a href="#lang-<?php echo $id_language; ?> " data-toggle="tab"><?php
<?php echo $form->field($model, 'description')->textArea(['rows' => 4, 'maxlength' => 155, 'placeholder' => Yii::t('app', 'This description also used as meta description')]); ?> <?php echo $form->field($model, 'tags')->widget(Select2::classname(), ['options' => ['placeholder' => Yii::t('app', 'Put additional tags ...')], 'data' => $model->getTags(), 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' ']]]); ?> </div> <div class="col-md-6"> <div class="well"> <?php echo $form->field($model, 'time')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Select media time ...', 'readonly' => true], 'removeButton' => false, 'convertFormat' => true, 'pluginOptions' => ['format' => 'yyyy-MM-dd HH:i:s', 'todayHighlight' => true]]); ?> <div class="row"> <div class="col-md-12"> <?php if ($module->enableUpload) { echo $form->field($model, 'file')->widget(KCFinderInputWidget::className(), ['multiple' => false, 'kcfOptions' => $kcfOptions, 'kcfBrowseOptions' => ['type' => 'files', 'lng' => substr(Yii::$app->language, 0, 2)]]); } else { echo $form->field($model, 'file')->textInput(['placeholder' => Yii::t('app', 'Url of file')]); } ?> </div> </div>
public function dateTime($options = []) { Html::addCssClass($options, 'form-control'); return $this->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Select operating time ...'], 'convertFormat' => true, 'pluginOptions' => ArrayHelper::merge(['format' => 'dd.MM.yyyy H:i', 'todayHighlight' => true], $options)]); }
break; case Content::ATTR_TYPE_URL: echo $form->field($model, $attr, ['template' => '{label}<div class="input-group"><span class="input-group-addon attached-button-chain"><i class="icon fa fa-chain"></i></span>{input}</div> {hint}{error}'])->textInput(isset($value['config']) ? $value['config'] : []); $urlAttribute = $attr; break; case Content::ATTR_TYPE_ADVANCED_TEXT: echo $form->field($model, $attr, ['options' => ['class' => 'form-group col-sm-12']])->widget(Widget::className(), isset($value['config']) ? $value['config'] : []); break; case Content::ATTR_TYPE_IMAGE: echo $form->field($model, $attr)->widget(FileAPI::className(), isset($value['config']) ? $value['config'] : []); break; case Content::ATTR_TYPE_TEXT: echo $form->field($model, $attr)->textarea(isset($value['config']) ? $value['config'] : []); break; case Content::ATTR_TYPE_DATE: echo $form->field($model, $attr)->widget(DateTimePicker::classname(), isset($value['config']) ? $value['config'] : []); break; case Content::ATTR_TYPE_BOOLEAN: echo $form->field($model, $attr)->checkbox(); break; case Content::ATTR_TYPE_DROPDOWN: echo $form->field($model, $attr)->dropDownList(isset($value['items']) ? $value['items'] : [], isset($value['config']) ? $value['config'] : []); break; default: break; } } if ($titleAttribute != null && $urlAttribute != null) { $this->registerJs(' $(document).ready(function(){ $("#' . Html::getInputId($model, $titleAttribute) . '").syncTranslit({destination: "' . Html::getInputId($model, $urlAttribute) . '"});
<?php echo $form->field($model, 'content_category_id')->dropDownList($model::categoryDropdown()); ?> <?php $pluginOptions = ['showUpload' => false, 'showRemove' => false, 'overwriteInitial' => true, 'browseLabel' => "Обзор...", 'allowedFileExtensions' => ['jpg', 'jpeg', 'gif', 'png']]; if (isset($image) && $image->getFileUrl()) { $pluginOptions['initialPreview'] = [Html::img($image->getFileUrl())]; } echo $form->field($model, 'image')->widget(FileInput::classname(), ['options' => ['accept' => 'image/*', 'multiple' => false], 'pluginOptions' => $pluginOptions]); ?> <?php if (!$model->isNewRecord) { $model->created_at = date('d.m.Y H:i', strtotime($model->created_at)); echo $form->field($model, 'created_at')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Время создания поста'], 'removeButton' => false, 'language' => 'ru-RU', 'pluginOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy hh:ii']]); } ?> <div class="panel panel-default"> <div class="panel-heading clearfix"> <a href="javascript:void(0)" class="spoiler-trigger pull-left" data-toggle="collapse">Привязать к матчу</a> <button type="button" class="spoiler-trigger pull-right btn btn-default btn-xs <?php echo isset($relation->match) ? 'dropup' : 'dropdown'; ?> " data-toggle="collapse"><span class="caret"></span></button> </div> <div class="panel-collapse collapse <?php echo isset($relation->match) ? 'in' : 'out'; ?> ">
?> <?php echo $form->field($model, 'destination')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'miles')->textInput(); ?> <?php echo $form->field($model, 'start_time')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Enter start time ...'], 'pluginOptions' => ['autoclose' => true]]); ?> <?php echo $form->field($model, 'end_time')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Enter end time ...'], 'pluginOptions' => ['autoclose' => true]]); ?> <?php echo $form->field($model, 'status')->dropDownList($status, ['prompt' => '- Choose Route status -']); ?> <?php echo $form->field($model, 'about')->textarea(['rows' => 6]); ?> <!-- --><?php //$form->field($model, 'check_list')->textarea(['rows' => 6]) ?>
?> <div class="row"> <div class="col-sm-6"> <?php echo $form->field($model, 'name')->textInput(['maxlength' => true]); ?> <div class="row"> <div class="col-sm-6"> <?php echo $form->field($model, 'active_from')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => ''], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd hh:ii:ss']]); ?> </div> <div class="col-sm-6"> <?php echo $form->field($model, 'active_to')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => ''], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd hh:ii:ss']]); ?> </div> </div> <?php echo $form->field($model, 'category_ids')->checkboxList(ArrayHelper::map($categoriesList, 'id', 'category')); ?> <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> </div> <div class="col-sm-6"> <?php echo $form->field($model, 'content')->widget(TinyMCE::className());