Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It would improve the content management UI/workflow if pages such as the node deletion confirmation page (node/#/delete) used a simple Javascript alert box or AJAX update to allow the deletion of the page without having to go to a separate page. This could apply to any confirmation type of page as long as it didn't include too much text for the alert.
Your thoughts?
Chris
(PS, I searched the issue queue and didn't find anything matching)
Comments
Comment #1
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedHow would you get this to degrade gracefully if the user does not have JS?
Comment #2
sarvab CreditAttribution: sarvab commentedHow about if the current system were kept intact, have the javascript catch the "Delete" or whatever button requires confirming, ask for confirmation, and then insert the appropriate form elements required for confirming the form directly into the DOM tree before submitting the form.
Just a quick thought, and not sure what else would need to be considered, however it would perform exactly as it does currently if javascript was disabled.
Comment #3
bartekg CreditAttribution: bartekg commentedAs far as I know this is how the FiveStar module works. When JS is enabled a script is executed to replace standard form with JS-based UI. I believe JS confirmations could work in a similar way.
Also, it would be even better if the implementation was flexible enough so that standard JS confirm function could be easily replaced with other JS handler (if anyone wants to use custom JS dialogs for instance).
Regards,
Bartek
Comment #4
dropcube CreditAttribution: dropcube commentedThis will be a great usability improvement, but won't happen in 6.x, moving the issue to 7.x
Comment #5
babbage CreditAttribution: babbage commentedI'd like to reactivate this issue, and propose jQuery Alerts or something similar in functionality as a possible interface for improving the standard JS confirm function etc. jQuery Alerts is themeable with CSS, and is released under the GPL, so seems ideally adapted to our needs.
I have already proposed that jQuery Alerts be added to jQuery plugins: #365474: Add jQuery Alerts plugin. Once that happens, or by applying the patch yourself, you can then see how this kind of functionality would look in Contrib Toggle v1.3. In that case it is not necessary to include separate functionality for browsers without javascript since the entire module's functionality relies on javascript. However, it does not seem likely to be difficult to implement what is described above.
Comment #6
starbow CreditAttribution: starbow commentedSounds a lot like #193311: Ajax Popups in Drupal 7: Adding Modal Dialogs to Help, Confirmations and Filter tips (Unified)
Comment #7
starbow CreditAttribution: starbow commentedI have rolled this functionality into #374646: Popbox (Popups Lite): Adding Modal Dialogs to Confirmations
Comment #8
ChrisBryant CreditAttribution: ChrisBryant commentedThanks for the link, good work and hopefully we can see this make it into Drupal 7. It will be a nice usability improvement.
Comment #9
executex CreditAttribution: executex commentedPLEASE... Please, just get RID of "Confirm" for deleting comments. I understand confirm for deleting nodes, but I get like 100s of comments daily of spam. I don't need to confirm that I need to delete this jj4j4jj2jrj2 titled comment.
Comment #10
Bojhan CreditAttribution: Bojhan commentedThis is a Drupal 8 issue, where hopefully we will stop having confirmation boxes all together but simply undo buttons.
Comment #11
nod_Oh undo buttons does sound good. Still seems pretty far away.
Let's say it's posponed on the Drupal.ajax refactor and the modal dialog issue.
Comment #12
larowlanwip: http://www.youtube.com/watch?v=GxDdOPGuqug&feature=youtu.be
Comment #13
larowlanPatch for discussion here: #1667742: Add abstracted dialog to core (resolves accessibility bug)
Comment #14
larowlanPatch is green here: #1667742: Add abstracted dialog to core (resolves accessibility bug)
Comment #15
nod_#617730: UX: Use modal dialogs for confirmation forms.