summaryrefslogtreecommitdiff
path: root/includes/sys_form.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/sys_form.php')
-rw-r--r--includes/sys_form.php32
1 files changed, 16 insertions, 16 deletions
diff --git a/includes/sys_form.php b/includes/sys_form.php
index 05df4c15..c974c1d1 100644
--- a/includes/sys_form.php
+++ b/includes/sys_form.php
@@ -38,12 +38,12 @@ function form_spinner($name, $label, $value)
</div>
</div>
<script type="text/javascript">
- $("#spinner-' . $name . '-down").click(function() {
- var spinner = $("#spinner-' . $name . '");
+ $(\'#spinner-' . $name . '-down\').click(function() {
+ var spinner = $(\'#spinner-' . $name . '\');
spinner.val(parseInt(spinner.val()) - 1);
});
- $("#spinner-' . $name . '-up").click(function() {
- var spinner = $("#spinner-' . $name . '");
+ $(\'#spinner-' . $name . '-up\').click(function() {
+ var spinner = $(\'#spinner-' . $name . '\');
spinner.val(parseInt(spinner.val()) + 1);
});
</script>
@@ -73,13 +73,13 @@ function form_date($name, $label, $value, $start_date = '', $end_date = '')
</div>
<script type="text/javascript">
$(function(){
- $("#' . $dom_id . '").datepicker({
- language: "' . locale_short() . '",
- todayBtn: "linked",
- format: "yyyy-mm-dd",
- startDate: "' . $start_date . '",
- endDate: "' . $end_date . '",
- orientation: "bottom"
+ $(\'#' . $dom_id . '\').datepicker({
+ language: \'' . locale_short() . '\',
+ todayBtn: \'linked\',
+ format: \'yyyy-mm-dd\',
+ startDate: \'' . $start_date . '\',
+ endDate: \'' . $end_date . '\',
+ orientation: \'bottom\'
});
});
</script>
@@ -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>';