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 / +28 lines)
Lines 1512-1517 Link Here
1512
                            </select>
1512
                            </select>
1513
                            <div class="hint">Select which authorized value category the user will choose from.</div>
1513
                            <div class="hint">Select which authorized value category the user will choose from.</div>
1514
                        </div>
1514
                        </div>
1515
                        <div id="runtime_param_options" style="display:none">
1516
                            <label>Parameter options:</label>
1517
                            <div class="form-check-inline">
1518
                                <input type="radio" class="form-check-input" id="single_param_check" name="param_option" value="" checked>
1519
                                <label class="form-check-label" for="single_param_check">Single parameter only</label>
1520
                                <i id="info_param_options" data-toggle="tooltip" title="" data-placement="top" class="fa fa-info-circle" data-original-title="Query expression should use ="></i>
1521
                                <input type="radio" class="form-check-input" id="include_all_check" name="param_option" value=":all">
1522
                                <label class="form-check-label" for="include_all_check">Include option for all</label>
1523
                                <i id="info_param_options" data-toggle="tooltip" title="" data-placement="top" class="fa fa-info-circle" data-original-title="Query expression must use LIKE"></i>
1524
                                <input type="radio" class="form-check-input" id="multi_select_check" name="param_option" value=":in">
1525
                                <label class="form-check-label" for="multi_select_check">Allow multiple selections</label>
1526
                                <i id="info_param_options" data-toggle="tooltip" title="" data-placement="top" class="fa fa-info-circle" data-original-title="Query expression must use IN"></i>
1527
                            </div>
1528
                        </div>
1515
                    </div> <!-- /.modal-body -->
1529
                    </div> <!-- /.modal-body -->
1516
                    <div class="modal-footer">
1530
                    <div class="modal-footer">
1517
                        <button type="submit" id="sendParam" class="btn btn-default approve">Insert parameter</button>
1531
                        <button type="submit" id="sendParam" class="btn btn-default approve">Insert parameter</button>
Lines 1716-1731 Link Here
1716
                    $("#authorised_value_category").show();
1730
                    $("#authorised_value_category").show();
1717
                    $("label[for='authorised_value']").addClass("required");
1731
                    $("label[for='authorised_value']").addClass("required");
1718
                    $("#authorised_value").prop("required", true ).attr("required", "required").addClass("required");
1732
                    $("#authorised_value").prop("required", true ).attr("required", "required").addClass("required");
1733
                    $("#runtime_param_options").show();
1719
                    break;
1734
                    break;
1720
                case "insertCnSource":
1735
                case "insertCnSource":
1721
                    modalTitle.text( _("Insert classification source parameter") );
1736
                    modalTitle.text( _("Insert classification source parameter") );
1722
                    $("#paramLabel").val( _("Source of classification or shelving scheme") );
1737
                    $("#paramLabel").val( _("Source of classification or shelving scheme") );
1723
                    $("#param_category").val("cn_source");
1738
                    $("#param_category").val("cn_source");
1739
                    $("#runtime_param_options").show();
1724
                    break;
1740
                    break;
1725
                case "insertFramework":
1741
                case "insertFramework":
1726
                    modalTitle.text( _("Insert bibliographic framework parameter") );
1742
                    modalTitle.text( _("Insert bibliographic framework parameter") );
1727
                    $("#paramLabel").val( _("Framework") );
1743
                    $("#paramLabel").val( _("Framework") );
1728
                    $("#param_category").val("biblio_framework");
1744
                    $("#param_category").val("biblio_framework");
1745
                    $("#runtime_param_options").show();
1729
                    break;
1746
                    break;
1730
                case "insertDate":
1747
                case "insertDate":
1731
                    modalTitle.text( _("Insert date parameter") );
1748
                    modalTitle.text( _("Insert date parameter") );
Lines 1736-1766 Link Here
1736
                    modalTitle.text( _("Insert item types parameter") );
1753
                    modalTitle.text( _("Insert item types parameter") );
1737
                    $("#paramLabel").val( _("Item type") );
1754
                    $("#paramLabel").val( _("Item type") );
1738
                    $("#param_category").val("itemtypes");
1755
                    $("#param_category").val("itemtypes");
1756
                    $("#runtime_param_options").show();
1739
                    break;
1757
                    break;
1740
                case "insertBranches":
1758
                case "insertBranches":
1741
                    modalTitle.text( _("Insert libraries parameter") );
1759
                    modalTitle.text( _("Insert libraries parameter") );
1742
                    $("#paramLabel").val( _("Library") );
1760
                    $("#paramLabel").val( _("Library") );
1743
                    $("#param_category").val("branches");
