Esempio n. 1
0
 public function run()
 {
     $form = ActiveForm::begin($this->formOptions);
     $column = [];
     $options = $this->attributeOptions;
     if (!isset($options['fieldConfig'])) {
         $options['fieldConfig'] = [];
     }
     if (!isset($options['fieldConfig']['template'])) {
         $options['fieldConfig']['template'] = "{input}\n{hint}\n{error}";
     }
     switch ($this->type) {
         case EditableType::TYPE_TEXT:
             $column[$this->attribute] = ExtForm::textField($options);
             break;
     }
     echo Form::widget(['model' => $this->model, 'form' => $form, 'attributes' => $column]);
     ActiveForm::end();
 }
Esempio n. 2
0
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\datecontrol\DateControl;
/**
 * @var yii\web\View $this
 * @var common\models\Meta $model
 * @var yii\widgets\ActiveForm $form
 */
$parents = \yii\helpers\ArrayHelper::map(\common\models\Meta::find()->where(['status' => \common\models\Meta::STATUS_ACTIVE, 'type' => \common\models\Meta::TYPE_ARTICLE_CATEGORIES, 'parent_id' => 0])->asArray()->all(), 'id', 'name');
$parents = \yii\helpers\ArrayHelper::merge([0 => '顶级分类'], $parents);
?>

<div class="meta-form">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['name' => ['type' => Form::INPUT_TEXT, 'options' => ['maxlength' => 32, 'placeholder' => 'Enter Name...']], 'slug' => ['type' => Form::INPUT_TEXT, 'options' => ['maxlength' => 255, 'placeholder' => 'Enter Slug...']], 'parent_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => \kartik\widgets\Select2::className(), 'options' => ['data' => $parents]], 'description' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['rows' => 5, 'maxlength' => 255, 'placeholder' => 'Enter Description...']]]]);
?>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
        </div>
    </div>
    <?php 
ActiveForm::end();
?>

</div>
Esempio n. 3
0
use kartik\builder\Form;
use kartik\datecontrol\DateControl;
use kartik\widgets\FileInput;
use kartik\builder\TabularForm;
/**
 * @var yii\web\View $this
 * @var common\models\ProductCat $model
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="product-cat-search">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'action' => ['index'], 'method' => 'get']);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['title' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Название категории...', 'maxlength' => 255]], 'parent_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => ArrayHelper::map(common\models\ProductCat::find()->all(), 'id', 'title'), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]]]]);
?>
    <div class="form-group">
        <?php 
echo Html::a(Yii::t('app', 'Reset'), ['index'], ['class' => 'btn btn-default', 'style' => 'margin-left: 15px; margin-right: 10px']);
?>
        <?php 
echo Html::submitButton(Yii::t('app', Yii::t('app', 'Search')), ['class' => 'btn btn-default', 'onclick' => ' $.pjax.reload({container: "#w2", data: $("#w0").serialize()  }); return false;']);
?>
  
    </div>

    <?php 
ActiveForm::end();
?>
Esempio n. 4
0
use yii\helpers\Html;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\datecontrol\DateControl;
/**
 * @var yii\web\View $this
 * @var common\models\Preferences $model
 * @var yii\widgets\ActiveForm $form
 */
?>
<div class="preferences-form">

    <?php 
$form = ActiveForm::begin(['id' => 'preferences-form', 'type' => ActiveForm::TYPE_HORIZONTAL, 'formConfig' => ['labelSpan' => 3]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'columnSize' => Form::SIZE_LARGE, 'attributes' => ['codes' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter 参数编码...', 'maxlength' => 4]], 'name1' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter 参数名称...', 'maxlength' => 80]], 'classmark' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter 项目分类-英文...', 'maxlength' => 30, 'value' => $model->isNewRecord && Yii::$app->request->get('create-classmark') ? Yii::$app->request->get('create-classmark') : $model->classmark]], 'classmarkcn' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter 项目分类-中文...', 'maxlength' => 50, 'value' => $model->isNewRecord && Yii::$app->request->get('create-classmark') ? \common\models\Preferences::getClassmarkcnByClassmark(Yii::$app->request->get('create-classmark')) : $model->classmarkcn]], 'status' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => $model->getStatusOptions()]]]);
?>
    <div class="form-group">
        <div class="col-sm-offset-3 col-sm-9">
            <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Save') : Yii::t('app', 'Update'), ['id' => 'btn-modal-footer', 'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        </div>
    </div>
    <?php 
//echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Save') : Yii::t('app', 'Update'), ['id' => 'btn-modal-footer','class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
ActiveForm::end();
?>
Esempio n. 5
0
<?php

use yii\helpers\Html;
//use yii\widgets\ActiveForm;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use yii\helpers\ArrayHelper;
/* @var $this yii\web\View */
/* @var $model common\models\Answers */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="answers-form">

    <?php 
$form = ActiveForm::begin();
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['questions_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\Select2', 'options' => ['data' => ArrayHelper::map($model->getAllQuestions(), 'id', 'questions'), 'options' => ['placeholder' => 'Выберите Вопрос', 'id' => 'season-id'], 'pluginOptions' => ['allowClear' => true]]], 'answer' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Введите ответ...']], 'actions' => ['type' => Form::INPUT_RAW, 'value' => '<div style="margin-top: 20px">' . Html::resetButton('Сбросить', ['class' => 'btn btn-default']) . ' ' . Html::submitButton($model->isNewRecord ? 'Создать' : 'Обновить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) . '</div>']]]);
ActiveForm::end();
?>

