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();
 }
 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');
 }
 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);
 }