rename some params (codestyle)
This commit is contained in:
parent
9496e35711
commit
2832fe48ee
|
@ -154,17 +154,17 @@ function form_multi_checkboxes($names, $label, $items, $selected, $disabled = []
|
||||||
* @param string $label
|
* @param string $label
|
||||||
* @param string $selected
|
* @param string $selected
|
||||||
* @param string $value
|
* @param string $value
|
||||||
* @param string $id
|
* @param string $html_id
|
||||||
* @return string
|
* @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)) {
|
if (is_null($html_id)) {
|
||||||
$id = $name;
|
$html_id = $name;
|
||||||
}
|
}
|
||||||
|
|
||||||
return '<div class="checkbox"><label>'
|
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"' : '') . ' /> '
|
. ($selected ? ' checked="checked"' : '') . ' /> '
|
||||||
. $label
|
. $label
|
||||||
. '</label></div>';
|
. '</label></div>';
|
||||||
|
|
|
@ -16,9 +16,9 @@ function checkAll(id, checked) {
|
||||||
* @param {string} id The elements ID
|
* @param {string} id The elements ID
|
||||||
* @param {list} shifts_list A list of numbers
|
* @param {list} shifts_list A list of numbers
|
||||||
*/
|
*/
|
||||||
function checkOwnTypes(id, shifts_list) {
|
function checkOwnTypes(id, shiftsList) {
|
||||||
$("#" + id + " input[type='checkbox']").each(function () {
|
$("#" + 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
|
* @param string $id
|
||||||
* @return mixed
|
* @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();
|
||||||
}
|
}
|
||||||
|
|
||||||
return Application::getInstance()->get($id);
|
return Application::getInstance()->get($instance_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue