Commit 7022fb84 authored by Jelle Sebreghts's avatar Jelle Sebreghts
Browse files

General bugfixes.

parent b054177e
......@@ -399,11 +399,12 @@ function clientside_validation_add_validation(&$element, &$form_state, $form_id)
$element['#attached']['js'][] = array(
'data' => $file,
'type' => 'file',
'scope' => 'footer',
);
}
}
}
return empty($validators);
return !empty($validators);
}
return FALSE;
}
......
......@@ -12,7 +12,7 @@ class CvCoreCaptchaValidator extends ClientsideValidationValidator {
public function supports(array $element, array &$form_state) {
return (
parent::supports($element, $form_state)
isset($element['#name'])
&& isset($element['#type'])
&& $element['#type'] == 'captcha'
&& isset($element['captcha_widgets']['captcha_response'])
......@@ -43,7 +43,7 @@ class CvCoreCaptchaValidator extends ClientsideValidationValidator {
}
public function getMessage(array $element) {
return t('Wrong answer for !title.', array('!title' => $element['#title']));
return t('Wrong answer for !title.', array('!title' => $element['captcha_widgets']['captcha_response']['#title']));
}
}
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