Bugzilla – Attachment 127066 Details for
Bug 29352
Runtime parameter labels should not be said to be optional
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29352: Runtime parameter labels should not be said to be optional
Bug-29352-Runtime-parameter-labels-should-not-be-s.patch (text/plain), 3.79 KB, created by
Andrew Fuerste-Henry
on 2021-10-28 16:56:38 UTC
(
hide
)
Description:
Bug 29352: Runtime parameter labels should not be said to be optional
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2021-10-28 16:56:38 UTC
Size:
3.79 KB
patch
obsolete
>From 4ee564a63a7dd885da68ae001ac95739e71bba36 Mon Sep 17 00:00:00 2001 >From: Owen <oleonard@myacpl.org> >Date: Thu, 28 Oct 2021 14:46:00 +0000 >Subject: [PATCH] Bug 29352: Runtime parameter labels should not be said to be > optional > >This patch alters the form shown when using the "Insert runtime >parameter" button in SQL reports. It makes the label field required and >removes "optional" from the field hint. > >To test, apply the patch and go to Reports -> Create from SQL. > > - Click the "Insert runtime parameter" button and select "Authorized > value." > - Clear the "parameter label" field and click "Insert parameter." > - The form should display an error asking you to fill in the label > field. > - Test that the category field is also required. > - Close the modal and select a different runtime parameter. > - Test again that the label field is required. > - Test that the form submits correctly when the label field is > populated. > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >--- > .../prog/en/modules/reports/guided_reports_start.tt | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >index e766923601..8b1ed4f447 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >@@ -1379,9 +1379,9 @@ > <input type="hidden" name="param_category" id="param_category" /> > <div class="modal-body"> > <div class="form-group"> >- <label for="paramLabel">Parameter label: </label> >- <input class="form-control" type="text" name="paramLabel" id="paramLabel"> >- <div class="hint">Optional. The label for the field shown when the report is run, e.g. "Select a library."</div> >+ <label for="paramLabel" class="required">Parameter label: </label> >+ <input class="form-control required" type="text" name="paramLabel" id="paramLabel" required="required" /> >+ <div class="hint">The label for the field shown when the report is run, e.g. "Select a library."</div> > </div> > <div id="authorised_value_category" class="form-group" style="display:none"> > <label for="authorised_value">Authorized value category:</label> >@@ -1528,7 +1528,8 @@ > modalTitle.text( _("Insert authorized value parameter") ); > $("#paramLabel").val( _("Authorized value") ); > $("#authorised_value_category").show(); >- $("#authorised_value").prop("required", true ).attr("required", "required"); >+ $("label[for='authorised_value']").addClass("required"); >+ $("#authorised_value").prop("required", true ).attr("required", "required").addClass("required"); > break; > case "insertDate": > modalTitle.text( _("Insert date parameter") ); >@@ -1953,7 +1954,8 @@ > $("#runtime_parameters").on("hide.bs.modal", function(){ > $("#send_runtime_parameter")[0].reset(); > $("#authorised_value_category").val("").hide(); >- $("#authorised_value").prop("required", false ).removeAttr("required"); >+ $("label[for='authorised_value']").removeClass("required"); >+ $("#authorised_value").prop("required", false ).removeAttr("required").removeClass("required"); > }); > > $("#send_runtime_parameter").on("submit", function(e){ >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29352
:
127061
|
127066
|
127115