Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'Cancel' link to node edit forms #357

Closed
ghost opened this issue Oct 14, 2014 · 10 comments
Closed

Add 'Cancel' link to node edit forms #357

ghost opened this issue Oct 14, 2014 · 10 comments

Comments

@ghost
Copy link

ghost commented Oct 14, 2014

It used to be that I told my clients that if they were adding or editing a node and messed it up and didn't want to save it, they could just click the Close button on the overlay. Now that the overlay's gone (but not just because of that), I think there should be a 'Cancel' button added to node add/edit forms so that it's obvious how to not-save a node (the only way currently is to click 'Back' or another link - this may leave users wondering if their changes were kept somewhere (like emails save drafts)...)

@Bojhan
Copy link

Bojhan commented Oct 15, 2014

OR bring the overlay back. J/k

@jenlampton
Copy link
Member

I like this idea, however, it should be a link and not a button (we already have a cancel link on confirm forms, if you want to see an example). If you want some light reading on why a link and not a button, check out this d.o issue

I'd also like to see similar cancel links on other things too, for consistency. Would you please create comparable issues for comments, terms, blocks, and users (and anything else you can think of where it makes sense)

@ghost
Copy link
Author

ghost commented Oct 17, 2014

@jenlampton I mentioned 'buttons' above, but ended up making it a 'link': backdrop/backdrop#493 (comment)

I did see that d.o post and used it as a reference (along with the fact that my PR simply copies from the Cancel link already on node delete forms). Seems sad to think that this simple feature still hasn't made it into Drupal core after 7.5 years, but I understand why.

Will make issues for other Backdrop forms.

@quicksketch
Copy link
Member

Thanks @BWPanda.

We do have buttons for canceling in places, including the Views UI and the new Layout UI. True, these situations necessitate a POST request because they are built with Form API, but there's no reason why we couldn't make them links with a token to prevent CSRF holes, like we do for removing a block without a POST request. On the opposite side, the "Delete" button on the node form doesn't actually do anything but take you to another page, so technically it should be a link rather than a button. 😛

The separation between a link vs. a button is esoteric from an end-user perspective. I'm much more inclined to use a link in some places and buttons in others just because sometimes one approach is much easier than another. However, there's no reason why we can't style them the same. And not having either at all because we can't make up which one should be used is downright silly. So lets use links where links are easy and buttons where buttons are easy, then style them the same as part of our redesign. Just having cancel links/buttons everywhere is more important than which element we use where.

@quicksketch
Copy link
Member

Merged in backdrop/backdrop#493. Let's followup on other forms throughout Backdrop. This one in particular was important to include. Thanks @BWPanda for the long-awaited fix.

@jenlampton jenlampton changed the title Add 'Cancel' button to node edit forms Add 'Cancel' link to node edit forms Oct 17, 2014
@jenlampton
Copy link
Member

Awesome. highfives

@ghost
Copy link
Author

ghost commented Oct 17, 2014

I know it's an unfair comparison, but: http://status.panda.id.au/notice/2590 ;)

@jenlampton
Copy link
Member

hehehe. :) Would you please use the hashtag #BackdropCMS?

@ghost
Copy link
Author

ghost commented Oct 17, 2014

Would you please use the hashtag #BackdropCMS?

Sure, will try to remember that in future.

There are some admin forms where we could add a Cancel link, but I don't think it's worth it as they're generally only used by people who know what they're doing:

  • Modules (/admin/modules/list)
  • Theme settings (/admin/appearance/settings/[THEME_NAME])
  • Content types (/admin/structure/types/add)
  • Menus (/admin/structure/menu/add)
  • etc.

@quicksketch
Copy link
Member

Totally agreed. Use discretion in picking the appropriate forms. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants