?>

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

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

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

    <?php 
echo $form->field($model, 'status', ['options' => ['class' => 'form-group']])->widget(Select2::className(), ["data" => ['-1' => '未管理', '0' => '未知', '1' => '正常', '2' => '警告', '3' => '次要', '4' => '重要', '5' => '严重'], 'options' => ['placeholder' => '选择状态'], 'pluginOptions' => ['allowClear' => true, 'width' => '200']]);
?>

    <?php 
// echo $form->field($model, 'lastPoll')
?>

    <?php 
// echo $form->field($model, 'categoryId')
?>

    <?php 
// echo $form->field($model, 'supportPing')
?>

    <?php 
Esempio n. 2
0
    <?php 
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>

    <?php 
echo $form->field($model, 'image[]')->fileInput(['multiple' => true]);
?>
    <?php 
echo \bariew\postAbstractModule\widgets\ImageGallery::widget(['model' => $model, 'field' => 'thumb1']);
?>
    <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => 255]);
?>
    <?php 
echo $form->field($model, 'categories')->widget(Select2::className(), ['data' => $model->categoriesList(), 'options' => ['placeholder' => false, 'multiple' => true]]);
?>

    <?php 
echo $form->field($model, 'brief')->widget(\yii\imperavi\Widget::className(), ['options' => ['minHeight' => 100, 'fileUpload' => Url::toRoute(['file-upload', 'attr' => 'brief', 'id' => $model->id]), 'imageUpload' => Url::toRoute(['image-upload', 'attr' => 'brief', 'id' => $model->id]), 'imageGetJson' => Url::toRoute(['image-list', 'attr' => 'brief', 'id' => $model->id]), 'imageUploadErrorCallback' => new \yii\web\JsExpression('function(json) { alert(json.error); }'), 'fileUploadErrorCallback' => new \yii\web\JsExpression('function(json) { alert(json.error); }')]]);
?>

    <?php 
echo $form->field($model, 'content')->widget(\yii\imperavi\Widget::className(), ['options' => ['minHeight' => 300, 'fileUpload' => Url::toRoute(['file-upload', 'attr' => 'content', 'id' => $model->id]), 'imageUpload' => Url::toRoute(['image-upload', 'attr' => 'content', 'id' => $model->id]), 'imageGetJson' => Url::toRoute(['image-list', 'attr' => 'content', 'id' => $model->id]), 'imageUploadErrorCallback' => new \yii\web\JsExpression('function(json) { alert(json.error); }'), 'fileUploadErrorCallback' => new \yii\web\JsExpression('function(json) { alert(json.error); }')]]);
?>

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

    <div class="form-group text-right">
Esempio n. 3
0
</td>
                                    <td><?php 
echo Yii::t('app', 'Credit');
?>
</td>
                                    <td><?php 
echo Yii::t('app', 'Debit');
?>
</td>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>
                                        <?php 
echo $form->field($model, 'account_id', ['template' => '{input}'])->widget(Select2::className(), ['data' => \yii\helpers\ArrayHelper::map(Accounts::find()->All(), 'id', 'name')]);
?>
                                    </td>
                                    <td>
                                        <span id="nameTransactions_account_id"></span>
                                    </td>
                                    
                                    <td>
                                        <input size="6" id="sourcepos" type="text" class="number" name="FormTransaction[sourcepos]" onchange="CalcSum()" value="0">
                                    </td>
                                    <td>
                                        <input size="6" id="sourceneg" type="text" class="number" name="FormTransaction[sourceneg]" onchange="CalcSum()" value="0">
                                    </td>
                                </tr>
                            </tbody>
                            <tfoot>
Esempio n. 4
0
 public static function enumerate(ActiveRecord $model, $attribute, $options = [])
 {
     $choices = ModelHelper::getEnumChoices($model, $attribute);
     $config = [$attribute, 'widget', 'widgetClass' => Select2::className(), 'data' => $choices, 'options' => ['placeholder' => 'Select...']];
     return ArrayHelper::merge($config, $options);
 }
Esempio n. 5
0
		    	 $("#dscAudiencia").show();
				 $("#nmProcesso").hide();
		    }
		});
	}
</script>
<div class="audiencia-form">

	<div id="audiencia" class="col-lg-12" ng-controller="audienciaController" ng-init="init()">
    	<?php 
$form = ActiveForm::begin(['id' => 'audienciaForm']);
?>
    	
    	<div class="col-lg-4">
	    	<?php 
