• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP widgets\DatePicker类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中kartik\widgets\DatePicker的典型用法代码示例。如果您正苦于以下问题:PHP DatePicker类的具体用法?PHP DatePicker怎么用?PHP DatePicker使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了DatePicker类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: genField

 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);
     }
 }
开发者ID:esoftslimited,项目名称:smart-settings,代码行数:36,代码来源:SettingsPanel.php


示例2: JsExpression

?>

        <?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>
开发者ID:santhika29,项目名称:y-app,代码行数:30,代码来源:_form.php


示例3:

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

开发者ID:plathir,项目名称:yii2-smart-user,代码行数:29,代码来源:_form_update_profile.php


示例4: isset

?>

            <?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">
开发者ID:Andrewkha,项目名称:sportforecast,代码行数:31,代码来源:_form.php


示例5:

// 	'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">
开发者ID:adem-team,项目名称:advanced,代码行数:31,代码来源:_formcustomer.php


示例6: array

				'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',
开发者ID:noikiy,项目名称:wowewe,代码行数:31,代码来源:channelscoretopx.php


示例7:

?>

    <?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 
开发者ID:rsoaresgouveia,项目名称:SiGePolo,代码行数:31,代码来源:_form2.php


示例8:

    <?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 
开发者ID:adem-team,项目名称:advanced,代码行数:30,代码来源:new_term.php


示例9:

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>';
开发者ID:agarb7,项目名称:mybriop,代码行数:31,代码来源:vissheeObrazovanie.php


示例10: function

// 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>
开发者ID:pookiez797,项目名称:nmis_59,代码行数:30,代码来源:index.php


示例11:

        <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();
开发者ID:lowbase,项目名称:yii2-document,代码行数:31,代码来源:_search.php


示例12: JsExpression

?>
" 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>
开发者ID:hendri30,项目名称:OpenPrint,代码行数:30,代码来源:jurnalar.php


示例13: array

    <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 
开发者ID:ercling,项目名称:economizzer,代码行数:31,代码来源:_form.php


示例14:

?>

    <?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 
开发者ID:stancel,项目名称:biz-referral-club,代码行数:31,代码来源:_form.php


示例15:

//= $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()
?>
开发者ID:GT-Volk,项目名称:ManagerOrganizer,代码行数:31,代码来源:_form.php


示例16:

?>
			</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>
开发者ID:adem-team,项目名称:advanced,代码行数:31,代码来源:_form_profile.php


示例17:

        <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">
开发者ID:jaibabu9,项目名称:987654321,代码行数:31,代码来源:_form.php


示例18: getItem

 /**
  * @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']);
     }
 }
开发者ID:navatech,项目名称:yii2-setting,代码行数:76,代码来源:Setting.php


示例19:

    <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>
开发者ID:ExtPoint,项目名称:project-boilerplate,代码行数:29,代码来源:index.php


示例20:

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP widgets\DepDrop类代码示例发布时间:2022-05-23
下一篇:
PHP widgets\ActiveForm类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap