function getlocations_fields_plugin_style_streetview::options_validate in Get Locations 7.2
Same name and namespace in other branches
- 7 modules/getlocations_fields/views/getlocations_fields_plugin_style_streetview.inc \getlocations_fields_plugin_style_streetview::options_validate()
Validate the options form.
Overrides views_plugin_style::options_validate
File
- modules/
getlocations_fields/ views/ getlocations_fields_plugin_style_streetview.inc, line 122 - getlocations_fields_plugin_style_streetview.inc @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Class
- getlocations_fields_plugin_style_streetview
- Getlocations style plugin to render a row as a google streetview.
Code
function options_validate(&$form, &$form_state) {
// css check
if (isset($form_state['values']['style_options']['width'])) {
if ($check = getlocations_dim_check($form_state['values']['style_options']['width'])) {
$form_state['values']['style_options']['width'] = $check;
}
else {
form_set_error('style_options][width', t('Width must be valid css'));
}
}
if (isset($form_state['values']['style_options']['height'])) {
if ($check = getlocations_dim_check($form_state['values']['style_options']['height'])) {
$form_state['values']['style_options']['height'] = $check;
}
else {
form_set_error('style_options][height', t('Height must be valid css'));
}
}
}