diff --git a/modules/openlayers_ui/includes/openlayers_ui.styles.inc b/modules/openlayers_ui/includes/openlayers_ui.styles.inc old mode 100644 new mode 100755 index 3045d74..29a85ab --- a/modules/openlayers_ui/includes/openlayers_ui.styles.inc +++ b/modules/openlayers_ui/includes/openlayers_ui.styles.inc @@ -287,7 +287,20 @@ function openlayers_ui_styles_form($form, &$form_state, $style = NULL, $edit = F } /** - * Submit handler for layers. + * Validation handler for styles. + */ +function openlayers_ui_styles_form_validate($form, &$form_state) { + if ($form_state['values']['data']['fillOpacity'] < 0 || $form_state['values']['data']['fillOpacity'] > 1) { + form_set_error('fillOpacity', t('The fillOpacity property must be between 0 and 1.')); + } + if ($form_state['values']['data']['graphicOpacity'] < 0 || $form_state['values']['data']['graphicOpacity'] > 1) { + form_set_error('graphicOpacity', t('The fillOpacity property must be between 0 and 1.')); + } +} + + +/** + * Submit handler for styles. */ function openlayers_ui_styles_form_submit(&$form, &$form_state) { $style_data = $form_state['values']['style_data'];