Exemplo n.º 1
0
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>

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

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

    <?php 
echo $form->field($model, 'start_time')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => '开始时间'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd hh:ii']]);
?>
    <?php 
echo $form->field($model, 'end_time')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => '到期时间'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd hh:ii']]);
?>
    <?php 
echo $form->field($model, 'status')->dropDownList(['1' => '启用', '0' => '禁用']);
?>


    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? '添加' : '修改', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>
Exemplo n.º 2
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 
Exemplo n.º 3
0
?>

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

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

    <?php 
echo $form->field($model, 'start_time')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Enter start time ...'], 'pluginOptions' => ['autoclose' => true]]);
?>

    <?php 
echo $form->field($model, 'end_time')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Enter end time ...'], 'pluginOptions' => ['autoclose' => true]]);
?>

    <?php 
echo $form->field($model, 'status')->dropDownList($status, ['prompt' => '- Choose Route status -']);
?>

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

<!--    --><?php 
//$form->field($model, 'check_list')->textarea(['rows' => 6])
?>

Exemplo n.º 4
0
        <?php 
echo $form->field($model, 'type')->radioButtonGroup($model->TypeArray, ['id' => 'type-create', 'itemOptions' => ['labelOptions' => ['class' => 'btn btn-warning btn-sm']]])->label(false);
?>
         <?php 
echo Html::error($model, 'type', ['data-activity' => 'form-summary', 'class' => 'help-block hidden']);
?>
    </div>

    <div class="form-group" data-activity="form-group">
            <div class="col-sm-4">
                <?php 
echo \Yii::t('net_frenzel_activity', 'When');
?>
:
                <?php 
echo DateTimePicker::widget(['model' => $model, 'attribute' => 'next_at', 'type' => DateTimePicker::TYPE_COMPONENT_PREPEND, 'pluginOptions' => ['autoclose' => true]]);
?>
            <?php 
echo Html::error($model, 'next_at', ['data-activity' => 'form-summary', 'class' => 'help-block hidden']);
?>
        </div>
        <div class="col-sm-8"><?php 
echo \Yii::t('net_frenzel_activity', 'Next');
?>
:
            <?php 
echo $form->field($model, 'next_type')->radioButtonGroup($model->NextTypeArray, ['id' => 'next_type-create', 'itemOptions' => ['labelOptions' => ['class' => 'btn btn-primary btn-sm']]])->label(false);
?>
            <?php 
