summaryrefslogtreecommitdiff
path: root/includes/sys_form.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2017-08-29 16:21:25 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2017-08-29 21:52:07 +0200
commitcc01c906ba63b3797bf2b9ef92a6854fe2ddbefb (patch)
treeea819678100f6a50d67f1f8516e82fdef8a9196b /includes/sys_form.php
parent73175e2b64c85c7a8c528c76452cd82ffa99f925 (diff)
#336: Integration of symfony/http-foundation request
Diffstat (limited to 'includes/sys_form.php')
-rw-r--r--includes/sys_form.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/includes/sys_form.php b/includes/sys_form.php
index 936e3203..78e97792 100644
--- a/includes/sys_form.php
+++ b/includes/sys_form.php
@@ -144,10 +144,15 @@ function form_multi_checkboxes($names, $label, $items, $selected, $disabled = []
* @param string $label
* @param string $selected
* @param string $value
+ * @param string $id
* @return string
*/
-function form_checkbox($name, $label, $selected, $value = 'checked')
+function form_checkbox($name, $label, $selected, $value = 'checked', $id = null)
{
+ if (is_null($id)) {
+ $id = $name;
+ }
+
return '<div class="checkbox"><label>'
. '<input type="checkbox" id="' . $name . '" name="' . $name . '" value="' . $value . '" '
. ($selected ? ' checked="checked"' : '') . ' /> '
@@ -374,7 +379,7 @@ function form_element($label, $input, $for = '')
*/
function form($elements, $action = '')
{
- return '<form role="form" action="' . $action . '" enctype="multipart/form-data" method="post">' . join($elements) . '</form>';
+ return '<form action="' . $action . '" enctype="multipart/form-data" method="post">' . join($elements) . '</form>';
}
/**