Two issues: 1 - We only add the required class, we don't make the input required 2 - We don't add a 'blank' option, so the field is preselected
Created attachment 114620 [details] [review] Bug 27297: Add required and blank options to av-build-dropbox.inc This patch adds two options to av-build-drobx required - which will add the required attribute to the select blank - which will add a blank option to avoid preselecting others To test: 1 - In OpacSuggestionMandatoryFeilds select itemtype 2 - Go to OPAC 3 - Add a suggestion 4 - Don't fill out any fields 5 - Submit 6 - Suggestion is added 7 - Delete it 8 - Apply patch 9 - Add a suggestion 10 - Note itemtyp edefaults to 'None' 11 - You cannot submit until you select a value
Created attachment 114737 [details] [review] Bug 27297: Add required and blank options to av-build-dropbox.inc This patch adds two options to av-build-drobx required - which will add the required attribute to the select blank - which will add a blank option to avoid preselecting others To test: 1 - In OpacSuggestionMandatoryFeilds select itemtype 2 - Go to OPAC 3 - Add a suggestion 4 - Don't fill out any fields 5 - Submit 6 - Suggestion is added 7 - Delete it 8 - Apply patch 9 - Add a suggestion 10 - Note itemtyp edefaults to 'None' 11 - You cannot submit until you select a value Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
I am sorry, but this doesn't work correctly. 1) When itemtype is set to mandatory, the None option appears multiple times in the pull down, I believe once for every item type listed. 2) when itemtype is not set to mandatory, the None option doesn't appear as all, which means as you can't unselect the itemtype it's still kidna mandatory. We need to fix 1) for sure,... but can we fix 2) please at the same time and always include a none option?
Created attachment 115020 [details] [review] Bug 27297: Add required and blank options to av-build-dropbox.inc This patch adds two options to av-build-drobx required - which will add the required attribute to the select blank - which will add a blank option to avoid preselecting others To test: 1 - In OpacSuggestionMandatoryFeilds select itemtype 2 - Go to OPAC 3 - Add a suggestion 4 - Don't fill out any fields 5 - Submit 6 - Suggestion is added 7 - Delete it 8 - Apply patch 9 - Add a suggestion 10 - Note itemtyp edefaults to 'None' 11 - You cannot submit until you select a value
Created attachment 115215 [details] [review] Bug 27297: Add required and blank options to av-build-dropbox.inc This patch adds two options to av-build-drobx required - which will add the required attribute to the select blank - which will add a blank option to avoid preselecting others To test: 1 - In OpacSuggestionMandatoryFeilds select itemtype 2 - Go to OPAC 3 - Add a suggestion 4 - Don't fill out any fields 5 - Submit 6 - Suggestion is added 7 - Delete it 8 - Apply patch 9 - Add a suggestion 10 - Note itemtyp edefaults to 'None' 11 - You cannot submit until you select a value Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Created attachment 115219 [details] [review] Bug 27297: Add required and blank options to av-build-dropbox.inc This patch adds two options to av-build-drobx required - which will add the required attribute to the select blank - which will add a blank option to avoid preselecting others To test: 1 - In OpacSuggestionMandatoryFeilds select itemtype 2 - Go to OPAC 3 - Add a suggestion 4 - Don't fill out any fields 5 - Submit 6 - Suggestion is added 7 - Delete it 8 - Apply patch 9 - Add a suggestion 10 - Note itemtyp edefaults to 'None' 11 - You cannot submit until you select a value Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Thx Nick, no complaints this time :)
Pushed to master for 21.05, thanks to everybody involved!
Pushed to 20.11.x for 20.11.02
Pushed to 20.05.x for 20.05.09
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.
Just noting: Bug 18680 added "empty" for the same purpose at the staff side. This added "blank" for OPAC.