Commit aaa8ef23 authored by Jelle Sebreghts's avatar Jelle Sebreghts
Browse files

Issue #1801834 by hartsak: Fixed Typo in decimal number placeholders.

parent a4494f68
......@@ -523,7 +523,7 @@ function _clientside_validation_set_title($title) {
}
/**
* Set validation rule for number fields.
* Set validation rule for positive or negative integer number fields.
*/
function _clientside_validation_set_number($name, $title, &$js_rules, $message = '') {
$title = _clientside_validation_set_title($title);
......@@ -565,7 +565,7 @@ function _clientside_validation_set_number_decimal($name, $title, $decimalpoint,
$js_rules[$name]['numberDE'] = TRUE;
$variables = array(
'message' => empty($message) ? '!title field accepts only numbers (use a \',\' as decimal point).' : $message,
'placeholers' => empty($message) ? array('!title' => $title) : array(),
'placeholders' => empty($message) ? array('!title' => $title) : array(),
'error_type' => 'number',
'element_name' => $name,
);
......
......@@ -104,15 +104,18 @@ function clientside_validation_webform_after_build_recurse($form_id, &$form, &$f
}
if (isset($element['#webform_component']) && $element['#webform_component']['type'] == 'number') {
_clientside_validation_set_number_decimal($element['#name'], $element['#title'], $element['#webform_component']['extra']['point'], $js_rules);
if (!$element['#webform_component']['extra']['integer']) {
_clientside_validation_set_number_decimal($element['#name'], $element['#title'], $element['#webform_component']['extra']['point'], $js_rules);
}
else {
_clientside_validation_set_number($element['#name'], $element['#title'], $js_rules);
}
if (module_exists('clientside_validation_html5')) {
_clientside_validation_set_minmax_html5($element['#name'], $element['#title'], $element['#webform_component']['extra']['min'], $element['#webform_component']['extra']['max'], $element['#webform_component']['extra']['step'], $js_rules);
}
else {
_clientside_validation_set_minmax($element['#name'], $element['#title'], $element['#webform_component']['extra']['min'], $element['#webform_component']['extra']['max'], $js_rules);
}
//_clientside_validation_set_number_decimal($name, $title, $decimalpoint, $js_rules);
}
}
clientside_validation_webform_after_build_recurse($form_id, $element, $form_state, $js_rules);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment