Exemplo n.º 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;
 }
Exemplo n.º 2
0
 public function input()
 {
     $input = parent::input();
     if ($this->suggestion) {
         $input->data(array('field' => 'passwordSuggestion'));
     }
     return $input;
 }
Exemplo n.º 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;
 }
Exemplo n.º 4
0
 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 6
0
 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 8
0
 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;
 }
Exemplo n.º 9
0
 public function input()
 {
     $input = parent::input();
     $input->data(array('field' => 'autocomplete', 'url' => panel()->urls()->api() . '/autocomplete/uris'));
     return $input;
 }
Exemplo n.º 10
0
 public function input()
 {
     $input = parent::input();
     $input->data('field', 'urlfield');
     return $input;
 }