[% USE Koha %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Administration › System preferences</title>
[% INCLUDE 'doc-head-close.inc' %]
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
-[% INCLUDE 'datatables.inc' %]
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/preferences.css" />
-[% IF ( bidi ) %]
- <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/right-to-left.css" />
-[% END %]
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
-<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/multiple-select/jquery.multiple.select.js"></script>
<link rel="stylesheet" type="text/css" href="[% interface %]/lib/jquery/plugins/multiple-select/multiple-select.css" />
-<script type="text/javascript">
-//<![CDATA[
- [% UNLESS ( searchfield ) %]$(document).ready(function(){
- $('#toolbar').fixFloat();
- });[% END %]
-
- $(document).ready(function(){
- $("select[multiple='multiple']").multipleSelect( {
- placeholder: _("Please select ..."),
- selectAllText: _("Select all"),
- allSelected: _("All selected"),
- countSelected: _("# of % selected"),
- noMatchesFound: _("No matches found")
- } );
- $(".force_reload").on("click",function(e){
- e.preventDefault();
- window.location.reload(true);
- });
- });
- // This is here because of its dependence on template variables, everything else should go in js/pages/preferences.js - jpw
- var to_highlight = "[% searchfield |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') |html %]";
- var search_jumped = [% IF ( search_jumped ) %]true[% ELSE %]false[% END %];
- var MSG_NOTHING_TO_SAVE = _("Nothing to save");
- var MSG_SAVING = _("Saving...");
- var MSG_SAVED_PREFERENCE = _("Saved preference %s");
- var MSG_MODIFIED = _("modified");
- var MSG_MADE_CHANGES = _("You have made changes to system preferences.");
- var MSG_CLICK_TO_EXPAND = _("Click to expand this section");
- var MSG_CLICK_TO_COLLAPSE = _("Click to collapse this section");
- var MSG_INTERNAL_SERVER_ERROR = _( "Internal Server Error, please reload the page" );
- var MSG_SESSION_TIMED_OUT = _( "You need to log in again, your session has timed out" );
- var MSG_DATA_NOT_SAVED = _( "Error; your data might not have been saved" );
- var MSG_LOADING = _( "Loading..." );
-
-//]]>
-</script>
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/humanmsg.css" />
-<script src="[% interface %]/lib/jquery/plugins/humanmsg.js" type="text/javascript"></script>
-<script src="[% interface %]/[% theme %]/js/ajax.js" type="text/javascript"></script>
-<script src="[% interface %]/[% theme %]/js/pages/preferences.js" type="text/javascript"></script>
-[%# Add WYSIWYG editor for htmlarea system preferences %]
-[% INCLUDE 'wysiwyg-systempreferences.inc' %]
</head>
<body id="admin_preferences" class="admin">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'prefs-menu.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ [% INCLUDE 'datatables.inc' %]
+ <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
+ <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/multiple-select/jquery.multiple.select.js"></script>
+ <script type="text/javascript">
+ [% UNLESS ( searchfield ) %]$(document).ready(function(){
+ $('#toolbar').fixFloat();
+ });[% END %]
+
+ $(document).ready(function(){
+ $("select[multiple='multiple']").multipleSelect( {
+ placeholder: _("Please select ..."),
+ selectAllText: _("Select all"),
+ allSelected: _("All selected"),
+ countSelected: _("# of % selected"),
+ noMatchesFound: _("No matches found")
+ } );
+ $(".force_reload").on("click",function(e){
+ e.preventDefault();
+ window.location.reload(true);
+ });
+ });
+ // This is here because of its dependence on template variables, everything else should go in js/pages/preferences.js - jpw
+ var to_highlight = "[% searchfield |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') |html %]";
+ var search_jumped = [% IF ( search_jumped ) %]true[% ELSE %]false[% END %];
+ var MSG_NOTHING_TO_SAVE = _("Nothing to save");
+ var MSG_SAVING = _("Saving...");
+ var MSG_SAVED_PREFERENCE = _("Saved preference %s");
+ var MSG_MODIFIED = _("modified");
+ var MSG_MADE_CHANGES = _("You have made changes to system preferences.");
+ var MSG_CLICK_TO_EXPAND = _("Click to expand this section");
+ var MSG_CLICK_TO_COLLAPSE = _("Click to collapse this section");
+ var MSG_INTERNAL_SERVER_ERROR = _( "Internal Server Error, please reload the page" );
+ var MSG_SESSION_TIMED_OUT = _( "You need to log in again, your session has timed out" );
+ var MSG_DATA_NOT_SAVED = _( "Error; your data might not have been saved" );
+ var MSG_LOADING = _( "Loading..." );
+ </script>
+ <script src="[% interface %]/lib/jquery/plugins/humanmsg.js" type="text/javascript"></script>
+ <script src="[% interface %]/[% theme %]/js/ajax.js" type="text/javascript"></script>
+ <script src="[% interface %]/[% theme %]/js/pages/preferences.js" type="text/javascript"></script>
+ [%# Add WYSIWYG editor for htmlarea system preferences %]
+ [% INCLUDE 'wysiwyg-systempreferences.inc' %]
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]
[% USE Koha %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Administration › [% IF ( add_form ) %] System preferences › [% IF ( modify ) %]Modify system preference '[% searchfield %]'[% ELSE %]Add a system preference[% END %][% END %][% IF ( add_validate ) %] System preferences › Data added[% END %]
[% IF ( delete_confirm ) %] System preferences › [% searchfield %] › Confirm deletion of parameter '[% searchfield %]'[% END %][% IF ( delete_confirmed ) %] System preferences › Parameter deleted[% END %][% IF ( else ) %]System preferences[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
-[%# Add WYSIWYG editor for htmlarea system preferences %]
-[% INCLUDE 'wysiwyg-systempreferences.inc' %]
-[% IF ( else ) %]
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
-[% INCLUDE 'datatables.inc' %]
-<script type="text/javascript">
- //<![CDATA[
- $(document).ready(function() {
- [% IF ( loop ) %]$("#sysprefst").dataTable($.extend(true, {}, dataTablesDefaults, {
- "sDom": '<"top pager"ilf>t',
- "aoColumnDefs": [
- { "aTargets": [ -1, -2, -3 ], "bSortable": false }
- ],
- "bPaginate": false
- }));[% END %]
- });
-</script>
-[% END %]
-<script type="text/javascript">
-//<![CDATA[
-[% IF ( add_form ) %]
- $(document).ready(function() {
- $('.variabletype').css({ color: "#0000CC", cursor: "pointer" });
- $('.variabletype').click(function() {
- $('#preftype').attr("value",$(this).attr("id"));
- });
- });
-[% END %]
- // FIXME: many of these js functions appear unused
- function isNotNull(f,noalert) {
- if (f.value.length ==0) {
- return false;
- }
- return true;
- }
- //
- function isNum(v,maybenull) {
- var n = new Number(v.value);
- if (isNaN(n)) {
- return false;
- }
- if (maybenull==0 && v.value=='') {
- return false;
- }
- return true;
- }
- //
- function Check(f) {
- var ok=1;
- var _alertString="";
- var alertString2;
- if (f.variable.value.length==0) {
- _alertString += "\n- " + _("variable missing");
- }
- if (f.value.value.length==0) {
- _alertString += "\n- " + _("value missing");
- }
- if (_alertString.length==0) {
- document.Aform.submit();
- } else {
- alertString2 = _("Form not submitted because of the following problem(s)");
- alertString2 += "\n------------------------------------------------------------------------------------\n";
- alertString2 += _alertString;
- alert(alertString2);
- }
- }
- $( function() {
- $( '#sysprefst .expand-textarea' ).show().click( function () {
- $( this ).hide().nextAll( 'textarea, input[type=submit]' ).show( 'slow' );
-
- return false;
- } ).nextAll( 'textarea, input[type=submit]' ).hide();
- } );
-
- //]]>
-</script>
</head>
+
<body id="admin_systempreferences" class="admin">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'prefs-admin-search.inc' %]
[% INCLUDE 'prefs-menu.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ [%# Add WYSIWYG editor for htmlarea system preferences %]
+ [% INCLUDE 'wysiwyg-systempreferences.inc' %]
+ [% IF ( else ) %]
+ [% INCLUDE 'datatables.inc' %]
+ <script type="text/javascript">
+ $(document).ready(function() {
+ [% IF ( loop ) %]$("#sysprefst").dataTable($.extend(true, {}, dataTablesDefaults, {
+ "sDom": '<"top pager"ilf>t',
+ "aoColumnDefs": [
+ { "aTargets": [ -1, -2, -3 ], "bSortable": false }
+ ],
+ "bPaginate": false
+ }));[% END %]
+ });
+ </script>
+ [% END %]
+ <script type="text/javascript">
+ [% IF ( add_form ) %]
+ $(document).ready(function() {
+ $('.variabletype').css({ color: "#0000CC", cursor: "pointer" });
+ $('.variabletype').click(function() {
+ $('#preftype').attr("value",$(this).attr("id"));
+ });
+ });
+ [% END %]
+ // FIXME: many of these js functions appear unused
+ function isNotNull(f,noalert) {
+ if (f.value.length ==0) {
+ return false;
+ }
+ return true;
+ }
+
+ function isNum(v,maybenull) {
+ var n = new Number(v.value);
+ if (isNaN(n)) {
+ return false;
+ }
+ if (maybenull==0 && v.value=='') {
+ return false;
+ }
+ return true;
+ }
+
+ function Check(f) {
+ var ok=1;
+ var _alertString="";
+ var alertString2;
+ if (f.variable.value.length==0) {
+ _alertString += "\n- " + _("variable missing");
+ }
+ if (f.value.value.length==0) {
+ _alertString += "\n- " + _("value missing");
+ }
+ if (_alertString.length==0) {
+ document.Aform.submit();
+ } else {
+ alertString2 = _("Form not submitted because of the following problem(s)");
+ alertString2 += "\n------------------------------------------------------------------------------------\n";
+ alertString2 += _alertString;
+ alert(alertString2);
+ }
+ }
+ $( function() {
+ $( '#sysprefst .expand-textarea' ).show().click( function () {
+ $( this ).hide().nextAll( 'textarea, input[type=submit]' ).show( 'slow' );
+
+ return false;
+ } ).nextAll( 'textarea, input[type=submit]' ).hide();
+ });
+ </script>
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]