<p>Publish final flights when done.</p> </div> <div class="row"> <div class="col-lg-2"> <label class="control-label">Competition start</label> <p><strong><?php echo Yii::$app->formatter->asDate($competition->start_date); ?> </strong></p> </div> <div class="col-lg-2"> <label class="control-label">First flight start time</label> <?php echo TimePicker::widget(['name' => 'GLtimeStart', 'options' => ['id' => 'GLtimeStart'], 'pluginOptions' => ['defaultTime' => substr($competition->start_date, 11, 5), 'minuteStep' => 1, 'showMeridian' => false]]); ?> </div> <div class="col-lg-3"> <label class="control-label">Flight time</label> <?php echo TouchSpin::widget(['name' => 'GLdeltaStart', 'options' => ['id' => 'GLdeltaStart'], 'pluginOptions' => ['postfix' => 'min', 'initval' => $competition->flight_time ? $competition->flight_time : Competition::FLIGHT_TIME_DEFAULT, 'min' => 4, 'max' => 30]]); ?> </div> <div class="col-lg-3"> <label class="control-label">Flight size</label> <?php echo TouchSpin::widget(['name' => 'GLflightSize', 'options' => ['id' => 'GLflightSize'], 'pluginOptions' => ['postfix' => 'golfers', 'initval' => 4, 'min' => 1, 'max' => $competition->flight_size ? $competition->flight_size : Competition::FLIGHT_SIZE_DEFAULT], 'pluginEvents' => ['change' => 'cleanUp']]);
<div class="col-md-3"> <?php echo $form->field($model, 'skhour')->textInput(['maxlength' => 20, 'disabled' => 'disabled', 'placeholder' => 'ครั้ง']); ?> </div> </div> <!-- end 9th row --> <div class="row"> <div class="col-md-12"><hr /></div> </div> <!-- end hr row --> <div class="row"> <div class="col-md-3"> <?php echo '<label class="control-label">เวลาที่รถ refer ออกจาก รพ.</label>'; echo TimePicker::widget(['name' => 'timereferout', 'value' => $model->timereferout, 'addonOptions' => ['asButton' => true, 'buttonOptions' => ['class' => 'btn btn-default']], 'pluginOptions' => ['showSeconds' => false, 'showMeridian' => false, 'minuteStep' => 1], 'disabled' => true]); ?> </div> <div class="col-md-3"> <?php echo $form->field($model, 'timehosbeforerefer')->textInput(['maxlength' => 20, 'disabled' => 'disabled', 'placeholder' => 'เวลา(นาที)']); ?> </div> <div class="col-md-3"> <?php echo $form->field($model, 'refer_result')->dropDownList(['0' => '---', '1' => 'ตายใน รพ.', '2' => 'มีVF VTขณะอยู่ รพ.', '3' => 'มี CPR ขณะอยู่ รพ.', '4' => 'มี arrest, seizure, VF/VT ขณะนำส่ง', '5' => 'ตายระหว่างนำส่ง', '6' => 'อื่นๆ'], ['disabled' => 'disabled']); ?> </div> <div class="col-md-3"> <?php echo $form->field($model, 'result_reply_loeihos')->dropDownList(['0' => '---', '1' => 'STEMI', '2' => 'NSTEMI', '3' => 'LV aneurysm', '4' => 'UA', '5' => 'ไม่ใช่โรคหัวใจ'], ['disabled' => 'disabled']);
/** * @param null $options * @param null $pluginOptions * * @return string * @throws \Exception */ public function getItem($options = null, $pluginOptions = null) { switch ($this->type) { case self::TYPE_TEXT: return Html::input('text', 'Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']); case self::TYPE_EMAIL: return Html::input('email', 'Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']); case self::TYPE_NUMBER: return Html::input('number', 'Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']); case self::TYPE_TEXTAREA: return Html::textarea('Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']); case self::TYPE_COLOR: return ColorInput::widget(['value' => $this->value, 'name' => 'Setting[' . $this->code . ']', 'options' => $options != null ? $options : ['class' => 'form-control']]); case self::TYPE_DATE: return DatePicker::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['format' => 'yyyy-mm-dd', 'todayHighlight' => true]]); case self::TYPE_TIME: return TimePicker::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['minuteStep' => 1, 'showSeconds' => true, 'showMeridian' => false]]); case self::TYPE_DATETIME: return DateTimePicker::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => ['format' => 'yyyy-mm-dd H:i:s', 'todayHighlight' => true]]); case self::TYPE_PASSWORD: return PasswordInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['showMeter' => true, 'toggleMask' => false]]); case self::TYPE_ROXYMCE: return RoxyMceWidget::widget(['id' => 'Setting_' . $this->code, 'name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'action' => Url::to(['roxymce/default']), 'options' => $options != null ? $options : ['title' => $this->getName()], 'clientOptions' => $pluginOptions != null ? $pluginOptions : []]); case self::TYPE_SELECT: return Select2::widget(['value' => $this->value, 'name' => 'Setting[' . $this->code . ']', 'data' => $this->getStoreRange(), 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => ['allowClear' => true]]); case self::TYPE_MULTI_SELECT: $options['multiple'] = true; if (!isset($options['class'])) { $options['class'] = 'form-control'; } return Select2::widget(['name' => 'Setting[' . $this->code . ']', 'value' => explode(",", $this->value), 'data' => $this->getStoreRange(), 'options' => $options, 'pluginOptions' => ['allowClear' => true]]); case self::TYPE_FILE_PATH: $value = Yii::getAlias($this->store_dir) . DIRECTORY_SEPARATOR . $this->value; return FileInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $value, 'options' => $options != null ? $options : ['class' => 'form-control', 'multiple' => false], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['previewFileType' => 'any', 'showRemove' => false, 'showUpload' => false, 'initialPreview' => !$this->isNewRecord ? [$this->value] : []]]); case self::TYPE_FILE_URL: $value = $this->store_url . '/' . $this->value; return FileInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $value, 'options' => $options != null ? $options : ['class' => 'form-control'], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['previewFileType' => 'any', 'showRemove' => false, 'showUpload' => false, 'initialPreviewAsData' => true, 'initialPreviewFileType' => self::fileType(pathinfo($this->value, PATHINFO_EXTENSION)), 'initialPreview' => !$this->isNewRecord ? $value : [], 'initialCaption' => $this->value]]); case self::TYPE_PERCENT: return RangeInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $this->value, 'html5Options' => ['min' => 0, 'max' => 100, 'step' => 1], 'options' => $options != null ? $options : ['class' => 'form-control'], 'addon' => ['append' => ['content' => '%']]]); case self::TYPE_SWITCH: $selector = explode(',', $this->store_range); if (count($selector) != 2) { throw new ErrorException(Yii::t('setting', 'Switch Field should have store with 2 value, and negative is first. Example: no,yes'), 500); } return Html::hiddenInput('Setting[' . $this->code . ']', $selector[0]) . SwitchInput::widget(['name' => 'Setting[' . $this->code . ']', 'value' => $selector[1], 'containerOptions' => ['class' => 'nv-switch-container'], 'options' => $options != null ? $options : [], 'pluginOptions' => $pluginOptions != null ? $pluginOptions : ['state' => $this->value == $selector[1], 'size' => 'small', 'offText' => ucfirst($selector[0]), 'onText' => ucfirst($selector[1])]]); case self::TYPE_CHECKBOX: $random = rand(1000, 9999); return Html::checkboxList('Setting[' . $this->code . ']', explode(",", $this->value), $this->getStoreRange(), $options != null ? $options : ['class' => 'nv-checkbox-list checkbox', 'item' => function ($index, $label, $name, $checked, $value) use($random) { $html = Html::beginTag('div'); $html .= Html::checkbox($name, $checked, ['id' => 'Setting_checkbox_' . $label . '_' . $index . '_' . $random, 'value' => $value]); $html .= Html::label($label, 'Setting_checkbox_' . $label . '_' . $index . '_' . $random); $html .= Html::endTag('div'); return $html; }]); case self::TYPE_RADIO: $random = rand(1000, 9999); return Html::radioList('Setting[' . $this->code . ']', $this->value, $this->getStoreRange(), $options != null ? $options : ['class' => 'nv-checkbox-list radio', 'item' => function ($index, $label, $name, $checked, $value) use($random) { $html = Html::beginTag('div'); $html .= Html::radio($name, $checked, ['id' => 'Setting_radio_' . $label . '_' . $index . '_' . $random, 'value' => $value]); $html .= Html::label($label, 'Setting_radio_' . $label . '_' . $index . '_' . $random); $html .= Html::endTag('div'); return $html; }]); case self::TYPE_SEPARATOR: return '<hr>'; default: return Html::input('text', 'Setting[' . $this->code . ']', $this->value, $options != null ? $options : ['placeholder' => $this->getName(), 'class' => 'form-control']); } }
<?php echo TimePicker::widget(['model' => $model, 'attribute' => 'TRAN_TIME', 'pluginOptions' => ['minuteStep' => 1, 'defaultTime' => false]]); //$form->field($model, 'TRAN_TIME')->widget(DateControl::classname(), ['type'=>DateControl::FORMAT_TIME])->label(false); ?> </div> <div class="col-md-2" style="min-width: 220px;padding-bottom: 20px; "> <a class="btn btn-danger btn-recv-medic-time" style="width: 100% ; padding-bottom: 20px; padding-top: 20px; font-size: 18px;"><span class="badge" style="margin-right:1em;">4</span>รับยา</a> <?php echo TimePicker::widget(['model' => $model, 'attribute' => 'RECV_MEDIC_TIME', 'pluginOptions' => ['minuteStep' => 1, 'defaultTime' => false]]); //$form->field($model, 'RECV_MEDIC_TIME')->widget(DateControl::classname(), ['type'=>DateControl::FORMAT_TIME])->label(false); ?> </div> <div class="col-md-2" style="min-width: 220px;padding-bottom: 20px; "> <a class="btn btn-warning btn-paid-time" style="width: 100% ; padding-bottom: 20px; padding-top: 20px; font-size: 18px;"><span class="badge" style="margin-right:1em;">5</span>ชำระเงิน</a> <?php echo TimePicker::widget(['model' => $model, 'attribute' => 'PAID_TIME', 'pluginOptions' => ['minuteStep' => 1, 'defaultTime' => false]]); //$form->field($model, 'PAID_TIME')->widget(DateControl::classname(), ['type'=>DateControl::FORMAT_TIME])->label(false); ?> </div> </div> </div> </div> <?php $form = ActiveForm::begin(['id' => 'cln-tran-inj-test-form-update-4']); ?> <div class="row"> <div class="col-md-12"> <?php