<div class="col-xs-6"> <?php echo $form->field($model, 'image_only')->widget(SwitchInput::classname(), ['type' => SwitchInput::CHECKBOX]); ?> </div> </div> <div class="row"> <div class="col-sm-6 "> <?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> <div class="col-sm-6 "> <?php echo $form->field($model, 'position')->widget(TouchSpin::classname(), ['pluginOptions' => ['min' => 0, 'max' => 20, 'step' => 1, 'handle' => 'triangle', 'tooltip' => 'always']]); ?> </div> </div> <div class="row"> <div class="col-sm-6 "> <?php if ($module->enableUpload) { echo $form->field($model, 'image')->widget(KCFinderInputWidget::className(), ['multiple' => false, 'kcfOptions' => $kcfOptions, 'kcfBrowseOptions' => ['type' => 'images', 'lng' => substr(Yii::$app->language, 0, 2)]]); } else { echo $form->field($model, 'image')->textInput(['placeholder' => Yii::t('app', 'Url of image')]); } ?> </div> <div class="col-sm-6 ">
/* @var $form yii\widgets\ActiveForm */ ?> <strong><?php echo Yii::t('backend', 'Fields with <span style="color: red;">*</span> is required.'); ?> </strong> <br /><br /> <div class="col-sm-6"> <?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]); ?> <?php echo $form->field($model, 'amount_text')->widget(TouchSpin::classname(), ['pluginOptions' => ['min' => 0.25, 'max' => 9.0, 'step' => 0.25, 'decimals' => 2, 'boostat' => 1, 'maxboostedstep' => 1]])->label(Yii::t('backend', 'Amount') . ' <span style="color: red;">*</span>'); ?> <?php $unit_data = backend\models\Unit::find()->select(['unit_id', 'unit_text'])->orderBy('unit_text')->all(); $unit_list = \yii\helpers\ArrayHelper::map($unit_data, 'unit_id', 'unit_text'); echo $form->field($model, 'unit_id')->dropDownList($unit_list, ['prompt' => Yii::t('backend', 'Select...')])->label(Yii::t('backend', 'Use Unit') . ' <span style="color: red;">*</span>'); ?> <?php echo $form->field($model, 'amount_img_temp')->widget(FileInput::classname(), ['options' => ['accept' => 'image/jpeg, image/gif, image/png, image/svg+xml'], 'pluginOptions' => ['showCaption' => true, 'showRemove' => true, 'showUpload' => false, 'browseLabel' => '', 'removeLabel' => '', 'removeClass' => 'btn btn-danger', 'initialPreview' => !empty($model->amount_img) ? [Html::img($model->amount_img, ['class' => 'file-preview-image'])] : [], 'initialCaption' => !empty($model->amount_img) ? ' /' . $model->amount_img : ' ']])->label(Yii::t('backend', 'Image') . ' <span style="color: red;">*</span>'); ?> <?php echo $form->field($model, 'note')->textarea(['rows' => 6]); ?>
<div class="col-md-6"> <div class="form-group"> <?php echo $form->field($model2, 'tgl_selesai')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Tanggal Kembali'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-m-d']])->label('Tangal Kembali'); ?> </div> <div class="form-group"> <?php echo $form->field($model, 'tgl_penugasan')->widget(DatePicker::classname(), ['options' => ['id' => 'tglsp', 'require' => true, 'placeholder' => 'Tanggal Penugasan'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-m-d']])->label('Tanggl Penugasan'); ?> </div> <div class="form-group"> <?php echo $form->field($model, 'uang_makan')->widget(TouchSpin::classname(), ['options' => ['id' => 'idmakan', 'placeholder' => 'Masukan Jumlah Uang Makan'], 'pluginOptions' => ['buttonup_class' => 'btn btn-primary', 'buttondown_class' => 'btn btn-info', 'buttonup_txt' => '<i class="glyphicon glyphicon-plus-sign"></i>', 'buttondown_txt' => '<i class="glyphicon glyphicon-minus-sign"></i>']]); ?> </div> </div> </div> </div> <div id="step-2"> <br/> <h2 class="StepTitle">Input Data Pembiayaan</h2> <br/> <table width="1000px" class="table table-striped table-bordered"> <tr style="background-color:#4e95f4;"> <td>No</td><td>Kategori Pembiayaan</td><td style="width:130px;">Bukti Kwitansi</td><td>Volume </td><td>Harga Satuan</td><td>Jumlah</td><td>Urian Pembiyaian</td> </tr> <tbody id="container"> <!-- nanti rows nya muncul di sini -->
'dopparams' => [ 'idinstallakt' => (string) filter_input(INPUT_GET, 'idinstallakt'), ], ]));*/ ?> <?php echo $form->field($model, 'id_parent')->widget(Select2::classname(), Proc::DGselect2(['model' => $model, 'resultmodel' => new app\models\Fregat\Mattraffic(), 'fields' => ['keyfield' => 'id_parent'], 'placeholder' => 'Введите инвентарный номер материальной ценности', 'fromgridroute' => 'Fregat/mattraffic/forinstallakt_matparent', 'resultrequest' => 'Fregat/tr-mat/selectinputfortrmatparent', 'thisroute' => $this->context->module->requestedRoute, 'methodquery' => 'selectinputfortrmat_parent', 'methodparams' => ['idinstallakt' => (string) filter_input(INPUT_GET, 'idinstallakt')], 'dopparams' => ['idinstallakt' => (string) filter_input(INPUT_GET, 'idinstallakt')]])); ?> <?php echo $form->field($model, 'id_mattraffic')->widget(Select2::classname(), array_merge(Proc::DGselect2(['model' => $model, 'resultmodel' => new app\models\Fregat\Mattraffic(), 'fields' => ['keyfield' => 'id_mattraffic'], 'placeholder' => 'Введите инвентарный номер материальной ценности', 'fromgridroute' => 'Fregat/mattraffic/forinstallakt_mat', 'resultrequest' => 'Fregat/tr-mat/selectinputfortrmatchild', 'thisroute' => $this->context->module->requestedRoute, 'methodquery' => 'selectinputfortrmat_child', 'methodparams' => ['idinstallakt' => (string) filter_input(INPUT_GET, 'idinstallakt')], 'dopparams' => ['foreigndo' => '1', 'idinstallakt' => (string) filter_input(INPUT_GET, 'idinstallakt')]]), ['pluginEvents' => ["select2:select" => "function() { SetMaxNumberByMaterial(); }", "select2:unselect" => "function() { UnSetMaxNumberByMaterial(); }"]]))->label('Перемещаемая материальная ценность'); ?> <?php echo $form->field($Mattraffic, 'mattraffic_number', ['inputTemplate' => '<div class="input-group">{input}<span id="mattraffic_number_max" class="input-group-addon">' . $mattraffic_number_max . '</span></div>'])->widget(TouchSpin::classname(), ['options' => ['class' => 'form-control setsession'], 'pluginOptions' => ['verticalbuttons' => true, 'min' => 0.001, 'max' => 10000000000, 'step' => 1, 'decimals' => 3, 'forcestepdivisibility' => 'none']]); ?> <div class="form-group"> <div class="panel panel-default"> <div class="panel-heading"> <?php echo Html::submitButton('<i class="glyphicon glyphicon-plus"></i> Добавить', ['class' => 'btn btn-success']); ?> </div> </div> </div> <?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 $form = ActiveForm::begin(); ?> <div class="well"> <div class="row"> <div class="col-md-6"><?= $form->field($model, 'produto_idproduto')->widget(Select2::classname(), [ 'options' => ['placeholder' => 'Selecione o produto...'], 'pluginOptions' => [ 'allowClear' => true, 'minimumInputLength' => 2, 'ajax' => [ 'url' => $url_produto, 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {search:params.term}; }') ], ], ]) ?></div> <div class="col-md-6"><?= $form->field($model, 'quantidade')->widget(TouchSpin::classname(),[ 'options' => ['placeholder' => $model->getAttributeLabel('quantidade')], 'pluginOptions' => [ 'max' => 100000, 'buttonup_class' => 'btn btn-primary', 'buttondown_class' => 'btn btn-info', 'buttonup_txt' => '<i class="glyphicon glyphicon-plus-sign"></i>', 'buttondown_txt' => '<i class="glyphicon glyphicon-minus-sign"></i>' ] ]) ?></div> </div> </div> <!-- Campo 'create_at é setado automaticamente' --> <div class="form-group"> <?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Cadastrar') : Yii::t('app', 'Atualizar'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
'url' => $urlLoja, 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {search:params.term}; }'), //'results' => new JsExpression('function(data,page) { return {results:data.results}; }'), ], //'initSelection' => new JsExpression($initScript_loja), ], 'options' => ['prompt' => \Yii::t('app', 'Escolha a loja de destino')], ]);?> </div> <div class="col-md-4"> <?= $form->field($model, 'quantidade')->widget(TouchSpin::classname(), [ 'options' => ['placeholder' => $model->getAttributeLabel('quantidade')], 'pluginOptions' => [ 'max' => 100000, 'buttonup_class' => 'btn btn-primary', 'buttondown_class' => 'btn btn-info', 'buttonup_txt' => '<i class="glyphicon glyphicon-plus-sign"></i>', 'buttondown_txt' => '<i class="glyphicon glyphicon-minus-sign"></i>' ] ]); ?> </div> <div class="form-group"> <div class="col-md-12"> <?= Html::submitButton(Yii::t('app', 'Salvar'), ['class' => 'btn btn-success']) ?>
/* @var $model app\models\Fregat\TrMatOsmotr */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="tr-mat-osmotr-form"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'id_tr_mat')->widget(Select2::classname(), Proc::DGselect2(['model' => $model, 'resultmodel' => new app\models\Fregat\TrMat(), 'fields' => ['keyfield' => 'id_tr_mat'], 'placeholder' => 'Введите инвентарный номер или наименование материала', 'fromgridroute' => 'Fregat/tr-mat/fortrmatosmotr', 'resultrequest' => 'Fregat/tr-mat/selectinputfortrmatosmotr', 'thisroute' => $this->context->module->requestedRoute, 'methodquery' => 'selectinputfortrmatosmotr', 'methodparams' => ['idosmotraktmat' => (string) filter_input(INPUT_GET, 'id')], 'dopparams' => ['idosmotraktmat' => (string) filter_input(INPUT_GET, 'id')]])); ?> <?php echo $form->field($model, 'tr_mat_osmotr_number')->widget(TouchSpin::classname(), ['options' => ['class' => 'form-control setsession'], 'pluginOptions' => ['verticalbuttons' => true, 'min' => 0, 'max' => 10000000000, 'step' => 1, 'decimals' => 3, 'forcestepdivisibility' => 'none']]); ?> <?php echo $form->field($model, 'id_reason')->widget(Select2::classname(), Proc::DGselect2(['model' => $model, 'resultmodel' => new app\models\Fregat\Reason(), 'fields' => ['keyfield' => 'id_reason', 'resultfield' => 'reason_text'], 'placeholder' => 'Выберете причину неисправности', 'fromgridroute' => 'Fregat/reason/index', 'resultrequest' => 'Fregat/reason/selectinput', 'thisroute' => $this->context->module->requestedRoute])); ?> <?php echo $form->field($model, 'tr_mat_osmotr_comment')->textarea(['class' => 'form-control setsession', 'maxlength' => 1024, 'placeholder' => 'Введите дополнительную информацию о неисправности', 'rows' => 10, 'style' => 'resize: none']); ?> <div class="form-group"> <div class="panel panel-default"> <div class="panel-heading">
/** * @param $Form * @param $ActiveRecord * @param $FieldName * @param null $Options */ public static function FilterFieldIntCondition($Form, $ActiveRecord, $FieldName, $Options = NULL) { if (!is_array($Options)) { $Options = []; } echo '<div class="form-group"><label class="control-label" for="' . $ActiveRecord->formName() . '-' . $FieldName . '">'; echo $ActiveRecord->getAttributeLabel($FieldName); echo '</label><div class="row"><div class="col-xs-5">'; echo $Form->field($ActiveRecord, $FieldName . '_znak')->widget(Select2::classname(), ['hideSearch' => true, 'data' => ['>=' => 'Больше или равно', '<=' => 'Меньше или равно', '=' => 'Равно'], 'options' => ['placeholder' => 'Выберете знак равенства', 'class' => 'form-control', 'style' => 'width; 215px;'], 'theme' => Select2::THEME_BOOTSTRAP])->label(false); echo '</div><div class="col-xs-7">'; echo $Form->field($ActiveRecord, $FieldName)->widget(TouchSpin::classname(), ['options' => ['class' => 'form-control'], 'pluginOptions' => array_merge(['verticalbuttons' => true, 'forcestepdivisibility' => 'none'], $Options)])->label(false); echo '</div></div></div>'; }