Lines 1504-1509
Link Here
|
1504 |
</select> |
1504 |
</select> |
1505 |
<div class="hint">Select which authorized value category the user will choose from.</div> |
1505 |
<div class="hint">Select which authorized value category the user will choose from.</div> |
1506 |
</div> |
1506 |
</div> |
|
|
1507 |
<div id="runtime_param_options" style="display:none"> |
1508 |
<label>Parameter options:</label> |
1509 |
<div class="form-check-inline"> |
1510 |
<input type="radio" class="form-check-input" id="single_param_check" name="param_option" value="" checked> |
1511 |
<label class="form-check-label" for="single_param_check">Single parameter only</label> |
1512 |
<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> |
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 |
<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> |
1516 |
<input type="radio" class="form-check-input" id="multi_select_check" name="param_option" value=":in"> |
1517 |
<label class="form-check-label" for="multi_select_check">Allow multiple selections</label> |
1518 |
<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> |
1519 |
</div> |
1520 |
</div> |
1507 |
</div> <!-- /.modal-body --> |
1521 |
</div> <!-- /.modal-body --> |
1508 |
<div class="modal-footer"> |
1522 |
<div class="modal-footer"> |
1509 |
<button type="submit" id="sendParam" class="btn btn-default approve">Insert parameter</button> |
1523 |
<button type="submit" id="sendParam" class="btn btn-default approve">Insert parameter</button> |
Lines 1691-1706
Link Here
|
1691 |
$("#authorised_value_category").show(); |
1705 |
$("#authorised_value_category").show(); |
1692 |
$("label[for='authorised_value']").addClass("required"); |
1706 |
$("label[for='authorised_value']").addClass("required"); |
1693 |
$("#authorised_value").prop("required", true ).attr("required", "required").addClass("required"); |
1707 |
$("#authorised_value").prop("required", true ).attr("required", "required").addClass("required"); |
|
|
1708 |
$("#runtime_param_options").show(); |
1694 |
break; |
1709 |
break; |
1695 |
case "insertCnSource": |
1710 |
case "insertCnSource": |
1696 |
modalTitle.text( _("Insert classification source parameter") ); |
1711 |
modalTitle.text( _("Insert classification source parameter") ); |
1697 |
$("#paramLabel").val( _("Source of classification or shelving scheme") ); |
1712 |
$("#paramLabel").val( _("Source of classification or shelving scheme") ); |
1698 |
$("#param_category").val("cn_source"); |
1713 |
$("#param_category").val("cn_source"); |
|
|
1714 |
$("#runtime_param_options").show(); |
1699 |
break; |
1715 |
break; |
1700 |
case "insertFramework": |
1716 |
case "insertFramework": |
1701 |
modalTitle.text( _("Insert bibliographic framework parameter") ); |
1717 |
modalTitle.text( _("Insert bibliographic framework parameter") ); |
1702 |
$("#paramLabel").val( _("Framework") ); |
1718 |
$("#paramLabel").val( _("Framework") ); |
1703 |
$("#param_category").val("biblio_framework"); |
1719 |
$("#param_category").val("biblio_framework"); |
|
|
1720 |
$("#runtime_param_options").show(); |
1704 |
break; |
1721 |
break; |
1705 |
case "insertDate": |
1722 |
case "insertDate": |
1706 |
modalTitle.text( _("Insert date parameter") ); |
1723 |
modalTitle.text( _("Insert date parameter") ); |
Lines 1711-1741
Link Here
|
1711 |
modalTitle.text( _("Insert item types parameter") ); |
1728 |
modalTitle.text( _("Insert item types parameter") ); |
1712 |
$("#paramLabel").val( _("Item type") ); |
1729 |
$("#paramLabel").val( _("Item type") ); |
1713 |
$("#param_category").val("itemtypes"); |
1730 |
$("#param_category").val("itemtypes"); |
|
|
1731 |
$("#runtime_param_options").show(); |
1714 |
break; |
1732 |
break; |
1715 |
case "insertBranches": |
1733 |
case "insertBranches": |
1716 |
modalTitle.text( _("Insert libraries parameter") ); |
1734 |
modalTitle.text( _("Insert libraries parameter") ); |
1717 |
$("#paramLabel").val( _("Library") ); |
1735 |
$("#paramLabel").val( _("Library") ); |
1718 |
$("#param_category").val("branches"); |
1736 |
$("#param_category").val("branches"); |
|
|
1737 |
$("#runtime_param_options").show(); |
1719 |
break; |
1738 |
break; |
1720 |
case "insertCategorycode": |
1739 |
case "insertCategorycode": |
1721 |
modalTitle.text( _("Insert patron category parameter") ); |
1740 |
modalTitle.text( _("Insert patron category parameter") ); |
1722 |
$("#paramLabel").val( _("Patron category") ); |
1741 |
$("#paramLabel").val( _("Patron category") ); |
1723 |
$("#param_category").val("categorycode"); |
1742 |
$("#param_category").val("categorycode"); |
|
|
1743 |
$("#runtime_param_options").show(); |
1724 |
break; |
1744 |
break; |
1725 |
case "insertCashregister": |
1745 |
case "insertCashregister": |
1726 |
modalTitle.text( _("Insert cash register parameter") ); |
1746 |
modalTitle.text( _("Insert cash register parameter") ); |
1727 |
$("#paramLabel").val( _("Cash register") ); |
1747 |
$("#paramLabel").val( _("Cash register") ); |
1728 |
$("#param_category").val("cash_registers"); |
1748 |
$("#param_category").val("cash_registers"); |
|
|
1749 |
$("#runtime_param_options").show(); |
1729 |
break; |
1750 |
break; |
1730 |
case "insertDebittypes": |
1751 |
case "insertDebittypes": |
1731 |
modalTitle.text( _("Insert debit type parameter") ); |
1752 |
modalTitle.text( _("Insert debit type parameter") ); |
1732 |
$("#paramLabel").val( _("Debit type") ); |
1753 |
$("#paramLabel").val( _("Debit type") ); |
1733 |
$("#param_category").val("debit_types"); |
1754 |
$("#param_category").val("debit_types"); |
|
|
1755 |
$("#runtime_param_options").show(); |
1734 |
break; |
1756 |
break; |
1735 |
case "insertCredittypes": |
1757 |
case "insertCredittypes": |
1736 |
modalTitle.text( _("Insert credit type parameter") ); |
1758 |
modalTitle.text( _("Insert credit type parameter") ); |
1737 |
$("#paramLabel").val( _("Credit type") ); |
1759 |
$("#paramLabel").val( _("Credit type") ); |
1738 |
$("#param_category").val("credit_types"); |
1760 |
$("#param_category").val("credit_types"); |
|
|
1761 |
$("#runtime_param_options").show(); |
1739 |
break; |
1762 |
break; |
1740 |
case "insertList": |
1763 |
case "insertList": |
1741 |
modalTitle.text( _("Insert list parameter") ); |
1764 |
modalTitle.text( _("Insert list parameter") ); |
Lines 2150-2155
Link Here
|
2150 |
$("#runtime_parameters").on("hide.bs.modal", function(){ |
2173 |
$("#runtime_parameters").on("hide.bs.modal", function(){ |
2151 |
$("#send_runtime_parameter")[0].reset(); |
2174 |
$("#send_runtime_parameter")[0].reset(); |
2152 |
$("#authorised_value_category").val("").hide(); |
2175 |
$("#authorised_value_category").val("").hide(); |
|
|
2176 |
$("#runtime_param_options").val("").hide(); |
2153 |
$("label[for='authorised_value']").removeClass("required"); |
2177 |
$("label[for='authorised_value']").removeClass("required"); |
2154 |
$("#authorised_value").prop("required", false ).removeAttr("required").removeClass("required"); |
2178 |
$("#authorised_value").prop("required", false ).removeAttr("required").removeClass("required"); |
2155 |
}); |
2179 |
}); |
Lines 2160-2165
Link Here
|
2160 |
var paramLabel = $("#paramLabel").val(); |
2184 |
var paramLabel = $("#paramLabel").val(); |
2161 |
var param_category = $("#param_category").val(); |
2185 |
var param_category = $("#param_category").val(); |
2162 |
var categoryLabel = $("#authorised_value").val(); |
2186 |
var categoryLabel = $("#authorised_value").val(); |
|
|
2187 |
var param_option = $('#runtime_param_options input[name="param_option"]:checked').val(); |
2163 |
// Get CodeMirror environment variables |
2188 |
// Get CodeMirror environment variables |
2164 |
var selection = editor.getSelection(); |
2189 |
var selection = editor.getSelection(); |
2165 |
var doc = editor.getDoc(); |
2190 |
var doc = editor.getDoc(); |
Lines 2177-2182
Link Here
|
2177 |
} else if( param_category ){ |
2202 |
} else if( param_category ){ |
2178 |
text += param_category; |
2203 |
text += param_category; |
2179 |
} |
2204 |
} |
|
|
2205 |
if( param_option ){ |
2206 |
text += param_option; |
2207 |
} |
2180 |
if( text != "" ){ |
2208 |
if( text != "" ){ |
2181 |
text = " <<" + text + ">> "; |
2209 |
text = " <<" + text + ">> "; |
2182 |
if( selection.length > 0){ |
2210 |
if( selection.length > 0){ |
2183 |
- |
|
|