Esempio n. 1
0
 /**
  * Convert display date for saving to model
  *
  * @return string JSON encoded HTML output
  */
 public function actionConvert()
 {
     $output = '';
     Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
     $post = Yii::$app->request->post();
     if (isset($post['displayDate'])) {
         $type = empty($post['type']) ? Module::FORMAT_DATE : $post['type'];
         $saveFormat = ArrayHelper::getValue($post, 'saveFormat');
         $dispFormat = ArrayHelper::getValue($post, 'dispFormat');
         $dispTimezone = ArrayHelper::getValue($post, 'dispTimezone');
         $saveTimezone = ArrayHelper::getValue($post, 'saveTimezone');
         $settings = ArrayHelper::getValue($post, 'settings', []);
         $dispDate = ArrayHelper::getValue($post, 'displayDate');
         $date = DateControl::getTimestamp($type, $dispDate, $dispFormat, $dispTimezone, $settings);
         if (empty($date) || !$date) {
             $value = '';
         } elseif ($saveTimezone != null) {
             $value = $date->setTimezone(new DateTimeZone($saveTimezone))->format($saveFormat);
         } else {
             $value = $date->format($saveFormat);
         }
         return ['status' => 'success', 'output' => $value];
     } else {
         return ['status' => 'error', 'output' => 'No display date found'];
     }
 }
 /**
  * Convert display date for saving to model
  *
  * @return string JSON encoded HTML output
  */
 public function actionConvert()
 {
     $output = '';
     Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
     $post = Yii::$app->request->post();
     if (isset($post['displayDate'])) {
         $saveFormat = ArrayHelper::getValue($post, 'saveFormat');
         $dispFormat = ArrayHelper::getValue($post, 'dispFormat');
         $dispTimezone = ArrayHelper::getValue($post, 'dispTimezone');
         $saveTimezone = ArrayHelper::getValue($post, 'saveTimezone');
         $settings = ArrayHelper::getValue($post, 'settings', []);
         // Russian dates ends with \r. - i dont know why
         if (StringHelper::endsWith($dispFormat, '.')) {
             $dispFormat = substr($dispFormat, 0, strlen($dispFormat) - 4);
             $post['displayDate'] = substr($post['displayDate'], 0, strlen($post['displayDate']) - 4);
         }
         if (ArrayHelper::getValue($post, 'type') != DateControl::FORMAT_DATETIME) {
             $dispTimezone = null;
             $saveTimezone = null;
         }
         $date = DateControl::getTimestamp($post['displayDate'], $dispFormat, $dispTimezone, $settings);
         if (empty($date) || !$date) {
             $value = '';
         } elseif ($saveTimezone != null) {
             $value = $date->setTimezone(new DateTimeZone($saveTimezone))->format($saveFormat);
         } else {
             $value = $date->format($saveFormat);
         }
         return ['status' => 'success', 'output' => $value];
     } else {
         return ['status' => 'error', 'output' => 'No display date found'];
     }
 }
 /**
  * Convert display date for saving to model.
  *
  * @return string JSON encoded HTML output
  */
 public function actionConvert()
 {
     Yii::$app->response->format = Response::FORMAT_JSON;
     $post = Yii::$app->request->post();
     if (!isset($post['displayDate'])) {
         return ['status' => 'error', 'output' => 'No display date found'];
     }
     $saveFormat = $dispFormat = $dispTimezone = $saveTimezone = $displayDate = '';
     $settings = [];
     extract($post);
     $date = DateControl::getTimestamp($displayDate, $dispFormat, $dispTimezone, $settings);
     if (empty($date) || !$date) {
         $value = '';
     } elseif ($saveTimezone != null) {
         $value = $date->setTimezone(new DateTimeZone($saveTimezone))->format($saveFormat);
     } else {
         $value = $date->format($saveFormat);
     }
     return ['status' => 'success', 'output' => $value];
 }
Esempio n. 4
0
File: _form.php Progetto: schw/SGE3
?>

    <?php 
echo $form->field($model, 'dataIni')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'language' => 'pt-BR', 'displayFormat' => 'php:d-F-Y']);
?>

    <?php 
echo $form->field($model, 'dataFim')->widget(DateControl::classname(), ['language' => 'pt-BR', 'type' => DateControl::FORMAT_DATE, 'displayFormat' => 'php:d-F-Y']);
?>

    <?php 
echo $form->field($model, 'horaIni')->widget(DateControl::classname(), ['language' => 'pt-BR', 'type' => DateControl::FORMAT_TIME]);
?>

    <?php 
echo $form->field($model, 'horaFim')->widget(DateControl::classname(), ['language' => 'pt-BR', 'value' => $model->horaFim, 'type' => DateControl::FORMAT_TIME]);
?>

    <?php 
echo $form->field($model, 'vagas')->textInput(['type' => 'number']);
?>

    <?php 
echo $form->field($model, 'cargaHoraria')->textInput(['type' => 'number']);
?>
    
    <?php 
echo $form->field($model, 'imagem2')->fileInput(['accept' => '.jpg, .png, .jpeg']);
?>

    <?php 
Esempio n. 5
0
/* @var $model app\models\Fregat\Osmotraktmat */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="osmotraktmat-form">

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

    <?php 
