Ticket #299 (new enhancement)

Opened 3 years ago

Last modified 2 months ago

Progressive enhancement for delete links in list scaffolds

Reported by: RichardDavies Owned by: somebody
Priority: normal Milestone: 2.0.x-next-patch
Version: Severity: minor
Keywords: Cc:

Description

Currently, the list scaffold creates a delete link to remove specific records from the database. The HTML generated for the link includes a JavaScript? confirmation prior to deleting the record.

Unfortunately, the way it's implemented prevents the link from working if JavaScript? is disabled in the user's browser. The following change to line 70 of ModelGlue?/unity/xsl/list.xsl is a better solution:

&lt;a href="#deleteEvent##keystring#" onclick="return confirm('Are you sure you want to delete this <xsl:value-of select="/object/label"/>?') ? true : false"&gt;Delete&lt;/a&gt;

This implementation uses progressive enhancement to provide the user with the confirmation if JS is enabled. If JS isn't enabled, the link still works (although with no confirmation).

Attachments

Change History

Changed 2 months ago by DanWilson

  • milestone set to 2.0.x-next-patch

I fixed this in the V3 code base, so there'll be a confirm before delete fires.

We need to fix this in the v2 code.

Add/Change #299 (Progressive enhancement for delete links in list scaffolds)

Author


E-mail address and user name can be saved in the Preferences.


Action
as new
 
Note: See TracTickets for help on using tickets.