rename some params (codestyle)

main
msquare 6 years ago
parent 9496e35711
commit 2832fe48ee

@ -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>';

@ -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;
});
}

@ -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);
}
/**

Loading…
Cancel
Save