echo !$model->isNewRecord ? $form->field($model, 'osmotraktmat_id')->textInput(['maxlength' => true, 'class' => 'form-control', 'disabled' => true]) : '';
?>

    <?php 
echo $form->field($model, 'osmotraktmat_date')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['options' => ['placeholder' => 'Выберите дату ...', 'class' => 'form-control setsession']]]);
?>

    <?php 
echo $form->field($model, 'id_master')->widget(Select2::classname(), Proc::DGselect2(['model' => $model, 'resultmodel' => new Employee(), 'fields' => ['keyfield' => 'id_master', 'resultfield' => 'idperson.auth_user_fullname'], 'placeholder' => 'Выберете пользователя', 'fromgridroute' => 'Fregat/employee/index', 'resultrequest' => 'Fregat/employee/selectinputemloyee', 'thisroute' => $this->context->module->requestedRoute, 'methodquery' => 'selectinput']));
?>

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

    <?php 
if (!$model->isNewRecord) {
    echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'tr-mat-osmotrgrid'], 'columns' => Proc::DGcols(['columns' => ['idTrMat.idMattraffic.idMaterial.idMatv.matvid_name', 'idTrMat.idMattraffic.idMaterial.material_name', 'idTrMat.idMattraffic.idMaterial.material_inv', ['attribute' => 'idTrMat.idMattraffic.mattraffic_number', 'label' => 'Всего количество у материально-ответственного лица', 'visible' => false], 'tr_mat_osmotr_number', ['attribute' => 'idTrMat.idMattraffic.idMol.idperson.auth_user_fullname', 'label' => 'ФИО материально-ответственного лица'], ['attribute' => 'idTrMat.idMattraffic.idMol.iddolzh.dolzh_name', 'label' => 'Должность материально-ответственного лица'], ['attribute' => 'idTrMat.idParent.idMaterial.material_name', 'label' => 'В составе материальной ценности'], ['attribute' => 'idTrMat.idParent.idMaterial.material_inv', 'label' => 'Инвентарный номер материальной ценности в которую укомплектовано'], 'idReason.reason_text', 'tr_mat_osmotr_comment'], 'buttons' => ['update' => ['Fregat/tr-mat-osmotr/update'], 'deleteajax' => ['Fregat/tr-mat-osmotr/delete']]]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-compressed"></i> Осмотренные материалы</h3>', 'before' => Html::a('<i class="glyphicon glyphicon-download"></i> Добавить материал', ['Fregat/tr-mat-osmotr/create', 'foreignmodel' => 'TrMatOsmotr', 'url' => $this->context->module->requestedRoute, 'field' => 'id_osmotraktmat', 'id' => $model->primaryKey], ['class' => 'btn btn-success', 'data-pjax' => '0'])]]]));
}
?>
Esempio n. 6
0
                $form->field($model, 'forma_pagamento_id')->widget(Select2::classname(), [
                        'pluginOptions' => [
                                'allowClear'         => true,
                                'minimumInputLength' => 2,
                                'ajax'               => [
                                        'url'      => $url_forma_pagamento,
                                        'dataType' => 'json',
                                        'data'     => new JsExpression('function(params) { return {search:params.term};}')
                                ],
                        ],
                        'options'       => ['placeholder' => 'Selecione um cliente...'],
                ]) ?>
        </div>
        <div class="row">
            <div class="col-md-4"><?= $form->field($model, 'data_vencimento')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['pluginOptions' => ['autoclose' => true]]]) ?></div>
            <div class="col-md-4"><?= $form->field($model, 'data_pagamento')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['pluginOptions' => ['autoclose' => true]]]) ?></div>
            <div class="col-md-4"><?= $form->field($model, 'status')->dropDownList([ 'Aberto' => 'Aberto', 'Pago' => 'Pago', ], ['prompt' => '']) ?></div>
        </div>
        <div class="row">
            <div class="col-md-12"><?= $form->field($model, 'obs')->textarea(['rows' => 6]) ?></div>
        </div>
    </div>

    <div class="form-group">
        <?= 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. 7
0
$form = ActiveForm::begin();
?>

   <?php 
echo Html::activeHiddenInput($model, 'student_id', ['value' => $student->id]);
?>

   <?php 
echo $form->field($model, 'rank_id')->dropDownList(Rank::getMap());
?>

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

   <?php 
echo $form->field($model, 'date')->widget(DateControl::classname(), ['widgetClass' => '\\yii\\widgets\\MaskedInput', 'options' => ['mask' => '99/99/9999']]);
?>

   <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 
echo $form->field($model, 'edital')->textInput(['readonly' => true]);
?>

                        <?php 
$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 
Esempio n. 9
0
echo Html::a('Create Posts', ['create'], ['class' => 'btn btn-success']);
?>
            </p>
            <?php 
$userModel = new $searchModel->module->userModel();
$user_items = \yii\helpers\ArrayHelper::map($userModel::find()->where('status = 10')->all(), 'id', 'username');
?>

            <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['attribute' => 'id', 'contentOptions' => ['style' => 'width: 7%;']], ['attribute' => 'description', 'contentOptions' => ['style' => 'width: 15%;']], ['attribute' => 'category', 'value' => function ($model) {
    if ($model->category) {
        $category = Category::findOne(['id' => $model->category]);
        if ($category) {
            return $category->name;
        }
    }
}, 'contentOptions' => ['style' => 'width: 15%;'], 'filter' => TreeViewInput::widget(['model' => $searchModel, 'attribute' => 'category', 'showInactive' => true, 'query' => Category::find()->addOrderBy('root, lft'), 'headingOptions' => ['label' => 'Categories'], 'asDropdown' => true, 'multiple' => true, 'fontAwesome' => true, 'dropdownConfig' => ['dropdown' => ['style' => 'width:250px']], 'rootOptions' => ['label' => '<i class="fa fa-tree"></i>', 'class' => 'text-success']])], ['attribute' => 'user_created', 'value' => function ($model, $key, $index, $widget) {
    $userModel = new $model->module->userModel();
    return $userModel::findOne(['id' => $model->user_created])->{$model->module->userNameField};
}, 'format' => 'html', 'contentOptions' => ['style' => 'width: 10%;'], 'filter' => \yii\bootstrap\Html::activeDropDownList($searchModel, 'user_created', $user_items, ['class' => 'form-control', 'prompt' => 'Select...'])], ['attribute' => 'created_at', 'format' => ['date', 'php:d-m-Y'], 'filter' => DateControl::widget(['model' => $searchModel, 'attribute' => 'created_at', 'name' => 'kartik-date-1', 'value' => 'created_at', 'type' => DateControl::FORMAT_DATE, 'options' => ['layout' => '{picker}{input}']]), 'contentOptions' => ['style' => 'width: 12%;']], ['attribute' => 'user_last_change', 'value' => function ($model, $key, $index, $widget) {
    $userModel = new $model->module->userModel();
    return $userModel::findOne(['id' => $model->user_last_change])->{$model->module->userNameField};
}, 'format' => 'html', 'filter' => \yii\bootstrap\Html::activeDropDownList($searchModel, 'user_last_change', $user_items, ['class' => 'form-control', 'prompt' => 'Select...']), 'contentOptions' => ['style' => 'width: 10%;']], ['attribute' => 'updated_at', 'format' => ['date', 'php:d-m-Y'], 'filter' => DateControl::widget(['model' => $searchModel, 'attribute' => 'updated_at', 'name' => 'kartik-date-2', 'value' => 'updated_at', 'type' => DateControl::FORMAT_DATE, 'options' => ['layout' => '{picker}{input}']]), 'contentOptions' => ['style' => 'width: 10%;']], ['attribute' => 'publish', 'value' => function ($model, $key, $index, $widget) {
    return $model->publish == true ? '<span class="label label-success">Published</span>' : '<span class="label label-danger">Unpublished</span>';
}, 'format' => 'html', 'filter' => \yii\bootstrap\Html::activeDropDownList($searchModel, 'publish', ['0' => 'Unpublished', '1' => 'Published'], ['class' => 'form-control', 'prompt' => 'Select...']), 'contentOptions' => ['style' => 'width: 10%;']], ['class' => 'yii\\grid\\ActionColumn', 'contentOptions' => ['style' => 'min-width: 70px;']]]]);
?>

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

use yii\helpers\Html;
use kartik\widgets\ActiveField;
use yii\helpers\ArrayHelper;
use kartik\widgets\DatePicker;
use kartik\datecontrol\DateControl;
$model_action_property->actionProperty = $actionProperty->value_default;
?>
<div class="form-group kv-fieldset-inline">
    <?php 
echo Html::activeLabel($model_action_property, '[' . $key . ']actionProperty', ['label' => $property->label, 'class' => 'col-sm-3 control-label']);
?>
    <div class="col-sm-5" style="padding-right:0">
        <?php 
echo $form->field($model_action_property, '[' . $key . ']actionProperty', ['showLabels' => false, 'feedbackIcon' => ['success' => 'ok', 'error' => 'exclamation-sign', 'successOptions' => ['class' => 'text-primary', 'style' => 'top: 6px;'], 'errorOptions' => ['class' => 'text-primary', 'style' => 'top: 6px;']]])->widget(DateControl::classname(), ['language' => 'rs-latin', 'type' => 'date', 'options' => ['type' => 2, 'size' => 'lg', 'pickerButton' => ['title' => 'Izaberite datum'], 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'startDate' => date('Y-m-d H:i:s')]]]);
?>
    </div>        
</div>
Esempio n. 11
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. 12
0
use kartik\widgets\FileInput;
use kartik\icons\Icon;
use kartik\popover\PopoverX;
use kartik\password\PasswordInput;
/**
 * @var yii\web\View $this
 * @var common\models\Osusuarios $model
 */
