コード例 #1
0
ファイル: DatePicker.php プロジェクト: tsyrya/mybriop
 public function init()
 {
     /* @var $formatter Formatter */
     $formatter = Yii::$app->formatter;
     if (!isset($this->pluginOptions['format'])) {
         $this->pluginOptions['format'] = 'dd.mm.yyyy';
     }
     if (!isset($this->pluginOptions['clearBtn'])) {
         $this->pluginOptions['clearBtn'] = true;
     }
     if (!isset($this->pluginOptions['autoclose'])) {
         $this->pluginOptions['autoclose'] = true;
     }
     $this->removeButton = false;
     $formatter->nullDisplay = '';
     $this->model->{$this->attribute} = $formatter->asDate($this->model->{$this->attribute});
     parent::init();
 }
コード例 #2
0
 private function genField($name, $setting, $options)
 {
     if (preg_match("/number|string/i", $setting->type)) {
         return Html::textInput($name, $setting->value, $options);
     } elseif (preg_match("/text/i", $setting->type)) {
         return Html::textArea($name, $setting->value, $options);
     } elseif (preg_match("/bool/i", $setting->type)) {
         return Html::checkBox($name, $setting->value, array_merge($options, $this->checkboxOptions, ['template' => '']));
     } elseif (preg_match("/dropdown/i", $setting->type)) {
         $data = @unserialize($setting->options);
         $data = is_array($data) ? $data : [];
         return Html::dropDownList($name, $setting->value, $data, $options);
     } elseif (preg_match("/radiolist/i", $setting->type)) {
         $data = @unserialize($setting->options);
         $data = is_array($data) ? $data : [];
         $template = $this->radioTemplate;
         $this->radioOptions['item'] = !$this->radioCallback ? function ($index, $label, $name, $checked, $value) use($template) {
             return strtr($template, ['{input}' => Html::radio($name, $checked, ['value' => $value]), '{labelText}' => $label]);
         } : $this->radioCallback;
         return Html::radioList($name, $setting->value, $data, array_merge($options, $this->radioOptions));
     } elseif (preg_match("/{dateradiolist}/i", $setting->type)) {
         $data = @unserialize($setting->options);
         $data = is_array($data) ? $data : [];
         $template = $this->radioTemplate;
         $this->radioOptions['item'] = function ($index, $label, $name, $checked, $value) use($template) {
             return strtr($template, ['{input}' => Html::radio($name, $checked, ['value' => $value]), '{labelText}' => date($value, time())]);
         };
         return Html::radioList($name, $setting->value, array_combine($data, $data), array_merge($options, $this->radioOptions));
     } elseif (preg_match("/timezone/i", $setting->type)) {
         return Html::dropDownList($name, $setting->value, $this->getTimezones(), $options);
     } elseif (preg_match("/date/i", $setting->type)) {
         return DatePicker::widget(['name' => $name, 'type' => DatePicker::TYPE_INPUT, 'value' => date('d-m-Y', strtotime($setting->value)), 'pluginOptions' => ['autoclose' => true, 'format' => 'dd-M-yyyy']]);
     } else {
         return Html::textArea($name, $setting->value, $options);
     }
 }
コード例 #3
0
ファイル: _form.php プロジェクト: santhika29/y-app
?>

        <?php 
$template = '<div><p class="nikkes">{{value}}</p></div>';
echo $form->field($model, 'nikkes')->widget(Typeahead::classname(), ['options' => ['placeholder' => 'Ketik NIKKES yang diinginkan'], 'pluginOptions' => ['highlight' => true], 'dataset' => [['datumTokenizer' => "Bloodhound.tokenizers.obj.whitespace('value')", 'display' => 'value', 'templates' => ['notFound' => '<div class="text-danger" style="padding:0 8px"> Nikkes tidak terdaftar </div>', 'suggestion' => new JsExpression("Handlebars.compile('{$template}')")], 'remote' => ['url' => Url::to(['peserta/get-nikkes-list']) . '?q=%QUERY', 'wildcard' => '%QUERY'], 'limit' => 10]]]);
?>
        

        

        <?php 
echo $form->field($model, 'hak_kacamata_id')->widget(Select2::classname(), ['data' => $model->hakkacamataList, 'options' => ['placeholder' => 'Please Choose One', 'disabled' => true], 'pluginOptions' => ['allowClear' => true]]);
?>

        <?php 
echo $form->field($model, 'tgl_ambil')->widget(\kartik\widgets\DatePicker::classname(), ['options' => ['placeholder' => 'Choose Tanggal Pengambilan'], 'type' => \kartik\widgets\DatePicker::TYPE_COMPONENT_APPEND, 'pluginOptions' => ['autoclose' => true, 'format' => 'dd-M-yyyy']]);
?>


        <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>
コード例 #4
0
?>
        <?php 
echo $profile->profile_image . '<br>';
//echo $form->field($profile, 'profile_image');
echo $form->field($profile, 'profile_image')->widget(NewWidget::className(), ['uploadUrl' => Url::toRoute(['/user/user-profile/uploadphoto']), 'previewUrl' => $profile->module->ProfileImagePathPreview, 'tempPreviewUrl' => $profile->module->ProfileImageTempPathPreview, 'width' => 200, 'height' => 200]);
?>

        <?php 
echo $form->field($profile, 'first_name');
?>
        <?php 
echo $form->field($profile, 'last_name');
?>
        <?php 
echo $form->field($profile, 'gender')->dropDownList(['1' => 'Male', '2' => 'Female']);
?>
        <?php 
echo $form->field($profile, 'birth_date')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Enter birth date ...'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy/mm/dd']]);
?>
        <div class="form-group">
            <?php 
echo Html::submitButton('Update', ['class' => 'btn btn-primary']);
?>
        </div>
        <?php 
ActiveForm::end();
?>
    </div>
</div>

コード例 #5
0
ファイル: _form.php プロジェクト: Andrewkha/sportforecast
?>

            <?php 
echo $form->field($model, 'country', ['template' => '{label} <div class="row"><div class="col-xs-10">{input}{error}{hint}</div></div>'])->dropDownList(ArrayHelper::map(Countries::find()->orderBy('country', 'asc')->all(), 'id', 'country'), ['prompt' => '---Выберите страну---']);
?>

            <?php 
echo $form->field($model, 'num_tours', ['template' => '{label} <div class="row"><div class="col-xs-5 col-sm-3">{input}{error}{hint}</div></div>'])->textInput();
?>

            <?php 
echo $form->field($model, 'startsOn', ['template' => '{label} <div class="row"><div class="col-xs-12 col-sm-8">{input}{error}{hint}</div></div>'])->widget(DatePicker::className(), ['removeButton' => false, 'pluginOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy', 'todayHighlight' => true], 'options' => ['value' => isset($model->startsOn) ? date('d.m.Y', $model->startsOn) : '']]);
?>

            <?php 
echo $form->field($model, 'wfDueTo', ['template' => '{label} <div class="row"><div class="col-xs-12 col-sm-8">{input}{error}{hint}</div></div>'])->widget(DatePicker::className(), ['removeButton' => false, 'pluginOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy', 'todayHighlight' => true], 'options' => ['value' => isset($model->wfDueTo) ? date('d.m.Y', $model->wfDueTo) : '']]);
?>

            <?php 
echo $form->field($model, 'is_active', ['template' => '{label} <div class="row"><div class="col-xs-8">{input}{error}{hint}</div></div>'])->dropDownList($model::statuses(), ['prompt' => '---Статус---']);
?>

            <?php 
echo $form->field($model, 'enableAutoprocess')->checkbox();
?>

            <?php 
echo $form->field($model, 'autoProcessURL')->input('text');
?>

            <div class="form-group">
コード例 #6
0
ファイル: _formcustomer.php プロジェクト: adem-team/advanced
// 	'data' => $dropparentkategori
// ]);
//
// echo $form->field($model, 'CUST_KTG')->widget(DepDrop::classname(), [
// 	'options' => [//'id'=>'customers-cust_ktg',
// 	'placeholder' => 'Select Customers kategory'],
// 	'type' => DepDrop::TYPE_SELECT2,
// 	'select2Options'=>['pluginOptions'=>['allowClear'=>true]],
// 	'pluginOptions'=>[
// 		'depends'=>['customers-cust_type'],
// 		'url' => Url::to(['/master/customers/lisdata']),
// 	  'loadingText' => 'Loading data ...',
// 	]
// ]);
echo $form->field($model, 'PIC', $config)->widget(LabelInPlace::classname());
echo $form->field($model, 'JOIN_DATE')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Dari  ...'], 'pluginOptions' => ['autoclose' => true, 'format' => 'dd-mm-yyyy'], 'pluginEvents' => ['show' => "function(e) {errror}"]]);
// echo $form->field($model, 'KD_DISTRIBUTOR')->widget(Select2::classname(), [
// 	     'data' => $dropdis,
//       'options' => [
//       'placeholder' => 'Pilih Distributor ...'],
//       'pluginOptions' => [
//           'allowClear' => true
//            ],
//
//   ]);
if (!$model->isNewRecord) {
    echo $form->field($model, 'STATUS')->dropDownList(['' => ' -- Silahkan Pilih --', '0' => 'Tidak Aktif', '1' => 'Aktif']);
}
?>

    <div class="form-group">
コード例 #7
0
ファイル: channelscoretopx.php プロジェクト: noikiy/wowewe
				'name'=>'date_range',
				'id'=>'id_date_range',
				'language'=>'zh',
				'convertFormat'=>true,
				'pluginOptions'=>[
				'timePicker'=>false,
				//        'timePickerIncrement'=>30,
				//        'format'=>'Y-m-d h:i A'
				'format'=>'Y-m-d',
				'separator'=>'_'
			]
		]);
