diff --git a/core/lib/Drupal/Core/Entity/EntityFormController.php b/core/lib/Drupal/Core/Entity/EntityFormController.php index e4a6456..a1f3a9d 100644 --- a/core/lib/Drupal/Core/Entity/EntityFormController.php +++ b/core/lib/Drupal/Core/Entity/EntityFormController.php @@ -248,7 +248,7 @@ protected function actions(array $form, array &$form_state) { ), ); - if ($this->entity->hasLinkTemplate('delete-form') && !$this->entity->isNew()) { + if (!$this->entity->isNew() && $this->entity->hasLinkTemplate('delete-form')) { $route_info = $this->entity->urlInfo('delete-form'); $route_info += array( 'route_parameters' => array(), diff --git a/core/modules/forum/lib/Drupal/forum/Form/ForumFormController.php b/core/modules/forum/lib/Drupal/forum/Form/ForumFormController.php index ae730ce..5575c8c 100644 --- a/core/modules/forum/lib/Drupal/forum/Form/ForumFormController.php +++ b/core/modules/forum/lib/Drupal/forum/Form/ForumFormController.php @@ -104,7 +104,7 @@ public function save(array $form, array &$form_state) { protected function actions(array $form, array &$form_state) { $actions = parent::actions($form, $form_state); - if ($this->entity->hasLinkTemplate('forum-delete-form') && !$this->entity->isNew()) { + if (!$this->entity->isNew() && $this->entity->hasLinkTemplate('forum-delete-form')) { $route_info = $this->entity->urlInfo('forum-delete-form'); $route_info += array( 'route_parameters' => array(), diff --git a/core/modules/node/lib/Drupal/node/NodeFormController.php b/core/modules/node/lib/Drupal/node/NodeFormController.php index f2afc4e..7b21d3c 100644 --- a/core/modules/node/lib/Drupal/node/NodeFormController.php +++ b/core/modules/node/lib/Drupal/node/NodeFormController.php @@ -283,6 +283,7 @@ protected function actions(array $form, array &$form_state) { } $element['preview'] = array( + '#type' => 'submit', '#access' => $preview_mode != DRUPAL_DISABLED && ($node->access('create') || $node->access('update')), '#value' => t('Preview'), '#weight' => 20, @@ -293,7 +294,6 @@ protected function actions(array $form, array &$form_state) { array($this, 'submit'), array($this, 'preview'), ), - '#type' => 'submit', ); $element['delete']['#access'] = $node->access('delete'); diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestFormController.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestFormController.php index 3e5a400..e4ffce5 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestFormController.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestFormController.php @@ -113,13 +113,12 @@ public function save(array $form, array &$form_state) { protected function actions(array $form, array &$form_state) { $actions = parent::actions($form, $form_state); $actions['delete'] = array( + '#type' => 'submit', '#value' => $this->t('Delete'), '#submit' => array( array($this, 'delete'), ), - '#type' => 'submit', ); - return $actions; } diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewAddFormController.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewAddFormController.php index c204e85..e8583a7 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/ViewAddFormController.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewAddFormController.php @@ -150,12 +150,12 @@ protected function actions(array $form, array &$form_state) { $actions['submit']['#value'] = $this->t('Save and edit'); $actions['cancel'] = array( + '#type' => 'submit', '#value' => $this->t('Cancel'), '#submit' => array( array($this, 'cancel'), ), '#limit_validation_errors' => array(), - '#type' => 'submit', ); return $actions; } diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewCloneFormController.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewCloneFormController.php index 281920e..558cc1d 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/ViewCloneFormController.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewCloneFormController.php @@ -54,11 +54,11 @@ public function form(array $form, array &$form_state) { */ protected function actions(array $form, array &$form_state) { $actions['submit'] = array( + '#type' => 'submit', '#value' => $this->t('Clone'), '#submit' => array( array($this, 'submit'), ), - '#type' => 'submit', ); return $actions; } diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php index c70c090..e7df71b 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php @@ -220,11 +220,11 @@ protected function actions(array $form, array &$form_state) { unset($actions['delete']); $actions['cancel'] = array( + '#type' => 'submit', '#value' => $this->t('Cancel'), '#submit' => array( array($this, 'cancel'), ), - '#type' => 'submit', ); return $actions; } diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php old mode 100755 new mode 100644