Commit 49eea514 authored by alexpott's avatar alexpott

Issue #1874528 by damiankloip | Bojhan: Remove "disable JS for Views UI" checkbox.

parent 1d707401
display_extenders: { } display_extenders: { }
no_javascript: false
skip_cache: false skip_cache: false
sql_signature: false sql_signature: false
ui: ui:
......
...@@ -10,9 +10,6 @@ views.settings: ...@@ -10,9 +10,6 @@ views.settings:
sequence: sequence:
- type: string - type: string
label: 'Display extender' label: 'Display extender'
no_javascript:
type: boolean
label: 'Disable JavaScript with Views'
skip_cache: skip_cache:
type: boolean type: boolean
label: 'Disable views data caching' label: 'Disable views data caching'
......
...@@ -63,13 +63,6 @@ public function buildForm(array $form, FormStateInterface $form_state) { ...@@ -63,13 +63,6 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'#default_value' => $config->get('sql_signature'), '#default_value' => $config->get('sql_signature'),
); );
$form['debug']['no_javascript'] = array(
'#type' => 'checkbox',
'#title' => $this->t('Disable JavaScript with Views'),
'#description' => $this->t("If you are having problems with the JavaScript, you can disable it here. The Views UI should degrade and still be usable without javascript; it's just not as good."),
'#default_value' => $config->get('no_javascript'),
);
$options = Views::fetchPluginNames('display_extender'); $options = Views::fetchPluginNames('display_extender');
if (!empty($options)) { if (!empty($options)) {
$form['extenders'] = array( $form['extenders'] = array(
...@@ -95,7 +88,6 @@ public function submitForm(array &$form, FormStateInterface $form_state) { ...@@ -95,7 +88,6 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
$this->config('views.settings') $this->config('views.settings')
->set('skip_cache', $form_state->getValue('skip_cache')) ->set('skip_cache', $form_state->getValue('skip_cache'))
->set('sql_signature', $form_state->getValue('sql_signature')) ->set('sql_signature', $form_state->getValue('sql_signature'))
->set('no_javascript', $form_state->getValue('no_javascript'))
->set('display_extenders', $form_state->getValue('display_extenders', array())) ->set('display_extenders', $form_state->getValue('display_extenders', array()))
->save(); ->save();
......
...@@ -125,13 +125,11 @@ function testEditUI() { ...@@ -125,13 +125,11 @@ function testEditUI() {
$edit = array( $edit = array(
'skip_cache' => TRUE, 'skip_cache' => TRUE,
'sql_signature' => TRUE, 'sql_signature' => TRUE,
'no_javascript' => TRUE,
); );
$this->drupalPostForm('admin/structure/views/settings/advanced', $edit, t('Save configuration')); $this->drupalPostForm('admin/structure/views/settings/advanced', $edit, t('Save configuration'));
$this->assertFieldChecked('edit-skip-cache', 'The skip_cache option is checked.'); $this->assertFieldChecked('edit-skip-cache', 'The skip_cache option is checked.');
$this->assertFieldChecked('edit-sql-signature', 'The sql_signature option is checked.'); $this->assertFieldChecked('edit-sql-signature', 'The sql_signature option is checked.');
$this->assertFieldChecked('edit-no-javascript', 'The no_javascript option is checked.');
// Test the "Clear Views' cache" button. // Test the "Clear Views' cache" button.
$this->drupalPostForm('admin/structure/views/settings/advanced', array(), t("Clear Views' cache")); $this->drupalPostForm('admin/structure/views/settings/advanced', array(), t("Clear Views' cache"));
......
...@@ -106,10 +106,7 @@ public function form(array $form, FormStateInterface $form_state) { ...@@ -106,10 +106,7 @@ public function form(array $form, FormStateInterface $form_state) {
$form['#attached']['library'][] = 'core/jquery.ui.dialog'; $form['#attached']['library'][] = 'core/jquery.ui.dialog';
$form['#attached']['library'][] = 'core/drupal.states'; $form['#attached']['library'][] = 'core/drupal.states';
$form['#attached']['library'][] = 'core/drupal.tabledrag'; $form['#attached']['library'][] = 'core/drupal.tabledrag';
$form['#attached']['library'][] = 'views_ui/views_ui.admin';
if (!\Drupal::config('views.settings')->get('no_javascript')) {
$form['#attached']['library'][] = 'views_ui/views_ui.admin';
}
$form['#attached']['css'] = static::getAdminCSS(); $form['#attached']['css'] = static::getAdminCSS();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment