Commit c65bb38a authored by Janne Hakala's avatar Janne Hakala Committed by Joseph Olstad
Browse files

Issue #2887293 by Uhkis, mikran, joel_osc: Can not redirect to <front> after submission

parent 2c9833e6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -317,7 +317,7 @@ function webform_localization_update_translation_strings($properties) {

  // Allow to translate the redirect url if it's not set to none or the
  // default confirmation page.
  if (!in_array($properties['redirect_url'], array('<confirmation>', '<none>'))) {
  if (!in_array($properties['redirect_url'], array('<confirmation>', '<none>', '<front>'))) {
    $name = webform_localization_i18n_string_name($properties['nid'], 'redirect_url');
    i18n_string($name, $properties['redirect_url'], $options);
  }
@@ -356,7 +356,7 @@ function webform_localization_translate_strings(&$node, $update = FALSE) {

  // Allow to translate the redirect url if it's not set to none or the
  // default confirmation page.
  if (!in_array($node->webform['redirect_url'], array('<confirmation>', '<none>'))) {
  if (!in_array($node->webform['redirect_url'], array('<confirmation>', '<none>', '<front>'))) {
    $name = webform_localization_i18n_string_name($node->webform['nid'], 'redirect_url');
    $node->webform['redirect_url'] = i18n_string($name, $node->webform['redirect_url'], $options);
  }
+1 −1
Original line number Diff line number Diff line
@@ -651,7 +651,7 @@ function _webform_localization_webform_configure_form_submit_i18n_tweaks($form,
    $form_elements = array('confirmation', 'submit_text');
    // Add redirect url if it's not set to none or the default
    // confirmation page.
    if (!in_array($form_state['values']['redirect_url'], array('<confirmation>', '<none>'))) {
    if (!in_array($form_state['values']['redirect_url'], array('<confirmation>', '<none>', '<front>'))) {
      $form_elements[] = 'redirect_url';
    }
    foreach ($form_elements as $element) {