View | Details | Raw Unified | Return to bug 35856
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-1 / +23 lines)
Lines 1507-1512 Link Here
1507
                            </select>
1507
                            </select>
1508
                            <div class="hint">Select which authorized value category the user will choose from.</div>
1508
                            <div class="hint">Select which authorized value category the user will choose from.</div>
1509
                        </div>
1509
                        </div>
1510
                        <div id="runtime_param_options" style="display:none">
1511
                            <label>Parameter options:</label>
1512
                            <div class="form-check-inline">
1513
                                <input type="radio" class="form-check-input" id="include_all_check" name="param_option" value=":all">
1514
                                <label class="form-check-label" for="include_all_check">Include option for all</label>
1515
                                <input type="radio" class="form-check-input" id="multi_select_check" name="param_option" value=":in">
1516
                                <label class="form-check-label" for="multi_select_check">Allow multiple selections</label>
1517
                            </div>
1518
                        </div>
1510
                    </div> <!-- /.modal-body -->
1519
                    </div> <!-- /.modal-body -->
1511
                    <div class="modal-footer">
1520
                    <div class="modal-footer">
1512
                        <button type="submit" id="sendParam" class="btn btn-default approve">Insert parameter</button>
1521
                        <button type="submit" id="sendParam" class="btn btn-default approve">Insert parameter</button>
Lines 1711-1726 Link Here
1711
                    $("#authorised_value_category").show();
1720
                    $("#authorised_value_category").show();
1712
                    $("label[for='authorised_value']").addClass("required");
1721
                    $("label[for='authorised_value']").addClass("required");
1713
                    $("#authorised_value").prop("required", true ).attr("required", "required").addClass("required");
1722
                    $("#authorised_value").prop("required", true ).attr("required", "required").addClass("required");
1723
                    $("#runtime_param_options").show();
1714
                    break;
1724
                    break;
1715
                case "insertCnSource":
1725
                case "insertCnSource":
1716
                    modalTitle.text( _("Insert classification source parameter") );
1726
                    modalTitle.text( _("Insert classification source parameter") );
1717
                    $("#paramLabel").val( _("Source of classification or shelving scheme") );
1727
                    $("#paramLabel").val( _("Source of classification or shelving scheme") );
1718
                    $("#param_category").val("cn_source");
1728
                    $("#param_category").val("cn_source");
1729
                    $("#runtime_param_options").show();
1719
                    break;
1730
                    break;
1720
                case "insertFramework":
1731
                case "insertFramework":
1721
                    modalTitle.text( _("Insert bibliographic framework parameter") );
1732
                    modalTitle.text( _("Insert bibliographic framework parameter") );
1722
                    $("#paramLabel").val( _("Framework") );
1733
                    $("#paramLabel").val( _("Framework") );
1723
                    $("#param_category").val("biblio_framework");
1734
                    $("#param_category").val("biblio_framework");
1735
                    $("#runtime_param_options").show();
1724
                    break;
1736
                    break;
1725
                case "insertDate":
1737
                case "insertDate":
1726
                    modalTitle.text( _("Insert date parameter") );
1738
                    modalTitle.text( _("Insert date parameter") );
Lines 1731-1761 Link Here
1731
                    modalTitle.text( _("Insert item types parameter") );
1743
                    modalTitle.text( _("Insert item types parameter") );
1732
                    $("#paramLabel").val( _("Item type") );
1744
                    $("#paramLabel").val( _("Item type") );
1733
                    $("#param_category").val("itemtypes");
1745
                    $("#param_category").val("itemtypes");
1746
                    $("#runtime_param_options").show();
1734
                    break;
1747
                    break;
1735
                case "insertBranches":
1748
                case "insertBranches":
1736
                    modalTitle.text( _("Insert libraries parameter") );
1749
                    modalTitle.text( _("Insert libraries parameter") );
1737
                    $("#paramLabel").val( _("Library") );
1750
                    $("#paramLabel").val( _("Library") );
1738
                    $("#param_category").val("branches");
1751
                    $("#param_category").val("branches");
1752
                    $("#runtime_param_options").show();
1739
                    break;
1753
                    break;
1740
                case "insertCategorycode":
1754
                case "insertCategorycode":
1741
                    modalTitle.text( _("Insert patron category parameter") );
1755
                    modalTitle.text( _("Insert patron category parameter") );
1742
                    $("#paramLabel").val( _("Patron category") );
1756
                    $("#paramLabel").val( _("Patron category") );
1743
                    $("#param_category").val("categorycode");
1757
                    $("#param_category").val("categorycode");
1758
                    $("#runtime_param_options").show();
1744
                    break;
1759
                    break;
1745
                case "insertCashregister":
1760
                case "insertCashregister":
1746
                    modalTitle.text( _("Insert cash register parameter") );
1761
                    modalTitle.text( _("Insert cash register parameter") );
1747
                    $("#paramLabel").val( _("Cash register") );
1762
                    $("#paramLabel").val( _("Cash register") );
1748
                    $("#param_category").val("cash_registers");
1763
                    $("#param_category").val("cash_registers");
1764
                    $("#runtime_param_options").show();
1749
                    break;
1765
                    break;
1750
                case "insertDebittypes":
1766
                case "insertDebittypes":
1751
                    modalTitle.text( _("Insert debit type parameter") );
1767
                    modalTitle.text( _("Insert debit type parameter") );
1752
                    $("#paramLabel").val( _("Debit type") );
1768
                    $("#paramLabel").val( _("Debit type") );
1753
                    $("#param_category").val("debit_types");
1769
                    $("#param_category").val("debit_types");
1770
                    $("#runtime_param_options").show();
1754
                    break;
1771
                    break;
1755
                case "insertCredittypes":
1772
                case "insertCredittypes":
1756
                    modalTitle.text( _("Insert credit type parameter") );
1773
                    modalTitle.text( _("Insert credit type parameter") );
1757
                    $("#paramLabel").val( _("Credit type") );
1774
                    $("#paramLabel").val( _("Credit type") );
1758
                    $("#param_category").val("credit_types");
1775
                    $("#param_category").val("credit_types");
1776
                    $("#runtime_param_options").show();
1759
                    break;
1777
                    break;
1760
                case "insertList":
1778
                case "insertList":
1761
                    modalTitle.text( _("Insert list parameter") );
1779
                    modalTitle.text( _("Insert list parameter") );
Lines 2170-2175 Link Here
2170
                $("#runtime_parameters").on("hide.bs.modal", function(){
2188
                $("#runtime_parameters").on("hide.bs.modal", function(){
2171
                    $("#send_runtime_parameter")[0].reset();
2189
                    $("#send_runtime_parameter")[0].reset();
2172
                    $("#authorised_value_category").val("").hide();
2190
                    $("#authorised_value_category").val("").hide();
2191
                    $("#runtime_param_options").val("").hide();
2173
                    $("label[for='authorised_value']").removeClass("required");
2192
                    $("label[for='authorised_value']").removeClass("required");
2174
                    $("#authorised_value").prop("required", false ).removeAttr("required").removeClass("required");
2193
                    $("#authorised_value").prop("required", false ).removeAttr("required").removeClass("required");
2175
                });
2194
                });
Lines 2180-2185 Link Here
2180
                    var paramLabel = $("#paramLabel").val();
2199
                    var paramLabel = $("#paramLabel").val();
2181
                    var param_category = $("#param_category").val();
2200
                    var param_category = $("#param_category").val();
2182
                    var categoryLabel = $("#authorised_value").val();
2201
                    var categoryLabel = $("#authorised_value").val();
2202
                    var param_option = $('#runtime_param_options input[name="param_option"]:checked').val();
2183
                    // Get CodeMirror environment variables
2203
                    // Get CodeMirror environment variables
2184
                    var selection = editor.getSelection();
2204
                    var selection = editor.getSelection();
2185
                    var doc = editor.getDoc();
2205
                    var doc = editor.getDoc();
Lines 2197-2202 Link Here
2197
                    } else if( param_category ){
2217
                    } else if( param_category ){
2198
                        text += param_category;
2218
                        text += param_category;
2199
                    }
2219
                    }
2220
                    if( param_option ){
2221
                        text += param_option;
2222
                    }
2200
                    if( text != "" ){
2223
                    if( text != "" ){
2201
                        text = " <<" + text + ">> ";
2224
                        text = " <<" + text + ">> ";
2202
                        if( selection.length > 0){
2225
                        if( selection.length > 0){
2203
- 

Return to bug 35856