Koha/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tmpl

271 lines
14 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Administration &rsaquo; <!-- TMPL_IF name="add_form" --> System Preferences &rsaquo; <!-- TMPL_IF NAME="modify" -->Modify system preference '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->Add a system preference<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- TMPL_IF name="add_validate" --> System Preferences &rsaquo; Data Added<!-- /TMPL_IF -->
<!-- TMPL_IF name="delete_confirm" --> System Preferences &rsaquo; <!-- TMPL_VAR NAME="searchfield" --> &rsaquo; Confirm Deletion of Parameter '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirmed" --> System Preferences &rsaquo; Parameter Deleted<!-- /TMPL_IF --><!-- TMPL_IF name="else" -->System Preferences<!-- /TMPL_IF --></title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<script type="text/javascript">
//<![CDATA[
<!-- TMPL_IF NAME="add_form" -->
$(document).ready(function() {
$('.variabletype').css({ color: "#0000CC", cursor: "pointer" });
$('.variabletype').click(function() {
$('#preftype').attr("value",$(this).attr("id"));
});
});
<!-- /TMPL_IF -->
//
function isNotNull(f,noalert) {
if (f.value.length ==0) {
return false;
}
return true;
}
//
function toUC(f) {
var x=f.value.toUpperCase();
f.value=x;
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 isDate(f) {
var t = Date.parse(f.value);
if (isNaN(t)) {
return false;
}
}
//
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);
}
}
//]]>
</script>
</head>
<body>
<!-- TMPL_INCLUDE NAME="header.inc" -->
<!-- TMPL_INCLUDE NAME="sysprefs-admin-search.inc" -->
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; <!-- TMPL_IF name="add_form" --> <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> &rsaquo; <!-- TMPL_IF NAME="modify" -->Modify system preference '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->Add a system preference<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- TMPL_IF name="add_validate" --> <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> &rsaquo; Data Added<!-- /TMPL_IF -->
<!-- TMPL_IF name="delete_confirm" --> <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> &rsaquo; <a href="/cgi-bin/koha/admin/systempreferences.pl?op=add_form&searchfield=<!-- TMPL_VAR NAME="searchfield" -->"><!-- TMPL_VAR NAME="searchfield" --></a> &rsaquo; Confirm Deletion of Parameter '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirmed" --> <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> &rsaquo; Parameter Deleted<!-- /TMPL_IF --><!-- TMPL_IF name="else" -->System Preferences<!-- /TMPL_IF --></div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<!-- TMPL_IF NAME="add_form" -->
<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
<fieldset class="rows"><legend><!-- TMPL_IF NAME="modify" -->
Modify a system preference
<!-- TMPL_ELSE -->
Add a system preference
<!-- /TMPL_IF --></legend><ol>
<li><label for="explanation">Explanation: </label><input type="text" name="explanation" id="explanation" size="60" value="<!-- TMPL_VAR NAME="explanation" escape="HTML" -->" /><input type="hidden" name="op" value="add_validate" /></li>
<li><!-- TMPL_IF NAME="searchfield" --><span class="label">Variable: </span><!-- TMPL_VAR NAME="searchfield" --><input type="hidden" name="variable" value="<!-- TMPL_VAR NAME="searchfield" -->" />
<!-- TMPL_ELSE --><label for="variable">Variable: </label><input type="text" name="variable" id="variable" size="60" /><!-- /TMPL_IF --></li>
<li><label for="value">Value: </label><!-- TMPL_IF NAME="type-free" -->
<textarea id="value" name="value" cols="<!-- TMPL_VAR NAME="fieldlength" -->"><!-- TMPL_VAR NAME="value" escape="HTML" --></textarea>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="type-textarea" -->
<textarea name="value" id="value" rows="<!--TMPL_VAR NAME="rows" -->" cols="<!-- TMPL_VAR NAME="cols" -->"><!-- TMPL_VAR NAME="value" escape="HTML" --></textarea>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="type-choice" -->
<select name="value" id="value">
<!-- TMPL_LOOP NAME="options" -->
<!-- TMPL_IF NAME="selected" -->
<option value="<!-- TMPL_VAR NAME="option" -->" selected="selected">
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR NAME="option" -->">
<!-- /TMPL_IF --><!-- TMPL_VAR NAME="option" --></option>
<!-- /TMPL_LOOP -->
</select>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="type-langselector" -->
<!-- TMPL_IF NAME="languages_loop" -->
<table>
<!-- TMPL_LOOP NAME="languages_loop" -->
<tr><td>
<!-- TMPL_IF NAME="plural" -->
<!-- TMPL_IF NAME="native_description" --><!-- TMPL_VAR NAME="native_description" --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="rfc4646_subtag" --><!-- /TMPL_IF -->
<!-- TMPL_LOOP NAME="sublanguages_loop" --><table><tr><td>
<!-- TMPL_IF NAME="sublanguage_current" -->
<label for="<!-- TMPL_VAR NAME="rfc4646_subtag" -->"><!-- TMPL_VAR NAME="native_description" --> <!-- TMPL_VAR NAME="script_description" --> <!-- TMPL_VAR NAME="region_description" --> <!-- TMPL_VAR NAME="variant_description" -->(<!-- TMPL_VAR NAME="rfc4646_subtag" -->)
<input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="value" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" <!-- TMPL_IF NAME="enabled" -->checked="checked"<!-- /TMPL_IF --> /> </label>
<!-- TMPL_ELSE -->
<label for="<!-- TMPL_VAR NAME="rfc4646_subtag" -->"><!-- TMPL_VAR NAME="native_description" --> <!-- TMPL_VAR NAME="script_description" --> <!-- TMPL_VAR NAME="region_description" --> <!-- TMPL_VAR NAME="variant_description" -->(<!-- TMPL_VAR NAME="rfc4646_subtag" -->)
<input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="value" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" <!-- TMPL_IF NAME="enabled" -->checked="checked"<!-- /TMPL_IF --> /> </label>
<!-- /TMPL_IF --></td></tr></table>
<!-- /TMPL_LOOP -->
<!-- TMPL_ELSE -->
<!-- TMPL_IF NAME="current" -->
<label for="<!-- TMPL_VAR NAME="rfc4646_subtag" -->"><!-- TMPL_VAR NAME="native_description" -->(<!-- TMPL_VAR NAME="rfc4646_subtag" -->)
<input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="value" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" <!-- TMPL_IF NAME="group_enabled" -->checked="checked"<!-- /TMPL_IF --> /> </label>
<!-- TMPL_ELSE -->
<label for="<!-- TMPL_VAR NAME="rfc4646_subtag" -->"><!-- TMPL_VAR NAME="native_description" -->(<!-- TMPL_VAR NAME="rfc4646_subtag" -->)
<input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="value" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" <!-- TMPL_IF NAME="group_enabled" -->checked="checked"<!-- /TMPL_IF --> /> </label>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
</td></tr>
<!-- /TMPL_LOOP -->
</table>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="type-yesno" -->
<!-- TMPL_IF NAME="value-yes" -->
<input type="radio" name="value" id="value" value="1" checked="checked" /><!-- TMPL_ELSE --><input type="radio" name="value" id="value" value="1" /><!-- /TMPL_IF --> <label for="value" class="yesno">ON</label>
<!-- TMPL_IF NAME="value-no" -->
<input type="radio" name="value" id="value-no" value="0" checked="checked" /><!-- TMPL_ELSE --><input type="radio" name="value" id="value-no" value="0" /><!-- /TMPL_IF --> <label for="value-no" class="yesno">OFF</label><!-- /TMPL_IF -->
</li>
</ol></fieldset>
<fieldset class="action"><input type="submit" value="Save" />
<!-- TMPL_IF name="return_tab" -->
<a class="cancel" href="/cgi-bin/koha/admin/systempreferences.pl?tab=<!-- TMPL_VAR name="return_tab" -->">Cancel</a>
<!-- TMPL_ELSE -->
<a class="cancel" href="/cgi-bin/koha/admin/systempreferences.pl">Cancel</a>
<!-- /TMPL_IF -->
</fieldset>
<fieldset class="brief">
<legend>Koha internal</legend>
<div class="hint">Note: you should have no reasons to modify the following default values</div>
<ol>
<li><label for="preftype">Variable type:</label>
<div class="hint"> (<span class="variabletype" id="Choice">Choice</span>, <span class="variabletype" id="YesNo">YesNo</span>, <span class="variabletype" id="Integer">Integer</span>, <span class="variabletype" id="Textarea">Textarea</span>, <span class="variabletype" id="Float">Float</span>, <span class="variabletype" id="Themes">Themes</span>, <span class="variabletype" id="Languages">Languages</span>, or <span class="variabletype" id="ClassSources">ClassSources</span>)</div>
<input type="text" name="preftype" id="preftype" value="<!--TMPL_VAR NAME="preftype" -->" size="40" maxlength="40" /></li>
<li><label for="prefoptions">Variable options:</label>
<div class="hint">(a choice list for Choice (separated by |) or cols|rows for Texarea)</div>
<input type="text" name="prefoptions" id="prefoptions" value="<!-- TMPL_VAR NAME="prefoptions" -->" size="60" maxlength="80" /></li>
</ol>
</fieldset>
</form>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="add_validate" -->
<h3>Data recorded</h3>
<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
<input type="submit" value="OK" />
</form>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="delete_confirm" -->
<table>
<caption>Confirm Deletion of <!-- TMPL_VAR NAME="searchfield" -->?</caption>
<tr>
<th>Variable Name:</th>
<td><!-- TMPL_VAR NAME="searchfield" --></td>
</tr>
<tr><th>Value: </th><td>
<!-- TMPL_VAR NAME="Tvalue" -->
</td></tr></table>
<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
<input type="hidden" name="op" value="delete_confirmed" />
<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
<input type="hidden" name="Tvalue" value="<!-- TMPL_VAR NAME="Tvalue" -->" />
<input type="submit" value="Yes, Delete" /></form>
<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="No, Do not Delete" /></form>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="delete_confirmed" -->
<h3>Data deleted</h3>
<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
<input type="submit" value="Back to System Preferences" />
</form>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="else" -->
<div id="toolbar">
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
<script type="text/javascript">
//<![CDATA[
// prepare DOM for YUI Toolbar
$(document).ready(function() {
yuiToolbar();
<!-- TMPL_IF NAME="loop" -->$("#sysprefst").tablesorter({
sortList: [[0,0]],
headers: { 1: {sorter:false},2: { sorter: false },3: { sorter: false },4: { sorter: false }}
});<!-- /TMPL_IF -->
});
// YUI Toolbar Functions
function yuiToolbar() {
new YAHOO.widget.Button("newstopword");
} //]]>
</script>
<ul class="toolbar">
<li><a id="newstopword" href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form">New Preference</a></li>
</ul></div>
<h1>System preferences admin</h1>
<h2><!-- TMPL_VAR name="tab" --> preferences</h2>
<!-- TMPL_VAR NAME="searchfield" -->
<table width="80%" id="sysprefst">
<thead> <tr>
<th>Preference</th>
<th>Explanation</th>
<th>Value</th>
<th>Edit</th>
<th>Delete</th>
</tr></thead>
<tbody><!-- TMPL_LOOP NAME="loop" -->
<!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
<td><strong><a href="<!-- TMPL_VAR NAME="edit" -->"><!-- TMPL_VAR NAME="variable" --></a></strong></td><td> <!-- TMPL_VAR NAME="explanation" ESCAPE="HTML" --></td>
<td><!-- TMPL_IF NAME="yesno" -->
<!-- TMPL_IF NAME="yes" -->ON<!-- TMPL_ELSE -->OFF<!-- /TMPL_IF -->
<!-- TMPL_ELSE --><!-- TMPL_VAR NAME="value" --><!-- /TMPL_IF --></td>
<td><a href="<!-- TMPL_VAR NAME="edit" -->">Edit </a></td>
<td><a href="<!-- TMPL_VAR NAME="delete" -->">Delete</a></td>
</tr>
<!-- /TMPL_LOOP --></tbody>
</table>
<!-- /TMPL_IF -->
</div>
</div>
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="sysprefs-menu.inc" -->
</div>
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->