Beispiel #1
0
 /**
  * Registers the needed assets
  */
 public function registerAssets()
 {
     $view = $this->getView();
     DepDropAsset::register($view);
     DepDropExtAsset::register($view);
     $this->registerPlugin('depdrop');
     if ($this->type === self::TYPE_SELECT2) {
         $loading = ArrayHelper::getValue($this->pluginOptions, 'loadingText', 'Loading ...');
         $this->select2Options['data'] = $this->data;
         $this->select2Options['options'] = $this->options;
         if ($this->hasModel()) {
             $settings = ArrayHelper::merge($this->select2Options, ['model' => $this->model, 'attribute' => $this->attribute]);
         } else {
             $settings = ArrayHelper::merge($this->select2Options, ['name' => $this->name, 'value' => $this->value]);
         }
         echo Select2::widget($settings);
         $id = $this->options['id'];
         $view->registerJs("initDepdropS2('{$id}','{$loading}');");
     } else {
         echo $this->getInput('dropdownList', true);
     }
 }
 /**
  * Registers the needed assets
  */
 public function registerAssets()
 {
     DepDropAsset::register($this->_view);
     $this->registerPlugin('depdrop');
 }
Beispiel #3
0
<?php

use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use kartik\depdrop\DepDrop;
use kartik\depdrop\DepDropAsset;
/* @var $this yii\web\View */
/* @var $model app\models\ProyectoAsignar */
/* @var $form yii\widgets\ActiveForm */
DepDropAsset::register($this);
?>

<div class="accion-centralizada-asignar-form">

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

    <?php 
echo $form->field($model, 'usuario')->hiddenInput(['maxlength' => true])->label(false);
?>
    

    
    <label class="control-label">Acción Centralizada</label>
    <?php 
if (!$model->isNewRecord) {
    ?>
    <?php 
Beispiel #4
0
use app\entities\Vedomstvo;
use kartik\widgets\DepDrop;
use app\entities\VremyaProvedeniyaAttestacii;
/**
 * @var \app\models\attestatsiya\Registraciya $registraciya
 */
$this->title = 'Регистрация на аттестацию';
$this->registerJsFile('/js/attestaciya.js', ['depends' => 'app\\assets\\AppAsset']);
if ($messages) {
    $js = '';
    foreach ($messages as $k => $v) {
        $js .= 'bsalert("' . $v['msg'] . '","' . $v['type'] . '","top");' . "\n";
    }
    $this->registerJS('$(function(){' . $js . '})');
}
\kartik\depdrop\DepDropAsset::register($this);
\kartik\depdrop\DepDropExtAsset::register($this);
$form = ActiveForm::begin();
echo $form->field($registraciya, 'fizLicoId')->hiddenInput()->label(false);
echo $form->field($registraciya, 'status')->hiddenInput()->label(false);
echo $form->field($registraciya, 'id')->hiddenInput()->label(false);
echo $form->field($registraciya, 'dolzhnost')->dropDownList($registraciya->getDolzhnostiFizLicaToSelect($registraciya->fizLicoId) + [-1 => 'добавить'], ['placeholder' => 'Выберите должность', 'id' => 'registraciya-dolzhnost', 'data-fizlicoid' => $registraciya->fizLicoId, 'onchange' => 'onChangeDolzhnost(this)']);
echo '<div class="panel panel-default">
  <div class="panel-heading"><b>Действующий аттестационный лист</b></div>
  <div class="panel-body">';
echo '<div class="col-md-3 no-left-padding">';
echo $form->field($registraciya, 'attestacionnyListKategoriya')->dropDownList(KategoriyaPedRabotnika::namesMap(), ['placeholder' => 'Выберите категорию', 'onChange' => 'onChangeCurrentCategoriya()', 'id' => 'attestacionnyListKategoriya']);
echo '</div>';
echo '<div id="preiod_dejstviya" class="col-md-3">';
echo $form->field($registraciya, 'attestacionnyListPeriodDejstviya', ['options' => ['class' => 'drp-container form-group', 'placeholder' => 'Выберите Период действия аттестации']])->widget(DateRangePicker::classname(), ['value' => date('d.m.Y') . ' - ' . date('d.m.Y'), 'useWithAddon' => true, 'language' => 'ru', 'hideInput' => true, 'pluginOptions' => ['format' => 'DD.MM.YYYY', 'separator' => ' - ', 'opens' => 'right']]);
echo '</div>';