From be519464363959ab0e35cad16fbe96fa51dfb7a2 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Thu, 11 Sep 2025 19:59:30 +0200 Subject: [PATCH] Form: rename 'content_below' to 'buttons_extra' --- controllers/EditAlbum.php | 2 +- controllers/EditTag.php | 2 +- controllers/EditUser.php | 2 +- models/Form.php | 4 ++-- templates/FormView.php | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/controllers/EditAlbum.php b/controllers/EditAlbum.php index 9691148..eb7a4c9 100644 --- a/controllers/EditAlbum.php +++ b/controllers/EditAlbum.php @@ -122,7 +122,7 @@ class EditAlbum extends HTMLController $this->form = new Form([ 'request_url' => BASEURL . '/editalbum/?' . ($id_tag ? 'id=' . $id_tag : 'add'), - 'content_below' => $after_form, + 'buttons_extra' => $after_form, 'fields' => $fields, ]); diff --git a/controllers/EditTag.php b/controllers/EditTag.php index 116d226..00ce7d3 100644 --- a/controllers/EditTag.php +++ b/controllers/EditTag.php @@ -106,7 +106,7 @@ class EditTag extends HTMLController $form = new Form([ 'request_url' => BASEURL . '/edittag/?' . ($id_tag ? 'id=' . $id_tag : 'add'), - 'content_below' => $after_form, + 'buttons_extra' => $after_form, 'fields' => $fields, ]); diff --git a/controllers/EditUser.php b/controllers/EditUser.php index 39715e9..089dca6 100644 --- a/controllers/EditUser.php +++ b/controllers/EditUser.php @@ -69,7 +69,7 @@ class EditUser extends HTMLController $form = new Form([ 'request_url' => BASEURL . '/edituser/?' . ($id_user ? 'id=' . $id_user : 'add'), - 'content_below' => $after_form, + 'buttons_extra' => $after_form, 'fields' => [ 'first_name' => [ 'type' => 'text', diff --git a/models/Form.php b/models/Form.php index e61b986..d006907 100644 --- a/models/Form.php +++ b/models/Form.php @@ -11,7 +11,7 @@ class Form public $request_method; public $request_url; public $content_above; - public $content_below; + public $buttons_extra; private $fields = []; private $data = []; private $missing = []; @@ -24,7 +24,7 @@ class Form $this->request_method = !empty($options['request_method']) ? $options['request_method'] : 'POST'; $this->request_url = !empty($options['request_url']) ? $options['request_url'] : BASEURL; $this->fields = !empty($options['fields']) ? $options['fields'] : []; - $this->content_below = !empty($options['content_below']) ? $options['content_below'] : null; + $this->buttons_extra = !empty($options['buttons_extra']) ? $options['buttons_extra'] : null; $this->content_above = !empty($options['content_above']) ? $options['content_above'] : null; $this->submit_caption = !empty($options['submit_caption']) ? $options['submit_caption'] : 'Save information'; $this->trim_inputs = !empty($options['trim_inputs']); diff --git a/templates/FormView.php b/templates/FormView.php index 69254e9..044f395 100644 --- a/templates/FormView.php +++ b/templates/FormView.php @@ -48,9 +48,9 @@ class FormView extends SubTemplate
'; - if (isset($this->form->content_below)) + if (isset($this->form->buttons_extra)) echo ' - ', $this->form->content_below; + ', $this->form->buttons_extra; echo '