Example #1
0
?>
    </div>
    <?php 
if (!Yii::$app->user->isGuest && Yii::$app->user->identity->isadmin) {
    ?>
    <div class="row">
        <?php 
    $form = \kartik\form\ActiveForm::begin(['type' => 'inline']);
    echo $form->field($model, 'airline')->textInput(['style' => 'width: 100px;']);
    echo $form->field($model, 'flightnumber')->textInput(['style' => 'width: 100px;']);
    echo $form->field($model, 'gate')->textInput(['style' => 'width: 100px;']);
    echo $form->field($model, 'aircraft')->textInput(['style' => 'width: 100px;']);
    echo $form->field($model, 'icaofrom')->textInput(['style' => 'width: 100px;', 'readonly' => !$model->isarrival]);
    echo $form->field($model, 'icaoto')->textInput(['style' => 'width: 100px;', 'readonly' => $model->isarrival == 1]);
    echo $form->field($model, 'timefrom')->widget(\kartik\widgets\TimePicker::className(), ['pluginOptions' => ['showMeridian' => false], 'options' => ['style' => 'width: 100px;']]);
    echo $form->field($model, 'timeto')->widget(\kartik\widgets\TimePicker::className(), ['pluginOptions' => ['showMeridian' => false], 'options' => ['style' => 'width: 100px;']]);
    echo \yii\bootstrap\Html::submitButton('<i class="fa fa-check"></i>Add', ['class' => 'btn btn-success btn-sm']);
    \kartik\form\ActiveForm::end();
    ?>
        <hr />
        <form method="post" class="form-horizontal" enctype="multipart/form-data">
            <div class="form-group field-batch-loading">
                <input id="form-token" type="hidden" name="<?php 
    echo Yii::$app->request->csrfParam;
    ?>
"
                       value="<?php 
    echo Yii::$app->request->csrfToken;
    ?>
"/>
                <label class="control-label" for="batch-loading">Batch loading(<?php 
Example #2
0
?>
</small>    Sub loc: <small><?php 
echo $persondetails->sublocn;
?>
</small> </kbd>
        </div>
                            <div class="row">
                                <div class="col-lg-6 col-md-6 col-sm-6">
                                    <?php 
echo $form->field($model, 'date_collect_urine')->widget(DatePicker::className(), ['dateFormat' => 'yyyy-MM-dd', 'options' => ['class' => 'form-control'], 'clientOptions' => ['changeMonth' => true, 'changeYear' => true, 'maxDate' => 'today']]);
?>
                                    <?php 
echo $form->field($model, 'date_received_urine')->widget(DatePicker::className(), ['dateFormat' => 'yyyy-MM-dd', 'options' => ['class' => 'form-control'], 'clientOptions' => ['changeMonth' => true, 'changeYear' => true, 'maxDate' => 'today']]);
?>
                                    <?php 
echo $form->field($model, 'time_received_urine')->widget(TimePicker::classname(), []);
?>
                                    
                                  
                                    
                                    
        
         <label>Aliquots</label>
        <div class="row">
              <div class="col-md-3"><?php 
echo $form->field($model, 'aliquot1')->checkbox();
?>
 </div>
              <div class="col-md-3"><?php 
echo $form->field($model, 'aliquot2')->checkbox();
?>
Example #3
0
                 <?php 
echo $form->field($model, 'chloride')->textInput()->textInput();
?>
                 <?php 
echo $form->field($model, 'angiopoietin2')->textInput()->textInput();
?>
                  <?php 
echo $form->field($model, 'tech_initial2')->dropDownList(app\models\Valuelist::valuelist('techs'), ['prompt' => '--Please select--']);
?>
               
                <?php 
echo $form->field($model, 'tech_date')->widget(DatePicker::className(), ['dateFormat' => 'yyyy-MM-dd', 'options' => ['class' => 'form-control'], 'clientOptions' => ['changeMonth' => true, 'changeYear' => true, 'maxDate' => 'today']]);
?>

                <?php 
echo $form->field($model, 'tech_time')->widget(TimePicker::classname(), []);
?>
              </div>
          </div>  
     </div> 
        <input type="hidden" value="<?php 
echo $model->date_received_blood;
?>
" id="datereceiveblood" />
         <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary btn-block']);
?>
    </div>

    <?php 
Example #4
0
use kartik\widgets\ActiveForm;
use kartik\widgets\TimePicker;
/* @var $this yii\web\View */
/* @var $model app\models\SysSetTime */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="sys-set-time-form">

    <?php 
$form = ActiveForm::begin();
?>


    <?php 
echo $form->field($model, 'event_time')->widget(TimePicker::classname(), ['pluginOptions' => ['showSeconds' => true, 'showMeridian' => false, 'minuteStep' => 1, 'secondStep' => 5]]);
?>

    <?php 
echo $form->field($model, 'days')->textInput();
?>

    <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();
?>
Example #5
0
$inventoryData = [];
if (!empty($model->location_id)) {
    $inventoryData = ArrayHelper::map(Equipment::find()->where(['id' => $model->equipment_id])->all(), 'id', 'nameWithInventory');
}
?>
	
	<?php 
echo $form->field($model, 'equipment_id')->dropDownList($inventoryData, ['prompt' => 'Selecciona un Número de Inventario...']);
?>
	
    <?php 
echo $form->field($model, 'purpose')->textarea(['maxlength' => 170, 'onkeyup' => 'javascript:this.value=this.value.toUpperCase();']);
?>

	<?php 
echo $form->field($model, 'start_time')->widget(TimePicker::classname(), ['options' => ['readonly' => true], 'pluginOptions' => ['minuteStep' => 1, 'showMeridian' => false, 'showSeconds' => true, 'defaultTime' => '0']])->hint('* Sólo para reservaciones.');
//VarDumper::dump($model->room);
?>
	
    <?php 
echo $form->field($model, 'duration')->dropDownList([15 => '15 min.', 30 => '30 min.', 45 => '45 min.', 60 => '1:00', 90 => '1:30 ', 120 => '2:00'], ['prompt' => Yii::t('app', 'Select a period of time')]);
?>
	
    <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', 'style' => 'float:left; margin-left:299px;', 'data-method' => 'POST']);
?>
		<?php 
echo Html::a('Cancelar', ['index'], ['class' => 'btn btn-danger btn-md', 'style' => 'margin-left:396px;']);
?>
		
Example #6
0
?>

		<?php 
echo $form->field($model, 'tagValues')->textInput(['maxlength' => 255])->hint(Yii::t('back', 'Please separate tags by commas!'));
?>

	</div>

	<div class="col-sm-12 col-md-3">

		<?php 
echo $form->field($model, 'content_date')->widget(DatePicker::className(), ['pluginOptions' => ['autoclose' => true], 'options' => ['class' => 'form-control', 'placeholder' => Yii::t('back', 'Date')]]);
?>

		<?php 
echo $form->field($model, 'content_time')->widget(TimePicker::className(), ['pluginOptions' => ['defaultTime' => false, 'showSeconds' => false, 'showMeridian' => false], 'options' => ['class' => 'form-control']]);
?>

		<?php 
echo $form->field($model, 'content_end_date')->widget(DatePicker::className(), ['pluginOptions' => ['autoclose' => true], 'options' => ['class' => 'form-control', 'placeholder' => Yii::t('back', 'End date')]]);
?>

		<?php 
echo $form->field($model, 'categoryBoxes')->checkboxList($model->getCategoryOptions());
?>

		<?php 
echo $form->field($model, 'boxes')->inline()->checkboxList([ArticleForm::PROPERTY_PUBLIC => Yii::t('back', 'Public'), ArticleForm::PROPERTY_ACTIVE => Yii::t('back', 'Active')], ['id' => 'modal-boxes', 'data-main' => 0]);
?>

		<?php 
Example #7
0
            var yyyy = today.getFullYear();
            dd--;
            if(dd<10) {
              dd="0"+dd
            }
            if(mm<10) {
              mm="0"+mm
            }
            $("#partida-fecha_suceso").val(dd+"/"+mm+"/"+yyyy);
          }
        }']])->label('Fecha de Matrimonio');
