当前位置: 首页>>代码示例>>PHP>>正文


PHP datecontrol\DateControl类代码示例

本文整理汇总了PHP中kartik\datecontrol\DateControl的典型用法代码示例。如果您正苦于以下问题:PHP DateControl类的具体用法?PHP DateControl怎么用?PHP DateControl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了DateControl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionConvert

 /**
  * 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'];
     }
 }
开发者ID:luobenyu,项目名称:blog-1,代码行数:31,代码来源:ParseController.php

示例2: actionConvert

 /**
  * 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'];
     }
 }
开发者ID:alexsuter,项目名称:yii2-datecontrol,代码行数:38,代码来源:ParseController.php

示例3: actionConvert

 /**
  * 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];
 }
开发者ID:kartik-v,项目名称:yii2-datecontrol,代码行数:25,代码来源:ParseController.php

示例4:

?>

    <?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 
开发者ID:schw,项目名称:SGE3,代码行数:31,代码来源:_form.php

示例5: Employee

/* @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'])]]]));
}
?>
开发者ID:vovancho,项目名称:yii2test,代码行数:31,代码来源:_form.php

示例6: JsExpression

                $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>
开发者ID:alissoncti,项目名称:sgo,代码行数:30,代码来源:_form.php

示例7:

$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>
开发者ID:NewPaltzKarateAcademy,项目名称:KIMS,代码行数:30,代码来源:_form.php

示例8:

                    <?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 
开发者ID:FernandoMauricio,项目名称:processos_seletivos,代码行数:31,代码来源:_form-candidato.php

示例9: function

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>
开发者ID:plathir,项目名称:yii2-smart-blog,代码行数:30,代码来源:index.php

示例10: date

<?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>
开发者ID:bokko79,项目名称:servicemapp,代码行数:19,代码来源:_date.php

示例11: function

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()
                      {
开发者ID:kibercoder,项目名称:bilious-octo-fibula,代码行数:31,代码来源:_form.php

示例12: isset

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>
开发者ID:orcsis,项目名称:yii2-admin,代码行数:30,代码来源:view.php

示例13:

    //                                //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 
}
开发者ID:emersinlioglu,项目名称:hausangebot,代码行数:31,代码来源:_kaufpreisabrechnung.php

示例14:

?>

<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();
?>
开发者ID:ibergonzi,项目名称:country,代码行数:31,代码来源:_searchfec.php

示例15:

//                            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']);
?>
开发者ID:emersinlioglu,项目名称:hausangebot,代码行数:31,代码来源:_kaeuferdaten.php


注:本文中的kartik\datecontrol\DateControl类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。