Commit be7ec21a authored by Kristen Pol's avatar Kristen Pol
Browse files

Issue #3291885 by joshua1234511, Kristen Pol, ameymudras: Enable the reset button for Redirect View

parent 4102c845
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ display:
        type: basic
        options:
          submit_button: Filter
          reset_button: false
          reset_button: true
          reset_button_label: Reset
          exposed_sorts_label: 'Sort by'
          expose_sort_order: true
+14 −0
Original line number Diff line number Diff line
@@ -222,3 +222,17 @@ function redirect_update_8108() {
  $config->clear('content_location_header');
  $config->save();
}

/**
 * Enable reset button for Redirect View.
 */
function redirect_update_8109() {
  $config_factory = \Drupal::configFactory();
  $config = $config_factory->getEditable('views.view.redirect');
  if ($config->isNew()) {
    return;
  }
  // Enable the reset button.
  $config->set('display.default.display_options.exposed_form.options.reset_button', TRUE);
  $config->save();
}