Bugzilla – Attachment 162306 Details for
Bug 35856
Runtime parameter modal should provide option of ":all"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35856: added options to runtime parameter modal
Bug-35856-added-options-to-runtime-parameter-modal.patch (text/plain), 7.28 KB, created by
Caroline Cyr La Rose
on 2024-02-20 17:31:03 UTC
(
hide
)
Description:
Bug 35856: added options to runtime parameter modal
Filename:
MIME Type:
Creator:
Caroline Cyr La Rose
Created:
2024-02-20 17:31:03 UTC
Size:
7.28 KB
patch
obsolete
>From 618c71db385ac93e20557357030b4993cd45dcca Mon Sep 17 00:00:00 2001 >From: Brendan Lawlor <blawlor@clamsnet.org> >Date: Wed, 24 Jan 2024 17:15:09 +0000 >Subject: [PATCH] Bug 35856: added options to runtime parameter modal > >This patch adds radio checkboxes to the reports runtime parameter modal for adding param options :all and :in. > >The :in param option functionality depends on https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35746 > >Test plan: >1. Apply patch >2. Create a report from SQL >3. Click Insert runtime parameter and choose any option other than date, list or text field >4. Note the form now includes a radio checkbox for parameter options >5. Choose 'Include option for all' and click Insert parameter >6. Note the parameter is inserted with :all option like <<label|authval:all>> >7. Choose 'Allow multiple selections' and click Insert parameter >8. Note the parameter is inserted with :in option like <<label|authval:in>> >9. Make sure that parameter options are not included on the form for date, list and text field > >Thanks! > >Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> >--- > .../modules/reports/guided_reports_start.tt | 23 +++++++++++++++++++ > 1 file changed, 23 insertions(+) > >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 30b2b5f143..fa7e316afd 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 >@@ -1507,6 +1507,15 @@ > </select> > <div class="hint">Select which authorized value category the user will choose from.</div> > </div> >+ <div id="runtime_param_options" style="display:none"> >+ <label>Parameter options:</label> >+ <div class="form-check-inline"> >+ <input type="radio" class="form-check-input" id="include_all_check" name="param_option" value=":all"> >+ <label class="form-check-label" for="include_all_check">Include option for all</label> >+ <input type="radio" class="form-check-input" id="multi_select_check" name="param_option" value=":in"> >+ <label class="form-check-label" for="multi_select_check">Allow multiple selections</label> >+ </div> >+ </div> > </div> <!-- /.modal-body --> > <div class="modal-footer"> > <button type="submit" id="sendParam" class="btn btn-default approve">Insert parameter</button> >@@ -1711,16 +1720,19 @@ > $("#authorised_value_category").show(); > $("label[for='authorised_value']").addClass("required"); > $("#authorised_value").prop("required", true ).attr("required", "required").addClass("required"); >+ $("#runtime_param_options").show(); > break; > case "insertCnSource": > modalTitle.text( _("Insert classification source parameter") ); > $("#paramLabel").val( _("Source of classification or shelving scheme") ); > $("#param_category").val("cn_source"); >+ $("#runtime_param_options").show(); > break; > case "insertFramework": > modalTitle.text( _("Insert bibliographic framework parameter") ); > $("#paramLabel").val( _("Framework") ); > $("#param_category").val("biblio_framework"); >+ $("#runtime_param_options").show(); > break; > case "insertDate": > modalTitle.text( _("Insert date parameter") ); >@@ -1731,31 +1743,37 @@ > modalTitle.text( _("Insert item types parameter") ); > $("#paramLabel").val( _("Item type") ); > $("#param_category").val("itemtypes"); >+ $("#runtime_param_options").show(); > break; > case "insertBranches": > modalTitle.text( _("Insert libraries parameter") ); > $("#paramLabel").val( _("Library") ); > $("#param_category").val("branches"); >+ $("#runtime_param_options").show(); > break; > case "insertCategorycode": > modalTitle.text( _("Insert patron category parameter") ); > $("#paramLabel").val( _("Patron category") ); > $("#param_category").val("categorycode"); >+ $("#runtime_param_options").show(); > break; > case "insertCashregister": > modalTitle.text( _("Insert cash register parameter") ); > $("#paramLabel").val( _("Cash register") ); > $("#param_category").val("cash_registers"); >+ $("#runtime_param_options").show(); > break; > case "insertDebittypes": > modalTitle.text( _("Insert debit type parameter") ); > $("#paramLabel").val( _("Debit type") ); > $("#param_category").val("debit_types"); >+ $("#runtime_param_options").show(); > break; > case "insertCredittypes": > modalTitle.text( _("Insert credit type parameter") ); > $("#paramLabel").val( _("Credit type") ); > $("#param_category").val("credit_types"); >+ $("#runtime_param_options").show(); > break; > case "insertList": > modalTitle.text( _("Insert list parameter") ); >@@ -2170,6 +2188,7 @@ > $("#runtime_parameters").on("hide.bs.modal", function(){ > $("#send_runtime_parameter")[0].reset(); > $("#authorised_value_category").val("").hide(); >+ $("#runtime_param_options").val("").hide(); > $("label[for='authorised_value']").removeClass("required"); > $("#authorised_value").prop("required", false ).removeAttr("required").removeClass("required"); > }); >@@ -2180,6 +2199,7 @@ > var paramLabel = $("#paramLabel").val(); > var param_category = $("#param_category").val(); > var categoryLabel = $("#authorised_value").val(); >+ var param_option = $('#runtime_param_options input[name="param_option"]:checked').val(); > // Get CodeMirror environment variables > var selection = editor.getSelection(); > var doc = editor.getDoc(); >@@ -2197,6 +2217,9 @@ > } else if( param_category ){ > text += param_category; > } >+ if( param_option ){ >+ text += param_option; >+ } > if( text != "" ){ > text = " <<" + text + ">> "; > if( selection.length > 0){ >-- >2.34.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 35856
:
161357
|
162306
|
162307
|
162308
|
164050
|
164287