echo $form->field($model, 'id_tipo_audiencia')->label('')->widget(Select2::className(), ['data' => ArrayHelper::map(TipoAudiencia::find()->all(), 'id', 'dsc_tipo_audiencia'), 'options' => ['onChange' => 'toggleCampoAudiencia(this,"' . Url::to(['tipo-audiencia/getflag']) . '")', 'placeholder' => 'Selecione o tipo da audiência']]);
?>
    	</div>
    	
    	<div id="dscAudiencia" class="col-lg-4" style="display:none">
	    	<?php 
echo $form->field($model, 'dsc_audiencia')->textInput(['maxlength' => true]);
?>
    	</div>
    	
    	<div id="nmProcesso" class="col-lg-4" style="display:none">
	    	<?php 
echo $form->field($model, 'nm_processo')->textInput(['maxlength' => true]);
?>
    	</div>
    	
Esempio n. 6
0
app\widgets\MiniForm::begin(array('header' => Yii::t('app', "Create deposit")));
?>

<?php 
$form = kartik\form\ActiveForm::begin(array('id' => 'deposit-form', 'enableAjaxValidation' => true));
$temp = \yii\helpers\ArrayHelper::map(Accounts::findAllByType(7), 'id', 'name');
$temp[''] = Yii::t('app', 'Choose Bank');
//$model->account_id = 0;
?>


<div class='row'>
    <div class='col-md-3'>

        <?php 
echo $form->field($model, "account_id")->widget(Select2::className(), ['data' => $temp]);
?>
        <?php 
echo $form->field($model, 'refnum');
?>
        <?php 
echo $form->field($model, 'date')->widget(DateControl::classname(), ['type' => 'date']);
?>

    </div>
    <div class='col-md-3'>
        <?php 
echo $form->field($model, 'cheq_sum')->textInput(['readonly' => true]);
?>
        <?php 
echo $form->field($model, 'cash_sum')->textInput(['readonly' => true]);
Esempio n. 7
0
?>
            <div>
                <?php 
echo \app\widgets\Refnum::widget(['model' => $model, 'attribute' => 'refnum']);
?>
            </div>



            <?php 
echo $form->field($model, 'date')->widget(DateControl::classname(), ['type' => 'date']);
?>
            

            <?php 
echo $form->field($model, 'opp_account_id')->widget(Select2::className(), ['data' => \yii\helpers\ArrayHelper::map(Accounts::find()->where(array('type' => 7))->all(), 'id', 'name')]);
//7=banks
?>



            <div class="form-actions">
                <?php 
echo \yii\helpers\Html::submitButton(Yii::t('app', 'Create'), ['class' => 'btn btn-success']);
?>
            </div>

            <?php 
kartik\form\ActiveForm::end();
?>
            
Esempio n. 8
0
    </div>

    <div class="row">
        <div class="col-sm-6">
            <?php 
$idTags = Html::getInputId($model, 'tags');
$handlerJs = <<<JS
function(data) {
    var select = \$("#{$idTags}").append('<option value="' + data.id + '">' + data.title + '</option>'),
        selectedValues = select.val() || [];
        selectedValues.push(data.id);

    select.val(\$.unique(selectedValues)).trigger('change');
}
JS;
echo $form->field($model, 'tags', ['wrapperOptions' => ['class' => 'col-sm-9'], 'inputTemplate' => '<div class="input-group select2-bootstrap-append">{input}' . \gromver\widgets\ModalIFrame::widget(['options' => ['class' => 'input-group-addon', 'title' => \Yii::t('gromver.platform', 'Select Tag')], 'label' => '<i class="glyphicon glyphicon-folder-open"></i>', 'url' => ['/tag/backend/default/select', 'modal' => true], 'dataHandler' => $handlerJs]) . \gromver\widgets\ModalIFrame::widget(['options' => ['class' => 'input-group-addon', 'title' => \Yii::t('gromver.platform', 'Add Tag')], 'label' => '<i class="glyphicon glyphicon-plus"></i>', 'url' => ['/tag/backend/default/create', 'modal' => true], 'dataHandler' => $handlerJs]) . '</div>'])->widget(\kartik\select2\Select2::className(), ['data' => \yii\helpers\ArrayHelper::map($model->tags, 'id', 'title'), 'options' => ['multiple' => true], 'theme' => \kartik\select2\Select2::THEME_BOOTSTRAP, 'pluginOptions' => ['multiple' => true, 'placeholder' => Yii::t('gromver.platform', 'Select ...'), 'ajax' => ['url' => \yii\helpers\Url::to(['/tag/backend/default/tag-list'])]]]);
?>
        </div>
        <div class="col-sm-6">
            <?php 
echo $form->field($model, 'ordering', ['horizontalCssClasses' => ['wrapper' => 'col-xs-8 col-sm-4', 'label' => 'col-xs-4 col-sm-3']])->textInput();
?>
        </div>
    </div>

    <?php 
//описание версии удобнее выставлять в списках версий
//= $form->field($model, 'versionNote')->textInput()
?>

    <ul class="nav nav-tabs">
Esempio n. 9
0
?>

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

    <?php 
echo $form->field($model, 'url')->widget(\sibds\widgets\translitInput::className(), ['fromField' => 'name']);
?>

    <?php 
echo $form->field($model, 'image')->widget(\sibds\widgets\InputFile::className());
?>

    <?php 
echo $form->field($model, 'layout')->widget(\kartik\select2\Select2::className(), ['data' => Yii::$app->controller->getLayouts(), 'options' => ['placeholder' => 'Значение по умолчанию'], 'addon' => ['prepend' => ['content' => \yii\bootstrap\Html::icon('open-file')]]]);
?>

    <?php 
echo $form->field($model, 'description')->widget(\sibds\widgets\CKEditor::className(), ['options' => ['rows' => 6]]);
?>

    <?php 
echo \sibds\form\FormFooter::widget(['model' => $model]);
?>

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

</div>
Esempio n. 10
0
?>

    <?php 
$form = ActiveForm::begin(['id' => 'billing-form', 'method' => 'get', 'layout' => 'inline']);
?>

    <?php 
echo $form->field($searchModel, 'periodInput')->widget(DateControl::className(), ['type' => DateControl::FORMAT_DATE, 'options' => ['options' => ['placeholder' => 'Период...'], 'pluginOptions' => ['autoclose' => true, 'minViewMode' => 1]], 'saveFormat' => 'php:n' . $searchModel::PERIOD_DELIMITER . 'Y', 'displayFormat' => 'php:F Y']);
?>

    <?php 
echo $form->field($searchModel, 'operatorId')->dropDownList($searchModel::operatorList());
?>

    <?php 
echo $form->field($searchModel, 'items')->widget(Select2::className(), ['showToggleAll' => false, 'options' => ['multiple' => true, 'placeholder' => 'Номер или имя сотрудника...'], 'pluginOptions' => ['width' => '600', 'allowClear' => true, 'minimumInputLength' => 3, 'ajax' => ['url' => \yii\helpers\Url::to(['items-list']), 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {q:params.term}; }'), 'delay' => 250], 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'), 'templateResult' => new JsExpression('function(item) {return item.number; }'), 'templateSelection' => new JsExpression('function (item) {return item.number; }')]]);
?>

    <?php 
echo Html::submitButton('<span class="glyphicon glyphicon-search"></span>', ['class' => 'btn btn-primary']);
?>

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

    <?php 
Pjax::begin(['formSelector' => '#billing-form', 'options' => ['style' => 'padding: 20px 0']]);
?>

    <?php 
Esempio n. 11
0
<?php

use ut8ia\filemanager\Module;
use ut8ia\filemanager\models\Tag;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
/* @var $this yii\web\View */
$form = ActiveForm::begin(['action' => '?', 'method' => 'get']);
?>
	<?php 
echo $form->field($model, 'tagIds')->widget(\kartik\select2\Select2::className(), ['maintainOrder' => true, 'data' => ArrayHelper::map(Tag::find()->all(), 'id', 'name'), 'options' => ['multiple' => true], 'addon' => ['append' => ['content' => Html::submitButton(Module::t('main', 'Search'), ['class' => 'btn btn-primary']), 'asButton' => true]]])->label(false);
ActiveForm::end();
?>

    <?php 
// echo $form->field($model, 'faultTimeDesc')
?>

    <?php 
// echo $form->field($model, 'recTime')
?>

    <?php 
// echo $form->field($model, 'recTimeDesc')
?>

    <?php 
echo $form->field($model, 'recStatus', ['options' => ['class' => 'form-group']])->widget(Select2::className(), ["data" => ['0' => '未恢复', '1' => '已恢复'], 'hideSearch' => true, 'options' => ['placeholder' => '选择状态'], 'pluginOptions' => ['allowClear' => true, 'width' => '150']]);
?>

    <?php 
// echo $form->field($model, 'recStatusDesc')
?>

    <?php 
// echo $form->field($model, 'recUserName')
?>

    <?php 
// echo $form->field($model, 'ackTime')
?>

    <?php 
