Пример #1
0
 public function init()
 {
     parent::init();
     $this->classModel = Common::getClassName($this->model);
     $this->label = $this->model->getAttributeLabel($this->attr);
     $this->options = array_merge(['dateFormat' => "yy-mm-dd", 'multidate' => true, 'disabledWeekends' => true, 'monthNamesShort' => ['มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฏาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม']], $this->options);
 }
Пример #2
0
 public function init()
 {
     parent::init();
     $this->classModel = Common::getClassName($this->model);
     if (empty($this->between)) {
         $this->label = $this->model->getAttributeLabel($this->attr);
     } else {
         $this->label[0] = $this->model->getAttributeLabel($this->between[0]);
         $this->label[1] = $this->model->getAttributeLabel($this->between[1]);
     }
     $this->options = array_merge(['format' => 'Y-m-d H:i', 'lang' => 'th', 'datepicker' => true, 'timepicker' => true, 'disabledWeekends' => true, 'inline' => false, 'scrollMonth' => false, 'yearStart' => date('Y') - 100, 'yearEnd' => date('Y') + 100, 'minTime' => '08:30', 'maxTime' => '22:30', 'step' => 30], $this->options);
 }
Пример #3
0
 public function init()
 {
     parent::init();
     if (!empty($this->between)) {
         $this->label[0] = $this->model->getAttributeLabel($this->between[0]);
         $this->element[0] = "#" . self::getClassName($this->model) . "-{$this->between[0]}";
         $this->label[1] = $this->model->getAttributeLabel($this->between[1]);
         $this->element[1] = "#" . self::getClassName($this->model) . "-{$this->between[1]}";
     } else {
         $this->label[0] = $this->model->getAttributeLabel($this->attr);
         $this->element[0] = "#" . self::getClassName($this->model) . "-{$this->attr}";
     }
     $this->options = array_merge($this->options, ['changeMonth' => true, 'changeYear' => true, 'hideIfNoPrevNext' => true, 'showButtonPanel' => true, 'monthNamesShort' => ['มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม'], 'dateFormat' => 'dd-mm-yy']);
 }
Пример #4
0
 public function init()
 {
     parent::init();
     if (isset($this->action)) {
         if (!isset($this->action['headerStyle'])) {
             $this->action['headerStyle'] = 'width: 120px;';
         }
         if (!isset($this->action['style'])) {
             $this->action['style'] = 'text-align: center;';
         }
     } else {
         $this->action = ['template' => ['view' => '<a class="btn btn-minier btn-default" href=""><i class="glyphicon glyphicon-th-list"></i></a>', 'update' => '<a class="btn btn-minier btn-primary" href=""><i class="glyphicon glyphicon-pencil"></i></a>', 'delete' => '<button type="button" class="btn btn-minier btn-danger"><i class="glyphicon glyphicon-trash"></i></button>'], 'headerStyle' => 'width: 120px;', 'style' => 'text-align: center;'];
     }
 }
Пример #5
0
 public function init()
 {
     parent::init();
 }
Пример #6
0
 public function init()
 {
     parent::init();
     $this->options['class'] = 'col-sm-offset-2 col-sm-10';
 }
Пример #7
0
 public function init()
 {
     parent::init();
     Html::addCssClass($this->options, 'panel-group');
 }
Пример #8
0
 public function init()
 {
     parent::init();
     $this->options['class'] = 'btn-group';
     $this->options['style'] = 'margin-bottom: 20px;';
 }
Пример #9
0
 public function init()
 {
     parent::init();
     $this->label = $this->model->getAttributeLabel($this->attr);
 }