You are here

function _webform_localization_webform_component_edit_form_submit in Webform Localization 7.4

Same name and namespace in other branches
  1. 7 webform_localization.module \_webform_localization_webform_component_edit_form_submit()

Handle specific localization options in Webform Component Edit Form.

1 string reference to '_webform_localization_webform_component_edit_form_submit'
webform_localization_form_webform_component_edit_form_alter in ./webform_localization.module
Implements hook_form_FORM_ID_alter().

File

./webform_localization.module, line 822
Webform localization module.

Code

function _webform_localization_webform_component_edit_form_submit($form, &$form_state) {
  module_load_include('inc', 'webform_localization', 'includes/webform_localization.component.sync');
  $options = array(
    'nid' => $form_state['values']['nid'],
    'cid' => $form_state['values']['cid'],
    'type' => $form_state['values']['type'],
    'standar_properties' => serialize($form_state['values']['localization']['standar_properties']),
    'extra_properties' => serialize($form_state['values']['localization']['extra_properties']),
  );
  $prev_options = webform_localization_synchronizable_properties($options);
  if (isset($prev_options['no_persistent'])) {
    drupal_write_record('webform_component_localization', $options);
  }
  else {
    drupal_write_record('webform_component_localization', $options, array(
      'nid',
      'cid',
    ));
  }

  // We reload cached configuration for this component.
  webform_localization_synchronizable_properties($options, TRUE);
}