$this->title = $model->usu_nombre;
$this->params['breadcrumbs'][] = ['label' => Yii::t('admin', 'Osusuarios'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $model->usu_nomusu;
?>
<div class="osusuarios-view">
    <!--<div class="page-header">
        <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    </div>-->


    <?php 
echo DetailView::widget(['model' => $model, 'condensed' => false, 'hover' => true, 'mode' => Yii::$app->request->get('edit') == 't' ? DetailView::MODE_EDIT : DetailView::MODE_VIEW, 'panel' => ['heading' => $this->title, 'type' => DetailView::TYPE_INFO], 'formOptions' => ['options' => ['enctype' => 'multipart/form-data']], 'attributes' => [['attribute' => 'uploadedFile', 'format' => 'raw', 'value' => $model->usu_type ? '<a href="#" class="thumbnail">
                        <img src="data:' . $model->usu_type . ';base64,' . base64_encode($model->usu_foto) . '" alt="" class="">
                    </a>' : '<a href="#" class="thumbnail">
                        <img src="' . Yii::$app->params['assetUrl'] . 'images/noavatar_man.png" alt="" class="">
                    </a>', 'type' => DetailView::INPUT_WIDGET, 'widgetOptions' => ['class' => FileInput::classname(), 'pluginOptions' => ['showCaption' => false, 'showRemove' => false, 'showUpload' => false, 'browseClass' => 'btn btn-primary btn-block', 'browseIcon' => '<i class="glyphicon glyphicon-camera"></i> ', 'browseLabel' => Yii::t('admin', 'Select Photo')], 'options' => ['accept' => 'image/*']]], 'usu_nomusu', 'usu_nombre', ['attribute' => 'usu_feccre', 'format' => ['datetime', isset(Yii::$app->modules['datecontrol']['displaySettings']['datetime']) ? Yii::$app->modules['datecontrol']['displaySettings']['datetime'] : 'd-m-Y H:i:s A'], 'type' => DetailView::INPUT_WIDGET, 'displayOnly' => true, 'widgetOptions' => ['class' => DateControl::classname(), 'type' => DateControl::FORMAT_DATETIME]], ['attribute' => 'usu_ulting', 'format' => ['datetime', isset(Yii::$app->modules['datecontrol']['displaySettings']['datetime']) ? Yii::$app->modules['datecontrol']['displaySettings']['datetime'] : 'd-m-Y H:i:s A'], 'type' => DetailView::INPUT_WIDGET, 'displayOnly' => true, 'widgetOptions' => ['class' => DateControl::classname(), 'type' => DateControl::FORMAT_DATETIME]], ['attribute' => 'usu_activo', 'format' => 'raw', 'value' => $model->usu_activo ? '<span class="label label-success">Activo</span>' : '<span class="label label-danger">Inactivo</span>', 'type' => DetailView::INPUT_SWITCH], ['attribute' => 'usu_ultemp', 'displayOnly' => true]], 'deleteOptions' => ['url' => ['delete', 'id' => $model->usu_id], 'data' => ['confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), 'method' => 'post']], 'enableEditMode' => true, 'buttons' => [['label' => Icon::show('key'), 'title' => Yii::t('admin', 'Change Password'), 'html' => PopoverX::widget(['header' => '<i class="glyphicon glyphicon-lock"></i> ' . Yii::t('admin', 'Change Password'), 'placement' => PopoverX::ALIGN_BOTTOM_RIGHT, 'size' => PopoverX::SIZE_LARGE, 'footer' => Html::submitButton(Yii::t('admin', 'Enviar'), ['class' => 'btn btn-sm btn-primary']), 'content' => '<label class="control-label">' . Yii::t('admin', 'Password') . '</label>' . PasswordInput::widget(['model' => $model, 'attribute' => 'passwd']), 'toggleButton' => ['label' => Icon::show('key'), 'class' => 'btn btn-xs btn-info', 'data-toggle' => 'tooltip', 'data-original-title' => Yii::t('admin', 'Change Password')]])]]]);
?>

</div>
    //                                //echo '<label>Übergang BNL:</label>';
    //                                echo DateTimePicker::widget([
    //                                    'name' => "Abschlag[$key][sonderwunsch_angefordert]",
    //                                    'options' => ['placeholder' => 'Datum auswählen'],
    //                                    'convertFormat' => true,
    //                                    'value' => $datum,
    //                                    'pluginOptions' => [
    //                                        'minView' => 'month',
    //                                        'maxView' => 'month',
    //                                        'viewSelect' => 'month',
    //                                        'format' => 'dd.mm.yyyy',
    //                                        'autoclose' => true,
    //                                        'todayHighlight' => true
    //                                    ]
    //                                ]);
    echo $form->field($modelAbschlag, "[{$key}]sonderwunsch_angefordert")->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['pluginOptions' => []]]);
    ?>
                        </td>
                        <td>
                            <?php 
    echo $form->field($modelAbschlag, "[{$key}]summe")->textInput(['disabled' => 'disabled']);
    ?>
                        </td>
                        <td>
                            <?php 
    echo Html::a('<span class="fa fa-minus"></span>', Yii::$app->urlManager->createUrl(["datenblatt/deleteabschlag", 'datenblattId' => $modelDatenblatt->id, 'abschlagId' => $modelAbschlag->id]), ['class' => 'add-zahlung btn btn-danger btn-xl']);
    ?>
                        </td>
                    </tr>    
                    <?php 
}
Esempio n. 14
0
?>

<div class="persona-search">

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

    <?php 
echo $form->field($model, 'fecdesde')->widget(DateControl::className(), ['type' => DateControl::FORMAT_DATE, 'options' => ['options' => ['placeholder' => 'Desde fecha'], 'id' => 'fcd', 'pluginEvents' => ['clearDate' => 'function(e) { 
													$("#fcd").val("");												
											}']]]);
?>
 
    <?php 
echo $form->field($model, 'fechasta')->widget(DateControl::className(), ['type' => DateControl::FORMAT_DATE, 'options' => ['options' => ['placeholder' => 'Hasta fecha'], 'id' => 'fch', 'pluginEvents' => ['clearDate' => 'function(e) { 
													$("#fch").val("");												
											}']]]);
?>
 

    <div class="form-group">
        <?php 
echo Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']);
?>
        <?php 
//Html::resetButton(Yii::t('app', 'Reset'), ['class' => 'btn btn-default'])
?>
    <?php 
ActiveForm::end();
?>
Esempio n. 15
0
//                            echo '<label>Abnahme GE:</label>';
//                            echo DateTimePicker::widget([
//                                'name' => "Kaeufer[abnahme_ge]",
//                                'options' => ['placeholder' => 'Datum auswählen'],
//                                'convertFormat' => true,
//                                'value' => $datum,
//                                'pluginOptions' => [
//                                    'minView' => 'month',
//                                    'maxView' => 'month',
//                                    'viewSelect' => 'month',
//                                    'format' => 'dd.mm.yyyy',
//                                    'autoclose' => true,
//                                    'todayHighlight' => true
//                                ]
//                            ]);
echo $form->field($modelKaeufer, "abnahme_ge")->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['pluginOptions' => []]]);
?>
                    </div>

                    <div class="col-sm-3">
                        <?php 
echo $form->field($modelKaeufer, 'auflassung')->checkbox([]);
?>
                    </div>
                </div>

                <div class="row">
                    <div class="col-sm-3">
                        <?php 
echo $form->field($modelKaeufer, 'anrede')->dropDownList([0 => 'Herr', 1 => 'Frau']);
?>
Esempio n. 16
0
File: _form.php Progetto: schw/SGE3
?>

<div class="evento-form">

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

<div style='float: left ;margin-left: 10%; margin: 0 0 5% 10%;'>
     <?php 
echo $form->field($model, 'dataIni')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'language' => 'pt-BR', 'displayFormat' => 'php:d-F-Y']);
?>
</div>
<div style='float: left ;margin-left: 10%; margin: 0 0 5% 10%;'>

<?php 
echo $form->field($model, 'datafim')->widget(DateControl::classname(), ['language' => 'pt-BR', 'type' => DateControl::FORMAT_DATE, 'displayFormat' => 'php:d-F-Y']);
?>

</div>

<?php 
echo Html::submitButton('relatorios');
?>

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

</div>
Esempio n. 17
0
 /**
  * Ham get html cho input theo type
  * @param string $type input co the la text, textarea, editor, date, datetime, daterange, dropdown, checkbox, radio
  * @param string $templateSetting giao dien input theo type
  * @param string $keySetting ten cua key setting
  * @param string $value gia tri cua key setting
  * @param array $items Mang cac gia tri cua setting neu setting co type la dropdown, checkbox, radio
  * @return string
  */
 private static function getInputByType($type = 'text', $templateSetting = null, $keySetting = null, $value = null, $items = [])
 {
     switch ($type) {
         case 'textarea':
             $templateSetting = Html::textarea($keySetting, $value, ['class' => 'form-control', 'title' => $keySetting]);
             break;
         case 'date':
             $templateSetting = DateControl::widget(['name' => $keySetting, 'value' => $value, 'type' => DateControl::FORMAT_DATE, 'ajaxConversion' => false, 'options' => ['pluginOptions' => ['autoclose' => true], 'options' => ['title' => $keySetting]], 'displayFormat' => 'dd-MM-yyyy', 'saveFormat' => 'yyyy-MM-dd']);
             break;
         case 'datetime':
             $templateSetting = DateControl::widget(['name' => $keySetting, 'value' => $value, 'type' => DateControl::FORMAT_DATETIME, 'ajaxConversion' => false, 'options' => ['pluginOptions' => ['autoclose' => true], 'options' => ['title' => $keySetting]], 'saveFormat' => 'yyyy-MM-dd']);
             break;
         case 'daterange':
             $templateSetting = DateRangePicker::widget(['name' => $keySetting, 'value' => $value, 'presetDropdown' => true, 'hideInput' => true, 'options' => ['title' => $keySetting]]);
             break;
         case 'dropdown':
             $templateSetting = Html::dropDownList($keySetting, $value, $items, ['class' => 'form-control', 'title' => $keySetting]);
             break;
         case 'checkbox':
             $templateSetting = Html::checkboxList($keySetting, $value, $items, ['class' => 'form-control', 'title' => $keySetting]);
             break;
         case 'radio':
             $templateSetting = Html::radioList($keySetting, $value, $items, ['class' => 'form-control', 'title' => $keySetting]);
             break;
         default:
             $templateSetting = Html::textInput($keySetting, $value, ['class' => 'form-control', 'title' => $keySetting]);
             break;
     }
     return $templateSetting;
 }
Esempio n. 18
0
</div>

<div class="row">
  <div class="col-md-4"> 
    <?php 
echo $form->field($model, 'classes_idclasses')->dropDownList(ArrayHelper::map(\frontend\models\Classes::find()->orderBy(['nome' => SORT_ASC])->all(), 'idclasses', 'nome'), ['prompt' => 'Selecione']);
?>
  </div>
  <div class="col-md-4"> 
    <?php 
echo $form->field($model, 'situacao')->dropdownList(['acordo' => 'Acordo', 'sem_acordo' => 'Sem Acordo', 'reconciliacao' => 'Reconciliação', 'redesignada' => 'Redesignada', 'processo_nao_realizados' => 'Processo Não Realizado'], ['prompt' => 'Selecione']);
?>
    </div>
      <div class="col-md-3">
  <?php 
echo $form->field($model, 'dataFim')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATETIME, 'ajaxConversion' => false, 'value' => time(), 'options' => ['pluginOptions' => ['autoclose' => true]]]);
?>
  </div>
  </div>
    <div class="row">
      <div class="col-md-6"> 
        <?php 
echo $form->field($model, 'user_id')->dropDownList(ArrayHelper::map(\frontend\models\User::find()->where(['id' => Yii::$app->user->identity->id])->orderBy(['nome' => SORT_ASC])->all(), 'id', 'nome'));
?>
      </div>
    </div>
    <div class="row">
        <div class="col-md-6"> 
         <?php 
echo $form->field($model, 'descricao')->textArea(['maxlength' => true, 'rows' => 4, 'cols' => 30]);
?>
Esempio n. 19
0
<?php

use yii\helpers\Html;
use kartik\detail\DetailView;
use kartik\datecontrol\DateControl;
/**
 * @var yii\web\View $this
 * @var app\models\KartikCrud $model
 */
$this->title = $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Kartik Cruds', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="kartik-crud-view">
    <div class="page-header">
        <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    </div>


    <?php 
echo DetailView::widget(['model' => $model, 'condensed' => false, 'hover' => true, 'mode' => Yii::$app->request->get('edit') == 't' ? DetailView::MODE_EDIT : DetailView::MODE_VIEW, 'panel' => ['heading' => $this->title, 'type' => DetailView::TYPE_INFO], 'attributes' => ['id', 'thought', 'goodness', 'rank', 'censorship', ['attribute' => 'occurred', 'format' => ['date', isset(Yii::$app->modules['datecontrol']['displaySettings']['date']) ? Yii::$app->modules['datecontrol']['displaySettings']['date'] : 'd-m-Y'], 'type' => DetailView::INPUT_WIDGET, 'widgetOptions' => ['class' => DateControl::classname(), 'type' => DateControl::FORMAT_DATE]], 'email:email', 'url:url', 'filename', 'avatar'], 'deleteOptions' => ['url' => ['delete', 'id' => $model->id], 'data' => ['confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), 'method' => 'post']], 'enableEditMode' => true]);
?>

</div>
Esempio n. 20
0

   <?= $form->field($modelRelatorio, 'inicio_intervalo')->widget(DateControl::classname(), [
    'type'=>DateControl::FORMAT_DATE,
    'ajaxConversion'=>false,
    'options' => [

    'pluginOptions' => [
    'autoclose' => true
    ]
    ],
    'displayFormat' => 'dd/MM/yyyy',
    'language'=>'pt',
    ]);?>

   <?= $form->field($modelRelatorio, 'fim_intervalo')->widget(DateControl::classname(), [
    'type'=>DateControl::FORMAT_DATE,
    'ajaxConversion'=>false,
    'options' => [

    'pluginOptions' => [
    'autoclose' => true
    ]
    ],
    'displayFormat' => 'dd/MM/yyyy',
    'language'=>'pt',
    ]); ?>
    <?= $form->field($modelRelatorio, 'usuario_id' )->hiddenInput(['value'=>Yii::$app->user->getId()])->label(false); ?>

    <div class="form-group">
        <?= Html::submitButton($modelRelatorio->isNewRecord ? Yii::t('yii', 'Create') : Yii::t('yii', 'Update'),
Esempio n. 21
0
        <div class="col-md-12">
            <strong>Siglas: <br></strong>
        </div>
    </div>
    <div class="row">
        <div class="col-md-3">LOD = Longe - Olho Direito<br></div>
        <div class="col-md-3">LOD = Longe - Olho Esquerdo<br></div>
        <div class="col-md-3">POD = Perto - Olho Direito<br></div>
        <div class="col-md-3">POD = Perto - Olho Esquerdo<br></div>     
    </div>
</div>
</div>
<div class="well">
    <h3>Informações Financeiras</h3>
    <div class="row">
        <div class="col-md-3"><?= $form->field($model, 'datanascimento')->widget(DateControl::classname(), [
            'type' => DateControl::FORMAT_DATE,
            'ajaxConversion' => false,
            'options' =>[
                'pluginOptions' =>['autoclose' => true]]]) ?>
        </div>
        <div class="col-md-2"><?= $form->field($model, 'naturalidade_uf')->dropDownList([ 'RN' => 'RN', 'AC' => 'AC', 'AL' => 'AL', 'AP' => 'AP', 'AM' => 'AM', 'BA' => 'BA', 'CE' => 'CE', 'DF' => 'DF', 'ES' => 'ES', 'GO' => 'GO', 'MA' => 'MA', 'MT' => 'MT', 'MS' => 'MS', 'MG' => 'MG', 'PR' => 'PR', 'PB' => 'PB', 'PA' => 'PA', 'PE' => 'PE', 'PI' => 'PI', 'RJ' => 'RJ', 'RS' => 'RS', 'RO' => 'RO', 'RR' => 'RR', 'SC' => 'SC', 'SE' => 'SE', 'SP' => 'SP', 'TO' => 'TO', ], ['prompt' => '']) ?></div>
        <div class="col-md-2"><?= $form->field($model, 'estadocivil')->dropDownList([ 'Solteiro' => 'Solteiro', 'Casado' => 'Casado', 'Divorciado' => 'Divorciado', 'Viúvo' => 'Viúvo', 'U. Estável' => 'U. Estável', ], ['prompt' => '']) ?></div>
        <div class="col-md-3"><?= $form->field($model, 'profissao')->textInput(['maxlength' => true]) ?></div>
        <div class="col-md-2"><?= $form->field($model, 'renda')->widget(MaskMoney::classname()) ?></div>
    </div>
    <div class="row">
        <div class="col-md-6"><?= $form->field($model, 'mae')->textInput(['maxlength' => true]) ?></div>
        <div class="col-md-6"><?= $form->field($model, 'pai')->textInput(['maxlength' => true]) ?></div>
    </div>
    <div class="row">
Esempio n. 22
0
<div class="horario-form">

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

    <?php 
echo $form->field($model, 'descricao')->textInput(['maxlength' => true]);
?>
    
    <?php 
echo $form->field($model, 'inicio')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_TIME, 'ajaxConversion' => false, 'options' => ['pluginOptions' => ['autoclose' => true, 'defaultTime' => false]]]);
?>
	
	<?php 
echo $form->field($model, 'termino')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_TIME, 'ajaxConversion' => false, 'options' => ['pluginOptions' => ['autoclose' => true, 'defaultTime' => false]]]);
?>

    <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>
Esempio n. 23
0
<div class="news-form">

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

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

    <?php 
echo $form->field($model, 'be_top')->dropDownList(Yii::$app->options->getOptions('be_top'));
?>

    <?php 
echo $form->field($model, 'public_at')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'ajaxConversion' => false, 'options' => ['pluginOptions' => ['autoclose' => true]]]);
?>

    <?php 
echo $form->field($model, 'content')->widget(CKEditor::className(), ['options' => ['rows' => 6], 'preset' => 'basic']);
?>

    <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. 24
0
            return isset($glprep_rlocat[$model->glprep_rlocat]) ? $glprep_rlocat[$model->glprep_rlocat] : '';
        }]], 'buttons' => array_merge(!$dopparams['DisableElements'] ? ['deleteajax' => ['Glauk/glprep/delete', 'glprep_id']] : [])]), 'gridOptions' => ['dataProvider' => $dopparams['dataProviderglprep'], 'filterModel' => $dopparams['searchModelglprep'], 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-tint"></i> Препараты</h3>', 'before' => !$dopparams['DisableElements'] ? Html::a('<i class="glyphicon glyphicon-download"></i> Добавить препарат', ['Glauk/glprep/create', 'idglaukuchet' => $model->glaukuchets->glaukuchet_id], ['class' => 'btn btn-success', 'data-pjax' => '0']) : '']]]));
    }
    ?>

                <div class="panel panel-<?php 
    echo Yii::$app->params['panelStyle'];
    ?>
