use yii\helpers\Html; use yii\helpers\ArrayHelper; use yii\helpers\Url; use kartik\widgets\ActiveForm; use kartik\builder\Form; use kartik\datecontrol\DateControl; use kartik\widgets\FileInput; use kartik\builder\TabularForm; use common\widgets\edit\InputFile; use common\widgets\edit\Redactor; /** * @var yii\web\View $this * @var common\models\Product $model * @var yii\widgets\ActiveForm $form */ ?> <div class="product-form"> <?php $form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]); echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['organization_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => ArrayHelper::map(common\models\Organization::find()->all(), 'id', 'title'), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]], 'type_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => ArrayHelper::map(common\models\ProductType::find()->all(), 'id', 'title'), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]], 'specialist_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => ArrayHelper::map(common\models\Specialist::find()->all(), 'id', 'last_name'), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]], 'title' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Название продукта...', 'maxlength' => 255]], 'title_full' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . $model->getAttributeLabel('title_full'), 'maxlength' => 255]], 'price' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Цена...']], 'price_discount' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Цена со скидкой...']], 'intro' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Redactor::className(), 'options' => ['filemanager' => ['webpath' => '/'], 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Полное описание...', 'rows' => 6]]], 'body' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Redactor::className(), 'options' => ['filemanager' => ['webpath' => '/'], 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Полное описание...', 'rows' => 6]]], 'body_buy' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Redactor::className(), 'options' => ['filemanager' => ['webpath' => '/'], 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Полное описание для покупки...', 'rows' => 6]]], 'keywords' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Ключевые слова...', 'maxlength' => 255]], 'priority' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Название продукта...', 'maxlength' => 255]], 'agreement_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => ArrayHelper::map(common\models\Agreement::find()->all(), 'id', 'title'), 'pluginOptions' => ['allowClear' => true]]]]]); echo Html::button(Yii::t('app', 'Cancel'), ['class' => 'btn btn-default', 'style' => 'margin-right: 20px', 'onclick' => 'window.location = "' . Url::to(['index']) . '"']); echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 10px', 'name' => 'goto', 'value' => 'list']); echo Html::submitButton(Yii::t('app', 'Apply'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 0px']); ActiveForm::end(); ?> </div>
use yii\helpers\Html; use yii\helpers\ArrayHelper; use yii\helpers\Url; use kartik\widgets\ActiveForm; use kartik\builder\Form; use kartik\datecontrol\DateControl; use kartik\widgets\FileInput; use kartik\builder\TabularForm; use common\widgets\edit\InputFile; use common\widgets\edit\Redactor; /** * @var yii\web\View $this * @var common\models\Agreement $model * @var yii\widgets\ActiveForm $form */ ?> <div class="agreement-form"> <?php $form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]); echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['title' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Загловок...', 'maxlength' => 255]], 'body' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Redactor::className(), 'options' => ['filemanager' => ['webpath' => '/'], 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Полное описание...', 'rows' => 6], 'clientOptions' => ['menubar' => true]]], 'default_flag' => ['type' => Form::INPUT_CHECKBOX, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Флаг...']]]]); echo Html::button(Yii::t('app', 'Cancel'), ['class' => 'btn btn-default', 'style' => 'margin-right: 20px', 'onclick' => 'window.location = "' . Url::to(['index']) . '"']); echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 10px', 'name' => 'goto', 'value' => 'list']); echo Html::submitButton(Yii::t('app', 'Apply'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 0px']); ActiveForm::end(); ?> </div>
use yii\helpers\Html; use yii\helpers\ArrayHelper; use yii\helpers\Url; use kartik\widgets\ActiveForm; use kartik\builder\Form; use kartik\datecontrol\DateControl; use kartik\widgets\FileInput; use kartik\builder\TabularForm; use common\widgets\edit\InputFile; use common\widgets\edit\Redactor; /** * @var yii\web\View $this * @var common\models\Diagnos $model * @var yii\widgets\ActiveForm $form */ ?> <div class="diagnos-form"> <?php $form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]); echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['body' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Redactor::className(), 'options' => ['filemanager' => ['webpath' => '/'], 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Полное описание...', 'rows' => 6]]], 'intro' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Redactor::className(), 'options' => ['filemanager' => ['webpath' => '/'], 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Полное описание...', 'rows' => 6]]], 'title' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Заголовок...', 'maxlength' => 255]]]]); echo Html::button(Yii::t('app', 'Cancel'), ['class' => 'btn btn-default', 'style' => 'margin-right: 20px', 'onclick' => 'window.location = "' . Url::to(['index']) . '"']); echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 10px', 'name' => 'goto', 'value' => 'list']); echo Html::submitButton(Yii::t('app', 'Apply'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 0px']); ActiveForm::end(); ?> </div>
use yii\helpers\Html; use yii\helpers\ArrayHelper; use yii\helpers\Url; use kartik\widgets\ActiveForm; use kartik\builder\Form; use kartik\datecontrol\DateControl; use kartik\widgets\FileInput; use kartik\builder\TabularForm; use common\widgets\edit\InputFile; use common\widgets\edit\Redactor; /** * @var yii\web\View $this * @var common\models\ProductType $model * @var yii\widgets\ActiveForm $form */ ?> <div class="product-type-form"> <?php $form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]); echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['cat_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => ArrayHelper::map(common\models\ProductCat::find()->where(['>', 'parent_id', '0'])->all(), 'id', 'title'), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]], 'title' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Название типа продукта...', 'maxlength' => 255]], 'icon_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => InputFile::className(), 'options' => ['language' => 'ru', 'controller' => 'elfinder', 'filter' => 'image', 'options' => ['class' => 'form-control'], 'buttonOptions' => ['class' => 'btn btn-default'], 'multiple' => false, 'path' => 'image']], 'body' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Redactor::className(), 'options' => ['filemanager' => ['webpath' => '/'], 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Полное описание...', 'rows' => 6]]], 'type_index' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => (new common\models\ProductType())->getTypeIndexList(), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]], 'diagnoses_list' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => ArrayHelper::map(\common\models\Diagnos::find()->all(), 'id', 'title'), 'options' => ['placeholder' => 'Выбрать...', 'multiple' => true], 'pluginOptions' => ['tags' => true, 'maximumInputLength' => 10]]]]]); echo Html::button(Yii::t('app', 'Cancel'), ['class' => 'btn btn-default', 'style' => 'margin-right: 20px', 'onclick' => 'window.location = "' . Url::to(['index']) . '"']); echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 10px', 'name' => 'goto', 'value' => 'list']); echo Html::submitButton(Yii::t('app', 'Apply'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 0px']); ActiveForm::end(); ?> </div>
use yii\helpers\Html; use yii\helpers\ArrayHelper; use yii\helpers\Url; use kartik\widgets\ActiveForm; use kartik\builder\Form; use kartik\datecontrol\DateControl; use kartik\widgets\FileInput; use kartik\builder\TabularForm; use common\widgets\edit\InputFile; use common\widgets\edit\Redactor; /** * @var yii\web\View $this * @var common\models\Organization $model * @var yii\widgets\ActiveForm $form */ ?> <div class="organization-form"> <?php $form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]); echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['title' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Заголовок...', 'maxlength' => 255]], 'main_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => InputFile::className(), 'options' => ['language' => 'ru', 'controller' => 'elfinder', 'filter' => 'image', 'options' => ['class' => 'form-control'], 'buttonOptions' => ['class' => 'btn btn-default'], 'multiple' => false, 'path' => 'organization']], 'intro' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Redactor::className(), 'options' => ['filemanager' => ['webpath' => '/'], 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Краткое описание...', 'rows' => 6]]], 'body' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Redactor::className(), 'options' => ['filemanager' => ['webpath' => '/'], 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Полное описание...', 'rows' => 6]]], 'doc_body' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Redactor::className(), 'options' => ['filemanager' => ['webpath' => '/'], 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Договор...', 'rows' => 6]]], 'address' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Адресс...', 'maxlength' => 150]], 'metro' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Метро...', 'maxlength' => 50]], 'phone' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => yii\widgets\MaskedInput::className(), 'options' => ['options' => ['class' => 'form-control', 'placeholder' => yii::t('app', 'Enter') . ' Телефон...'], 'mask' => '+7(999)999-99-99', 'clientOptions' => ['clearIncomplete' => true]]], 'phone2' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => yii\widgets\MaskedInput::className(), 'options' => ['options' => ['class' => 'form-control', 'placeholder' => yii::t('app', 'Enter') . ' Телефон...'], 'mask' => '+7(999)999-99-99', 'clientOptions' => ['clearIncomplete' => true]]], 'email' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Email...', 'maxlength' => 50]], 'priority' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Заголовок...', 'maxlength' => 255]], 'type_index' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => (new common\models\Organization())->getTypeIndexList(), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]], 'icon_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => InputFile::className(), 'options' => ['language' => 'ru', 'controller' => 'elfinder', 'filter' => 'image', 'options' => ['class' => 'form-control'], 'buttonOptions' => ['class' => 'btn btn-default'], 'multiple' => false, 'path' => 'image']]]]); echo Html::button(Yii::t('app', 'Cancel'), ['class' => 'btn btn-default', 'style' => 'margin-right: 20px', 'onclick' => 'window.location = "' . Url::to(['index']) . '"']); echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 10px', 'name' => 'goto', 'value' => 'list']); echo Html::submitButton(Yii::t('app', 'Apply'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 0px']); ActiveForm::end(); ?> </div>
use yii\helpers\Html; use yii\helpers\ArrayHelper; use yii\helpers\Url; use kartik\widgets\ActiveForm; use kartik\builder\Form; use kartik\datecontrol\DateControl; use kartik\widgets\FileInput; use kartik\builder\TabularForm; use common\widgets\edit\InputFile; use common\widgets\edit\Redactor; /** * @var yii\web\View $this * @var common\models\Specialist $model * @var yii\widgets\ActiveForm $form */ ?> <div class="specialist-form"> <?php $form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]); echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['intro' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Redactor::className(), 'options' => ['filemanager' => ['webpath' => '/'], 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Краткое описание...', 'rows' => 6]]], 'body' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Redactor::className(), 'options' => ['filemanager' => ['webpath' => '/'], 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Полное описание...', 'rows' => 6]]], 'middle_name' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Отчество...', 'maxlength' => 255]], 'email' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Email...', 'maxlength' => 100]], 'first_name' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Имя...', 'maxlength' => 255]], 'last_name' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Фамилия...', 'maxlength' => 255]], 'phone' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => yii\widgets\MaskedInput::className(), 'options' => ['options' => ['class' => 'form-control', 'placeholder' => yii::t('app', 'Enter') . ' Телефон...'], 'mask' => '+7(999)999-99-99', 'clientOptions' => ['clearIncomplete' => true]]], 'photo_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => InputFile::className(), 'options' => ['language' => 'ru', 'controller' => 'elfinder', 'filter' => 'image', 'options' => ['class' => 'form-control'], 'buttonOptions' => ['class' => 'btn btn-default'], 'multiple' => false, 'path' => 'image']], 'specTypes_list' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => ArrayHelper::map(\common\models\SpecialistType::find()->all(), 'id', 'title'), 'options' => ['placeholder' => 'Выбрать...', 'multiple' => true], 'pluginOptions' => ['tags' => true, 'maximumInputLength' => 10]]]]]); echo Html::button(Yii::t('app', 'Cancel'), ['class' => 'btn btn-default', 'style' => 'margin-right: 20px', 'onclick' => 'window.location = "' . Url::to(['index']) . '"']); echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 10px', 'name' => 'goto', 'value' => 'list']); echo Html::submitButton(Yii::t('app', 'Apply'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 0px']); ActiveForm::end(); ?> </div>
use yii\helpers\Html; use yii\helpers\ArrayHelper; use yii\helpers\Url; use kartik\widgets\ActiveForm; use kartik\builder\Form; use kartik\datecontrol\DateControl; use kartik\widgets\FileInput; use kartik\builder\TabularForm; use common\widgets\edit\InputFile; use common\widgets\edit\Redactor; /** * @var yii\web\View $this * @var common\models\Recommend $model * @var yii\widgets\ActiveForm $form */ ?> <div class="recommend-form"> <?php $form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]); echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['intro' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Redactor::className(), 'options' => ['filemanager' => ['webpath' => '/'], 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Полное описание...', 'rows' => 6]]], 'body' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Redactor::className(), 'options' => ['filemanager' => ['webpath' => '/'], 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Полное описание...', 'rows' => 6]]], 'list_order' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Сортировка...']], 'name' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Имя...', 'maxlength' => 255]], 'profession' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Профессия...', 'maxlength' => 255]], 'photo_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => InputFile::className(), 'options' => ['language' => 'ru', 'controller' => 'elfinder', 'filter' => 'image', 'options' => ['class' => 'form-control'], 'buttonOptions' => ['class' => 'btn btn-default'], 'multiple' => false, 'path' => 'image']]]]); echo Html::button(Yii::t('app', 'Cancel'), ['class' => 'btn btn-default', 'style' => 'margin-right: 20px', 'onclick' => 'window.location = "' . Url::to(['index']) . '"']); echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 10px', 'name' => 'goto', 'value' => 'list']); echo Html::submitButton(Yii::t('app', 'Apply'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 0px']); ActiveForm::end(); ?> </div>