Esempio n. 13
0
/* @var $model app\modules\blog\models\Post */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="post-form">

    <?php 
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>
    
    <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'category_id')->widget(Select2::className(), ['data' => ArrayHelper::map(Category::find()->getActive()->all(), 'id', 'title'), 'language' => 'en', 'options' => ['placeholder' => 'Select a category ...'], 'pluginOptions' => ['allowClear' => true]]);
?>
    <?php 
echo $form->field($model, 'description')->widget(CKEditor::className(), ['options' => ['row' => 6], 'preset' => 'basic']);
?>
    <?php 
echo $form->field($model, 'text')->widget(CKEditor::className(), ['options' => ['row' => 6], 'preset' => 'basic']);
?>
    <?php 
echo $form->field($model, 'img')->widget(FileInput::classname(), ['name' => 'img[]', 'options' => ['multiple' => true], 'pluginOptions' => ['initialPreview' => $model->img ? Html::img($model->img, ['class' => 'file-preview-image']) : '', 'overwriteInitial' => true]]);
?>
    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>
Esempio n. 14
0
        <div class="col-sm-6">
            <?php 
echo $form->field($model, 'alias', ['wrapperOptions' => ['class' => 'col-sm-9']])->textInput(['maxlength' => 255, 'placeholder' => Yii::t('gromver.platform', 'Auto-generate')]);
?>
        </div>
    </div>

    <div class="row">
        <div class="col-sm-6">
            <?php 
echo $form->field($model, 'status', ['wrapperOptions' => ['class' => 'col-sm-9']])->dropDownList(['' => Yii::t('gromver.platform', 'Select ...')] + $model->statusLabels());
?>
        </div>
        <div class="col-sm-6">
            <?php 
echo $form->field($model, 'group', ['wrapperOptions' => ['class' => 'col-sm-9']])->widget(\kartik\select2\Select2::className(), ['theme' => \kartik\select2\Select2::THEME_BOOTSTRAP, 'data' => \yii\helpers\ArrayHelper::map(\gromver\platform\core\modules\tag\models\Tag::find()->groupBy('group')->andWhere('[[group]] != "" AND [[group]] IS NOT NULL')->all(), 'group', 'group'), 'pluginOptions' => ['tags' => true, 'allowClear' => true, 'multiple' => false, 'placeholder' => Yii::t('gromver.platform', 'Select ...')]]);
?>
        </div>
    </div>

    <ul class="nav nav-tabs">
        <li class="active"><a href="#meta-options" data-toggle="tab"><?php 
echo Yii::t('gromver.platform', 'SEO');
?>
</a></li>
    </ul>
    <br/>
    <div class="tab-content">
        <div id="meta-options" class="tab-pane active">
            <?php 
echo $form->field($model, 'metakey')->textInput(['maxlength' => 255]);
Esempio n. 15
0
        <div class="col-lg-6"> 
            <?php 
echo $form->field($model, 'tag_name_en')->textInput();
?>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-6">
            <?php 
echo $form->field($model, 'parent_id')->widget(Select2::className(), ['data' => Tags::getTagsList(), 'options' => ['placeholder' => 'Select parent tag..', 'multiple' => false], 'pluginOptions' => ['allowClear' => true]]);
?>
        </div>
        <div class="col-lg-6">
            <?php 
echo $form->field($model, 'tag_type')->widget(Select2::className(), ['data' => TagType::getTagTypeList(), 'options' => ['tags' => true, 'placeholder' => 'Select tag type..', 'multiple' => false], 'pluginOptions' => ['allowClear' => true]]);
?>
        </div>
    </div>
    <hr>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>
Esempio n. 16
0
?>

<?php 
$formatJs = <<<'JS'
var formatEmployeeList = function(item) {
    return '<b>' + item.name + '</b><p><small>' + item.post + ' (' + item.division + ')</small></p>';
}
var formatEmployeeSelection = function (employee) {
    return employee.name || employee.text;
}
JS;
$this->registerJs($formatJs, View::POS_HEAD);
?>

<?php 
echo $form->field($model, 'ownerId')->widget(\kartik\select2\Select2::className(), ['initValueText' => $model->owner->fullName, 'showToggleAll' => false, 'options' => ['placeholder' => 'Имя сотрудника...'], 'pluginOptions' => ['allowClear' => true, 'minimumInputLength' => 3, 'ajax' => ['url' => \yii\helpers\Url::to(['owner-list']), 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {q:params.term}; }'), 'delay' => 250], 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'), 'templateResult' => new JsExpression('formatEmployeeList'), 'templateSelection' => new JsExpression('formatEmployeeSelection')]]);
?>

<?php 
echo $form->field($model, 'operatorId')->dropDownList(Operator::items());
?>