1761
                    $("#param_category").val("branches");
1762
                    $("#runtime_param_options").show();
1744
                    break;
1763
                    break;
1745
                case "insertCategorycode":
1764
                case "insertCategorycode":
1746
                    modalTitle.text( _("Insert patron category parameter") );
1765
                    modalTitle.text( _("Insert patron category parameter") );
1747
                    $("#paramLabel").val( _("Patron category") );
1766
                    $("#paramLabel").val( _("Patron category") );
1748
                    $("#param_category").val("categorycode");
1767
                    $("#param_category").val("categorycode");
1768
                    $("#runtime_param_options").show();
1749
                    break;
1769
                    break;
1750
                case "insertCashregister":
1770
                case "insertCashregister":
1751
                    modalTitle.text( _("Insert cash register parameter") );
1771
                    modalTitle.text( _("Insert cash register parameter") );
1752
                    $("#paramLabel").val( _("Cash register") );
1772
                    $("#paramLabel").val( _("Cash register") );
1753
                    $("#param_category").val("cash_registers");
1773
                    $("#param_category").val("cash_registers");
1774
                    $("#runtime_param_options").show();
1754
                    break;
1775
                    break;
1755
                case "insertDebittypes":
1776
                case "insertDebittypes":
1756
                    modalTitle.text( _("Insert debit type parameter") );
1777
                    modalTitle.text( _("Insert debit type parameter") );
1757
                    $("#paramLabel").val( _("Debit type") );
1778
                    $("#paramLabel").val( _("Debit type") );
1758
                    $("#param_category").val("debit_types");
1779
                    $("#param_category").val("debit_types");
1780
                    $("#runtime_param_options").show();
1759
                    break;
1781
                    break;
1760
                case "insertCredittypes":
1782
                case "insertCredittypes":
1761
                    modalTitle.text( _("Insert credit type parameter") );
1783
                    modalTitle.text( _("Insert credit type parameter") );
1762
                    $("#paramLabel").val( _("Credit type") );
1784
                    $("#paramLabel").val( _("Credit type") );
1763
                    $("#param_category").val("credit_types");
1785
                    $("#param_category").val("credit_types");
1786
                    $("#runtime_param_options").show();
1764
                    break;
1787
                    break;
1765
                case "insertList":
1788
                case "insertList":
1766
                    modalTitle.text( _("Insert list parameter") );
1789
                    modalTitle.text( _("Insert list parameter") );
Lines 2165-2170 Link Here
2165
                $("#runtime_parameters").on("hide.bs.modal", function(){
2188
                $("#runtime_parameters").on("hide.bs.modal", function(){
2166
                    $("#send_runtime_parameter")[0].reset();
2189
                    $("#send_runtime_parameter")[0].reset();
2167
                    $("#authorised_value_category").val("").hide();
2190
                    $("#authorised_value_category").val("").hide();
2191
                    $("#runtime_param_options").val("").hide();
2168
                    $("label[for='authorised_value']").removeClass("required");
2192
                    $("label[for='authorised_value']").removeClass("required");
2169
                    $("#authorised_value").prop("required", false ).removeAttr("required").removeClass("required");
2193
                    $("#authorised_value").prop("required", false ).removeAttr("required").removeClass("required");
2170
                });
2194
                });
Lines 2175-2180 Link Here
2175
                    var paramLabel = $("#paramLabel").val();
2199
                    var paramLabel = $("#paramLabel").val();
2176
                    var param_category = $("#param_category").val();
2200
                    var param_category = $("#param_category").val();
2177
                    var categoryLabel = $("#authorised_value").val();
2201
                    var categoryLabel = $("#authorised_value").val();
2202
                    var param_option = $('#runtime_param_options input[name="param_option"]:checked').val();
2178
                    // Get CodeMirror environment variables
2203
                    // Get CodeMirror environment variables
2179
                    var selection = editor.getSelection();
2204
                    var selection = editor.getSelection();
2180
                    var doc = editor.getDoc();
2205
                    var doc = editor.getDoc();
Lines 2192-2197 Link Here
2192
                    } else if( param_category ){
2217
                    } else if( param_category ){
2193
                        text += param_category;
2218
                        text += param_category;
2194
                    }
2219
                    }
2220
                    if( param_option ){
2221
                        text += param_option;
2222
                    }
2195
                    if( text != "" ){
2223
                    if( text != "" ){
2196
                        text = " <<" + text + ">> ";
2224
                        text = " <<" + text + ">> ";
2197
                        if( selection.length > 0){
2225
                        if( selection.length > 0){
2198
- 

Return to bug 35856