Problem/Motivation

Contact module defines actions in the CategoryFormController::form() method.

Proposed resolution

CategoryFormController should implement ::actions() in order to set the text of the submit button.

Remaining tasks

Needs patch.

User interface changes

None.

API changes

None.

None.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

socketwench’s picture

Status: Active » Needs review
FileSize
1.12 KB
tim.plunkett’s picture

Title: "CategoryFormController::form() should not define form actions » CategoryFormController::form() should not define form actions
+++ b/core/modules/contact/lib/Drupal/contact/CategoryFormController.php
@@ -63,16 +63,20 @@ public function form(array $form, array &$form_state) {
+    $actions['submit']['#value'] = t('Save');

Actually, I think this is already 'Save', this needs manually testing but I think it needs unset($actions['delete']);

Status: Needs review » Needs work

The last submitted patch, 2115631.1.categoryActionForm.patch, failed testing.

larowlan’s picture

Status: Needs work » Needs review
andypost’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
FileSize
617 bytes

Manually tested, this simply just use defaults (Save), that's why test coverage works

@tim.plunkett no need to unset the delete is covered by entity access controller, so "personal" is protected from edit and delete

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 2093f34 and pushed to 8.x. Thanks!

  • alexpott committed 2093f34 on 8.x
    Issue #2115631 by andypost, socketwench: Fixed CategoryFormController::...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.