Form: rename 'content_above' to 'before_fields'
This commit is contained in:
parent
be51946436
commit
f88d1885a2
@ -10,7 +10,7 @@ class Form
|
|||||||
{
|
{
|
||||||
public $request_method;
|
public $request_method;
|
||||||
public $request_url;
|
public $request_url;
|
||||||
public $content_above;
|
public $before_fields;
|
||||||
public $buttons_extra;
|
public $buttons_extra;
|
||||||
private $fields = [];
|
private $fields = [];
|
||||||
private $data = [];
|
private $data = [];
|
||||||
@ -25,7 +25,7 @@ class Form
|
|||||||
$this->request_url = !empty($options['request_url']) ? $options['request_url'] : BASEURL;
|
$this->request_url = !empty($options['request_url']) ? $options['request_url'] : BASEURL;
|
||||||
$this->fields = !empty($options['fields']) ? $options['fields'] : [];
|
$this->fields = !empty($options['fields']) ? $options['fields'] : [];
|
||||||
$this->buttons_extra = !empty($options['buttons_extra']) ? $options['buttons_extra'] : null;
|
$this->buttons_extra = !empty($options['buttons_extra']) ? $options['buttons_extra'] : null;
|
||||||
$this->content_above = !empty($options['content_above']) ? $options['content_above'] : null;
|
$this->before_fields = !empty($options['before_fields']) ? $options['before_fields'] : null;
|
||||||
$this->submit_caption = !empty($options['submit_caption']) ? $options['submit_caption'] : 'Save information';
|
$this->submit_caption = !empty($options['submit_caption']) ? $options['submit_caption'] : 'Save information';
|
||||||
$this->trim_inputs = !empty($options['trim_inputs']);
|
$this->trim_inputs = !empty($options['trim_inputs']);
|
||||||
}
|
}
|
||||||
|
@ -31,8 +31,8 @@ class FormView extends SubTemplate
|
|||||||
echo '
|
echo '
|
||||||
<form action="', $this->form->request_url, '" method="', $this->form->request_method, '" enctype="multipart/form-data">';
|
<form action="', $this->form->request_url, '" method="', $this->form->request_method, '" enctype="multipart/form-data">';
|
||||||
|
|
||||||
if (isset($this->form->content_above))
|
if (isset($this->form->before_fields))
|
||||||
echo $this->form->content_above;
|
echo $this->form->before_fields;
|
||||||
|
|
||||||
$this->missing = $this->form->getMissing();
|
$this->missing = $this->form->getMissing();
|
||||||
$this->data = $this->form->getData();
|
$this->data = $this->form->getData();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user