Owen Leonard
63cb08fc8d
Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
306 lines
12 KiB
Cheetah
306 lines
12 KiB
Cheetah
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
|
|
<title>Koha › Tools › Notices<!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF name="modify" --> › Modify notice<!-- TMPL_ELSE --> › Add notice<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- TMPL_IF NAME="add_validate" --> › Notice added<!-- /TMPL_IF --><!-- TMPL_IF NAME="delete_confirm" --> › Confirm Deletion<!-- /TMPL_IF --></title>
|
|
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
|
<!-- TMPL_INCLUDE NAME="yui-toolbars.inc" -->
|
|
<!-- TMPL_IF NAME="add_form" -->
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
|
|
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 (!(isNotNull(window.document.Aform.code))) {
|
|
_alertString += "\n- " + _("Code missing");
|
|
}*/
|
|
/* if (!(isNotNull(window.document.Aform.name))) {
|
|
_alertString += "\n- " + _("Name 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);
|
|
}
|
|
}
|
|
// GPL code coming from PhpMyAdmin
|
|
function insertValueQuery() {
|
|
var myQuery = document.Aform.content;
|
|
var myListBox = document.Aform.SQLfieldname;
|
|
|
|
if(myListBox.options.length > 0) {
|
|
var chaineAj = "";
|
|
var NbSelect = 0;
|
|
for(var i=0; i<myListBox.options.length; i++) {
|
|
if (myListBox.options[i].selected){
|
|
NbSelect++;
|
|
if (NbSelect > 1)
|
|
chaineAj += ", ";
|
|
chaineAj += myListBox.options[i].value;
|
|
}
|
|
}
|
|
|
|
//IE support
|
|
if (document.selection) {
|
|
myQuery.focus();
|
|
sel = document.selection.createRange();
|
|
sel.text = chaineAj;
|
|
document.Aform.insert.focus();
|
|
}
|
|
//MOZILLA/NETSCAPE support
|
|
else if (document.Aform.content.selectionStart || document.Aform.content.selectionStart == "0") {
|
|
var startPos = document.Aform.content.selectionStart;
|
|
var endPos = document.Aform.content.selectionEnd;
|
|
var chaineSql = document.Aform.content.value;
|
|
myQuery.value = chaineSql.substring(0, startPos) +'<<'+ chaineAj+'>>' + chaineSql.substring(endPos, chaineSql.length);
|
|
} else {
|
|
myQuery.value += chaineAj;
|
|
}
|
|
}
|
|
}
|
|
//]]>
|
|
</script>
|
|
<!-- /TMPL_IF -->
|
|
</head>
|
|
<body>
|
|
<!-- TMPL_INCLUDE NAME="header.inc" -->
|
|
<!-- TMPL_INCLUDE NAME="letters-search.inc" -->
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › <!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF name="modify" --><a href="/cgi-bin/koha/tools/letter.pl">Noticess</a> › Modify notice<!-- TMPL_ELSE --> <a href="/cgi-bin/koha/tools/letter.pl">Notices</a> › Add notice<!-- /TMPL_IF --><!-- TMPL_ELSE --><!-- TMPL_IF NAME="add_validate" --> <a href="/cgi-bin/koha/tools/letter.pl">Notices</a> › Notice added<!-- TMPL_ELSE --><!-- TMPL_IF NAME="delete_confirm" --> <a href="/cgi-bin/koha/tools/letter.pl">Notices</a> › Confirm Deletion<!-- TMPL_ELSE -->Notices<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF --></div>
|
|
|
|
<!-- TMPL_IF NAME="add_form" --><div id="doc" class="yui-t7"><!-- TMPL_ELSE --><div id="doc3" class="yui-t2"><!-- /TMPL_IF -->
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
<!-- TMPL_IF NAME="else" -->
|
|
<!-- TMPL_INCLUDE NAME="tools-notices-toolbar.inc" -->
|
|
|
|
<!-- TMPL_IF NAME="search" -->
|
|
<p>You Searched for <b><!-- TMPL_VAR NAME="searchfield" --></b></p>
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="letter" --><table>
|
|
<tr>
|
|
<th>Module</th>
|
|
<th>Code</th>
|
|
<th>Name</th>
|
|
<th> </th>
|
|
<th> </th>
|
|
</tr>
|
|
<!-- TMPL_LOOP NAME="letter" -->
|
|
<tr bgcolor=<!-- TMPL_VAR NAME="toggle" --> >
|
|
<td><!-- TMPL_VAR NAME="module" --></td>
|
|
<td><!-- TMPL_VAR NAME="code" --></td>
|
|
<td><!-- TMPL_VAR NAME="name" --></td>
|
|
<td>
|
|
<a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=<!-- TMPL_VAR name="module" -->&code=<!-- TMPL_VAR NAME="code" -->">Edit</a>
|
|
</td>
|
|
<td>
|
|
<a href="/cgi-bin/koha/tools/letter.pl?op=delete_confirm&module=<!-- TMPL_VAR name="module"-->&code=<!-- TMPL_VAR NAME="code" -->">Delete</a>
|
|
</td>
|
|
</tr>
|
|
<!-- /TMPL_LOOP -->
|
|
</table>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="add_form" -->
|
|
|
|
|
|
<form action="/cgi-bin/koha/tools/letter.pl" name="Aform" method="post">
|
|
<input type="hidden" name="op" value="add_validate" />
|
|
<input type="hidden" name="checked" value="0" />
|
|
<fieldset class="rows">
|
|
<legend><!-- TMPL_IF name="modify" -->Modify letter<!-- TMPL_ELSE -->Add letter<!-- /TMPL_IF --></legend>
|
|
<ol>
|
|
<!-- TMPL_IF NAME="modify" -->
|
|
<li>
|
|
<label for="module">Koha module:</label>
|
|
<select name="module" id="module">
|
|
<!--TMPL_IF Name="catalogue"-->
|
|
<option value="catalogue" selected="selected">Catalogue</option>
|
|
<!--TMPL_ELSE-->
|
|
<option value="catalogue" >Catalogue</option>
|
|
<!--/TMPL_IF-->
|
|
<!--TMPL_IF Name="Serial"-->
|
|
<option value="serial" selected="selected">Serial</option>
|
|
<!--TMPL_ELSE-->
|
|
<option value="serial">Serial</option>
|
|
<!--/TMPL_IF-->
|
|
<!--TMPL_IF Name="claimacquisition"-->
|
|
<option value="claimacquisition" selected="selected">Claim Acquisition</option>
|
|
<!--TMPL_ELSE-->
|
|
<option value="claimacquisition">Claim Acquisition</option>
|
|
<!--/TMPL_IF -->
|
|
<!--TMPL_IF Name="claimissues"-->
|
|
<option value="claimissues" selected="selected">Claim Issues</option>
|
|
<!--TMPL_ELSE-->
|
|
<option value="claimissues">Claim Issues</option>
|
|
<!--/TMPL_IF-->
|
|
<!--TMPL_IF Name="circulation"-->
|
|
<option value="circulation" selected="selected">Circulation</option>
|
|
<!--TMPL_ELSE-->
|
|
<option value="circulation">Circulation</option>
|
|
<!--/TMPL_IF-->
|
|
<!--TMPL_IF Name="members"-->
|
|
<option value="members" selected="selected">Members</option>
|
|
<!--TMPL_ELSE-->
|
|
<option value="members">Members</option>
|
|
<!--/TMPL_IF-->
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<span class="label">Code:</span><input type="hidden" id="code" name="code" value="<!-- TMPL_VAR NAME="code" -->" /><!-- TMPL_VAR NAME="code" -->
|
|
</li>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="adding" -->
|
|
<li>
|
|
<label for="module">Koha module:</label>
|
|
<select name="module" id="module" onchange="javascript:window.location.href = unescape(window.location.pathname)+'?op=add_form&module='+this.value+'&content='+window.document.forms['Aform'].elements['content'].value;">
|
|
<!--TMPL_IF Name="catalogue"-->
|
|
<option value="catalogue" selected="selected">Catalogue</option>
|
|
<!--TMPL_ELSE-->
|
|
<option value="catalogue" >Catalogue</option>
|
|
<!--/TMPL_IF-->
|
|
<!--TMPL_IF Name="serial"-->
|
|
<option value="serial" selected="selected">Serial</option>
|
|
<!--TMPL_ELSE-->
|
|
<option value="serial">Serial</option>
|
|
<!--/TMPL_IF-->
|
|
<!--TMPL_IF Name="claimacquisition"-->
|
|
<option value="claimacquisition" selected="selected">Claim Acquisition</option>
|
|
<!--TMPL_ELSE-->
|
|
<option value="claimacquisition">Claim Acquisition</option>
|
|
<!--/TMPL_IF -->
|
|
<!--TMPL_IF Name="claimissues"-->
|
|
<option value="claimissues" selected="selected">Claim Issues</option>
|
|
<!--TMPL_ELSE-->
|
|
<option value="claimissues">Claim Issues</option>
|
|
<!--/TMPL_IF-->
|
|
<!--TMPL_IF Name="circulation"-->
|
|
<option value="circulation" selected="selected">Circulation</option>
|
|
<!--TMPL_ELSE-->
|
|
<option value="circulation">Circulation</option>
|
|
<!--/TMPL_IF-->
|
|
<!--TMPL_IF Name="members"-->
|
|
<option value="members" selected="selected">Members</option>
|
|
<!--TMPL_ELSE-->
|
|
<option value="members">Members</option>
|
|
<!--/TMPL_IF-->
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<label for="code">Code:</label><input type="text" id="code" name="code" size="20" maxlength="20" />
|
|
</li>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<li>
|
|
<label for="name">Name:</label><input type="text" id="name" name="name" size="60" value="<!-- TMPL_VAR NAME="name" -->" />
|
|
</li>
|
|
<li>
|
|
<label for="title">Message Subject:</label><input type="text" id="title" name="title" size="60" value="<!-- TMPL_VAR NAME="title" -->" />
|
|
</li>
|
|
<li>
|
|
<label for="SQLfieldname">Message Body:</label>
|
|
</li>
|
|
<li>
|
|
<select name="SQLfieldname" id="SQLfieldname" size="9">
|
|
<!-- TMPL_LOOP name="SQLfieldname" -->
|
|
<option value="<!-- TMPL_VAR name="value"-->"><!-- TMPL_VAR name="text"--></option>
|
|
<!-- /TMPL_LOOP -->
|
|
</select>
|
|
<input type="button" name="insert" value=">>" onclick="insertValueQuery()" title="Insert" />
|
|
<textarea name="content" cols="80" rows="15"><!-- TMPL_VAR NAME="content" --></textarea>
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
<p><input type="button" value="Submit" onclick="Check(this.form)" class="button" /></p>
|
|
</form>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="add_validate" -->
|
|
Data recorded
|
|
<form action="<!-- TMPL_VAR NAME="action" -->" method="post">
|
|
<input type="submit" value="OK" />
|
|
</form>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="delete_confirm" -->
|
|
<h3>Delete Notice?</h3>
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
<b>module / Code</b>
|
|
</td>
|
|
<td>
|
|
<b><!-- TMPL_VAR name="module"--> / <!-- TMPL_VAR NAME="code" --></b>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Name</td>
|
|
<td><!-- TMPL_VAR NAME="Name" --></td>
|
|
</tr>
|
|
</table>
|
|
<p><form action="<!-- TMPL_VAR NAME="action" -->" method="post"><input type="hidden" name="op" value="delete_confirmed">
|
|
<input type="hidden" name="code" value="<!-- TMPL_VAR NAME="code" -->" />
|
|
<input type="hidden" name="module" value="<!-- TMPL_VAR NAME="module" -->" />
|
|
<input type="submit" value="YES" />
|
|
</form>
|
|
|
|
<form action="<!-- TMPL_VAR NAME="action" -->" method="post">
|
|
<input type="submit" value="NO" />
|
|
</form>
|
|
</p>
|
|
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="delete_confirmed" -->
|
|
Data deleted
|
|
<form action="<!-- TMPL_VAR NAME="action" -->" method="post">
|
|
<input type="submit" value="OK" />
|
|
</form>
|
|
<!-- /TMPL_IF -->
|
|
|
|
</div>
|
|
</div>
|
|
<!-- TMPL_UNLESS NAME="add_form" --><div class="yui-b">
|
|
<!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
|
|
</div><!-- /TMPL_UNLESS -->
|
|
</div>
|
|
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|