summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjacob.embree2018-04-17 19:17:20 (GMT)
committersalvis2018-04-17 19:17:20 (GMT)
commitfc4bcaa3d2e369bdcc41d8b1f8ec8002cd43883a (patch)
tree43e8b8efc2501893afad3cbfdf62940ffa594908
parent09b3673760cbf3e28cf630b079ad27e85b9b0fc2 (diff)
Issue #2448063 by jacob.embree, zaporylie: Add #actions container to submit buttons
-rw-r--r--devel_generate/src/Form/DevelGenerateForm.php6
-rw-r--r--src/Form/ConfigEditor.php6
-rw-r--r--src/Form/ConfigsList.php5
-rw-r--r--src/Form/DevelReinstall.php6
-rw-r--r--src/Form/ExecutePHP.php6
-rw-r--r--src/Form/SystemStateEdit.php10
-rw-r--r--webprofiler/src/Form/ConfigForm.php3
7 files changed, 24 insertions, 18 deletions
diff --git a/devel_generate/src/Form/DevelGenerateForm.php b/devel_generate/src/Form/DevelGenerateForm.php
index 63c708b..72366b8 100644
--- a/devel_generate/src/Form/DevelGenerateForm.php
+++ b/devel_generate/src/Form/DevelGenerateForm.php
@@ -77,12 +77,12 @@ class DevelGenerateForm extends FormBase {
$plugin_id = $this->getPluginIdFromRequest();
$instance = $this->getPluginInstance($plugin_id);
$form = $instance->settingsForm($form, $form_state);
- $form['actions'] = array('#type' => 'actions');
- $form['actions']['submit'] = array(
+ $form['actions'] = ['#type' => 'actions'];
+ $form['actions']['submit'] = [
'#type' => 'submit',
'#value' => $this->t('Generate'),
'#button_type' => 'primary',
- );
+ ];
return $form;
}
diff --git a/src/Form/ConfigEditor.php b/src/Form/ConfigEditor.php
index e4fe88c..231298a 100644
--- a/src/Form/ConfigEditor.php
+++ b/src/Form/ConfigEditor.php
@@ -69,11 +69,11 @@ class ConfigEditor extends FormBase {
'#required' => TRUE,
);
- $form['actions'] = array('#type' => 'actions');
- $form['actions']['submit'] = array(
+ $form['actions'] = ['#type' => 'actions'];
+ $form['actions']['submit'] = [
'#type' => 'submit',
'#value' => $this->t('Save'),
- );
+ ];
$form['actions']['cancel'] = array(
'#type' => 'link',
'#title' => $this->t('Cancel'),
diff --git a/src/Form/ConfigsList.php b/src/Form/ConfigsList.php
index f0993e7..0c01ca4 100644
--- a/src/Form/ConfigsList.php
+++ b/src/Form/ConfigsList.php
@@ -35,10 +35,11 @@ class ConfigsList extends FormBase {
'#title_display' => 'invisible',
'#default_value' => $filter,
);
- $form['filter']['show'] = array(
+ $form['filter']['actions'] = ['#type' => 'actions'];
+ $form['filter']['actions']['show'] = [
'#type' => 'submit',
'#value' => $this->t('Filter'),
- );
+ ];
$header = array(
'name' => array('data' => $this->t('Name')),
diff --git a/src/Form/DevelReinstall.php b/src/Form/DevelReinstall.php
index 109e40b..ee85c36 100644
--- a/src/Form/DevelReinstall.php
+++ b/src/Form/DevelReinstall.php
@@ -116,11 +116,11 @@ class DevelReinstall extends FormBase {
$form['#attached']['library'][] = 'system/drupal.system.modules';
- $form['actions'] = array('#type' => 'actions');
- $form['actions']['submit'] = array(
+ $form['actions'] = ['#type' => 'actions'];
+ $form['actions']['submit'] = [
'#type' => 'submit',
'#value' => $this->t('Reinstall'),
- );
+ ];
return $form;
}
diff --git a/src/Form/ExecutePHP.php b/src/Form/ExecutePHP.php
index cd66bf4..e0f5dcc 100644
--- a/src/Form/ExecutePHP.php
+++ b/src/Form/ExecutePHP.php
@@ -32,7 +32,11 @@ class ExecutePHP extends FormBase {
'#default_value' => (isset($_SESSION['devel_execute_code']) ? $_SESSION['devel_execute_code'] : ''),
'#rows' => 20,
);
- $form['execute']['op'] = array('#type' => 'submit', '#value' => t('Execute'));
+ $form['execute']['actions'] = ['#type' => 'actions'];
+ $form['execute']['actions']['op'] = [
+ '#type' => 'submit',
+ '#value' => t('Execute'),
+ ];
$form['#redirect'] = FALSE;
if (isset($_SESSION['devel_execute_code'])) {
unset($_SESSION['devel_execute_code']);
diff --git a/src/Form/SystemStateEdit.php b/src/Form/SystemStateEdit.php
index d4ba0ed..e83c260 100644
--- a/src/Form/SystemStateEdit.php
+++ b/src/Form/SystemStateEdit.php
@@ -108,17 +108,17 @@ class SystemStateEdit extends FormBase {
'#rows' => 15,
);
- $form['actions'] = array('#type' => 'actions');
- $form['actions']['submit'] = array(
+ $form['actions'] = ['#type' => 'actions'];
+ $form['actions']['submit'] = [
'#type' => 'submit',
'#value' => $this->t('Save'),
'#disabled' => $disabled,
- );
- $form['actions']['cancel'] = array(
+ ];
+ $form['actions']['cancel'] = [
'#type' => 'link',
'#title' => $this->t('Cancel'),
'#url' => Url::fromRoute('devel.state_system_page')
- );
+ ];
return $form;
}
diff --git a/webprofiler/src/Form/ConfigForm.php b/webprofiler/src/Form/ConfigForm.php
index e99e216..d95582b 100644
--- a/webprofiler/src/Form/ConfigForm.php
+++ b/webprofiler/src/Form/ConfigForm.php
@@ -165,7 +165,8 @@ class ConfigForm extends ConfigFormBase {
'#open' => FALSE,
];
- $form['purge']['purge'] = [
+ $form['purge']['actions'] = ['#type' => 'actions'];
+ $form['purge']['actions']['purge'] = [
'#type' => 'submit',
'#value' => $this->t('Purge'),
'#submit' => [[$this, 'purge']],