function clientside_validation_settings_title in Clientside Validation 7
Same name and namespace in other branches
- 7.2 clientside_validation.module \clientside_validation_settings_title()
1 call to clientside_validation_settings_title()
File
- ./
clientside_validation.module, line 1484 - Add client side validation to forms.
Code
function clientside_validation_settings_title($cvs_type, $cvs_formid, $edit = TRUE) {
$title = 'Edit settings of %formid';
if (!$edit) {
$title = 'Create settings for %formid';
}
switch ($cvs_type) {
case 'default':
return t('Edit default settings');
break;
case 'content-types':
$content_types = node_type_get_types();
if (isset($content_types[$cvs_formid])) {
return t($title, array(
'%formid' => t($content_types[$cvs_formid]->name),
));
}
break;
case 'webforms':
$node = node_load($cvs_formid);
if ($node) {
return t($title, array(
'%formid' => $node->title,
));
}
break;
case 'custom-forms':
return t($title, array(
'%formid' => $cvs_formid,
));
break;
}
return t($title, array(
'%formid' => $cvs_type,
));
}