summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/sys_form.php10
-rw-r--r--public/js/forms.js4
-rw-r--r--src/helpers.php6
3 files changed, 10 insertions, 10 deletions
diff --git a/includes/sys_form.php b/includes/sys_form.php
index 05df4c15..b29dd364 100644
--- a/includes/sys_form.php
+++ b/includes/sys_form.php
@@ -154,17 +154,17 @@ function form_multi_checkboxes($names, $label, $items, $selected, $disabled = []
* @param string $label
* @param string $selected
* @param string $value
- * @param string $id
+ * @param string $html_id
* @return string
*/
-function form_checkbox($name, $label, $selected, $value = 'checked', $id = null)
+function form_checkbox($name, $label, $selected, $value = 'checked', $html_id = null)
{
- if (is_null($id)) {
- $id = $name;
+ if (is_null($html_id)) {
+ $html_id = $name;
}
return '<div class="checkbox"><label>'
- . '<input type="checkbox" id="' . $id . '" name="' . $name . '" value="' . htmlspecialchars($value) . '" '
+ . '<input type="checkbox" id="' . $html_id . '" name="' . $name . '" value="' . htmlspecialchars($value) . '" '
. ($selected ? ' checked="checked"' : '') . ' /> '
. $label
. '</label></div>';
diff --git a/public/js/forms.js b/public/js/forms.js
index 5aa4f25a..22082e51 100644
--- a/public/js/forms.js
+++ b/public/js/forms.js
@@ -16,9 +16,9 @@ function checkAll(id, checked) {
* @param {string} id The elements ID
* @param {list} shifts_list A list of numbers
*/
-function checkOwnTypes(id, shifts_list) {
+function checkOwnTypes(id, shiftsList) {
$("#" + id + " input[type='checkbox']").each(function () {
- this.checked = $.inArray(parseInt(this.value), shifts_list) != -1;
+ this.checked = $.inArray(parseInt(this.value), shiftsList) != -1;
});
}
diff --git a/src/helpers.php b/src/helpers.php
index 8d8f74e1..3f118bf3 100644
--- a/src/helpers.php
+++ b/src/helpers.php
@@ -14,13 +14,13 @@ use Symfony\Component\HttpFoundation\Session\SessionInterface;
* @param string $id
* @return mixed
*/
-function app($id = null)
+function app($instance_id = null)
{
- if (is_null($id)) {
+ if (is_null($instance_id)) {
return Application::getInstance();
}
- return Application::getInstance()->get($id);
+ return Application::getInstance()->get($instance_id);
}
/**