*/
if (empty($cur_date)) {
    echo '<label class="control-label">请输入时间范围</label>';
    echo DatePicker::widget(['name' => 'date_start', 'value' => $date_start, 'options' => ['id' => 'id_date_start'], 'type' => DatePicker::TYPE_RANGE, 'name2' => 'date_end', 'value2' => $date_end, 'options2' => ['id' => 'id_date_end'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd', 'language' => 'zh-CN']]);
}
?>
	</p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterSelector' => '#id_date_start, #id_date_end', 'filterModel' => $filter, 'options' => ['class' => 'table-responsive'], 'tableOptions' => ['class' => 'table table-striped'], 'columns' => [['label' => '渠道编号', 'attribute' => 'id', 'headerOptions' => array('style' => 'width:15%;'), 'filter' => true, 'visible' => false], ['label' => '渠道名称', 'attribute' => 'title', 'headerOptions' => array('style' => 'width:25%;')], ['label' => '渠道推广数量', 'attribute' => 'cnt_sum', 'headerOptions' => array('style' => 'width:20%;')]], 'bordered' => false, 'export' => false, 'panel' => ['heading' => "<h3 class=\"panel-title\">&nbsp;</h3>", 'type' => 'default', 'before' => Html::a('下载 <i class="glyphicon glyphicon-arrow-down"></i>', Url::to() . '&channelscoretopxdownload=1', ['class' => 'btn btn-success']), 'showFooter' => false]]);
?>

</div>

<?php 
/*
			[
				'label' => '渠道类别',
				'attribute' => 'cat',
コード例 #8
0
ファイル: _form2.php プロジェクト: rsoaresgouveia/SiGePolo
?>

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

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

    <?php 
echo $form->field($model, 'bairro_id')->dropDownList(ArrayHelper::map(\frontend\models\Bairro::find()->orderBy(['nome' => SORT_ASC])->all(), 'id', 'nome'), ['prompt' => 'Selecione']);
?>

    <?php 
echo $form->field($model, 'datanascimento')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Coloque a data...'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]);
?>

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

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

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

    <?php 
コード例 #9
0
ファイル: new_term.php プロジェクト: adem-team/advanced
    <?php 
echo $form->field($model, 'PRINCIPAL_KD')->widget(Select2::classname(), ['options' => ['placeholder' => 'Select Nama Principal ...'], 'data' => $data_corp]);
?>

    <?php 
echo $form->field($model, 'DIST_KD')->widget(Select2::classname(), ['options' => ['placeholder' => 'Select Nama Distributor ...'], 'data' => $data_distributor]);
?>


   <?php 
echo $form->field($model, 'PERIOD_START')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Tgl Term Dibuat'], 'pluginOptions' => ['todayHighlight' => true, 'autoclose' => true, 'format' => 'yyyy-m-dd'], 'pluginEvents' => ['show' => "function(e) {show}"]]);
?>

        <?php 
echo $form->field($model, 'PERIOD_END')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Tgl Term Berakhir'], 'pluginOptions' => ['todayHighlight' => true, 'autoclose' => true, 'format' => 'yyyy-m-dd'], 'pluginEvents' => ['show' => "function(e) {show}"]]);
?>

    <?php 
echo $form->field($model, 'BUDGET_AWAL')->widget(MaskMoney::classname(), ['pluginOptions' => ['allowNegative' => false]]);
?>

    <?php 
if (!$model->IsNewRecord) {
    echo $form->field($model, 'STATUS')->dropDownList(['' => ' -- Silahkan Pilih --', '0' => 'Tidak Aktif', '1' => 'Aktif']);
}
?>


    <div class="form-group">
        <?php 
コード例 #10
0
ファイル: vissheeObrazovanie.php プロジェクト: agarb7/mybriop
echo Html::activeDropDownList($model, "[{$num}]tipDokumenta", TipDokumentaObObrazovanii::namesMap(), ['class' => 'form-control']);
echo Html::tag('div', $model->getFirstError('tipDokumenta'), ['class' => 'help-block']);
echo '</div>';
echo '<div class="col-md-4 no-right-padding ' . (($model->hasErrors('kvalifikaciyaId') or $model->hasErrors('kvalifikaciyaNazvanie')) ? 'has-error' : '') . '">';
echo Select3::widget(['model' => $model, 'attribute' => "[{$num}]kvalifikaciyaId", 'secondAttribute' => "[{$num}]kvalifikaciyaNazvanie", 'data' => $kvalifikaciya, 'placeholder' => 'Выберите квалификацию', 'secondPlaceholder' => 'Введите наименование квалификации']);
echo '</div>';
echo '<div class="col-md-3 no-left-padding field-seriya ' . ($model->hasErrors('seriya') ? 'has-error' : '') . '">';
echo Html::activeLabel($model, "[{$num}]seriya");
echo Html::activeTextInput($model, "[{$num}]seriya", ['class' => 'form-control', 'placeholder' => '', 'maxlength' => 40]);
echo Html::tag('div', $model->getFirstError('seriya'), ['class' => 'help-block']);
echo '</div>';
echo '<div class="col-md-3 ' . ($model->hasErrors('nomer') ? 'has-error' : '') . '">';
echo Html::activeLabel($model, "[{$num}]nomer");
echo Html::activeTextInput($model, "[{$num}]nomer", ['class' => 'form-control', 'maxlength' => 40]);
echo Html::tag('div', $model->getFirstError('nomer'), ['class' => 'help-block']);
echo '</div>';
echo '<div class="col-md-3 ' . ($model->hasErrors('dataVidachi') ? 'has-error' : '') . '">';
echo Html::activeLabel($model, '[{$num}]dataVidachi');
echo DatePicker::widget(['model' => $model, 'attribute' => "[{$num}]dataVidachi", 'language' => 'ru', 'type' => DatePicker::TYPE_COMPONENT_PREPEND, 'pluginOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy'], 'options' => ['placeholder' => 'Выберите дату выдачи']]);
echo Html::tag('div', $model->getFirstError('dataVidachi'), ['class' => 'help-block']);
echo '</div>';
echo '<div class="col-md-3 no-right-padding ' . ($model->hasErrors('documentKopiya') ? 'has-error' : '') . '">';
echo Html::activeLabel($model, "[{$num}]documentKopiya");
echo \app\widgets\Files2Widget::widget(['model' => $model, 'attribute' => "[{$num}]documentKopiya"]);
echo Html::tag('div', $model->getFirstError('documentKopiya'), ['class' => 'help-block']);
echo Html::activeHiddenInput($model, "[{$num}]udalit", ['class' => 'udalit_input']);
echo '</div>';
//panel-body end
echo '</div>';
//panel end
echo '</div>';
コード例 #11
0
ファイル: index.php プロジェクト: pookiez797/nmis_59
// echo $this->render('_search', ['model' => $searchModel]);
?>

    <p>
        <?php 
echo Html::a(Yii::t('app', 'เพิ่มรายการกิจกรรม'), ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'rowOptions' => function ($model) {
    if ($model->patient_flag == 1) {
        return ['class' => 'info'];
    } else {
        return [];
    }
}, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'date', 'value' => 'date', 'options' => ['class' => 'col-md-3'], 'filter' => DatePicker::widget(['model' => $searchModel, 'attribute' => 'date', 'language' => 'th', 'options' => ['placeholder' => 'เลือกวันที่'], 'pluginOptions' => ['format' => 'yyyy-mm-dd', 'todayHighlight' => true, 'autoclose' => true]]), 'format' => 'html'], ['attribute' => 'period', 'filter' => NurseEvent::itemAlias('shift'), 'value' => function ($model) {
    return $model->shiftName;
}], ['value' => function ($model) {
    return Html::a('เพิ่มข้อมูลผู้ป่วย', ['nurse-patient/create', 'event_ref' => $model->ref], ['class' => 'btn btn-default btn-block']);
}, 'format' => 'html'], ['value' => function ($model) {
    return Html::a('เพิ่มข้อมูล Staff Mix', ['nurse-staffevent/create', 'event_ref' => $model->ref], ['class' => 'btn btn-default btn-block']);
}, 'format' => 'html'], ['value' => function ($model) {
    return Html::a('พิมพ์ใบมอบหมายงาน', ['nurse-patient/assign-report', 'event_ref' => $model->ref], ['target' => '_blank', 'class' => 'btn btn-primary btn-block']);
}, 'format' => 'raw'], ['value' => function ($model) {
    return Html::a('พิมพ์ใบรายชื่อผู้ป่วย', ['nurse-patient/daily-report', 'event_ref' => $model->ref], ['target' => '_blank', 'class' => 'btn btn-default btn-block']);
}, 'format' => 'raw'], ['class' => 'yii\\grid\\ActionColumn', 'header' => 'ลบ', 'template' => '{delete}']]]);
?>

</div>
コード例 #12
0
ファイル: _search.php プロジェクト: lowbase/yii2-document
        <div class="col-lg-6">
            <?php 
echo $form->field($model, 'created_at_till')->widget(DatePicker::classname(), ['options' => ['placeholder' => ''], 'type' => DatePicker::TYPE_COMPONENT_APPEND, 'pluginOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy']]);
?>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-6">
            <?php 
echo $form->field($model, 'updated_at_from')->widget(DatePicker::classname(), ['options' => ['placeholder' => ''], 'type' => DatePicker::TYPE_COMPONENT_APPEND, 'pluginOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy']]);
?>
        </div>
        <div class="col-lg-6">
            <?php 
echo $form->field($model, 'updated_at_till')->widget(DatePicker::classname(), ['options' => ['placeholder' => ''], 'type' => DatePicker::TYPE_COMPONENT_APPEND, 'pluginOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy']]);
?>
        </div>
    </div>

    <div class="form-group row text-center">
        <div class="col-lg-12">
            <?php 
echo Html::submitButton('<i class="glyphicon glyphicon-search"></i> ' . Yii::t('document', 'Найти'), ['class' => 'btn btn-primary btn-lg']);
?>
        </div>
    </div>


    <?php 
ActiveForm::end();
コード例 #13
0
ファイル: jurnalar.php プロジェクト: hendri30/OpenPrint
?>
" class="btn btn-default right" style="margin-right:10px;"><i class="glyphicon glyphicon-repeat"></i></a>
					<br/>
					<br/>
				</div>
			<div style="clear:both"></div>
				<div id="jurnalar">
					<?php 
$form = ActiveForm::begin(['id' => 'jurnalArForm', 'action' => [''], 'options' => ['target' => '_blank'], 'method' => 'get']);
?>
					<?php 
echo $form->field($model, 'partner')->widget(Select2::classname(), ['options' => ['placeholder' => 'All Customer ...'], 'pluginOptions' => ['tags' => true, 'allowClear' => true, 'minimumInputLength' => 2, 'ajax' => ['url' => $url, 'dataType' => 'json', 'data' => new JsExpression('function(term,page) { return {search:term}; }'), 'results' => new JsExpression('function(data,page) { return {results:data.results}; }')], 'initSelection' => new JsExpression($initScript)]]);
?>
					<br/>
					<?php 
echo DatePicker::widget(['model' => $model, 'attribute' => 'date_from', 'attribute2' => 'date_to', 'options' => ['placeholder' => 'Start date'], 'options2' => ['placeholder' => 'End date'], 'type' => DatePicker::TYPE_RANGE, 'form' => $form, 'pluginOptions' => ['format' => 'yyyy-MM-dd', 'autoclose' => true, 'startDate' => '01/07/2014'], 'convertFormat' => true]);
?>
					<div class="form-group">
					    <br/>
					    <?php 
echo Html::submitButton('Search', ['class' => 'btn btn-primary']);
?>
					</div>
					<?php 
ActiveForm::end();
?>
					</div>

			<div style="clear:both"></div>
		</div>
コード例 #14
0
ファイル: _form.php プロジェクト: ercling/economizzer
    <div class="tab-pane active" id="home">

    <?php 
echo $form->field($model, 'type_id')->radioList(['1' => Yii::t('app', 'Revenue'), '2' => Yii::t('app', 'Expense')], ['itemOptions' => ['class' => 'radio-inline', 'labelOptions' => array('style' => 'padding:5px;')]])->label('');
?>
    <div class="row">
        <div class="col-sm-2">
            <?php 
echo $form->field($model, 'account_id')->dropDownList($accountItems);
?>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-2">
        <?php 
echo DatePicker::widget(['model' => $model, 'form' => $form, 'attribute' => 'date', 'type' => DatePicker::TYPE_INPUT, 'size' => 'sm', 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'format' => 'yyyy-mm-dd']]);
?>
</div>
        </div>

    <div class="row">
        <div class="col-sm-2">
        <?php 
echo $form->field($model, 'value')->textInput(['size' => 10]);
?>
        </div>
    </div>

    <div class="row">
        <div class="col-sm-3">
        <?php 
コード例 #15
0
ファイル: _form.php プロジェクト: stancel/biz-referral-club
?>

    <?php 
echo $form->field($model, 'IS_ACTIVE')->dropDownList(['TRUE' => 'TRUE', 'FALSE' => 'FALSE'], ['prompt' => '']);
?>

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

    <?php 
echo $form->field($model, 'PASSWORD')->passwordInput(['maxlength' => 60]);
?>

    <?php 
echo $form->field($model, 'JOINED_DATE')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Enter birth date ...'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]);
?>


    

    <?php 
echo $form->field($model, 'COMPANY_ID')->dropDownList(ArrayHelper::map(COMPANIES::find()->all(), 'COMPANY_ID', 'COMPANY_NAME'), ['prompt' => '-Choose a Company-']);
//This works WITHOUT $model
//      Html::dropDownList('COMPANY_ID', null,ArrayHelper::map(COMPANIES::find()->all(), 'COMPANY_ID', 'COMPANY_NAME'),['prompt' => '---- Choose a Company ----']);
//This works with $model, but the CSS is off
//      Html::activeDropDownList($model, 'COMPANY_ID',ArrayHelper::map(COMPANIES::find()->all(), 'COMPANY_ID', 'COMPANY_NAME'));
?>
    
    
    <?php 
コード例 #16
0
ファイル: _form.php プロジェクト: GT-Volk/ManagerOrganizer
//= $form->field($model, 'created')->textInput()
?>

    <?php 
//= $form->field($model, 'updated')->textInput()
?>

    <table width="100%">
        <tr>
            <td style="width: 270px; vertical-align: top">
                <div>
                    <label>Плановая дата</label>

                    <div class="well well-sm" style="background-color: #fff; width:245px;">
                        <?php 
echo DatePicker::widget(['model' => $model, 'attribute' => 'plan_date', 'type' => DatePicker::TYPE_INLINE, 'language' => 'ru', 'pluginOptions' => ['format' => 'yyyy-mm-dd']]);
?>
                    </div>
                </div>
            </td>
            <td style="vertical-align: top">
                <?php 
echo $form->field($model, 'client')->dropDownList(Clients::getClients());
?>
                <?php 
//= $form->field($model, 'client')->textInput(['maxlength' => true])
?>

                <?php 
//= $form->field($model, 'plan_date')->textInput()
?>
コード例 #17
0
ファイル: _form_profile.php プロジェクト: adem-team/advanced
?>
			</div>
			<div class="col-lg-4">
				<?php 
echo Html::img(Yii::getAlias('@web') . '/upload/hrd/Employee/' . $model->EMP_IMG, ['width' => '130', 'height' => '130', 'align' => 'right']);
?>
			</div>
			<div class="col-lg-12">
				<?php 
/* echo $form->field($model, 'vCabID')->dropDownList($aryCbgID,[
				'id'=>'emp-cab',
				'prompt'=>$model->cabOne['CAB_NM'],
			])->label('Cabang'); */
echo $form->field($model, 'EMP_KTP')->textInput(['maxlength' => true, 'style' => ['width' => '100%']])->label('Nomer KTP');
echo $form->field($model, 'EMP_ZIP')->textInput(['maxlength' => true, 'style' => ['width' => '100%']])->label('Emp ZIP');
echo $form->field($model, 'EMP_TGL_LAHIR')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Enter Join date ...'], 'pluginEvents' => ['show' => "function(e) {show}"], 'pluginOptions' => ['autoclose' => true]])->label('Birth Date');
echo $form->field($model, 'EMP_GENDER')->radioList(['Male' => 'Male', 'Female' => 'Female'], ['separator' => '', 'tabindex' => 3]);
echo $form->field($model, 'EMP_EMAIL')->textInput(['maxlength' => true, 'style' => ['width' => '100%']])->label('Email');
echo $form->field($model, 'EMP_ALAMAT')->textArea(['maxlength' => true, 'style' => ['width' => '100%']])->label('Alamat');
?>
			</div>
	<div  class="col-lg-12" style="text-align: right;">
			<?php 
echo Html::submitButton('Update', ['class' => 'btn btn-primary']);
?>
		</div>

    <?php 
ActiveForm::end();
?>
	</div>
コード例 #18
0
ファイル: _form.php プロジェクト: jaibabu9/987654321
        <div class="col-md-4">
            <?php 
echo $form->field($model, 'firstName');
?>
        </div>
        <div class="col-md-4">
            <?php 
echo $form->field($model, 'lastName');
?>
        </div>
        <div class="col-md-4">
            <?php 
echo '<label class="control-label">Birth Date</label>';
?>
            <?php 
echo DatePicker::widget(['model' => $model, 'attribute' => 'dob', 'name' => 'dob', 'size' => 'md', 'options' => ['placeholder' => 'Enter birth date ...'], 'pluginOptions' => ['autoclose' => true, 'format' => 'mm/dd/yyyy']]);
?>
        </div>
    </div>
    <div class="row">
    <div class="col-md-4">
        <?php 
echo $form->field($model, 'age');
?>
    </div>
    <div class="col-md-4">
        <?php 
echo $form->field($model, 'gender')->radioList(['1' => 'Male', 2 => 'Female']);
?>
    </div>
    <div class="col-md-4">
コード例 #19
0
ファイル: Setting.php プロジェクト: navatech/yii2-setting
 /**
  * @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']);
     }
 }
コード例 #20
0
    <h3>Основное</h3>
    <?php 
echo $form->field($model->info, 'firstName');
?>
    <?php 
echo $form->field($model->info, 'lastName');
?>
    <?php 
echo $form->field($model, 'email', ['inputTemplate' => '<div class="input-group"><span class="input-group-addon">@</span>{input}</div>']);
?>
    <?php 
echo $form->field($model->info, 'phone', ['inputTemplate' => '<div class="input-group"><span class="input-group-addon"><span class="glyphicon glyphicon-phone"></span></span>{input}</div>']);
?>
    <?php 
echo $form->field($model->info, 'birthday')->widget(DatePicker::classname());
?>

    <h3>Смена фотографии</h3>
    <?php 
echo $form->field($model, 'photo')->widget(FileInput::className());
?>

    <div class="form-group">
        <div class="col-sm-offset-3 col-sm-6">
            <?php 
echo Html::submitButton('Сохранить', ['class' => 'btn btn-primary']);
?>
        </div>
    </div>
コード例 #21
0
ファイル: budget.php プロジェクト: adem-team/advanced
?>

 <?php 
echo $form->field($budget, 'ID_TERM')->hiddenInput(['value' => $id])->label(false);
?>

<?php 
echo $form->field($budget, 'INVES_TYPE')->widget(Select2::classname(), ['options' => ['placeholder' => 'Select Type Investasi ...'], 'data' => $budget->data($data1, $to1, $from1)]);
?>

<?php 
echo $form->field($budget, 'PERIODE_START')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Dari  ...'], 'pluginOptions' => ['autoclose' => true, 'format' => 'dd-mm-yyyy'], 'pluginEvents' => ['show' => "function(e) {errror}"]]);
?>

<?php 
echo $form->field($budget, 'PERIODE_END')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Sampai'], 'pluginOptions' => ['autoclose' => true, 'format' => 'dd-mm-yyyy'], 'pluginEvents' => ['show' => "function(e) {error}"]]);
?>

<?php 
echo $form->field($budget, 'PROGRAM')->textArea(['options' => ['rows' => 5]]);
?>

<?php 
echo $form->field($budget, 'BUDGET_PLAN')->widget(MaskMoney::classname(), ['pluginOptions' => ['prefix' => 'Rp', 'precision' => 2, 'allowNegative' => false]]);
?>



<div class="form-group">
    <?php 
echo Html::submitButton($budget->isNewRecord ? 'Create' : 'Update', ['class' => $budget->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
コード例 #22
0
ファイル: so_tgl_kirim.php プロジェクト: adem-team/advanced
/* @var $model lukisongroup\master\models\Kota */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="kota-form">

    <?php 
$form = ActiveForm::begin(['id' => $model->formName(), 'enableClientValidation' => true]);
?>

    <?php 
echo $form->field($model, 'KODE_REF')->textInput(['value' => $model->KD_SO, 'readonly' => true]);
?>

     <?php 
echo $form->field($model, 'TGL_KIRIM')->widget(DatePicker::classname(), ['options' => ['placeholder' => ' pilih ...'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd'], 'pluginEvents' => ['show' => "function(e) {errror}"]]);
?>

    <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>

コード例 #23
0
ファイル: form_pilot.php プロジェクト: adem-team/advanced
    <?php 
echo $form->field($model, 'DESTINATION_TO')->widget(Select2::classname(), ['data' => $dropemploy, 'options' => ['placeholder' => 'Pilih Karyawan ...'], 'pluginOptions' => ['allowClear' => true]]);
$options = ['multiple' => true];
// echo $form->field($model, $attribute)->listBox($items, $options);
echo $form->field($model, 'USER_CC')->widget(DualListbox::className(), ['items' => $dropemploy, 'options' => $options, 'clientOptions' => ['moveOnSelect' => false, 'selectedListLabel' => 'Selected Items', 'nonSelectedListLabel' => 'Available Items']]);
?>
	
 

  <?php 
echo $form->field($model, 'PLAN_DATE1')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Enter...', 'value' => $tgl], 'pluginOptions' => ['autoclose' => true], 'pluginEvents' => ['show' => "function(e) {show}"]]);
?>


  <?php 
echo $form->field($model, 'PLAN_DATE2')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Enter...', 'value' => $tgl_1], 'pluginOptions' => ['autoclose' => true], 'pluginEvents' => ['show' => "function(e) {show}"]]);
?>

   


      <!--$form->field($model, 'ACTUAL_DATE2')->widget(DatePicker::classname(), [
    'options' => ['placeholder' => 'Enter date ...'],
    'pluginOptions' => [
        'autoclose'=>true
    ],
    'pluginEvents' => [
                      'show' => "function(e) {show}",
    ],
]);?>-->
コード例 #24
0
ファイル: _form.php プロジェクト: khurshedt9l/collegey
?>
    
    <?php 
echo $form->field($implink, 'url')->textInput(['maxlength' => true]);
?>

     <?php 
echo $form->field($model, 'logo')->fileInput(['maxlength' => true]);
?>

     <?php 
echo $form->field($model, 'banner')->fileInput(['maxlength' => true]);
?>
    <?php 
echo '<label class="control-label">Establish</label>';
echo DatePicker::widget(['name' => 'College[establish]', 'value' => '01/01/1990', 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'todayBtn' => true, 'format' => 'dd/mm/yyyy']]);
?>
    
    <?php 
echo $form->field($addresmodel, 'address')->textInput(['maxlength' => true]);
?>
    
    <?php 
echo $form->field($addresmodel, 'landmark')->textInput(['maxlength' => true]);
?>
    
    <?php 
if (empty($addresmodel->country_id)) {
    $addresmodel->country_id = 'IND';
}
$coutrylist = ArrayHelper::map(\common\models\Countries::findAll(['is_visible' => 1, 'status' => 1]), 'countryID', 'countryName');
コード例 #25
0
ファイル: index.php プロジェクト: hscstudio/psaham
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Report Emiten';
$this->params['breadcrumbs'][] = $this->title;
Pjax::begin(['id' => 'pjax-report']);
?>
<div class="report-emiten-index">

    <!-- <div class="ui divider"></div> -->
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>
    <?php 
$form = ActiveForm::begin(['action' => ['update'], 'options' => []]);
?>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'responsive' => true, 'responsiveWrap' => true, 'hover' => true, 'resizableColumns' => false, 'showPageSummary' => true, 'showFooter' => true, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-th"></i> <span class="hidden-xs"></span> ' . Html::encode($this->title) . '</h3>', 'before' => '<div class="row">' . '<div class="col-xs-5 col-md-4 col-md-3 col-lg-2">' . DatePicker::widget(['name' => 'reportDate', 'value' => $reportDates[1], 'options' => ['id' => 'reportDate', 'placeholder' => 'Tgl Emiten ...'], 'readonly' => true, 'removeButton' => false, 'pluginOptions' => ['todayHighlight' => true, 'todayBtn' => true, 'format' => 'dd-M-yyyy', 'autoclose' => true], 'pluginEvents' => ["changeDate" => "function(e) {\n                        changeDate(e.format(0,'yyyy-m-d'))\n                    }"]]) . '</div>' . '<div class="col-xs-5 col-sm-4 col-md-3 col-lg-2">' . '</div>' . '</div>', 'after' => Html::submitButton('<i class="glyphicon glyphicon-floppy-disk"></i> Simpan', ['class' => 'btn btn-success']) . ' ' . Html::a('<i class="glyphicon glyphicon-trash"></i> Hapus', ['delete', 'date' => $reportDates[1]], ['class' => 'btn btn-danger', 'data-method' => 'post', 'data-pjax' => '0', 'data-confirm' => 'Apakah data akan dihapus?']) . ' ', 'footer' => false], 'toolbar' => [['content' => Html::a('<i class="glyphicon glyphicon-repeat"></i>', ['index'], ['data-pjax' => 0, 'class' => 'btn btn-default', 'title' => 'Reset Grid'])], ButtonExport::widget()], 'export' => ['fontAwesome' => true], 'columns' => [['class' => 'kartik\\grid\\SerialColumn'], ['attribute' => 'EMITEN_KODE', 'label' => 'Kode', 'filter' => false, 'format' => 'raw', 'options' => ['width' => '100px'], 'hAlign' => 'center', 'vAlign' => 'middle', 'value' => function ($data) {
    return Html::a($data->EMITEN_KODE, '', ['onclick' => 'setFromGridview($(this)); return false;', 'data-pjax' => '0']);
}], ['attribute' => 'JMLLOT', 'label' => 'Jml Lot', 'filter' => false, 'format' => ['decimal', 2], 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle'], ['attribute' => 'JMLSAHAM', 'label' => 'Jml Saham', 'filter' => false, 'format' => ['decimal', 2], 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'pageSummary' => true, 'pageSummaryFunc' => GridView::F_SUM], ['label' => 'Range Beli', 'format' => ['decimal', 2], 'filter' => false, 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'value' => function ($data) {
    // Range Beli = saldob / (jmllotb * jmllbrsaham) -> Ket:  saldob, jmllotb dr detemiten; jmllbrsaham dr lotshare.
    //koreksi: Range Beli = saldob / jmlsahamb -> Ket:  saldob, jmlsahamb dr detemiten.
    $range_beli = (double) @($data->SALDOB / $data->JMLSAHAMB);
    return $range_beli;
}], ['label' => 'Range', 'format' => ['decimal', 2], 'filter' => false, 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'value' => function ($data) {
    //Range = saldo / jmlsaham.
    $range = (double) @($data->SALDO / $data->JMLSAHAM);
    return $range;
}], ['attribute' => 'SALDO', 'label' => 'Saldo', 'filter' => false, 'format' => ['decimal', 2], 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'pageSummary' => true, 'pageSummaryFunc' => GridView::F_SUM], ['attribute' => 'HARGA', 'label' => 'Harga', 'filter' => false, 'format' => 'raw', 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'value' => function ($data) {
    return MaskedInput::widget(['name' => 'harga[' . $data->EMITEN_KODE . ']', 'value' => number_format($data->HARGA, 2), 'clientOptions' => ['alias' => 'numeric', 'groupSeparator' => ',', 'radixPoint' => '.', 'autoGroup' => true, 'removeMaskOnSubmit' => true]]);
}], ['attribute' => 'TGLAKHIR', 'label' => 'Tgl Akhir', 'filter' => false, 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle'], ['label' => 'Saldo **)', 'format' => ['decimal', 2], 'filter' => false, 'options' => ['width' => '100px'], 'headerOptions' => ['style' => 'text-align:center'], 'hAlign' => 'right', 'vAlign' => 'middle', 'value' => function ($data) {
    //Saldo**) = jmlsaham * harga
    $saldo = $data->HARGA * $data->JMLSAHAM;
コード例 #26
0
ファイル: education.php プロジェクト: khurshedt9l/collegey
                                	<div class="col col1">
                                    	<label>Dates Attend</label>
                                    	<?php 
echo DatePicker::widget(['name' => 'Certification[attended_date]', 'value' => '01/01/1990', 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'todayBtn' => true, 'format' => 'dd/mm/yyyy']]);
?>
                                    </div>
                                    <div class="col col2 clearfix">                                    	
                                    	<label>Dates of Completion</label>
                                    	<?php 
echo DatePicker::widget(['name' => 'Certification[completion_date]', 'value' => '01/01/1990', 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'todayBtn' => true, 'format' => 'dd/mm/yyyy']]);
?>
                                    </div>
                                    <div class="col col3 clearfix">
                                    	<label>Valid Up To</label>
                                    	<?php 
echo DatePicker::widget(['name' => 'Certification[valid_upto]', 'value' => '01/01/1990', 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'todayBtn' => true, 'format' => 'dd/mm/yyyy']]);
?>
                                    </div>
                                </div>  
                                <!--<div class="common smallCheckBox">
                                	<input type="checkbox" id="forCertificateExpire" name="Certification[is_expired]" />
                                        <label for="forCertificateExpire">This certificate doesn't expire</label>
                                </div>-->
                                <?php 
echo Html::submitButton($certfmodel->isNewRecord ? 'Add <i class="plus-small"></i>' : 'Update', ['class' => 'btn btn-default addmarginR10', 'id' => 'certification-subbtn']);
?>
                    	        <?php 
echo Html::resetButton('Cancle', array('class' => 'btn btn-default'));
?>
                                        <?php 
ActiveForm::end();
コード例 #27
0
ファイル: index.php プロジェクト: nahidlu/easysale
<div class="col-md-offset-3 col-md-6">
<div class="panel-body">
<h2>Attendance Form</h2><br/>
<?php 
$form = ActiveForm::begin(['action' => Yii::$app->getUrlManager()->createUrl('attendance/create')]);
//$form = ActiveForm::begin(['layout' => 'horizontal'])
?>
	<div class="form-group">
		<?php 