">
                    <div class="panel-heading"><?php 
    echo Html::encode('Снятие с учета');
    ?>
</div>
                    <div class="panel-body">
                        <?php 
    echo $form->field($dopparams['Glaukuchet'], 'glaukuchet_deregdate')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['options' => ['placeholder' => 'Выберите дату ...', 'class' => 'form-control', 'disabled' => $dopparams['DisableElements']]], 'saveOptions' => ['class' => 'form-control setsession', 'form' => $formname]]);
    ?>
                        <?php 
    echo $form->field($dopparams['Glaukuchet'], 'glaukuchet_deregreason')->widget(Select2::classname(), ['hideSearch' => true, 'data' => $dopparams['Glaukuchet']->VariablesValues('glaukuchet_deregreason'), 'pluginOptions' => ['allowClear' => true], 'options' => ['placeholder' => 'Выберете причину снятия с учета', 'class' => 'form-control setsession', 'form' => $formname, 'disabled' => $dopparams['DisableElements']], 'theme' => Select2::THEME_BOOTSTRAP]);
    ?>
                    </div>
                </div>

                <?php 
    echo $form->field($dopparams['Glaukuchet'], 'glaukuchet_comment')->textarea(['class' => 'form-control setsession', 'form' => $formname, 'maxlength' => 512, 'placeholder' => 'Введите комментарий к карте глаукомного пациента', 'rows' => 10, 'disabled' => $dopparams['DisableElements'], 'style' => 'resize: none']);
    ?>

            </div>
        </div>
    <?php 
}
Esempio n. 25
0
    <?= $form->field($model, 'titulo')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'dataEntrada')->widget(DateControl::classname(), [
		'type'=>DateControl::FORMAT_DATE,
		'ajaxConversion'=>false,
		'options' => [

		'pluginOptions' => [
		'autoclose' => true
		]
		],
		'displayFormat' => 'dd/MM/yyyy',
		'language'=>'pt',
		]); ?>
    
    <?= $form->field($model, 'dataSaida')->widget(DateControl::classname(), [
		'type'=>DateControl::FORMAT_DATE,
		'ajaxConversion'=>false,
		'options' => [

		'pluginOptions' => [
		'autoclose' => true
		]
		],
		'displayFormat' => 'dd/MM/yyyy',
		'language'=>'pt',
		]); ?>

    <?= $form->field($model, 'link')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'status')->textInput() ?>