</div>
$data_cargos = ArrayHelper::map($cargos, 'descricao', 'descricao');
echo $form->field($model, 'cargo')->widget(Select2::classname(), ['data' => array_merge(["" => ""], $data_cargos), 'options' => ['placeholder' => 'Selecione o cargo...'], 'pluginOptions' => ['allowClear' => true]]);
?>


                    <?php 
echo $form->field($model, 'nome')->textInput(['maxlength' => true, 'placeholder' => 'Nome completo...']);
?>

                    <?php 
echo $form->field($model, "datanascimento")->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATETIME, 'displayFormat' => 'dd/MM/yyyy', 'autoWidget' => false, 'widgetClass' => 'yii\\widgets\\MaskedInput', 'options' => ['mask' => '99/99/9999', 'options' => ['class' => 'form-control', 'placeholder' => 'Data nascimento...']]]);
?>

                    <?php 
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 4, 'attributes' => ['cpf' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu CPF...']], 'identidade' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu RG...']], 'orgao_exped' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe o orgão expedidor...']], 'sexo' => ['type' => Form::INPUT_RADIO_LIST, 'items' => [true => 'Masculino', false => 'Feminino'], 'options' => ['inline' => true]]]]);
?>

                    <?php 
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 4, 'attributes' => ['email' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu e-mail...']], 'emailAlt' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu e-mail alternativo...']], 'telefone' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu telefone...']], 'telefoneAlt' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Informe seu telefone alternativo...']]]]);
?>
                       
                    <?php 
$form->field($model, 'cpf')->hiddenInput()->widget(\yii\widgets\MaskedInput::className(), ['mask' => '999.999.999-99']);
?>

                    <?php 
$form->field($model, 'telefone')->hiddenInput()->widget(\yii\widgets\MaskedInput::className(), ['mask' => '(99)99999-999[9]']);
?>

                    <?php 