echo $form->field($model, 'empID')->dropDownList(ArrayHelper::map($empList, 'empID', 'name'), ['prompt' => 'Select Employee']);
?>
	</div>
	<div class="form-group">
		<?php 
echo $form->field($model, 'date')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Enter date'], 'pluginOptions' => ['todayHighlight' => true, 'todayBtn' => true, 'format' => 'dd-mm-yyyy', 'autoclose' => true]]);
?>
	</div>
  <div class="form-group">
		<?php 
echo $form->field($model, 'startTime')->widget(TimePicker::classname(), []);
?>
  </div>
  <div class="form-group">
		<?php 
echo $form->field($model, 'endTime')->widget(TimePicker::classname(), []);
?>
  </div>  
  <?php 
echo Html::submitButton('Submit', ['class' => 'btn btn-primary']);
ActiveForm::end();
コード例 #28
0
                                	<div class="col col1">
                                    	<label>First Name</label>
                                    	<?php 
echo $form->field($user, 'fname')->textInput(['value' => $user->fname, 'class' => 'form-control'])->label(false);
?>
                                    </div>
                                    <div class="col col2">
                                    	<label>Last Name</label>
                                    	<?php 
echo $form->field($user, 'lname')->textInput(['value' => $user->lname, 'class' => 'form-control'])->label(false);
?>
                                    </div>
                                    <div class="col col3">
                                    <?php 
