当前位置: 首页>>代码示例>>PHP>>正文


PHP DateTimePicker::className方法代码示例

本文整理汇总了PHP中kartik\datetime\DateTimePicker::className方法的典型用法代码示例。如果您正苦于以下问题:PHP DateTimePicker::className方法的具体用法?PHP DateTimePicker::className怎么用?PHP DateTimePicker::className使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kartik\datetime\DateTimePicker的用法示例。


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

示例1: ActiveDataProvider

echo Yii::t('oef.nav', 'Transaction');
?>
</h3>
        <div class="box-tools pull-right">
            <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
        </div>
    </div>
    <div class="box-body" style="padding-bottom: 0;"><?php 
$form = ActiveForm::begin(['requiredCssClass' => 'form-group-required']);
?>
        <div class="row"><div class="col-md-12">
            <?php 
echo $form->field($searchModel, 'trade_date_from')->widget(DateTimePicker::className(), ['type' => 1, 'pluginOptions' => ['autoclose' => true, 'format' => $fmShortDateJui, 'startView' => 2, 'minView' => 2, 'todayHighlight' => true]]);
?>
            <?php 
echo $form->field($searchModel, 'trade_date_to')->widget(DateTimePicker::className(), ['type' => 1, 'pluginOptions' => ['autoclose' => true, 'format' => $fmShortDateJui, 'startView' => 2, 'minView' => 2, 'todayHighlight' => true]]);
?>
            <div class="form-group">
                <?php 
echo Html::submitButton(Yii::t('button', 'Search'), ['class' => 'btn btn-info btn-lg btn-block', 'name' => MasterValueUtils::SM_MODE_NAME, 'value' => MasterValueUtils::SM_MODE_INPUT]);
?>
            </div>
        </div></div>
    <?php 
ActiveForm::end();
?>
</div>
    <div class="box-body-notool">
        <div class="row"><?php 