Esempio n. 26
0
echo $form->field($model, 'Name', ['horizontalCssClasses' => ['wrapper' => 'col-sm-4']])->textInput(['maxlength' => 500]);
?>

    <?php 
echo $form->field($model, 'Description', ['horizontalCssClasses' => ['wrapper' => 'col-sm-4']])->textarea(['rows' => 6]);
?>

    <?php 
echo $form->field($model, 'StatusOrder', ['horizontalCssClasses' => ['wrapper' => 'col-sm-4']])->textInput();
?>

    <?php 
echo $form->field($model, 'Comment', ['horizontalCssClasses' => ['wrapper' => 'col-sm-4']])->textarea(['rows' => 6]);
?>

    <?php 
echo $form->field($model, 'deleted_at', ['horizontalCssClasses' => ['wrapper' => 'col-sm-4']])->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'ajaxConversion' => true]);
?>

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

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

</div>
Esempio n. 27
0



        </div>

        <div class="row">
            <div class="col-xs-4">
                <?php 
echo $form->field($model, 'freunion')->widget(\kartik\datecontrol\DateControl::classname());
?>
            </div>

            <div class="col-xs-4">
                <?php 
echo $form->field($model, 'fcampana')->widget(\kartik\datecontrol\DateControl::classname());
?>
            </div>
            <div class="col-xs-4">
                <?php 
