예제 #1
0
 public function input()
 {
     # Use `BaseField`'s setup
     $input = parent::input();
     # Provide a hook for the Panel's form initialization. This is a jQuery method, defined in assets/js/place.js
     $input->data('field', 'mapField');
     return $input;
 }
예제 #2
0
 public function input()
 {
     $input = parent::input();
     if ($this->suggestion) {
         $input->data(array('field' => 'passwordSuggestion'));
     }
     return $input;
 }
예제 #3
0
 public function input()
 {
     $input = parent::input();
     if ($this->autocomplete) {
         $input->attr('autocomplete', 'off');
         $input->data(array('field' => 'autocomplete', 'url' => panel()->urls()->api() . '/autocomplete/emails?_csrf=' . panel()->csrf()));
     }
     return $input;
 }
예제 #4
0
파일: textarea.php 프로젝트: nsteiner/kdoc
 public function input()
 {
     $input = parent::input();
     $input->tag('textarea');
     $input->removeAttr('type');
     $input->removeAttr('value');
     $input->html($this->value() ? htmlentities($this->value(), ENT_NOQUOTES, 'UTF-8') : false);
     $input->data('field', 'editor');
     return $input;
 }
예제 #5
0
 public function input()
 {
     $input = parent::input();
     $input->tag('textarea');
     $input->removeAttr('type');
     $input->removeAttr('value');
     $input->html($this->value() ?: false);
     $input->data('field', 'editor');
     return $input;
 }
예제 #6
0
파일: tags.php 프로젝트: kompuser/panel
 public function input()
 {
     $input = parent::input();
     $input->addClass('input-with-tags');
     $input->data(array('field' => 'tags', 'lowercase' => $this->lower, 'separator' => $this->separator));
     if ($page = $this->page()) {
         $query = array('uri' => $page->id(), 'index' => $this->index(), 'field' => $this->field(), 'separator' => $this->separator());
         $input->data('url', url('panel/api/autocomplete/field?' . http_build_query($query)));
     }
     return $input;
 }
예제 #7
0
 public function input()
 {
     $input = parent::input();
     $input->addClass('input-with-tags');
     $input->data(array('field' => 'tags', 'lowercase' => $this->lower, 'separator' => $this->separator));
     if (isset($this->data)) {
         $input->data('url', html(json_encode($this->data), false));
     } else {
         if ($page = $this->page()) {
             $query = array('uri' => $page->id(), 'index' => $this->index(), 'field' => $this->name(), 'separator' => $this->separator());
             $input->data('url', panel()->urls()->api() . '/autocomplete/field?' . http_build_query($query));
         }
     }
     return $input;
 }
예제 #8
0
파일: tags.php 프로젝트: nsteiner/kdoc
 public function input()
 {
     $input = parent::input();
     $input->addClass('input-with-tags');
     $input->data(array('field' => 'tags', 'lowercase' => $this->lower ? 'true' : false, 'separator' => $this->separator));
     if (isset($this->data)) {
         $input->data('url', html(json_encode($this->data), false));
     } else {
         if ($page = $this->page()) {
             $field = empty($this->field) ? $this->name() : $this->field;
             $model = is_a($this->model, 'File') ? 'file' : 'page';
             $query = array('uri' => $page->id(), 'index' => $this->index(), 'field' => $field, 'yaml' => $this->parentField, 'model' => $model, 'separator' => $this->separator(), '_csrf' => panel()->csrf());
             $input->data('url', panel()->urls()->api() . '/autocomplete/field?' . http_build_query($query));
         }
     }
     return $input;
 }
예제 #9
0
 public function input()
 {
     $input = parent::input();
     $input->data(array('field' => 'autocomplete', 'url' => panel()->urls()->api() . '/autocomplete/uris'));
     return $input;
 }
예제 #10
0
파일: url.php 프로젝트: nsteiner/kdoc
 public function input()
 {
     $input = parent::input();
     $input->data('field', 'urlfield');
     return $input;
 }