Exemple #1
0
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) {
Exemple #2
0
    <?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);
?>

<?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">
Exemple #4
0
 /**
  * @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));
             }
             break;
         case 'file':
             if (!isset($options['value'])) {
                 $options['value'] = Html::getAttributeValue($model, $attribute);
             }
             $field->fileInput($options);
             break;
         default:
         case 'text':
             if (!isset($options['value'])) {
                 $options['value'] = Html::getAttributeValue($model, $attribute);
             }
             if ($column && $column->type === 'string' && $column->size !== null) {
                 $options['maxlength'] = $column->size;
             }
             $field->textInput($options);
             break;
     }
     return $field;
 }
<?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');
?>
    <?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>
/* @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 
Exemple #8
0
<?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();
Exemple #9
0
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">
Exemple #10
0
<?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();
Exemple #11
0
?>

<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)];
Exemple #12
0
    $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']);
?>
	
	<?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();
?>
Exemple #14
0
    <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 
Exemple #15
0
            <?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>
Exemple #16
0
    <?php 
echo $form->field($model, 'description')->widget(CKEditor::className(), ['options' => ['rows' => 6], 'preset' => 'basic']);
?>


    <?php 
echo $form->field($model, 'location')->textInput(['class' => 'placepicker form-control']);
?>

    <?php 
echo $form->field($model, 'eopen_date')->widget(DateTimePicker::className(), ['name' => 'eopen_date', 'options' => ['placeholder' => 'Select Entries open time ...'], 'convertFormat' => true, 'pluginOptions' => ['orientation' => 'top', 'format' => 'd-M-y hh:i ', 'startDate' => date('yyyy-MM-dd hh:ii:ss'), 'autoclose' => true, 'todayHighlight' => true]]);
?>

    <?php 
echo $form->field($model, 'eclose_date')->widget(DateTimePicker::className(), ['name' => 'eclose_date', 'options' => ['placeholder' => 'Select Entries close time ...'], 'convertFormat' => true, 'pluginOptions' => ['orientation' => 'top', 'format' => 'd-M-y hh:i ', 'autoclose' => true, 'startDate' => date('yyyy-MM-dd hh:ii:ss'), 'todayHighlight' => true]]);
?>

    <?php 
echo DatePicker::widget(['model' => $model, 'name' => 'from_date', 'attribute' => 'start_date', 'attribute2' => 'end_date', 'options' => ['placeholder' => 'Select Event start date ...'], 'options2' => ['placeholder' => 'Select Event end date ...'], 'value' => '01-Feb-1996', 'type' => DatePicker::TYPE_RANGE, 'name2' => 'to_date', 'value2' => '27-Feb-1996', 'pluginOptions' => ['autoclose' => true, 'format' => 'dd-M-yyyy']]);
?>


    <p></p>
    <h4>
    <span class="label label-info">By Clicking the Create button the Event will be automatically posted on HorseBuzz mobile app</span>
    </h4>
    <p></p>


    <di"form-group">
Exemple #17
0
?>

	<?php 
echo $form->field($model, 'sport_id')->dropDownList(ArrayHelper::map($sports, 'id', 'name'), ['prompt' => '']);
?>

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

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

    <?php 
echo $form->field($model, 'date')->widget(DateTimePicker::className(), ['removeButton' => false, 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd hh:ii']]);
?>

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

	<?php 
echo $form->field($model, 'description')->widget(TinyMce::className(), ['options' => ['rows' => 9], 'language' => 'es', 'clientOptions' => ['plugins' => ["advlist autolink lists link charmap print preview anchor", "searchreplace visualblocks code fullscreen", "insertdatetime media table contextmenu paste", "image"], 'toolbar' => "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | image | fullscreen"]]);
?>

    <input type="hidden" name="attachment1Changed" value="false" id="attachment1Changed">
    <?php 
if ($model->isNewRecord || $model->attachment1 == '') {
    $pluginOptions = ['showUpload' => false, 'initialPreviewShowDelete' => true, 'previewFileType' => 'any'];
} else {