echo $form->field($model, 'monto_propuesta')->textInput(['maxlength' => true]);
?>
            </div>


        </div>



        <div class="row">
Esempio n. 28
0
echo $form->fieldSetEnd();
?>

<?php 
echo $form->fieldSet(\Yii::t('skeeks/reviews2', 'Processing'));
?>
    <?php 
echo $form->fieldSelect($model, 'status', \skeeks\cms\reviews2\models\Reviews2Message::getStatuses());
?>

    <?php 
echo $form->fieldSelect($model, 'processed_by', \yii\helpers\ArrayHelper::map(\skeeks\cms\models\User::find()->active()->all(), 'id', 'displayName'));
?>

    <?php 
echo $form->field($model, 'published_at')->widget(\kartik\datecontrol\DateControl::classname(), ['type' => \kartik\datecontrol\DateControl::FORMAT_DATETIME]);
?>


<?php 
echo $form->fieldSetEnd();
?>

<? if (!$model->isNewRecord) : ?>
    <?php 
echo $form->fieldSet(\Yii::t('skeeks/reviews2', 'Additional information'));
?>
        <?php 
echo \yii\widgets\DetailView::widget(['model' => $model, 'attributes' => [['attribute' => 'id', 'label' => \Yii::t('skeeks/reviews2', 'Message number')], ['attribute' => 'created_at', 'value' => \Yii::$app->formatter->asDatetime($model->created_at, 'medium') . "(" . \Yii::$app->formatter->asRelativeTime($model->created_at) . ")"], ['format' => 'raw', 'label' => \Yii::t('skeeks/reviews2', 'Sent from site'), 'value' => "<a href=\"{$model->site->url}\" target=\"_blank\" data-pjax=\"0\">{$model->site->name}</a>"], ['format' => 'raw', 'label' => \Yii::t('skeeks/reviews2', 'Sender'), 'value' => $model->createdBy ? "{$model->createdBy->displayName}" : " - "], ['attribute' => 'ip', 'label' => \Yii::t('skeeks/reviews2', 'Ip address of the sender')], ['attribute' => 'page_url', 'format' => 'raw', 'label' => \Yii::t('skeeks/reviews2', 'Sent from the page'), 'value' => Html::a($model->page_url, $model->page_url, ['target' => '_blank', 'data-pjax' => 0])]]]);
?>
Esempio n. 29
0
?>
    <?php 
echo $form->field($model, 'refnum2');
?>
    
    
    
    
</div>

<div class="col-md-3">   
    <?php 
echo $form->field($model, 'details');
?>
    <?php 
echo $form->field($model, 'valuedate')->widget(DateControl::classname(), ['type' => 'date']);
?>
    <?php 
//echo $form->labelEx($model, 'refnum1');
?>
    <?php 
//echo $form->textField($model, 'refnum1');
?>
    <?php 
//echo $form->error($model, 'refnum1');
?>

    <?php 
//echo $form->labelEx($model, 'refnum2');
?>
    
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>