echo Html::error($model, 'next_type', ['data-activity' => 'form-summary', 'class' => 'help-block hidden']);
?>
Exemplo n.º 5
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) {
Exemplo n.º 6
0
?>


    <?php 
echo $form->field($model, 'budzhet')->dropDownList(['1' => 'Относится', '0' => 'Не относится']);
?>


    <?php 
echo $form->field($model, 'date_zvit')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Выберите дату и время ...'], 'pluginOptions' => ['autoclose' => true, 'weekStart' => 1]]);
?>
<br>


    <?php 
echo $form->field($model, 'date_zvit_us')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Выберите дату и время ...'], 'pluginOptions' => ['autoclose' => true, 'weekStart' => 1]]);
?>
<br>


    <?php 
echo $form->field($model, 'key')->dropDownList(['0' => 'Не нужен', '1' => 'Нужен']);
?>

    <?php 
echo $form->field($model, 'zhurnal')->dropDownList(['1' => 'Внесено', '0' => 'Не Внесено']);
?>


    <?php 
echo $form->field($model, 'note')->textInput(['maxlength' => true]);
Exemplo n.º 7
0
</li>
	<li><span>Stap 6</span><?php 
echo Html::a(Yii::t('request-project', 'Overview'), ['/request-project/overview']);
?>
</li>
</ul>

<div class="col-sm-6">
	<div class="row">
		<div class="block">
		    <?php 
$form = ActiveForm::begin();
?>
		    
		    <?php 
echo $form->field($model, 'deadline')->widget(\kartik\datetime\DateTimePicker::classname(), ['pluginOptions' => ['minView' => 'month', 'format' => 'dd-mm-yyyy', 'weekStart' => 1, 'daysOfWeekDisabled' => [0, 6], 'todayHighlight' => true, 'startDate' => '+7d']]);
?>
			
		    <?php 
echo $form->field($model, 'comment')->textArea();
?>
		    
		    <?php 
echo Html::a(Yii::t('common', 'Last step'), ['step-2'], ['class' => 'btn btn-primary']);
?>
			<?php 
echo Html::submitButton(Yii::t('common', 'Next step'), ['class' => 'btn btn-primary']);
?>
			
			<?php 
ActiveForm::end();
Exemplo n.º 8
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();
/* @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 
Exemplo n.º 10
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">
Exemplo n.º 11
0
    <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'description')->textarea();
?>



    <?php 
echo $form->field($model, 'start')->widget(\kartik\datetime\DateTimePicker::classname(), ['options' => ['placeholder' => '请设置事件的起始时间...'], 'pluginOptions' => ['autoclose' => true]]);
?>

    <?php 
echo $form->field($model, 'end')->widget(\kartik\datetime\DateTimePicker::classname(), ['options' => ['placeholder' => '请设置事件的起始时间...'], 'pluginOptions' => ['autoclose' => true]]);
?>

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

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

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

Exemplo n.º 12
0
<div class="tab-content">
    <div class="tab-pane  active fade in " id="edit-tab-state">
        <br /><br />
    </div>
    <div class="tab-pane fade" id="edit-tab-slug">
        <br /><br />
    </div>
    <div class="tab-pane  fade" id="edit-tab-user">
        <br />
        <br />
    </div>
    <div class="tab-pane fade" id="edit-tab-created">
        <br />
        <?php 
echo DateTimePicker::widget(['name' => 'event_time', 'value' => date("Y-m-d H:i", $model->created_at), 'removeButton' => false, 'pluginOptions' => ['format' => 'yyyy-mm-dd hh:mm', 'autoclose' => true, 'todayHighlight' => true], 'pluginEvents' => ["changeDate" => "function(e,b) { console.log(e.date.getTimezoneOffset());   \$('#created_at').val(Math.round(e.date.valueOf()/1000)+(e.date.getTimezoneOffset()*60)); }"]]);
?>
        <br />
    </div>
    <div class="tab-pane fade" id="edit-tab-meta">
        <br /><br />
    </div>
</div>
<?php 
$this->registerJs('$(".widget-file-remove").click(function(a){  l = $(this); $.get(l.attr("href"),function(d){ if(d == "deleted") l.parent().remove(); });  return false; });');
?>




Exemplo n.º 13
0
        <?php 
foreach ($purses as $purse) {
    echo '<option value="' . $purse->id . '"  ' . ($model->purse_id == $purse->id ? "selected" : "") . '>' . $purse->name . '</option>';
}
?>
    </select>
<br>
<label class="whiteColor">Сумма*</label>
    <input type="text" name="ExpenseForm[money]" value="<?php 
echo $model->money;
?>
" class="form-control money-input" >
    <br>
    <div class="input-group date-group">
        <label class="whiteColor">Дата расхода (необязательно для заполнения)</label>
        <?php 
echo DateTimePicker::widget(['name' => 'ExpenseForm[datetime]', 'class' => 'form-control', 'convertFormat' => true, 'pluginOptions' => ['minView' => 2, 'format' => 'dd.MM.yyyy']]);
?>
    </div><!-- /input-group --><br>
<label class="whiteColor">Описание</label>
    <textarea class="form-control" name="ExpenseForm[description]" ><?php 
echo $model->description;
?>
</textarea>
    <br>
<button class="btn btn-lg btn-primary" type="submit">Добавить</button>
<?php 
ActiveForm::end();
?>
<br>
<br>
Exemplo n.º 14
0
    return Html::a($data->title, Url::toRoute(['/catalog/update-product', 'id' => $data->id]), ['data-pjax' => 0]);
}], ['header' => 'Категории', 'format' => 'raw', 'value' => function ($data) {
    $tmp = '';
    foreach ($data->categories as $cItem) {
        $tmp .= '<div>' . Html::a($cItem->title, Url::toRoute(['/catalog/products', 'Product[parents]' => $cItem->id])) . '</div>';
    }
    return $tmp;
}, 'filter' => Html::activeDropDownList($filterModel, 'parents', Category::getAllToList(), ['class' => 'form-control input-sm filtered', 'prompt' => '-'])], ['attribute' => 'price', 'format' => 'raw', 'value' => function ($data) {
    return Yii::$app->formatter->asCurrency($data->price, 'RUR');
}], ['attribute' => 'quantity', 'headerOptions' => ['class' => 'text-center'], 'contentOptions' => ['class' => 'text-center'], 'format' => 'raw', 'value' => function ($data) {
    return Yii::$app->formatter->asInteger($data->quantity);
}], ['attribute' => 'is_active', 'headerOptions' => ['class' => 'text-center'], 'contentOptions' => ['class' => 'text-center'], 'format' => 'html', 'value' => function ($data) {
    return $data->is_active ? '<span class="label label-success">Активный</span>' : '<span class="label label-danger">Не активный</span>';
}, 'filter' => Html::activeDropDownList($filterModel, 'is_active', [true => 'Активный', false => 'Не активный'], ['class' => 'form-control input-sm filtered', 'prompt' => '-'])], ['attribute' => 'created_at', 'format' => 'raw', 'options' => ['width' => '200'], 'value' => function ($data) {
    return Yii::$app->formatter->asDateTime($data->created_at, Yii::$app->formatter->dateFormat) . ' <small style="color:gray;">' . Yii::$app->formatter->asDateTime($data->created_at, Yii::$app->formatter->timeFormat) . '</small>';
}, 'filter' => DateTimePicker::widget(['name' => 'Product[created_at]', 'value' => $filterModel->created_at != '' ? Yii::$app->formatter->asDateTime($filterModel->created_at, Yii::$app->formatter->dateFormat) : null, 'options' => ['placeholder' => 'Введите дату ...', 'class' => 'form-control input-sm filtered'], 'size' => 'sm', 'pickerButton' => null, 'convertFormat' => true, 'type' => DateTimePicker::TYPE_COMPONENT_APPEND, 'pluginOptions' => ['format' => 'dd.MM.yyyy', 'autoclose' => true, 'todayBtn' => true, 'startView' => 2, 'minView' => 3]])], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update-product} {delete-product}', 'options' => ['width' => '100'], 'buttons' => ['update-product' => function ($url, $model) {
    return Html::a('<span class="icon fa fa-edit"></span>', $url, ['class' => 'btn btn-xs btn-primary', 'data-pjax' => 0]);
}, 'delete-product' => function ($url, $model) {
    return Html::a('<span class="icon fa fa-trash"></span>', $url, ['class' => 'btn btn-xs btn-danger isDel', 'data-pjax' => 0]);
}]]]]);
?>
</div>

<?php 
$js = <<<SCRIPT
jQuery(document).ready(function () {
//    jQuery('#w2').yiiGridView("destroy");
//    jQuery('#w2').yiiGridView({
//        "filterUrl":"\\/admin\\/catalog\\/products?Product%5Btitle%5D=\\u0026Product%5Bparents%5D=\\u0026Product%5Bis_active%5D=\\u0026Product%5Bcreated_at%5D=\\u0026_pjax=%23w0",
//        "filterSelector":"#w2-filters .filtered"
//    });
Exemplo n.º 15
0
?>

<?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">
Exemplo n.º 16
0
            <?php 
$title = isset($model->name) && !empty($model->name) ? $model->name : 'Advertise';
echo Html::img($model->getImageUrl(), ['class' => 'img-thumbnail center-block', 'alt' => $title, 'title' => $title]);
?>
            <?php 
echo $form->field($model, 'img')->widget(FileInput::classname(), ['name' => 'image-member', 'pluginOptions' => ['showCaption' => false, 'showRemove' => false, 'showUpload' => false, 'browseClass' => 'btn btn-primary btn-block', 'browseIcon' => '<i class="glyphicon glyphicon-camera"></i> ', 'browseLabel' => yii::t('advertise', 'Select Photo')], 'options' => ['accept' => 'image/*']]);
?>
            <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>
            <?php 
echo $form->field($model, 'start_at')->widget(DateTimePicker::classname(), ['type' => DateTimePicker::TYPE_COMPONENT_PREPEND, 'options' => ['placeholder' => 'Enter event time ...'], 'value' => '23-Feb-1982 01:10', 'layout' => '{picker}{input}', 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'todayBtn' => true, 'format' => 'mm/dd/yyyy hh:ii:ss']]);
?>

            <?php 
echo $form->field($model, 'end_at')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Enter event time ...'], 'layout' => '{picker}{input}', 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'todayBtn' => true, 'format' => 'mm/dd/yyyy hh:ii:ss']]);
?>

            <?php 
echo $form->field($model, 'is_show')->widget(CheckboxX::classname(), ['autoLabel' => false, 'pluginOptions' => ['threeState' => false, 'size' => 'md']])->label("Is Show");
?>

            <?php 
echo $form->field($model, 'link')->textInput(['maxlength' => true]);
?>
            <?php 
echo $form->field($model, 'body')->widget(CKEditor::className(), ['options' => ['rows' => 6], 'preset' => 'advanced']);
?>
            <?php 
$langues = BLanguecenter::find()->where(['is_show' => 1])->orderBy('ordinal_view ASC')->all();
$id = '';
Exemplo n.º 17
0
$form = ActiveForm::begin(['options' => ['class' => 'form-horizontal']]);
?>

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


        <?php 
echo $form->field($model, 'image_id')->widget(DropzoneWidget::className(), ['existingFile' => $model->image, 'options' => ['class' => 'col-md-3 col-sm-4 col-xs-6']]);
?>

        
        <?php 
echo $form->field($model, 'publish_date', ['inputColumnClass' => 'col-sm-4'])->widget(DateTimePicker::classname(), ['size' => 'sm', 'options' => ['placeholder' => 'Enter publish date ...'], 'pluginOptions' => ['todayHighlight' => true, 'format' => 'yyyy-mm-dd hh:ii:ss', 'autoclose' => true]]);
?>



        <?php 
echo $form->field($model, 'content')->widget(app\components\forms\RedactorWidget::className(), ['css' => ['@web/css/style-redactor.css' => ['depends' => ['app\\components\\assets\\bower\\AnimateCssAsset', 'app\\components\\assets\\bower\\WowJsAsset']]]]);
?>

        <div class="row">
            <div class="col-sm-10 col-sm-offset-2">
                
                <?php 
echo $form->beginSectionHider(['title' => 'Seo', 'key' => 'seo']);
?>
Exemplo n.º 18
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>
Exemplo n.º 19
0
			<?php 
echo $form->field($model, 'description')->textArea(['rows' => 4, 'maxlength' => 155, 'placeholder' => Yii::t('app', 'This description also used as meta description')]);
?>
			
			
			<?php 
echo $form->field($model, 'tags')->widget(Select2::classname(), ['options' => ['placeholder' => Yii::t('app', 'Put additional tags ...')], 'data' => $model->getTags(), 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' ']]]);
?>
					
		</div>	
		
		<div class="col-md-6">
			<div class="well">
			<?php 
echo $form->field($model, 'time')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Select media time ...', 'readonly' => true], 'removeButton' => false, 'convertFormat' => true, 'pluginOptions' => ['format' => 'yyyy-MM-dd HH:i:s', 'todayHighlight' => true]]);
?>
						
			
			<div class="row">
				<div class="col-md-12">
				<?php 
if ($module->enableUpload) {
    echo $form->field($model, 'file')->widget(KCFinderInputWidget::className(), ['multiple' => false, 'kcfOptions' => $kcfOptions, 'kcfBrowseOptions' => ['type' => 'files', 'lng' => substr(Yii::$app->language, 0, 2)]]);
} else {
    echo $form->field($model, 'file')->textInput(['placeholder' => Yii::t('app', 'Url of file')]);
}
?>
							
				</div>				
			</div>
<?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');
Exemplo n.º 21
0
            break;
        case Content::ATTR_TYPE_URL:
            echo $form->field($model, $attr, ['template' => '{label}<div class="input-group"><span class="input-group-addon attached-button-chain"><i class="icon fa fa-chain"></i></span>{input}</div> {hint}{error}'])->textInput(isset($value['config']) ? $value['config'] : []);
            $urlAttribute = $attr;
            break;
        case Content::ATTR_TYPE_ADVANCED_TEXT:
            echo $form->field($model, $attr, ['options' => ['class' => 'form-group col-sm-12']])->widget(Widget::className(), isset($value['config']) ? $value['config'] : []);
            break;
        case Content::ATTR_TYPE_IMAGE:
            echo $form->field($model, $attr)->widget(FileAPI::className(), isset($value['config']) ? $value['config'] : []);
            break;
        case Content::ATTR_TYPE_TEXT:
            echo $form->field($model, $attr)->textarea(isset($value['config']) ? $value['config'] : []);
            break;
        case Content::ATTR_TYPE_DATE:
            echo $form->field($model, $attr)->widget(DateTimePicker::classname(), isset($value['config']) ? $value['config'] : []);
            break;
        case Content::ATTR_TYPE_BOOLEAN:
            echo $form->field($model, $attr)->checkbox();
            break;
        case Content::ATTR_TYPE_DROPDOWN:
            echo $form->field($model, $attr)->dropDownList(isset($value['items']) ? $value['items'] : [], isset($value['config']) ? $value['config'] : []);
            break;
        default:
            break;
    }
}
if ($titleAttribute != null && $urlAttribute != null) {
    $this->registerJs('
             $(document).ready(function(){
                    $("#' . Html::getInputId($model, $titleAttribute) . '").syncTranslit({destination: "' . Html::getInputId($model, $urlAttribute) . '"});
Exemplo n.º 22
0
    ?>
                <input type="hidden" name="empty_date" value="1">
            <?php 
}
?>
            <div class="panel panel-info ">
                <div class="panel-heading">Фильтр по датам</div>
                <div class="input-group filter-date-list">
                    <div class="input-group date-group">
                        <?php 
echo DateTimePicker::widget(['name' => 'date_before_filter', 'class' => 'form-control', 'convertFormat' => true, 'value' => $date_before_filter ? $date_before_filter : ($datePayDay ? $datePayDay[2] . "." . $datePayDay[1] . "." . $datePayDay[0] : ""), 'pluginOptions' => ['minView' => 2, 'format' => 'dd.MM.yyyy'], 'pluginEvents' => ['changeDate' => 'function(){$(this).parents("form").submit();}']]);
?>
                    </div>
                    <div class="input-group date-group">
                        <?php 
echo DateTimePicker::widget(['name' => 'date_after_filter', 'class' => 'form-control', 'convertFormat' => true, 'value' => $date_after_filter, 'pluginOptions' => ['minView' => 2, 'format' => 'dd.MM.yyyy'], 'pluginEvents' => ['changeDate' => 'function(){$(this).parents("form").submit();}']]);
?>
                    </div>
                </div>
            </div>
        </form>
        <?php 
if ($is_filter) {
    ?>
            <a class="btn btn-primary pull-right-custom btn-in-panel"
               href="<?php 
    echo \yii\helpers\Url::toRoute(['expense/list', 'empty_date' => 1]);
    ?>
">Сброс фильтра</a>
        <?php 
}
Exemplo n.º 23
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;
 }
Exemplo n.º 24
0
        <?php 
echo $form->field($lab_en, 'content')->textarea(['rows' => 6, 'class' => 'ntSaveForms form-control']);
?>
 
    </div>
    
    <div class="col-md-12">
        <?php 
echo $form->field($lab, 'email')->textInput(['maxlength' => true, 'class' => 'ntSaveForms form-control']);
?>
    </div>
   
    <div class="col-md-12">
    <?php 
echo '<label>Начало</label>';
echo DateTimePicker::widget(['model' => $lab, 'attribute' => 'created_date', 'language' => 'ru', 'name' => 'datetime_1', 'options' => ['placeholder' => 'Select operating time ...'], 'convertFormat' => true, 'pluginOptions' => ['format' => 'yyyy-MM-dd H:mm:ss', 'startDate' => '01-Mar-2015 12:00 AM', 'todayHighlight' => true, 'todayBtn' => true, 'autoclose' => true]]);
?>
    </div>
    <div class="col-md-12">
        <?php 
echo $form->field($lab, 'user_id')->dropDownList(ArrayHelper::map(User::find()->all(), 'id', 'username'));
?>
    </div>
    <div class="col-md-12">
        <?php 
echo $form->field($lab, 'images[]')->fileInput(['multiple' => false, 'required' => $lab->isNewRecord ? true : false]);
?>
    </div>

    <div class="col-md-12">
        <p><img src="<?php 
Exemplo n.º 25
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);
Exemplo n.º 26
0
?>
    <?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>
    <?php 
    $form = ActiveForm::begin();
    ?>
    <?php 
    echo $form->field($shift, 'title')->textInput(['maxlength' => 255]);
    ?>

    <div class="form-group">
		<?php 
    echo $form->field($shift, 'length')->textInput();
    ?>
		<p class="help-block">In Hours</p>
	</div>

    <?php 
    echo $form->field($shift, 'formStart')->widget(DateTimePicker::classname(), ['pluginOptions' => ['defaultTime' => false, 'format' => 'M d  yyyy, H:ii P', 'startDate' => $model->event->formStart, 'endDate' => $model->event->formEnd]]);
    ?>

    <?php 
    echo $form->field($shift, 'min_needed')->textInput();
    ?>
    <?php 
    echo $form->field($shift, 'max_needed')->textInput();
    ?>

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

	<?php 
    echo $form->field($shift, 'requirement_id')->dropDownList(ArrayHelper::map($requirements, 'id', 'name'), ['prompt' => 'N/A']);
Exemplo n.º 28
0
/* @var $this yii\web\View */
/* @var $model app\models\History */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="history-form">

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

    <?php 
echo $form->field($model, 'number')->widget(\yii\widgets\MaskedInput::className(), ['mask' => '9999 9999 9999 9999'])->textInput(['placeholder' => '9999 9999 9999 9999', 'value' => $number, 'readonly' => '']);
?>

    <?php 
echo $form->field($model, 'use_date')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Choose date and time'], 'convertFormat' => true, 'pluginOptions' => ['format' => 'yyyy-MM-dd HH:i', 'startDate' => date('yyyy-MM-dd HH:i'), 'todayHighlight' => true]]);
?>

    <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>
Exemplo n.º 29
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">
Exemplo n.º 30
0
    <?php 
echo $form->field($model, 'content_category_id')->dropDownList($model::categoryDropdown());
?>

    <?php 
$pluginOptions = ['showUpload' => false, 'showRemove' => false, 'overwriteInitial' => true, 'browseLabel' => "Обзор...", 'allowedFileExtensions' => ['jpg', 'jpeg', 'gif', 'png']];
if (isset($image) && $image->getFileUrl()) {
    $pluginOptions['initialPreview'] = [Html::img($image->getFileUrl())];
}
echo $form->field($model, 'image')->widget(FileInput::classname(), ['options' => ['accept' => 'image/*', 'multiple' => false], 'pluginOptions' => $pluginOptions]);
?>

    <?php 
if (!$model->isNewRecord) {
    $model->created_at = date('d.m.Y H:i', strtotime($model->created_at));
    echo $form->field($model, 'created_at')->widget(DateTimePicker::classname(), ['options' => ['placeholder' => 'Время создания поста'], 'removeButton' => false, 'language' => 'ru-RU', 'pluginOptions' => ['autoclose' => true, 'format' => 'dd.mm.yyyy hh:ii']]);
}
?>

    <div class="panel panel-default">
        <div class="panel-heading clearfix">
            <a href="javascript:void(0)" class="spoiler-trigger pull-left" data-toggle="collapse">Привязать к матчу</a>
            <button type="button" class="spoiler-trigger pull-right btn btn-default btn-xs <?php 
echo isset($relation->match) ? 'dropup' : 'dropdown';
?>
" data-toggle="collapse"><span class="caret"></span></button>
        </div>
        <div class="panel-collapse collapse <?php 
echo isset($relation->match) ? 'in' : 'out';
?>
">