echo '<label class="control-label">Date of Birth</label>';
echo DatePicker::widget(['name' => 'UserProfile[DOB]', 'value' => '01/01/1990', 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'todayBtn' => true, 'format' => 'dd/mm/yyyy']]);
?>
                                     </div>
                                </div>
                                <div class="col-3 clearfix">
                                	<div class="col col1">
                                    	<label>Gender</label>
                                    	<?php 
echo $form->field($model, 'gender')->dropDownList(['0' => 'Select', 'M' => 'Male', 'F' => 'Female'], ['class' => 'singleSelectBox'])->label(false);
?>
                                    </div>
                                    <div class="col col2">
                                    	<label>Mobile Number</label>
                                    	<?php 
echo $form->field($user, 'phone')->textInput(['value' => $user->phone, 'class' => 'form-control'])->label(false);
?>
コード例 #29
0
ファイル: _search.php プロジェクト: kmolchanov/rgkgroup-test
?>
                </div>
            </div>
        </div>
    </div>
    <div class="form-group">
        <div class="col-md-12">
            <div class="form-group row">
                <div class="col-md-3">
                    <?php 
echo $form->field($model, 'released_from')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Enter date ...'], 'pluginOptions' => ['autoclose' => true]]);
?>
                </div>
                <div class="col-md-3">
                    <?php 
echo $form->field($model, 'released_to')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Enter date ...'], 'pluginOptions' => ['autoclose' => true]]);
?>
                </div>
                <div class="col-md-3">
                    <?php 
echo Html::submitButton('Search', ['class' => 'btn btn-primary']);
?>
                </div>
            </div>
        </div>
    </div>

    <?php 
ActiveForm::end();
?>
コード例 #30
0
 public function date($options = [])
 {
     $this->parts['{input}'] = DatePicker::widget(['model' => $this->model, 'attribute' => $this->attribute, 'options' => $options]);
     return $this;
 }