Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#1734 closed enhancement (fixed)

Replace alert() messages in form validation with something better-lookin

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: minor Milestone: BASE 3.3
Component: web Version:
Keywords: Cc:

Description

If an error is detected when validating a form before saving it an error message is usually displayed in a popup using the alert() function. Nothing wrong with that, but we can do a bit better with modern browsers. See the attached image for an example.

Attachments (1)

alert.png (6.7 KB) - added by Nicklas Nordborg 10 years ago.

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by Nicklas Nordborg

Attachment: alert.png added

comment:1 Changed 10 years ago by Nicklas Nordborg

Owner: changed from everyone to Nicklas Nordborg
Status: newassigned

comment:2 Changed 10 years ago by Nicklas Nordborg

(In [6175]) References #1734: Replace alert() messages in form validation with something better-looking

Implemented a function for this: Forms.showNotification which should replace all calls to alert(). The function will automatically focus and select the specified form field if possible. The notification automatically disappears when the user starts typing or when the field loses focus.

The setting dialogs in the "BASE" menu and the calendar popup has been used for testing.

comment:3 Changed 10 years ago by Nicklas Nordborg

Resolution: fixed
Status: assignedclosed

(In [6176]) Fixes #1734: Replace alert() messages in form validation with something better-looking

Should be fixed in all other dialogs now, and also in some list pages and other places.

Added support for putting the notification to the right of the element. Use: Forms.showNotification(element, msg, null, 'pointer-left')

comment:4 Changed 10 years ago by Nicklas Nordborg

(In [6189]) References #1734: Replace alert() messages in form validation with something better-lookin

Seems like [6176] contained some code that had been commented out/removed due to debugging.

comment:5 Changed 8 years ago by Nicklas Nordborg

(In [6450]) References #1734: Replace alert() messages in form validation with something better-lookin

Add parameter to force left- or right-align of message.

Note: See TracTickets for help on using tickets.