Pjax::begin();
echo GridView::widget(['layout' => '{summary}<div class="table-responsive">{items}</div>{pager}', 'options' => ['class' => 'grid-view col-xs-12'], 'tableOptions' => ['class' => 'table table-bordered'], 'pager' => ['options' => ['class' => 'pagination pagination-bottom'], 'maxButtonCount' => 6], 'dataProvider' => new ActiveDataProvider(['query' => $dataQuery, 'pagination' => ['pagesize' => 20]]), 'columns' => [['label' => Yii::t('fin.grid', 'Ref'), 'headerOptions' => ['style' => 'text-align: center'], 'contentOptions' => ['style' => 'vertical-align: middle; text-align: center'], 'format' => 'raw', 'value' => function ($model, $key, $index, $column) {
开发者ID:kaihatsusha,项目名称:kpimon,代码行数:31,代码来源:index_sp.php

示例2:

    <?php 
echo $form->field($searchModel, 'created_at_to')->widget(\kartik\datetime\DateTimePicker::className());
?>

    <?php 
echo $form->field($searchModel, 'updated_at_from')->widget(\kartik\datetime\DateTimePicker::className());
?>
    <?php 
echo $form->field($searchModel, 'updated_at_to')->widget(\kartik\datetime\DateTimePicker::className());
?>

    <?php 
echo $form->field($searchModel, 'auth_at_from')->widget(\kartik\datetime\DateTimePicker::className());
?>
    <?php 
echo $form->field($searchModel, 'auth_at_to')->widget(\kartik\datetime\DateTimePicker::className());
?>


    <?
        /**
         * @var $searchModel \skeeks\cms\models\CmsUser
         */
        $searchRelatedPropertiesModel = new \skeeks\cms\models\searchs\SearchRelatedPropertiesModel();
        $searchRelatedPropertiesModel->propertyElementClassName = \skeeks\cms\models\CmsUserProperty::className();
        $searchRelatedPropertiesModel->initProperties($searchModel->relatedProperties);
        $searchRelatedPropertiesModel->load(\Yii::$app->request->get());
        $searchRelatedPropertiesModel->search($dataProvider, $searchModel::tableName());
    ?>
    <?php 
echo $form->relatedFields($searchRelatedPropertiesModel);
开发者ID:skeeks-cms,项目名称:cms,代码行数:31,代码来源:_search.php

示例3:

?>

<?php 
$listRoom = ArrayHelper::map(Msroom::find()->all(), 'RoomID', 'RoomName');
$listPatient = ArrayHelper::map(Mspatient::find()->all(), 'PatientID', 'FirstName');
$listDoctor = ArrayHelper::map(Msdoctor::find()->all(), 'DoctorID', 'FirstName');
?>

<div class="trreservation-form">

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

    <?php 
echo $form->field($model, 'Date')->widget(DateTimePicker::className());
?>

    <?php 
echo $form->field($model, 'RoomID')->dropDownList($listRoom);
?>

    <?php 
echo $form->field($model, 'PatientID')->dropDownList($listPatient);
?>

    <?php 
echo $form->field($model, 'DoctorID')->dropDownList($listDoctor);
?>

    <div class="form-group">
开发者ID:shiningflint,项目名称:LSI-Reservation,代码行数:31,代码来源:_form.php

示例4: createActiveField

 /**
  * @param \netis\crud\db\ActiveRecord $model
  * @param string                      $attribute
  * @param array                       $options
  * @param bool                        $multiple
  *
  * @return \yii\bootstrap\ActiveField
  * @throws InvalidConfigException
  */
 public static function createActiveField($model, $attribute, $options = [], $multiple = false)
 {
     /** @var Formatter $formatter */
     $formatter = Yii::$app->formatter;
     $stubForm = new \stdClass();
     $stubForm->layout = 'default';
     /** @var \yii\bootstrap\ActiveField $field */
     $field = Yii::createObject(['class' => \yii\bootstrap\ActiveField::className(), 'model' => $model, 'attribute' => $attribute, 'form' => $stubForm]);
     $attributeName = Html::getAttributeName($attribute);
     $attributeFormat = $model->getAttributeFormat($attributeName);
     $format = is_array($attributeFormat) ? $attributeFormat[0] : $attributeFormat;
     $column = $model->getTableSchema()->getColumn($attributeName);
     switch ($format) {
         case 'boolean':
             if ($multiple) {
                 $field->inline()->radioList(['0' => $formatter->booleanFormat[0], '1' => $formatter->booleanFormat[1], '' => Yii::t('app', 'Any')], $options);
             } else {
                 $field->checkbox($options);
             }
             break;
         case 'shortLength':
             $value = Html::getAttributeValue($model, $attribute);
             if (!isset($options['value'])) {
                 $options['value'] = $value === null ? null : $formatter->asMultiplied($value, 1000);
             }
             $field->textInput($options);
             $field->inputTemplate = '<div class="input-group">{input}<span class="input-group-addon">m</span></div>';
             break;
         case 'shortWeight':
             $value = Html::getAttributeValue($model, $attribute);
             if (!isset($options['value'])) {
                 $options['value'] = $value === null ? null : $formatter->asMultiplied($value, 1000);
             }
             $field->textInput($options);
             $field->inputTemplate = '<div class="input-group">{input}<span class="input-group-addon">kg</span></div>';
             break;
         case 'multiplied':
             $value = Html::getAttributeValue($model, $attribute);
             if (!isset($options['value'])) {
                 $options['value'] = $value === null ? null : $formatter->asMultiplied($value, $attributeFormat[1]);
             }
             $field->textInput($options);
             break;
         case 'integer':
             if (!isset($options['value'])) {
                 $options['value'] = Html::getAttributeValue($model, $attribute);
             }
             $field->textInput($options);
             break;
         case 'time':
             if (!isset($options['value'])) {
                 $options['value'] = Html::encode(Html::getAttributeValue($model, $attribute));
             }
             $field->textInput($options);
             break;
         case 'datetime':
         case 'date':
             if (!isset($options['value'])) {
                 $value = Html::getAttributeValue($model, $attribute);
                 if (!$model->hasErrors($attribute) && $value !== null) {
                     $value = $formatter->format($value, $format);
                 }
                 $options['value'] = $value;
             }
             if (!isset($options['class'])) {
                 $options['class'] = 'form-control';
             }
             $field->parts['{input}'] = array_merge(['class' => \omnilight\widgets\DatePicker::className(), 'model' => $model, 'attribute' => $attributeName, 'options' => $options], $format !== 'datetime' ? [] : ['class' => \kartik\datetime\DateTimePicker::className(), 'convertFormat' => true]);
             break;
         case 'enum':
             $items = $formatter->getEnums()->get($attributeFormat[1]);
             if ($multiple) {
                 $options = array_merge(['class' => 'select2', 'placeholder' => self::getPrompt(), 'multiple' => 'multiple'], $options);
                 $field->parts['{input}'] = ['class' => \maddoger\widgets\Select2::className(), 'model' => $model, 'attribute' => $attribute, 'items' => $items, 'clientOptions' => ['allowClear' => true, 'closeOnSelect' => true], 'options' => $options];
             } else {
                 if ($column !== null && $column->allowNull) {
                     $options['prompt'] = self::getPrompt();
                 }
                 $field->dropDownList($items, $options);
             }
             break;
         case 'flags':
             throw new InvalidConfigException('Flags format is not supported by ' . get_called_class());
         case 'paragraphs':
             if (!isset($options['value'])) {
                 $options['value'] = Html::encode(Html::getAttributeValue($model, $attribute));
             }
             if ($multiple) {
                 $field->textInput($options);
             } else {
                 $field->textarea(array_merge(['cols' => '80', 'rows' => '10'], $options));
//.........这里部分代码省略.........
开发者ID:netis-pl,项目名称:yii2-crud,代码行数:101,代码来源:FormBuilder.php

示例5:

<?php

/**
 * @var $this yii\web\View
 * @var app\backend\components\ActiveForm $form
 * @var \app\modules\shop\models\DiscountCode $object
 */
?>



<?php 
echo $form->field($object, 'code');
echo $form->field($object, 'valid_from')->widget(\kartik\datetime\DateTimePicker::className());
echo $form->field($object, 'valid_till')->widget(\kartik\datetime\DateTimePicker::className());
echo $form->field($object, 'maximum_uses');
开发者ID:yii2ApplicationCollect,项目名称:dotplant2,代码行数:16,代码来源:_discount_code.php

示例6:

?>
    <?php 
echo $form->field($model, 'model_id')->textInput(['maxlength' => 255]);
?>
    <?php 
echo $form->field($model, 'model_method')->textInput(['maxlength' => 255]);
?>
    <?php 
echo $form->field($model, 'model_value')->textInput(['maxlength' => 255]);
?>
    <?php 
echo $form->field($model, 'interval')->textInput(['maxlength' => 255]);
?>
    <?php 
echo $form->field($model, 'start_at_local')->widget(DateTimePicker::className(), ['convertFormat' => true]);
?>
    <?php 
echo $form->field($model, 'end_at_local')->widget(DateTimePicker::className(), ['convertFormat' => true]);
?>
    <div class="form-group text-right">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('modules/schedule', 'Create') : Yii::t('modules/schedule', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>

</div>
开发者ID:bariew,项目名称:yii2-module-abstract-schedule,代码行数:30,代码来源:_form.php

示例7: foreach

/* @var $this \yii\web\View */
/* @var $parent yii\db\ActiveRecord */
/* @var $model bariew\scheduleAbstractModule\models\Schedule */
/* @var $form yii\widgets\ActiveForm */
?>

<table class="table table-bordered table-striped">
    <tr>
        <?php 
foreach (['model_class', 'model_method', 'model_value', 'start_at_local', 'interval', 'end_at_local'] as $attribute) {
    ?>
            <?php 
    if ($this->context->{$attribute} === null) {
        ?>
                <td><?php 
        echo in_array($attribute, ['start_at_local', 'end_at_local']) ? $form->field($model, "[{$index}]{$attribute}")->label(false)->widget(\kartik\datetime\DateTimePicker::className(), ['options' => ['placeholder' => $model->getAttributeLabel($attribute), 'onmouseenter' => 'if ($(this).parents(".template").length){
                                $(this).datetimepicker($(this).attr("data-krajee-datetimepicker"));
                            }']]) : $form->field($model, "[{$index}]{$attribute}")->label(false)->textInput(['placeholder' => $model->getAttributeLabel($attribute)]);
        ?>
</td>
            <?php 
    } elseif (is_array($this->context->{$attribute})) {
        ?>
                <td><?php 
        echo $form->field($model, "[{$index}]{$attribute}")->label(false)->dropDownList($this->context->{$attribute});
        ?>
</td>
            <?php 
    } else {
        ?>
                <td class="hide"><?php 
开发者ID:bariew,项目名称:yii2-module-abstract-schedule,代码行数:31,代码来源:attachedSchedule.php

示例8: function

<?php

/** @var \backend\modules\quiz\models\QuizForm $model */
use kartik\form\ActiveForm;
use rmrevin\yii\fontawesome\FA;
use yii\bootstrap\Html;
$js = <<<'JS'
$('#quizAnswersList').addInputArea();

$("body").on('inputArea.added inputArea.removed', "#quizAnswersList", function(){
    $("#quizAnswersList .quizAnswersList_del")
});
JS;
$this->registerJsFile('/js/addInputArea.js', ['depends' => 'yii\\web\\JqueryAsset']);
$this->registerJs($js);
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'id' => 'edit-quiz-form', 'options' => ['data-pjax' => true, 'class' => 'editQuizForm']]);
echo $form->field($model, 'name');
?>
    <div id="quizAnswersList">
        <?php 
foreach ($model->answers as $key => $answer) {
    echo \yii\helpers\Html::tag('div', $form->field($answer, 'text', ['inputOptions' => ['name_format' => 'QuizAnswerForm[%d][text]'], 'addon' => ['append' => ['content' => Html::button(FA::icon('times'), ['class' => 'quizAnswersList_del btn btn-danger btn-sm', 'style' => 'height: 34px; width: 34px;']), 'asButton' => true]]]) . (!empty($answer->id) ? $form->field($answer, 'id', ['inputOptions' => ['name' => "QuizAnswerForm[{$key}][id]", 'name_format' => 'QuizAnswerForm[%d][id]']])->hiddenInput()->label(false) : ''), ['class' => 'quizAnswersList_var']);
}
?>
    </div>
<?php 
echo Html::button(FA::icon('plus') . ' Добавить', ['class' => 'quizAnswersList_add btn btn-success btn-sm', 'style' => 'margin: 0px auto; display: block;']) . Html::tag('br'), $form->field($model, 'dateStart')->widget(\kartik\datetime\DateTimePicker::className(), ['pluginOptions' => []]), $form->field($model, 'dateEnd')->widget(\kartik\datetime\DateTimePicker::className(), []), $form->field($model, 'published')->checkbox([], false), $form->field($model, 'deleted')->checkbox([], false), Html::tag('div', Html::button('Сохранить', ['class' => 'btn btn-success btn-lg', 'type' => 'submit']), ['class' => 'text-center']);
$form->end();
开发者ID:BoBRoID,项目名称:new.k-z,代码行数:28,代码来源:editForm.php

示例9:

echo MasterValueUtils::SM_MODE_NAME;
?>
' value='<?php 
echo MasterValueUtils::SM_MODE_INPUT;
?>
'><i class="fa fa-edit"></i></button>
                </div>
            </div>
            <div class="progress progress-xxs" style="margin-top: 8px;">
                <div style="width: 100%" aria-valuemax="100" aria-valuemin="0" aria-valuenow="100" role="progressbar" class="progress-bar progress-bar-warning progress-bar-striped"></div>
            </div>
            <?php 
echo $form->field($model, 'fmonth_from')->widget(DateTimePicker::className(), ['type' => 1, 'readonly' => true, 'pluginOptions' => ['autoclose' => true, 'format' => $fmKeyJui, 'startView' => 3, 'minView' => 3]]);
?>
            <?php 
echo $form->field($model, 'fmonth_to')->widget(DateTimePicker::className(), ['type' => 1, 'readonly' => true, 'pluginOptions' => ['autoclose' => true, 'format' => $fmKeyJui, 'startView' => 3, 'minView' => 3]]);
?>
            <div class="form-group">
                <?php 
echo Html::submitButton(Yii::t('button', 'Search'), ['class' => 'btn btn-info btn-lg btn-block', 'name' => MasterValueUtils::SM_MODE_NAME, 'value' => MasterValueUtils::SM_MODE_LIST]);
?>
            </div>
        </div></div>
    <?php 
ActiveForm::end();
?>
</div>
    <?php 
if (!is_null($gridData)) {
    ?>
<div class="box-body-notool">
开发者ID:kaihatsusha,项目名称:kpimon,代码行数:31,代码来源:payment_sp.php

示例10:

<?php

use kartik\form\ActiveForm;
/** @var \backend\modules\ads\models\BannerForm $model */
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'id' => 'edit-ad-form', 'options' => ['data-pjax' => true]]);
echo $form->field($model, 'name'), $form->field($model, 'position')->dropDownList($model->possiblePositions), $form->field($model, 'enableDate')->widget(\kartik\datetime\DateTimePicker::className(), []), $form->field($model, 'disableDate')->widget(\kartik\datetime\DateTimePicker::className(), []), $form->field($model, 'code')->textarea(['style' => 'height: 30vh']), $form->field($model, 'state')->checkbox([], false), \yii\bootstrap\Html::tag('div', \yii\helpers\Html::button('Сохранить', ['class' => 'btn btn-success', 'type' => 'submit']), ['class' => 'text-center']);
$form->end();
开发者ID:BoBRoID,项目名称:new.k-z,代码行数:7,代码来源:editForm.php

示例11: implode

?>

<div class="coupon-form">

    <?php 
$form = ActiveForm::begin();
$fieldGroups = [];
$fields = [];
$stations = \core\models\Station::findAll(['enabled' => 1]);
$stationArray = ArrayHelper::map($stations, 'id', 'name');
$fields[] = $form->field($model, 'star_id')->dropDownList($stationArray);
$fields[] = $form->field($model, 'total')->textInput(['maxlength' => true]);
$fields[] = $form->field($model, 'desc')->textarea(['maxlength' => true]);
$fields[] = $form->field($model, 'status')->dropDownList([1 => '是', 0 => '否']);
$fields[] = $form->field($model, 'start_at')->widget(DateTimePicker::className(), ['options' => ['value' => $start_at], 'pluginOptions' => ['language' => 'zh-CN', 'autoclose' => true]]);
$fields[] = $form->field($model, 'end_at')->widget(DateTimePicker::className(), ['options' => ['value' => $end_at], 'pluginOptions' => ['language' => 'zh-CN', 'autoclose' => true]]);
$fieldGroups[] = ['label' => Yii::t('marketing', 'Coupon Info'), 'content' => implode('', $fields)];
$fields = [];
$fields[] = $form->field($model, 'total_price')->textInput(['maxlength' => true]);
$fields[] = $form->field($model, 'qty')->textInput(['maxlength' => true]);
$root = \common\models\Tree::find()->where(['name' => '商品分类'])->one();
$categories = $root->children(1)->all();
$categories = ArrayHelper::map($categories, 'id', 'name');
$fields[] = $form->field($model, 'category_id')->widget(Select2::classname(), ['data' => $categories, 'language' => 'en', 'pluginOptions' => ['placeholder' => 'Select a state ...'], 'options' => ['multiple' => true]]);
$fieldGroups[] = ['label' => Yii::t('marketing', 'Coupon Conditions'), 'content' => implode('', $fields)];
$fields = [];
$fields[] = $form->field($model, 'type')->dropDownList([0 => '满减', 1 => '打折']);
$fields[] = $form->field($model, 'number')->textInput(['maxlength' => true]);
$fields[] = $form->field($model, 'shipping')->dropDownList([0 => '邮费不变', 1 => '减邮费', 2 => '包邮']);
$fields[] = $form->field($model, 'shippingFee')->textInput(['maxlength' => true]);
$fieldGroups[] = ['label' => Yii::t('marketing', 'Coupon Result'), 'content' => implode('', $fields)];
开发者ID:ASDAFF,项目名称:OurYincart2,代码行数:31,代码来源:_form.php

示例12:

    $this->title = 'Добавление новости';
    $breadcrumb = $this->title;
}
$this->params['breadcrumbs'][] = ['url' => '/news', 'label' => 'Новости'];
$this->params['breadcrumbs'][] = $breadcrumb;
echo Html::beginTag('div', ['class' => 'col-xs-12']);
if (\Yii::$app->session->getFlash('saved', false)) {
    echo \yii\bootstrap\Alert::widget(['body' => \Yii::$app->session->getFlash('saved'), 'options' => ['class' => 'alert alert-success alert-dismissible']]);
} else {
    if (\Yii::$app->session->getFlash('error', false)) {
        echo \yii\bootstrap\Alert::widget(['body' => \Yii::$app->session->getFlash('error'), 'options' => ['class' => 'alert alert-danger alert-dismissible row col-xs-10 col-xs-offset-1']]);
    }
}
echo Html::endTag('div');
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL]);
?>
<div class="panel panel-default">
    <div class="panel-heading">
        <?php 
echo $this->render('_news_header_buttons', ['model' => $model, 'mode' => $mode]);
?>
    </div>
    <div class="panel-body">
        <?php 
echo Html::tag('div', $form->field($model, 'title') . $form->field($model, 'category')->widget(\kartik\select2\Select2::className(), ['data' => ArrayHelper::map(Category::find()->where(['deleted' => 0])->asArray()->all(), 'id', 'title')]) . $form->field($model, 'link')->hint('Оставьте поле пустым, чтобы ссылку сгенерировала система') . $form->field($model, 'text')->widget(\yii\imperavi\Widget::className(), ['id' => 'textEditor', 'options' => ['lang' => 'ru', 'imageUpload' => '/news/upload', 'imageManagerJson' => '/news/uploaded'], 'plugins' => ['imagemanager', 'video', 'border']]) . $form->field($model, 'metaDescription')->textarea() . $form->field($model, 'metaKeywords') . $form->field($model, 'language')->dropDownList($model->getLanguages()) . $form->field($model, 'publishDate')->widget(\kartik\datetime\DateTimePicker::className(), ['pluginOptions' => ['format' => 'dd.mm.yyyy HH:ii']]) . $form->field($model, 'genre')->dropDownList($model->getGenres()) . $form->field($model, 'author'), ['class' => 'col-xs-12']), $form->field($model, 'published', ['options' => ['style' => 'display: none']])->hiddenInput()->label(false), $form->field($model, 'favorite', ['options' => ['style' => 'display: none']])->hiddenInput()->label(false), $form->field($model, 'deleted', ['options' => ['style' => 'display: none']])->hiddenInput()->label(false), $form->field($model, 'moderatedComments', ['options' => ['style' => 'display: none']])->hiddenInput()->label(false), Html::tag('div', Html::button(FontAwesome::i('save') . Html::tag('small', 'сохранить'), ['class' => 'btn btn-app btn-success', 'type' => 'submit']), ['class' => 'text-center']);
?>
    </div>
</div>
<?php 
$form->end();
echo Html::tag('div', '', ['class' => 'clearfix']);
开发者ID:BoBRoID,项目名称:new.k-z,代码行数:31,代码来源:news_edit.php

示例13:

?>
	
	<?php 
echo $form->errorSummary($model);
?>

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

    <?php 
echo $form->field($model, 'formStart')->widget(\kartik\datetime\DateTimePicker::className(), ['type' => 1, 'pluginOptions' => ['format' => 'M d yyyy, H:ii P']]);
?>

    <?php 
echo $form->field($model, 'formEnd')->widget(\kartik\datetime\DateTimePicker::className(), ['type' => 1, 'pluginOptions' => ['format' => 'M d yyyy, H:ii P']]);
?>

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

    <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();
?>
开发者ID:Flashpoint-Artists-Initiative,项目名称:Volunteering,代码行数:31,代码来源:_form.php

示例14:

    <div class="box-header with-border"><h3 class="box-title"><?php 
echo Yii::t('fin.form', 'Input Values');
?>
</h3></div>
    <div id="oefPurchaseCreateForm" class="box-body"><?php 
$form = ActiveForm::begin(['requiredCssClass' => 'form-group-required']);
?>
        <div class="row"><div class="col-md-12">
            <?php 
echo $form->field($model, 'purchase_date')->widget(DateTimePicker::className(), ['type' => 1, 'pluginOptions' => ['autoclose' => true, 'format' => $fmShortDateJui, 'startView' => 2, 'minView' => 2, 'todayHighlight' => true]]);
?>
            <?php 
echo $form->field($model, 'purchase_type')->dropDownList($arrPurchaseType, ['prompt' => '']);
?>
            <?php 
echo $form->field($model, 'sip_date')->widget(DateTimePicker::className(), ['type' => 1, 'options' => ['data-backup' => $model->sip_date], 'pluginOptions' => ['autoclose' => true, 'format' => $fmShortDateJui, 'startView' => 2, 'minView' => 2, 'todayHighlight' => true]]);
?>
            <?php 
echo $form->field($model, 'nav')->textInput(['type' => 'number', 'step' => 'any']);
?>
            <?php 
echo $form->field($model, 'purchase')->textInput(['type' => 'number']);
?>
            <?php 
echo $form->field($model, 'transfer_fee')->textInput(['type' => 'number']);
?>
            <?php 
echo $form->field($model, 'other_fee')->textInput(['type' => 'number']);
?>
            <div class="form-group">
                <?php 
开发者ID:kaihatsusha,项目名称:kpimon,代码行数:31,代码来源:create.php

示例15: date

            <?php 
echo Html::a('<span class="glyphicon glyphicon-plus"></span> New Ticket', ['ticket/create', 'close' => true, 'Ticket' => ['invoice_id' => $model->invoice_id]], ['id' => 'new-ticket-btn', 'class' => 'btn btn-success btn-xs pull-right', 'target' => '_blank']);
?>
            <?php 
echo Html::button('<span class="glyphicon glyphicon-refresh"></span>', ['class' => 'btn btn-default btn-xs pull-right', 'title' => 'Refresh tickets for selected location', 'onclick' => '$("#location-select").trigger("depdrop.change")']);
?>
            <?php 
echo $form->field($model, 'ticketIds')->widget(\kartik\depdrop\DepDrop::className(), ['type' => \kartik\depdrop\DepDrop::TYPE_SELECT2, 'data' => yii\helpers\ArrayHelper::map(\common\models\Ticket::find()->location($model->invoice_id)->open()->all(), 'id', 'fullName'), 'options' => ['multiple' => true], 'select2Options' => ['pluginOptions' => ['allowClear' => true]], 'pluginOptions' => ['depends' => ['location-select'], 'url' => Url::to(['/location/ajax-tickets']), 'placeholder' => false], 'pluginEvents' => ['depdrop.change' => 'function(event, id, value, count) {
                        console.log(event, id, value);
                        $("#new-ticket-btn").attr("href", "/ticket/create?close=true" + (value == null ? "" : ("&Ticket%5Binvoice_id%5D=" + value)));
                    }']]);
?>

            <?php 
echo $form->field($model, 'start_time')->widget(DateTimePicker::className(), ['pluginOptions' => ['format' => 'yyyy-mm-dd hh:ii:00', 'startDate' => date('Y-m-d'), 'initialDate' => date('Y-m-d H:00:00', strtotime('+1 hour')), 'todayHighlight' => true, 'showMeridian' => true, 'minuteStep' => 15, 'autoclose' => true]]);
?>

            <?php 
echo $form->field($model, 'duration')->input('number', ['min' => 15, 'step' => 5]);
?>

            <?php 
echo $form->field($model, 'onSite')->checkbox([], false);
?>

            <?php 
echo $form->field($model, 'description')->textarea(['rows' => 6]);
?>

        </p>
开发者ID:jslight,项目名称:helpdesk,代码行数:30,代码来源:_form.php


注:本文中的kartik\datetime\DateTimePicker::className方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。