?>
      </span>
      <span style="order: 3; flex-grow: 1; margin-right:10px;">
        <?php 
echo $form->field($partida, 'hora_suceso')->widget(TimePicker::className(), ['language' => 'es', 'pluginOptions' => ['showMeridian' => true, 'autoclose' => true], 'options' => ['readonly' => true]])->label('Hora de Matrimonio');
?>
        </span>
      </div>
      <div class="cflex">
        <span style="order: 1; flex-grow: 1; margin-right:10px;">
          <?php 
echo Html::label('Adopta Apellido', 'matrimonio-ape');
?>
          <?php 
echo Html::radioList('adop_casada', 'No', ['Si' => 'Si', 'No' => 'No'], ['id' => 'matrimonio-ape']);
?>
        </span>
        <span style="order: 2; flex-grow: 1; margin-right:10px;">
          <?php 
echo $form->field($model, 'apellido_casada')->textInput(['readOnly' => true, 'placeholder' => 'Especifique el apellido de casada']);
Example #8
0
	<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']]);
Example #9
0
  <div class="tab-content">
      <div role="tabpanel" class="tab-pane active" id="home">
          <div class="row">
              <div class="col-lg-6 col-md-6 col-sm-6">
                    <?php 
$yesno = ['Yes' => 'Yes', 'No' => 'No'];
$schoolLevel = ['Kindergarten' => 'Kindergarten', 'Primary' => 'Primary', 'Secondary' => 'Secondary', 'College/University' => 'College/University', 'Refused to answer' => 'Refused to answer', 'Never attended' => 'Never attended'];
?>

                    <?php 
echo $form->field($model, 'date_interview')->widget(DatePicker::className(), ['dateFormat' => 'yyyy-MM-dd', 'options' => ['class' => 'form-control'], 'clientOptions' => ['changeMonth' => true, 'changeYear' => true]]);
?>
 

                    <?php 
echo $form->field($model, 'time_interview')->widget(TimePicker::classname(), []);
?>
                    
                    <?php 
if ($gender != 'm') {
    ?>
                        <?php 
    echo $form->field($model, 'pregnant')->dropDownList($yesno, ['prompt' => '--Please select--', 'onChange' => 'checkpreg($(this).val())']);
    ?>

                  <span class="checkpreg hide"><?php 
    echo $form->field($model, 'menstruating')->dropDownList($yesno, ['prompt' => '--Please select--']);
    ?>
</span>

                        <?php 
Example #10
0
File: view.php Project: poykub/wph
                        <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']);
echo $form->field($model, 'replied_at[time]')->widget(TimePicker::className(), ['pluginOptions' => ['showMeridian' => false]]);
?>


    <?php 
echo $form->field($model, 'fixed_begin[date]')->widget(DatePicker::className(), ['options' => ['placeholder' => 'Select issue date ...'], 'pluginOptions' => ['format' => 'yyyy-mm-dd', 'todayHighlight' => true]]);
?>
    <?php 
echo $form->field($model, 'fixed_begin[time]')->widget(TimePicker::className(), ['pluginOptions' => ['showMeridian' => false]]);
?>

    <?php 
echo $form->field($model, 'fixed_end[date]')->widget(DatePicker::className(), ['options' => ['placeholder' => 'Select issue date ...'], 'pluginOptions' => ['format' => 'yyyy-mm-dd', 'todayHighlight' => true]]);
?>
    <?php 
echo $form->field($model, 'fixed_end[time]')->widget(TimePicker::className(), ['pluginOptions' => ['showMeridian' => false]]);
?>

    <?php 
echo $form->field($model, 'site')->textInput(['maxlength' => 255]);
?>

    <?php 
echo $form->field($model, 'hardware_type')->textInput(['maxlength' => 255]);
?>

    <?php 
echo $form->field($model, 'hardware_part')->textInput(['maxlength' => 255]);
?>

    <?php 
<div class="ponto-form">

    <?php 
$form = ActiveForm::begin();
?>

    <div class="row">
        <div class="col-md-2"><?php 
echo $form->field($model, 'data')->textInput(['value' => date('Y-m-d'), 'readonly' => "readonly", 'pluginOptions' => ['format' => 'dd-mm-yyyy']]);
?>
</div>

        <div class="col-md-2">
            <?php 
echo $form->field($model, 'hora_Chegada')->widget(TimePicker::classname(), ['name' => 't1', 'disabled' => false, 'readonly' => "readonly", 'pluginOptions' => ['showSeconds' => false, 'showMeridian' => false, 'minuteStep' => 1, 'secondStep' => 5]]);
?>
</div>

        <div class="col-md-2">
            <?php 
echo $form->field($model, 'tipoFrequencia')->dropDownList(['Presente' => 'Presente', 'Ausente' => 'Ausente', 'Atrasado' => 'Atrasado'], ['prompt' => '']);
?>
</div>
        
        <div class="col-md-2">
        <?php 
echo $form->field($model, 'idBolsista')->widget(Select2::classname(), ['options' => ['placeholder' => 'Selecione o bolsista...'], 'pluginOptions' => ['allowClear' => true, 'minimumInputLength' => 1, 'ajax' => ['url' => $url_bolsista, 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {search:params.term};}')]]]);
?>
</div>
    </div>
Example #13
0
</small>      From : <small><?php 
echo $persondetails->sublocn;
?>
</small>    Sub loc: <small><?php 
echo $persondetails->sublocn;
?>
</small> </kbd>
                    </div>

                    <?php 
echo $form->field($model, 'date_visit')->widget(DatePicker::className(), ['dateFormat' => 'yyyy-MM-dd', 'options' => ['class' => 'form-control'], 'clientOptions' => ['changeMonth' => true, 'changeYear' => true, 'maxDate' => 'today']]);
?>
 

                    <?php 
echo $form->field($model, 'time_visit')->widget(TimePicker::classname(), []);
?>
                    <?php 
$list = ['yes' => 'Yes', 'no' => 'No'];
?>
                    <?php 
echo $form->field($model, 'study_info_given')->dropDownList($list, ['prompt' => '--Please select']);
?>

                    <?php 
echo $form->field($model, 'serial_no_bpm')->dropDownList(app\models\Valuelist::valuelist("spotbpmachines"), ['prompt' => '--Please select--']);
?>
          
                <input type="hidden" value="<?php 
echo $model->date_visit;
?>
Example #14
0
        <?php 
echo $form->field($model, 'date_visit')->widget(DatePicker::className(), ['dateFormat' => 'yyyy-MM-dd', 'options' => ['class' => 'form-control'], 'clientOptions' => ['changeMonth' => true, 'changeYear' => true, 'maxDate' => 'today']]);
?>
 

        <?php 
echo $form->field($model, 'time_visit')->widget(TimePicker::classname(), []);
?>

        <?php 
echo $form->field($model, 'spot_urine_collected')->dropDownList($yesno, ['prompt' => '--Please select--', 'onChange' => 'disableInputs($(this).val())']);
?>

        <?php 
echo $form->field($model, 'spot_urine_time')->widget(TimePicker::classname(), []);
?>
    </div>
    <div class="col-lg-6 col-md-6 col-sm-6">

        <?php 
echo $form->field($model, 'sample_labelled')->dropDownList($yesno, ['prompt' => '--Please select--']);
?>

        <?php 
echo $form->field($model, 'tech_initials_r')->dropDownList(app\models\Valuelist::valuelist('techs'), ['prompt' => '--Please select--']);
?>
    </div>
</div>
</div>
  <input type="hidden" value="<?php 
Example #15
0
    $display = 'none';
}
?>
    <?php 
echo $form->field($model, 'sendingDateTime', ['options' => ['style' => "display:{$display};"]])->widget(DateTimePicker::classname(), ['removeButton' => false, 'options' => ['placeholder' => 'Masukkan Tanggal dan Jam Pengiriman'], 'pluginOptions' => ['autoClose' => true, 'format' => 'yyyy-mm-dd hh:ii:ss']]);
?>
    
    <?php 
if ($model->timeOptions == SendSmsForm::TIME_OPT_DELAY) {
    $display = 'block';
} else {
    $display = 'none';
}
?>
    <?php 
echo $form->field($model, 'sendingTime', ['options' => ['style' => "display:{$display};"]])->widget(TimePicker::className(), ['pluginOptions' => ['showMeridian' => false, 'defaultTime' => '00:00']]);
?>
    
    <?php 
echo $form->field($model, 'text')->widget(TextCounterWidget::className(), ['options' => ['rows' => 5, 'class' => 'form-control'], 'pluginOptions' => ['maxCharacterSize' => 153, 'originalStyle' => 'originalTextareaInfo', 'warningStyle' => 'warningTextareaInfo', 'warningNumber' => 40, 'displayFormat' => '#left Karakter Tersisa']]);
?>
    
    <div class="form-group">
        <?php 
echo Html::submitButton('Kirim', ['class' => 'btn btn-primary']);
?>
    </div>
    
    <?php 
ActiveForm::end();
?>
Example #16
0
 /**
  * @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']);
     }
 }
Example #17
0
echo $form->field($model, 'fixed_begin[date]')->widget(DatePicker::className(), ['pluginOptions' => ['format' => 'yyyy-mm-dd', 'todayHighlight' => true]]);
?>
	    </div>
	    <div class="col-md-6 col-md-2">
	    <?php 
echo $form->field($model, 'fixed_begin[time]')->label(\Yii::t('ticket', 'Time'))->widget(TimePicker::className(), ['pluginOptions' => ['showMeridian' => false, 'showSeconds' => true]]);
?>
	    </div>
	    <div class="col-md-6 col-md-4">
	    <?php 
echo $form->field($model, 'fixed_end[date]')->widget(DatePicker::className(), ['pluginOptions' => ['format' => 'yyyy-mm-dd', 'todayHighlight' => true]]);
?>
	    </div>
	    <div class="col-md-6 col-md-2">
	    <?php 
echo $form->field($model, 'fixed_end[time]')->label(\Yii::t('ticket', 'Time'))->widget(TimePicker::className(), ['pluginOptions' => ['showMeridian' => false, 'showSeconds' => true]]);
?>
	    </div>
    </div>

    </div>
</div>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('ticket', 'Create') : Yii::t('ticket', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
Example #18
0
		
<div class="modal fade end-time-modal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-sm">
    <div class="modal-content">
		<div class="modal-header">
           <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
           <h4 class="modal-title" id="myLargeModalLabel">Update End Time</h4>
        </div>
		<?php 
$form = ActiveForm::begin(['action' => Yii::$app->getUrlManager()->createUrl('attendance/updateendtime')]);
?>
			<div class="modal-body">
				  <div class="form-group">
					<?php 
echo $form->field($model, 'endTime')->widget(TimePicker::classname(), ['options' => ['id' => 'endTime']]);
?>
					<?php 
echo $form->field($model, 'ID')->textInput()->label(false);
?>
				  </div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
				<?php 
echo Html::submitButton('Submit', ['class' => 'btn btn-primary']);
?>
			</div>
		<?php 
ActiveForm::end();
?>
Example #19
0
                                        <?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