Problem/Motivation

  • The Cancel button isn't being moved to the correct location when a delete form is opened in a modal dialog.

Issue fork rigel-3437940

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

baldwinlouie created an issue. See original summary.

baldwinlouie’s picture

Status: Active » Needs review
StatusFileSize
new327.29 KB

@yas, please review this patch. This fix moves the Cancel button into the correct location in a modal. It turns out the following code removes the necessary css class that the Dialog JS needs to move the button into the lower right hand corner.

$form['actions']['cancel']['#attributes']['class']['0'] = '';

I also changed the color of the Cancel button. Best practice says the the cancel button should be a different color than the main "Delete" button. That way, the user can easily distinguish between the two.

What do you think about the color change.

yas’s picture

Title: Fix Cancel button placement in modal dialog » Fix the 'Cancel' button placement in a modal dialog window
Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

@baldwinlouie

Thank you for the fix. I tried the patch and it looks perfect. I'll merge the patch to 6.x and 7.x; and close this issue as Fixed.

  • yas committed 7df16979 on 7.x authored by baldwinlouie
    Issue #3437940 by baldwinlouie, yas: Fix the 'Cancel' button placement...
yas’s picture

.

  • yas committed 65f0dd13 on 6.x authored by baldwinlouie
    Issue #3437940 by baldwinlouie, yas: Fix the 'Cancel' button placement...
yas’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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