<?php 
echo ActiveRadioList::widget(['activeField' => $form->field($model, 'destination'), 'items' => $model::destinationItems(), 'options' => ['class' => 'btn-group  btn-group-sm']]);
?>

<?php 
echo $form->field($model, 'limit', ['enableClientValidation' => true]);
?>

<?php 
Esempio n. 17
0
    </div>

    <div class="row">
        <div class="col-sm-6">
            <?php 
$idTags = Html::getInputId($model, 'tags');
$handlerJs = <<<JS
function(data) {
    var select = \$("#{$idTags}").append('<option value="' + data.id + '">' + data.title + '</option>'),
        selectedValues = select.val() || [];
        selectedValues.push(data.id);

    select.val(\$.unique(selectedValues)).trigger('change');
}
JS;
echo $form->field($model, 'tags', ['wrapperOptions' => ['class' => 'col-sm-9'], 'inputTemplate' => '<div class="input-group select2-bootstrap-append">{input}' . \gromver\widgets\ModalIFrame::widget(['options' => ['class' => 'input-group-addon', 'title' => \Yii::t('gromver.platform', 'Select Tag')], 'label' => '<i class="glyphicon glyphicon-folder-open"></i>', 'url' => ['/grom/tag/backend/default/select', 'modal' => true], 'handler' => $handlerJs, 'actionHandler' => 'function(url) {return (new URI(url)).addSearch("TagSearch[language]", $("#' . $idLanguage . '").val())}']) . \gromver\widgets\ModalIFrame::widget(['options' => ['class' => 'input-group-addon', 'title' => \Yii::t('gromver.platform', 'Add Tag')], 'label' => '<i class="glyphicon glyphicon-plus"></i>', 'url' => ['/grom/tag/backend/default/create', 'modal' => true], 'handler' => $handlerJs, 'actionHandler' => 'function(url) {return (new URI(url)).addSearch("language", $("#' . $idLanguage . '").val())}']) . '</div>'])->widget(\kartik\select2\Select2::className(), ['data' => \yii\helpers\ArrayHelper::map($model->tags, 'id', 'title'), 'options' => ['multiple' => true], 'theme' => \kartik\select2\Select2::THEME_BOOTSTRAP, 'pluginOptions' => ['multiple' => true, 'placeholder' => Yii::t('gromver.platform', 'Select ...'), 'ajax' => ['url' => \yii\helpers\Url::to(['/grom/tag/backend/default/tag-list']), 'data' => new \yii\web\JsExpression('function(params) { return {q:params.term, language:$("#' . $idLanguage . '").val()}; }')]]]);
?>
        </div>
        <div class="col-sm-6">
            <?php 
echo $form->field($model, 'ordering', ['horizontalCssClasses' => ['wrapper' => 'col-xs-8 col-sm-4', 'label' => 'col-xs-4 col-sm-3']])->textInput();
?>
        </div>
    </div>

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

    <ul class="nav nav-tabs">
        <li class="active"><a href="#main-options" data-toggle="tab"><?php 
Esempio n. 18
0
    ?>

<?php 
    echo Alert::widget(['options' => ['class' => 'alert-success'], 'body' => Yii::t('rbac', 'Assignments have been updated')]);
    ?>

<?php 
}
?>

<?php 
$form = ActiveForm::begin(['enableClientValidation' => false, 'enableAjaxValidation' => false]);
?>

<?php 
echo Html::activeHiddenInput($model, 'user_id');
?>

<?php 
echo $form->field($model, 'items')->widget(Select2::className(), ['data' => $model->getAvailableItems(), 'options' => ['id' => 'items', 'multiple' => true]]);
?>

<?php 
echo Html::submitButton(Yii::t('rbac', 'Update assignments'), ['class' => 'btn btn-success btn-block']);
?>

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

Esempio n. 19
0
$list[0] = Yii::t('app', 'None');
?>

<?php 
echo $form->errorSummary($model);
echo $form->field($model, 'id');
echo $form->field($model, 'label');
?>

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

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

<?php 
echo $form->field($model, 'parent')->widget(\kartik\select2\Select2::className(), ['data' => $list]);
echo $form->field($model, 'sort');
?>

<div class="form-actions">
    <?php 
echo \yii\helpers\Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => 'btn btn-success']);
?>

</div>

<?php 
kartik\form\ActiveForm::end();
Esempio n. 20
0
    <?php 
$form = ActiveForm::begin();
?>


    <?php 
