diff options
author | msquare <msquare@notrademark.de> | 2018-08-06 13:10:53 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2018-08-06 13:10:53 +0200 |
commit | 2832fe48eeff7335e734ac17b1b7d9f3c52621a8 (patch) | |
tree | 6cf65382789df3aa55ef8c451c1ab6dd0321d963 | |
parent | 9496e3571168feff780f6efb17ddc00c670e2dee (diff) |
rename some params (codestyle)
-rw-r--r-- | includes/sys_form.php | 10 | ||||
-rw-r--r-- | public/js/forms.js | 4 | ||||
-rw-r--r-- | src/helpers.php | 6 |
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); } /** |