$form->field($model, 'telefoneAlt')->hiddenInput()->widget(\yii\widgets\MaskedInput::className(), ['mask' => '(99)99999-999[9]']);
Esempio n. 7
0
use yii\helpers\Html;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\datecontrol\DateControl;
/**
 * @var yii\web\View $this
 * @var common\models\Events $model
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="events-form">

    <?php 
$form = ActiveForm::begin(['id' => 'events-form', 'type' => ActiveForm::TYPE_HORIZONTAL, 'formConfig' => ['labelSpan' => 3]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['user_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\Select2', 'options' => ['data' => \yii\helpers\ArrayHelper::map(\dektrium\user\models\User::find()->all(), 'id', 'username'), 'value' => $model->isNewRecord ? Yii::$app->user->identity->getId() : $model->user_id, 'options' => ['prompt' => '---请选择事件关联的用户---'], 'addon' => ['append' => ['content' => Html::button(\kartik\helpers\Html::icon('fa fa-user-plus', [], ''), ['class' => 'btn btn-primary', 'title' => '请选择事件关联的用户', 'data-toggle' => 'tooltip', 'data-placement' => 'bottom']), 'asButton' => true]], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 3]]], 'title' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter 事件标题...', 'maxlength' => 100]], 'data' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['placeholder' => 'Enter 事件内容...', 'rows' => 6]], 'time' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter 触发事件次数...']]]]);
?>
    <div class="form-group">
        <div class="col-sm-offset-3 col-sm-9">
            <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Save') : Yii::t('app', 'Update'), ['id' => 'btn-modal-footer', 'class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        </div>
    </div>
    <?php 
//echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Save') : Yii::t('app', 'Update'), ['id' => 'btn-modal-footer','class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
ActiveForm::end();
?>
Esempio n. 8
0
use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use yii\helpers\Url;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\datecontrol\DateControl;
use kartik\widgets\FileInput;
use kartik\builder\TabularForm;
use common\widgets\edit\InputFile;
use common\widgets\edit\Redactor;
/**
 * @var yii\web\View $this
 * @var common\models\ProductTypeHasDiagnos $model
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="product-type-has-diagnos-form">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['diagnos_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => ArrayHelper::map(common\models\Diagnos::find()->all(), 'id', 'title'), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]], 'product_type_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => ArrayHelper::map(common\models\ProductType::find()->all(), 'id', 'title'), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]]]]);
echo Html::button(Yii::t('app', 'Cancel'), ['class' => 'btn btn-default', 'style' => 'margin-right: 20px', 'onclick' => 'window.location = "' . Url::to(['index']) . '"']);
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 10px', 'name' => 'goto', 'value' => 'list']);
echo Html::submitButton(Yii::t('app', 'Apply'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 0px']);
ActiveForm::end();
?>

</div>
Esempio n. 9
0

    
 <?=

 Form::widget([
        'model'=>$model,
        'form'=>$form,
        'columns'=>3,
        'attributes'=>[       // 2 column layout
            'zoek'=>['type'=>Form::INPUT_TEXT, 'options'=>['placeholder'=>'vul hier je zoektekst in', 'class'=>'col-md-9']],
           'startdatum' =>['type'=>Form::INPUT_WIDGET, 
                'widgetClass'=>'\kartik\widgets\DatePicker',
                'options'=>[
                            'class'=>'col-md-9', 
                            'language' => 'nl',
                            ]], 
            'einddatum' =>['type'=>Form::INPUT_WIDGET, 
                'widgetClass'=>'\kartik\widgets\DatePicker',
                'options'=>[
                            'class'=>'col-md-9', 
                            'language' => 'nl',
                            ]], 
            
            ] 
        ]);
    

?>

        <div class="col-md-4"><?php 
echo $form->field($model, 'siap')->textInput(['maxlength' => 15]);
?>
</div>
    </div>

    <div class="row">
        <div class="col-md-4"><?php 
echo $form->field($model, 'nome')->textInput(['maxlength' => 200]);
?>
</div>
    </div>

    <div class="row">
        <div class="col-md-4"><?php 
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['username' => ['type' => Form::INPUT_TEXT], 'password' => ['type' => Form::INPUT_PASSWORD]]]);
?>
</div>
    </div>

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

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

</div>
Esempio n. 11
0
    echo Html::tag('div', $form->field($model, 'name')->textInput(['maxlength' => true, 'placeholder' => 'Введите имя команды...']), ['class' => 'col-xs-4']);
}
?>
        <div class="col-xs-4">
            <?php 
echo $form->field($model, 'slug')->textInput(['maxlength' => true, 'placeholder' => 'Введите Url...']);
?>
        </div>
    </div>


    <?php 
//    echo '<br>';
//    $name =
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 3, 'attributes' => ['year' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Введите год создания...']], 'web_site' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Введите веб сайт...']]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 3, 'attributes' => ['city' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Введите город...']], 'stadium' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Введите стадион...']]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['description' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['placeholder' => 'Введите описание...']]]]);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Создать' : 'Обновить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

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

</div>
Esempio n. 12
0
use yii\helpers\Html;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\datecontrol\DateControl;
/**
 * @var yii\web\View $this
 * @var common\models\User $model
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="user-form">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['username' => ['type' => Form::INPUT_TEXT, 'options' => ['maxlength' => 32, 'disabled' => !$model->isNewRecord, 'placeholder' => 'Enter Username...']], 'status' => ['type' => Form::INPUT_RADIO_LIST, 'items' => $model->getStatusOptions(), 'options' => ['inline' => true]], 'nickname' => ['type' => Form::INPUT_TEXT, 'options' => ['maxlength' => 32, 'placeholder' => 'Enter Nickname...']], 'email' => ['type' => Form::INPUT_TEXT, 'options' => ['maxlength' => 255, 'placeholder' => 'Enter Email...']], 'profile' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['rows' => 5, 'maxlength' => 255, 'placeholder' => 'Enter Profile...']]]]);
?>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <?php 
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
        </div>
    </div>
    <?php 
ActiveForm::end();
?>

</div>
Esempio n. 13
0
	<?php 
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 12, 'attributes' => ['frequency' => ['label' => Yii::t('igolf', 'Recurrence'), 'type' => Form::INPUT_DROPDOWN_LIST, 'items' => Recurrence::getLocalizedConstants('FREQUENCY_'), 'columnOptions' => ['colspan' => 4]], 'interval' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => TouchSpin::className(), 'options' => ['pluginOptions' => ['initval' => 1, 'min' => 1, 'max' => 30]], 'columnOptions' => ['colspan' => 4]], 'repeat' => ['label' => Yii::t('igolf', 'every'), 'type' => Form::INPUT_STATIC, 'columnOptions' => ['colspan' => 4]]]]);
echo '<div class="recurrence_byweekday">';
echo $form->field($model, 'byweekday')->checkboxButtonGroup(Enum::dayList())->label(false);
echo '</div>';
echo '<div class="recurrence_bymonth">';
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 12, 'attributes' => ['option' => ['type' => Form::INPUT_RADIO_LIST, 'items' => ['bymonthday' => Yii::t('igolf', 'on day')], 'columnOptions' => ['colspan' => 2], 'label' => false], 'bymonthday' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Enum::dateList(1, 31), 'columnOptions' => ['colspan' => 2], 'label' => false]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 12, 'attributes' => ['option' => ['type' => Form::INPUT_RADIO_LIST, 'items' => ['byposday' => Yii::t('igolf', 'on the')], 'columnOptions' => ['colspan' => 2], 'label' => false], 'bypos4month' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Recurrence::getLocalizedConstants('POSITION_'), 'columnOptions' => ['colspan' => 4], 'label' => false], 'weekday4month' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Enum::dayList() + Recurrence::getLocalizedConstants('DAY_'), 'columnOptions' => ['colspan' => 4], 'label' => false]]]);
echo '</div>';
echo '<div class="recurrence_byyear">';
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 12, 'attributes' => ['option' => ['type' => Form::INPUT_RADIO_LIST, 'items' => ['bymonth' => Yii::t('igolf', 'on')], 'columnOptions' => ['colspan' => 2], 'label' => false], 'bymonth' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Enum::monthList(), 'columnOptions' => ['colspan' => 4], 'label' => false], 'monthday4year' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Enum::dateList(1, 31), 'columnOptions' => ['colspan' => 2], 'label' => false]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 12, 'attributes' => ['option' => ['type' => Form::INPUT_RADIO_LIST, 'items' => ['byposmonth' => Yii::t('igolf', 'on the')], 'columnOptions' => ['colspan' => 2], 'label' => false], 'bypos4year' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Recurrence::getLocalizedConstants('POSITION_'), 'columnOptions' => ['colspan' => 3], 'label' => false], 'weekday4year' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Enum::dayList() + Recurrence::getLocalizedConstants('DAY_'), 'columnOptions' => ['colspan' => 3], 'label' => false], 'month4year' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Enum::monthList(), 'columnOptions' => ['colspan' => 4], 'label' => false]]]);
echo '</div>';
echo '<div class="recurrence_until">';
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 12, 'attributes' => ['until' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Recurrence::getLocalizedConstants('UNTIL_'), 'columnOptions' => ['colspan' => 4]], 'count' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => TouchSpin::className(), 'options' => ['pluginOptions' => ['initval' => 1, 'min' => 1, 'max' => 20]], 'columnOptions' => ['colspan' => 4]], 'date_end' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DatePicker::className(), 'options' => ['pluginOptions' => ['format' => 'yyyy/mm/dd', 'todayHighlight' => true]], 'columnOptions' => ['colspan' => 4], 'label' => Yii::t('igolf', 'End Date')]]]);
echo '</div>';
?>

	<div class="form-group">
	    <?php 
echo Html::button(Yii::t('igolf', 'Cancel'), ['class' => 'btn btn-danger', 'data' => ['dismiss' => 'modal']]);
?>
	    <?php 
echo Html::button(Yii::t('igolf', 'OK'), ['class' => 'btn btn-success action-ok', 'data' => ['dismiss' => 'modal']]);
?>
	</div>

</div>
<script type="text/javascript">
<?php 
Esempio n. 14
0
                                'errorLoading' => 'Buscando ...',
                                'ajax' => [
                                    'url' => \yii\helpers\Url::to(['localidad/find']),
                                    'dataType' => 'json',
                                    'data' => new JsExpression('function(params) { return {q:params.term}; }')
                                ],
                                'escapeMarkup' => new JsExpression('function (markup) { return markup; }'),
                                'templateResult' => new JsExpression('function(city) { return city.nombre; }'),
                                'templateSelection' => new JsExpression('function (city) { return city.nombre; }'),
                            ],
                        ],
                ],
            ]
        ]);
*/
$dataLocalidad = ArrayHelper::map(\app\models\Localidad::find()->asArray()->all(), 'id', 'nombre');
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['domicilio' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Ingrese Domicilio...']], 'localidad_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\select2\\Select2', 'options' => ['options' => ['placeholder' => 'Seleccione Ciudad...'], 'data' => $dataLocalidad, 'pluginOptions' => ['allowClear' => true]]]]]);
?>

    <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();
?>

</div>
<?php

use yii\helpers\ArrayHelper;
use kartik\builder\Form;
use kartik\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model app\models\Acervo */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="acervo-form">   
      <div class="row">
        <div class="col-sm-12">   
    <?php 
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 3, 'attributes' => ['restauracion' => ['type' => Form::INPUT_TEXT, 'label' => 'Restauración', 'options' => ['placeholder' => 'Detalles...']], 'fechaInicioRestauracion' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\datecontrol\DateControl::className(), 'hint' => 'Ingrese Fecha de Inicio Restauracióna (dd/mm/aaaa)'], 'fechaFinRestauracion' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\datecontrol\DateControl::className(), 'hint' => 'Ingrese Fecha del Fin de la Restauracióna (dd/mm/aaaa)']]]);
?>
            </div>
          </div>
</div>
Esempio n. 16
0
use kartik\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use kartik\builder\Form;
/* @var $this yii\web\View */
/* @var $model app\models\TipoAcervo */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="tipo-acervo-form">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_VERTICAL]);
?>

    <?php 
$dataTipoAcervo = ArrayHelper::map(\app\models\TipoAcervo::find()->where(['is', 'tipoAcervo_id', NULL])->asArray()->all(), 'id', 'descripcion');
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['descripcion' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Descripcion...']], 'tipoAcervo_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\widgets\\Select2', 'options' => ['data' => $dataTipoAcervo], 'pluginOptions' => ['allowClear' => true], 'hint' => 'Seleccione la colección a la que pertenece el acervo']]]);
?>

    <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();
?>

</div>
Esempio n. 17
0
 public function run()
 {
     $options = ['model' => $this->model, 'form' => $this->_form, 'attributes' => $this->attributes] + $this->options;
     echo Form::widget($options);
     if ($this->buttons != null) {
         $tag = ArrayHelper::remove($this->buttonsContainer, 'tag', 'div');
         echo Html::tag($tag, $this->_buttons, $this->buttonsContainer);
     }
     ActiveForm::end();
 }
Esempio n. 18
0
      <h4 class="panel-title">
        <a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseFive" aria-expanded="false" aria-controls="collapseFive">
          Algemeen reis tarief
        </a>
      </h4>
    </div>
    <div id="collapseFive" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFive">
      <div class="panel-body">
          
       <div class="panel panel-warning">
  <div class="panel-heading">
    <h3 class="panel-title">Algemeen reis tarief</h3>
  </div>
  <div class="panel-body">
       <?php 
echo Form::widget(['model' => $tariefReizen, 'form' => $form, 'columns' => 3, 'attributes' => ['vrije_km' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => '0']], 'tarief' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => '0,0']], 'tarief_eenheid' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Km']]]]);
?>
   </div>
</div>

      
</div>
</div>
</div>
<!--END   tariefReizen ------------------------------------------>

<!--START   Documenten ------------------------------------------>
<div class="panel panel-primary">
    <div class="panel-heading" role="tab" id="headingSix">
      <h4 class="panel-title">
        <a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseSix" aria-expanded="false" aria-controls="collapseSix">
Esempio n. 19
0
<?php

use yii\helpers\Html;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use app\models\forms\EmailForm;
use app\components\helpers\PollUrl;
echo Html::tag('p', Html::encode(Yii::t('app', 'You can use the tags <member-name>, <member-group> and <voting-code> or <voting-link> (for clickable link) to customize your message for each member.')));
?>
<div class="email-form">
<?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_VERTICAL, 'action' => PollUrl::toRoute(['email/sendsingle', 'member_id' => $member->id])]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['subject' => ['type' => Form::INPUT_TEXT, 'options' => ['maxlength' => 255]], 'message' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['rows' => 6]]]]);
?>
    <div class="form-group">
        <?php 
echo Html::submitButton(Yii::t('app', 'Send'), ['class' => 'btn btn-primary']);
?>
    </div>
<?php 
ActiveForm::end();
?>
</div>
Esempio n. 20
0
<?php

use yii\helpers\Html;
//use yii\widgets\ActiveForm;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
/* @var $this yii\web\View */
/* @var $model common\models\SeasonDetailsSearch */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="season-details-search">

    <?php 
$form = ActiveForm::begin(['action' => ['index'], 'method' => 'get']);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['season_id' => ['type' => Form::INPUT_WIDGET, 'label' => 'Сезон', 'widgetClass' => '\\kartik\\widgets\\Select2', 'options' => ['data' => $model->getAllSeason(), 'pluginOptions' => ['allowClear' => true], 'options' => ['placeholder' => 'Выберите сезон']]], 'team_id' => ['type' => Form::INPUT_WIDGET, 'label' => 'Сезон', 'widgetClass' => '\\kartik\\widgets\\Select2', 'options' => ['data' => $model->getAllTeam(), 'pluginOptions' => ['allowClear' => true], 'options' => ['placeholder' => 'Выберите команду']]], 'actions' => ['type' => Form::INPUT_RAW, 'value' => '<div style="margin-top: 20px;margin-bottom: 20px;">' . Html::a('Reset', ['index'], ['class' => 'btn btn-default']) . ' ' . Html::submitButton('Search', ['class' => 'btn btn-primary']) . '</div>']]]);
?>

<!--    --><?php 
//echo $form->field($model, 'id')
?>
<!--    <div class="row">-->
<!--        <div class="col-xs-6">--><?php 
//echo $form->field($model, 'season_id')
?>
<!--</div>-->
<!--        <div class="col-xs-6">--><?php 
//echo $form->field($model, 'team_id')
?>
<!--</div>-->
<!--    </div>-->
Esempio n. 21
0
use common\widgets\elfinder\InputFile;
use yii\bootstrap\Modal;
use mihaildev\elfinder\ElFinder;
use yii\web\JsExpression;
/**
 * @var yii\web\View $this
 * @var common\models\Post $model
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="post-form">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['title' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Заголовок...', 'maxlength' => 255]], 'intro' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => \vova07\imperavi\Widget::className(), 'options' => ['settings' => ['toolbarFixed' => false, 'minHeight' => 100, 'plugins' => ['elfinder', 'fontcolor']]]], 'body' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => \vova07\imperavi\Widget::className(), 'options' => ['settings' => ['toolbarFixed' => false, 'minHeight' => 100]]], 'user_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => ArrayHelper::map(common\models\User::find()->all(), 'id', 'username'), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]], 'category_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => ArrayHelper::map(common\models\PostCategory::find()->all(), 'id', 'title'), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]], 'state_index' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\Select2::className(), 'options' => ['data' => (new common\models\Post())->getStateIndexList(), 'options' => ['placeholder' => 'Выбрать...'], 'pluginOptions' => ['allowClear' => true]]], 'main_flag' => ['type' => Form::INPUT_CHECKBOX, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Главная...']], 'noforeign_id' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Noforeign ID...', 'maxlength' => 11]], 'created_datetime' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(), 'options' => ['type' => DateControl::FORMAT_DATETIME]], 'start_date' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(), 'options' => ['type' => DateControl::FORMAT_DATE]], 'start_time' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(), 'options' => ['type' => DateControl::FORMAT_TIME]], 'preview_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => InputFile::className(), 'options' => ['language' => 'ru', 'controller' => 'elfinder', 'filter' => 'image', 'options' => ['class' => 'form-control'], 'buttonOptions' => ['class' => 'btn btn-default'], 'multiple' => false, 'path' => 'news']], 'doc_file' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => InputFile::className(), 'options' => ['language' => 'ru', 'controller' => 'elfinder', 'filter' => 'image', 'options' => ['class' => 'form-control'], 'buttonOptions' => ['class' => 'btn btn-default'], 'multiple' => false, 'path' => 'news']]]]);
/*
        ?>
        <script>
              if (!RedactorPlugins) var RedactorPlugins = {};
              RedactorPlugins.elfinder = function()
              {
                  return {
                      init: function()
                      {
                          var elfinder = this.button.add('elfinder', 'Elfinder');
                          this.button.setAwesome('elfinder', 'fa-elfinder');
                          this.button.addCallback(elfinder, this.elfinder.openElfinder);
                      },
                      openElfinder: function()
                      {
Esempio n. 22
0
 <?php 
use yii\bootstrap\Html;
use kartik\form\ActiveForm;
use kartik\builder\Form;
use kartik\switchinput\SwitchInput;
use yii\helpers\Url;
use frontend\packages\BootstrapTreeviewAsset;
BootstrapTreeviewAsset::register($this);
?>
 

			<?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'formConfig' => ['labelSpan' => 3], 'enableAjaxValidation' => true, 'id' => 'frmBookingForm']);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 3, 'attributes' => ['title' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Event title...']], 'description' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['placeholder' => 'Event description...'], 'columnOptions' => ['colspan' => 2]]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['calendar_id' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ['0' => ''] + yii::$app->CalendarComponent->myCalendarList, 'options' => ['id' => 'calendar_id', 'placeholder' => 'Select a calendar']], 'project_id' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ['0' => ''] + yii::$app->ProjectComponent->myProjectList, 'options' => ['id' => 'project_id', 'placeholder' => 'Select a project']]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['start_date' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\datecontrol\\DateControl', 'options' => ['options' => ['id' => 'start_date']]], 'all_day_option_id' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => $model->allDayOptions]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['start_time' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\time\\TimePicker', 'options' => ['pluginOptions' => ['showMeridian' => false], 'options' => ['id' => 'start_time']]], 'end_time' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\time\\TimePicker', 'options' => ['pluginOptions' => ['showMeridian' => false], 'options' => ['id' => 'end_time']]]]]);
?>
<input type="hidden" name="_csrf" value="<?php 
echo Yii::$app->request->getCsrfToken();
?>
" />
<?php 
\kartik\form\ActiveForm::end();
?>
	
Esempio n. 23
0
<?php

use app\models\Wineries;
use app\models\Appellations;
use app\models\Varietals;
use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use kartik\widgets\ActiveForm;
use kartik\widgets\Select2;
use kartik\builder\Form;
use kartik\datecontrol\DateControl;
/**
 * @var yii\web\View $this
 * @var app\models\Wines $model
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="wines-form">
    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['upc_barcode' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Upc Barcode...', 'maxlength' => 30]], 'wine_name' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Wine Name...', 'maxlength' => 45]], 'winery_id' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Wineries::find()->orderBy('winery_name')->asArray()->all(), 'id', 'winery_name')], 'appellation_id' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Appellations::find()->orderBy('app_name')->asArray()->all(), 'id', 'app_name')], 'wine_year' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Wine Year...', 'maxlength' => 4]], 'wine_varietal_id' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Varietals::find()->orderBy('varietal_name')->asArray()->all(), 'id', 'varietal_name')], 'bottle_size' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Bottle Size...', 'maxlength' => 15]], 'bottle_size' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Yii::$app->params['bottle_sizes']], 'overall_rating' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Overall Rating...']], 'created_at' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Created At...']], 'updated_at' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Updated At...']], 'description' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Description...', 'maxlength' => 255]]]]);
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
ActiveForm::end();
?>
</div>
Esempio n. 24
0
use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use yii\helpers\Url;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\datecontrol\DateControl;
use kartik\widgets\FileInput;
use kartik\builder\TabularForm;
use common\widgets\edit\InputFile;
use common\widgets\edit\Redactor;
/**
 * @var yii\web\View $this
 * @var common\models\Agreement $model
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="agreement-form">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['title' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Загловок...', 'maxlength' => 255]], 'body' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Redactor::className(), 'options' => ['filemanager' => ['webpath' => '/'], 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Полное описание...', 'rows' => 6], 'clientOptions' => ['menubar' => true]]], 'default_flag' => ['type' => Form::INPUT_CHECKBOX, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Флаг...']]]]);
echo Html::button(Yii::t('app', 'Cancel'), ['class' => 'btn btn-default', 'style' => 'margin-right: 20px', 'onclick' => 'window.location = "' . Url::to(['index']) . '"']);
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 10px', 'name' => 'goto', 'value' => 'list']);
echo Html::submitButton(Yii::t('app', 'Apply'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 0px']);
ActiveForm::end();
?>

</div>
Esempio n. 25
0
                <div class="col-sm-12">
                    <?php 
echo Html::submitButton('保 存', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-info']);
?>
                </div>
            </div>
            <?php 
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 6, 'attributes' => ['personal_id' => ['type' => Form::INPUT_HIDDEN, 'label' => false, 'columnOptions' => ['colspan' => 0]], 's_date' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => '请输入登记日期..', 'maxlength' => 8]], 'code1' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => '请输入员工编码..', 'maxlength' => 36]], 'name1' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => '请输入员工姓名..', 'maxlength' => 50]]]]);
?>
        </div>

        <div class="col-sm-12">
            <?php 
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 4, 'attributes' => ['fcode' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-fcode', 'placeholder' => '身份证号', 'maxlength' => 18]], 'sex' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('psex'), 'options' => ['id' => 'p-sex', 'readOnly' => true]], 'birthdate' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-birthdate', 'placeholder' => '请输入出生日期..', 'maxlength' => 8, 'readOnly' => true]], 'unit' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-unit', 'readOnly' => true, 'maxlength' => 30]], 'flag' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pflag'), 'options' => ['placeholder' => 'Enter Flag...', 'maxlength' => 2]], 'hkxz' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('chkxz'), 'options' => ['placeholder' => 'Enter Hkxz...', 'maxlength' => 2]], 'marry' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pmarry'), 'options' => ['id' => 'p-marry', 'placeholder' => 'Enter Marry...', 'maxlength' => 2]], 'marrydate' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-marrydate', 'placeholder' => 'Enter Marrydate...', 'maxlength' => 8]], 'memo1' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pmemo1'), 'options' => ['placeholder' => 'Enter Memo1...', 'maxlength' => 2]], 'selfno' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Selfno...']], 'lhdate' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-lhdate', 'placeholder' => 'Enter Lhdate...', 'maxlength' => 8]], 'zhdate' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-zhdate', 'maxlength' => 8]], 'work1' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pwork1'), 'options' => ['placeholder' => 'Enter Work1...', 'maxlength' => 2]], 'childnum' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Childnum...']], 'obect1' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmark('pobect1'), 'options' => ['placeholder' => '--请选择--'], 'pluginOptions' => ['allowClear' => true]]], 'fhdate' => ['type' => Form::INPUT_TEXT, 'options' => ['id' => 'p-fhdate', 'maxlength' => 8]], 'mz' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pmz'), 'options' => ['placeholder' => 'Enter Mz...', 'maxlength' => 2]], 'whcd' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmarkReturnName1ToName1('pwhcd'), 'options' => ['placeholder' => '请输入..', 'id' => 'p-whcd', 'data-classmark' => 'pwhcd', 'data-classmarkcn' => '文化程度'], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 10]]], 'title' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmarkReturnName1ToName1('ptitle'), 'options' => ['placeholder' => '请输入..', 'id' => 'p-title', 'data-classmark' => 'ptitle', 'data-classmarkcn' => '职称'], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 10]]], 'zw' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmarkReturnName1ToName1('awork1'), 'options' => ['placeholder' => '请输入..', 'id' => 'p-zw', 'data-classmark' => 'awork1', 'data-classmarkcn' => '职务'], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 10]]], 'is_dy' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmarkReturnName1ToName1('pis_dy'), 'options' => ['placeholder' => '请输入..', 'id' => 'p-is_dy', 'data-classmark' => 'pis_dy', 'data-classmarkcn' => '政治面貌'], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 10]]], 'onlysign' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('ponlysign'), 'options' => ['placeholder' => 'Enter Onlysign...', 'maxlength' => 2]], 'tel' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Tel...', 'maxlength' => 50]], 'jobdate' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Jobdate...', 'maxlength' => 8]], 'address1' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => 'Enter Address1...', 'maxlength' => 80]], 'grous' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::className(), 'options' => ['data' => Preferences::getByClassmarkReturnName1ToName1('pgrous'), 'options' => ['placeholder' => '请输入..', 'id' => 'p-grous', 'data-classmark' => 'pgrous', 'data-classmarkcn' => '所属街道'], 'pluginOptions' => ['tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 10]]], 'ingoingdate' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Ingoingdate...', 'maxlength' => 8]]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 4, 'attributes' => ['hkaddr' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => 'Enter Hkaddr...', 'maxlength' => 80]], 'logout' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('plogout'), 'options' => ['placeholder' => 'Enter Logout...']], 'e_date' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter E Date...', 'maxlength' => 8]]]]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 4, 'attributes' => ['memo' => ['type' => Form::INPUT_TEXT, 'columnOptions' => ['colspan' => 2], 'options' => ['placeholder' => 'Enter Memo...', 'maxlength' => 254]], 'checktime' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Preferences::getByClassmark('pchecktime'), 'options' => ['id' => 'p-checktime', 'placeholder' => 'Enter Checktime...', 'maxlength' => 2]]]]);
ActiveForm::end();
?>
        </div>
    </div>

</div>

<?php 
\common\widgets\JsBlock::begin();
?>
    <script type="text/javascript">
        //身份证合法性
        function certificateNoParse(certificateNo){
            var pat = /^\d{6}(((19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}([0-9]|x|X))|(\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}))$/;
            if(!pat.test(certificateNo))
Esempio n. 26
0
<?php

use app\models\Cellars;
use app\models\Wines;
use app\models\Locations;
use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use kartik\widgets\ActiveForm;
use kartik\widgets\Select2;
use kartik\builder\Form;
use kartik\datecontrol\DateControl;
/**
 * @var yii\web\View $this
 * @var app\models\Cellarwines $model
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="cellarwines-form">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['cellar_id' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Cellars::find()->orderBy('cellar_name')->asArray()->all(), 'id', 'cellar_name')], 'wine_id' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => Wines::getListing()], 'quantity' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Quantity...']], 'cellar_loc_id' => ['type' => Form::INPUT_DROPDOWN_LIST, 'items' => ArrayHelper::map(Locations::find()->orderBy('loc_name')->asArray()->all(), 'id', 'loc_name')], 'rating' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Rating...']], 'created_at' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Created At...']], 'updated_at' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Updated At...']], 'cost' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Cost...', 'maxlength' => 10]]]]);
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
ActiveForm::end();
?>

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

use yii\helpers\Html;
use yii\helpers\Url;
use kartik\widgets\ActiveForm;
use kartik\widgets\ActiveField;
use yii\helpers\ArrayHelper;
use kartik\builder\Form;
$message = 'Problemi u vezi sa predmetom usluge koje rešavate ili otklanjate.';
$model_list = ArrayHelper::map($service->object->issues, 'issue', 'issue');
?>
<div class="wrapper headline search" style="">
    <label class="head">
        <i class="fa fa-stethoscope fa-lg"></i>&nbsp;
        <?php 
echo Yii::t('app', 'Problemi');
?>
    </label>
    <i class="fa fa-chevron-down chevron"></i>
</div>
<div class="wrapper body fadeIn animated" style="border-top:none;">
<?php 
echo $this->render('../_hint.php', ['message' => $message]);
?>
     <div class="enclosedCheckboxes">    
    <?php 
echo Form::widget(['model' => $model, 'form' => $form, 'options' => ['tag' => 'div', 'style' => 'margin:10px 0;'], 'contentBefore' => '', 'attributes' => ['issues[]' => ['type' => Form::INPUT_CHECKBOX_LIST, 'label' => 'Problem(i) sa ' . $service->object->tNameInst . '<br><div class="checkbox col-sm-offset-3"><label><input type="checkbox" id="ckbCheckAll"> <i>Izaberite/Poništite sve</i></label></div>', 'fieldConfig' => ['hintType' => ActiveField::HINT_SPECIAL, 'hintSettings' => ['onLabelClick' => false, 'onLabelHover' => true, 'title' => '<i class="glyphicon glyphicon-info-sign"></i> Napomena']], 'items' => $model_list, 'options' => ['tag' => 'ul', 'class' => 'column2 multiselect', 'style' => 'padding:13px 20px 20px; background:#f8f8f8; border:1px solid #ddd; border-radius:4px;']]]]);
?>
    </div>
</div>
Esempio n. 28
0
    <?php 
$dataPersona = \yii\helpers\ArrayHelper::map(\app\models\Persona::find()->asArray()->all(), 'id', 'nombre');
$dataTipoPersona = \yii\helpers\ArrayHelper::map(\app\models\TipoPersona::find()->asArray()->all(), 'id', 'nombre');
//         $form->field($model, 'nombre', [
//                'hintType' => ActiveField::HINT_SPECIAL,
//                'hintSettings' => [
//                    'showIcon' => false,
//                    'title' => '<i class="glyphicon glyphicon-info-sign"></i> Nota'
//                ]
//                ])->textInput()->hint('Ingrese el nombre/designación con que se describirá el objeto.');
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 2, 'attributes' => ['persona_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\select2\\Select2', 'label' => 'Persona Donante', 'options' => ['options' => ['placeholder' => 'Seleccione Persona...'], 'data' => $dataPersona, 'pluginOptions' => ['allowClear' => true]]], 'tipoPersona_id' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\select2\\Select2', 'options' => ['options' => ['placeholder' => 'Seleccione Tipo de Persona...'], 'data' => $dataTipoPersona, 'pluginOptions' => ['allowClear' => true]]]]]);
?>
        
    <?php 
$dataPersonaDonante = \yii\helpers\ArrayHelper::map(\app\models\Persona::find()->asArray()->all(), 'id', 'nombre');
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['persona_id_depositante' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\kartik\\select2\\Select2', 'label' => 'Persona Depositante', 'options' => ['options' => ['placeholder' => 'Seleccione Persona Depositante...'], 'data' => $dataPersona, 'pluginOptions' => ['allowClear' => true]]]]]);
?>



    </div>
    
    <div>       
    <?php 
$heading = '<i class="glyphicon glyphicon-book"></i> Acervos';
$gridColumns = [['class' => 'kartik\\grid\\SerialColumn'], ['attribute' => 'nombre', 'vAlign' => 'middle', 'format' => 'raw', 'noWrap' => true], ['attribute' => 'nroInventario', 'vAlign' => 'middle', 'headerOptions' => ['class' => 'kv-sticky-column'], 'contentOptions' => ['class' => 'kv-sticky-column']], ['class' => 'kartik\\grid\\ActionColumn', 'dropdownOptions' => ['class' => 'pull-right'], 'urlCreator' => function ($action, $model, $key, $index) {
    if ($action == 'update') {
        return Url::toRoute(['acervo/update-ingreso', 'id' => $key]);
    }
    if ($action == 'view') {
        return Url::toRoute(['acervo/view', 'id' => $key]);
Esempio n. 29
0
<?php

use yii\helpers\Html;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\datecontrol\DateControl;
use kartik\widgets\Select2;
/**
 * @var yii\web\View $this
 * @var common\models\empresa\Osconfemp $model
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="osconfemp-form">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['coe_nombre' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => '\\yii\\widgets\\MaskedInput', 'options' => ['mask' => 'A{3,10}9{0,5}']], 'coe_descri' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter Descripción...', 'maxlength' => 60]], 'coe_tipo' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => Select2::classname(), 'options' => ['data' => Yii::$app->orcsis->getOpcTab($model->tableName(), 'coe_tipo'), 'options' => ['placeholder' => 'Enter Tipo de Dato...']]], 'coe_data' => ['type' => Form::INPUT_TEXTAREA, 'options' => ['placeholder' => 'Enter Coe Data...', 'rows' => 6]]]]);
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
ActiveForm::end();
?>

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

use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use yii\helpers\Url;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
use kartik\datecontrol\DateControl;
use kartik\widgets\FileInput;
use kartik\builder\TabularForm;
/**
 * @var yii\web\View $this
 * @var common\models\SliderImage $model
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="slider-image-form">

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'options' => ['enctype' => 'multipart/form-data']]);
echo Form::widget(['model' => $model, 'form' => $form, 'columns' => 1, 'attributes' => ['publish_flag' => ['type' => Form::INPUT_CHECKBOX, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Опубликовано...']], 'slider' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Слайдер...']], 'href' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Ссылка...', 'maxlength' => 255]], 'body' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => \vova07\imperavi\Widget::className(), 'options' => ['settings' => ['toolbarFixed' => false, 'minHeight' => 100]]], 'menu_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('menu_image') ? Html::img($model->getUploadUrl('menu_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]], 'href_enabled_flag' => ['type' => Form::INPUT_CHECKBOX, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Показывать кнопку перейти...']], 'created_date' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => DateControl::classname(), 'options' => ['type' => DateControl::FORMAT_DATE]], 'iframe_href' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => yii::t('app', 'Enter') . ' Ссылка на iframе(если указан изображения игнорируются)...', 'maxlength' => 255]], 'banner_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('banner_image') ? Html::img($model->getUploadUrl('banner_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]], 'banner_phone_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('banner_phone_image') ? Html::img($model->getUploadUrl('banner_phone_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]], 'banner_tablet_image' => ['type' => Form::INPUT_WIDGET, 'widgetClass' => kartik\widgets\FileInput::className(), 'options' => ['pluginOptions' => ['accept' => 'image/*', 'allowedFileExtensions' => ['jpg', 'gif', 'png'], 'showRemove' => false, 'showUpload' => false, 'initialPreview' => $model->getUploadUrl('banner_tablet_image') ? Html::img($model->getUploadUrl('banner_tablet_image'), ['class' => 'file-preview-image']) : false, 'maxFileCount' => 1]]]]]);
echo Html::button(Yii::t('app', 'Cancel'), ['class' => 'btn btn-default', 'style' => 'margin-right: 20px', 'onclick' => 'window.location = "' . Url::to(['index']) . '"']);
echo Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 10px', 'name' => 'goto', 'value' => 'list']);
echo Html::submitButton(Yii::t('app', 'Apply'), ['class' => 'btn btn-primary', 'style' => 'margin-right: 0px']);
ActiveForm::end();
?>

</div>