echo $form->field($model, 'id_zal')->dropDownList(ArrayHelper::map($zal, 'id', 'name_zal'), ['prompt' => 'Выберите зал', 'onchange' => '
                $.post( "' . Yii::$app->urlManager->createUrl('oborud/lists?id=') . '"+$(this).val(), function( data ) {
                  $( "select#event-oborud1" ).html( data );
                });
            ']);
?>

    <?php 
echo $form->field($model, 'oborud1')->widget(Select2::className(), ['options' => ['placeholder' => 'Выберите оборудование...', 'multiple' => true], 'pluginOptions' => ['allowClear' => true]]);
?>





    <?php 
echo $form->field($model, 'id_client')->dropDownList(ArrayHelper::map($client, 'id', 'name_client'), ['prompt' => 'Выберите клиента']);
?>


    <?php 
echo $form->field($model, 'date_event')->widget(DatePicker::classname(), ['options' => ['placeholder' => 'Выберите дату ...'], 'language' => 'ru-RU', 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]);
?>
Esempio n. 21
0
SCRIPT;
$met_description = Yii::t('app', 'Introduce your business, Your business on the map, image gallery for your business, attachments for your business, Mark your business location in map');
$this->registerMetaTag(['property' => 'og:description', 'content' => $met_description]);
$this->registerMetaTag(['name' => 'description', 'content' => $met_description]);
$this->registerMetaTag(['name' => 'keywords', 'content' => $met_description]);
?>
<div class="row">
    <div class="col-md-2">
        <?php 
$form = ActiveForm::begin(['id' => $searchModel->formName(), 'enableAjaxValidation' => false, 'enableClientValidation' => false, 'method' => 'get']);
?>
        <?php 
echo $form->field($searchModel, 'category_id')->widget(Select2::classname(), ['language' => Yii::$app->helper->getTwoCharLanguage(), 'size' => Select2::MEDIUM, 'options' => [], 'pluginOptions' => ['allowClear' => true, 'minimumInputLength' => 2, 'ajax' => ['url' => $categoriesListUrl, 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {search:params.term}; }'), 'results' => new JsExpression('function(data,page) { return {results:data.results}; }')], 'initSelection' => new JsExpression($initCategoriesListScript)]]);
?>
        <?php 
echo $form->field($searchModel, 'country_id')->widget(Select2::className(), ['data' => ArrayHelper::map(Country::find()->asArray()->all(), 'id', 'name'), 'language' => Yii::$app->helper->getTwoCharLanguage(), 'options' => ['placeholder' => Yii::t('app', 'Select...')], 'pluginOptions' => ['allowClear' => true]]);
echo $form->field($searchModel, 'province_id')->widget(DepDrop::classname(), ['data' => !$searchModel->country_id ? [] : ArrayHelper::map(Province::find()->where(['country_id' => $searchModel->country_id])->asArray()->all(), 'id', 'name'), 'type' => DepDrop::TYPE_SELECT2, 'options' => ['placeholder' => Yii::t('app', 'Select...')], 'select2Options' => ['pluginOptions' => ['allowClear' => true], 'language' => Yii::$app->helper->getTwoCharLanguage()], 'pluginOptions' => ['depends' => ['search-country_id'], 'url' => Url::to(['/province/dep-list']), 'loadingText' => Yii::t('app', 'Loading...')]]);
echo $form->field($searchModel, 'city_id')->widget(DepDrop::classname(), ['data' => !$searchModel->province_id ? [] : ArrayHelper::map(City::find()->where(['province_id' => $searchModel->province_id])->asArray()->all(), 'id', 'name'), 'options' => ['placeholder' => Yii::t('app', 'Select...')], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['allowClear' => true], 'language' => Yii::$app->helper->getTwoCharLanguage()], 'pluginOptions' => ['depends' => ['search-province_id'], 'url' => Url::to(['/city/dep-list']), 'loadingText' => Yii::t('app', 'Loading...')]]);
?>
            <?php 
echo $form->field($searchModel, 'title')->textInput();
?>
            <?php 
echo $form->field($searchModel, 'address')->textInput();
?>
            <?php 
echo Html::hiddenInput('view', $adverView, ['id' => 'hiddenViewMode']);
?>
        <div class="form-group">
            <?php 
echo Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']);
        </article>

    </div>
</section>

<input type="hidden" name="PrefilteredPages[params]" id="params">


<?php 
BackendWidget::begin(['title' => Yii::t('app', 'Match settings'), 'icon' => 'cogs', 'footer' => $this->blocks['submit']]);
?>
    <div id="properties">
        <?php 
$url = Url::to(['/shop/backend-category/autocomplete']);
$category = $model->last_category_id > 0 ? \app\modules\shop\models\Category::findById($model->last_category_id) : null;
echo $form->field($model, 'last_category_id')->widget(Select2::className(), ['language' => Yii::$app->language, 'pluginOptions' => ['allowClear' => true, 'ajax' => ['url' => $url, 'dataType' => 'json', 'data' => new JsExpression('function(term,page) { return {search:term}; }'), 'results' => new JsExpression('function(data,page) { return {results:data.results}; }')]], 'initValueText' => !is_null($category) ? $category->name : '']);
?>
        <div class="row">
            <div class="col-md-10 col-md-offset-2">
                <a href="#" class="btn btn-md btn-primary add-property">
                    <?php 
echo Icon::show('plus');
?>
                    <?php 
echo Yii::t('app', 'Add property');
?>
                </a>
                <br>
                <br>
            </div>
        </div>
Esempio n. 23
0
$form = ActiveForm::begin(['layout' => 'horizontal']);
?>

    <div>
        <?php 
echo $form->errorSummary($model);
?>
        <?php 
$this->beginBlock('main');
?>
        <p>
            <?php 
/*= $form->field($model, 'client_id')->dropDownList(\yii\helpers\ArrayHelper::map(\common\models\Client::find()->active()->all(), 'id', 'name'), ['prompt' => '']) */
?>
            <?php 
echo $form->field($model, 'client_id')->widget(\kartik\select2\Select2::className(), ['data' => \yii\helpers\ArrayHelper::map(\common\models\Client::find()->active()->all(), 'id', 'name'), 'options' => ['prompt' => '']]);
?>

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

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

            <?php 
echo $form->field($model, 'phone')->input('tel', ['maxlength' => true, 'placeholder' => '(10 digits only)']);
?>

            <?php 
Esempio n. 24
0
$form = ActiveForm::begin(['layout' => 'horizontal']);
?>

    <div>
        <?php 
echo $form->errorSummary($model);
?>
        <?php 
$this->beginBlock('main');
?>
        <p>
            <?php 
/*= $form->field($model, 'invoice_id')->dropDownList(yii\helpers\ArrayHelper::map(\common\models\Location::find()->active()->all(), 'id', 'fullName'), ['id' => 'location-select','prompt' => '']) */
?>
            <?php 
echo $form->field($model, 'invoice_id')->widget(\kartik\select2\Select2::className(), ['data' => \yii\helpers\ArrayHelper::map(\common\models\Location::find()->active()->all(), 'id', 'fullName'), 'options' => ['prompt' => '', 'id' => 'location-select']]);
?>

            <?php 
echo $form->field($model, 'tech_id')->dropDownList(yii\helpers\ArrayHelper::map(\common\models\Tech::find()->contact()->all(), 'contact_id', 'contact.name'), ['prompt' => '']);
?>

            <?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);
Esempio n. 25
0
    /*Html::encode()*/
    // plain text, not json
}
?>
        <?php 
if (!empty($model->tags)) {
    ?>
            <br>--
            <br>
            <?php 
    foreach ($model->tags as $tag) {
        ?>
                <?php 
        echo Html::a("#" . $tag->name, Url::toRoute(['/', 'query' => "#" . $tag->name]));
        ?>
            <?php 
    }
    ?>
        <?php 
}
?>
        <hr>
        <?php 
$form = ActiveForm::begin(['action' => '', 'method' => 'post']);
echo Html::tag("div", $form->field($model, 'id')->hiddenInput() . $form->field($model, 'text')->hiddenInput() . $form->field($model, 'hash')->hiddenInput() . $form->field($model, 'created')->hiddenInput() . $form->field($model, 'ip')->hiddenInput() . $form->field($model, 'user_agent')->hiddenInput(), ['style' => "display: none;"]);
echo $form->field($model, 'tags')->widget(Select2::className(), ['data' => ArrayHelper::map(Tag::find()->all(), 'id', 'name'), 'options' => ['multiple' => true, 'placeholder' => 'Теги', 'id' => 'moderation-tags-' . $model->id], 'pluginOptions' => ['tags' => true, 'maximumInputLength' => 255]]);
echo Html::tag("div", Html::a('Редактировать', ['edit', 'id' => $model->id], ['class' => 'btn btn-warning']) . " " . Html::submitButton('Опубликовать', ['class' => 'btn btn-success']), ['style' => "text-align: center;"]);
$form->end();
?>
    </div>
</div>
Esempio n. 26
0
foreach ($modelDetails as $i => $modelDetail) {
    ?>
                        <tr class="item">
                            <td>
                                <b><?php 
    echo $i + 1;
    ?>
</b>
                                <?php 
    if (!$modelDetail->isNewRecord) {
        echo Html::activeHiddenInput($modelDetail, "[{$i}]id");
    }
    ?>
                            </td>
                            <td><?php 
    echo $form->field($modelDetail, "[{$i}]item_id")->widget(Select2::className(), ['data' => ArrayHelper::map(Item::find()->all(), 'id', 'name'), 'disabled' => !$modelDetail->isNewRecord])->label(false);
    ?>
</td>
                            <td><?php 
    echo $form->field($modelDetail, "[{$i}]quantity")->textInput()->label(false);
    ?>
</td>
                            <td><button type="button" class="pull-right remove-item btn btn-danger btn-xs"><i class="fa fa-minus"></i> Hapus</button></td>
                        </div>
                    <?php 
}
?>
                </table>
            <?php 
DynamicFormWidget::end();
?>
Esempio n. 27
0
?>
        </div>
    </div>
    <div class="panel panel-default">
        <div class="panel-heading">消息模版</div>
        <div class="panel-body">
            <?php 
echo $form->field($model, "smsTemplate_id")->widget(Select2::className(), ["data" => $templates, 'options' => ['placeholder' => '选择消息模版'], 'pluginOptions' => ['allowClear' => true]]);
?>
        </div>
    </div>
    <div class="panel panel-default">
        <div class="panel-heading">选择设备</div>
        <div class="panel-body">
            <?php 
echo $form->field($model, "sms_device_type")->widget(Select2::className(), ["data" => [0 => '有线设备', 1 => '无线设备']]);
?>
            <?php 
echo $form->field($model, 'dev_ips', ['skipFormLayout' => true, 'inputOptions' => ['style' => 'width:1000px;']]);
?>
        </div>
    </div>

    <div class="panel panel-default">
        <div class="panel-heading">告警条件设置</div>
        <div class="panel-body" id="condition">

        </div>
    </div>
    <?php 
echo $form->field($model, "alarmSet")->hiddenInput(["id" => "alarmSet"]);
Esempio n. 28
0
?>

    <?php 
echo $form->field($model, 'preview')->fileInput();
?>

    <?php 
echo $form->field($model, 'date')->widget(DatePicker::className(), ['inline' => true, 'template' => '<div class="well well-sm" style="background-color: #fff; width:250px">{input}</div>', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]);
?>

   <?php 
$authors = \app\models\Author::find()->all();
foreach ($authors as $author) {
    $data[$author->id] = $author->lastname . ' ' . $author->firstname;
}
echo $form->field($model, 'author_id')->widget(\kartik\select2\Select2::className(), ['data' => $data, 'options' => ['placeholder' => 'Выберите автора']]);
?>

    <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>
<?php 
$script = <<<JS
Esempio n. 29
0
use kartik\select2\Select2;
use yii\widgets\ActiveForm;
use yii\helpers\Html;
?>

<?php 
$form = ActiveForm::begin(['enableClientValidation' => false, 'enableAjaxValidation' => true]);
?>

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

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

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

<?php 
echo $form->field($model, 'children')->widget(Select2::className(), ['data' => $model->getUnassignedItems(), 'options' => ['id' => 'children', 'multiple' => true]]);
?>

<?php 
echo Html::submitButton(Yii::t('rbac', 'Save'), ['class' => 'btn btn-success btn-block']);
?>

<?php 
ActiveForm::end();
Esempio n. 30
0
<?php

/* @var $this yii\web\View */
/* @var $model app\models\Wiki */
/* @var $form yii\bootstrap\ActiveForm */
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use vova07\imperavi\Widget;
use kartik\select2\Select2;
$form = ActiveForm::begin(['layout' => 'horizontal']);
?>

<?php 
echo $form->field($model, 'title');
echo $form->field($model, 'text')->widget(Widget::classname(), ['settings' => ['lang' => 'ru', 'minHeight' => 400, 'pastePlainText' => true, 'buttonSource' => true, 'plugins' => ['clips', 'fullscreen']]]);
echo $form->field($model, 'tags')->widget(Select2::className(), ['options' => ['multiple' => true, 'placeholder' => Yii::t('app', 'Choose tags')], 'data' => \app\models\Tag::getOptions($project->id), 'pluginOptions' => ['tags' => true, 'maximumInputLength' => 254, 'tokenSeparators' => [',']]]);
?>

    <div class="form-group">
        <div class="col-sm-offset-3 col-sm-9">
            <?php 
echo Html::submitButton($model->isNewRecord ? \Yii::t('app', 'Create') : \Yii::t('app', 'Save'), ['class' => 'btn btn-primary']);
?>
        </div>
    </div>

<?php 
ActiveForm::end();