Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-1417

Failed dialog validation should not save/close the dialog

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.0.3, 3.1 M2
    • 3.0.1
    • gui
    • None

    Description

      Currently, dialog controls marked as required can still be empty.
      Patches have been provided by MAGNOLIA-1119 and MAGNOLIA-1361 and are summarized/improved in the attached patch.

      One of the problems with these patches is that the validation code was called during rendering: as a result mandatory fields were immediately marked "red", and the user did not have any indication of what was wrong anymore after a failed validation, since nothing changed visually. It also removed the alert box, which while not being the most sexy device was a way of saying to the user that something was wrong. (if the missing required field was in another tab, the user would just see nothing)
      To fix this, I introduced the "wasValidatedOrNotSaved" field in DialogControlImpl.

      Another problem is that a file control would loose its file upon failed validation and the user would thus have to reselect and reupload it. while that's viable with simple dialogs, it is not in more complex scenarios where multiple files are involved.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                pbaerfuss Philipp Bärfuss
                gjoseph Magnolia International
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD