Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
1e2d200b
Commit
1e2d200b
authored
Nov 15, 2006
by
Nigel McNie
Committed by
Nigel McNie
Nov 15, 2006
Browse files
Provide JS for getting the radio value when doing an AJAX request
parent
5e405159
Changes
1
Show whitespace changes
Inline
Side-by-side
htdocs/lib/form/elements/date.php
View file @
1e2d200b
...
...
@@ -79,6 +79,17 @@ function form_get_value_date($element, Form $form) {
return
$time
;
}
function
form_get_value_js_date
(
$element
,
Form
$form
)
{
$formname
=
$form
->
get_name
();
$name
=
$element
[
'name'
];
return
<<<EOF
data['{$name}_year'] = document.forms['$formname'].elements['{$name}_year'].value;
data['{$name}_month'] = document.forms['$formname'].elements['{$name}_month'].value;
data['{$name}_day'] = document.forms['$formname'].elements['{$name}_day'].value;
EOF;
}
/** helper: used when rendering the element, to get the value for it */
function
form_render_select_get_value
(
$timeperiod
,
$min
,
$max
,
$element
,
Form
$form
)
{
static
$lookup
=
array
(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment