141 lines
5.8 KiB
Cheetah
141 lines
5.8 KiB
Cheetah
<!-- TMPL_INCLUDE NAME="parameters-top.inc" -->
|
|
|
|
<script language="javascript" type="text/javascript">
|
|
function _(s) { return s } // dummy function for gettext
|
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
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.frameworkcode.value.length==0) {
|
|
_alertString += "\n- " + _("Framework code missing");
|
|
}
|
|
if (!(isNotNull(window.document.Aform.frameworktext,1))) {
|
|
_alertString += "\n- " + _("Description 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>
|
|
<div id="mainbloc">
|
|
<!-- TMPL_IF NAME="add_form" -->
|
|
<!-- TMPL_IF NAME="frameworkcode" -->
|
|
<h1>Modify framework text</h1>
|
|
<!-- TMPL_ELSE -->
|
|
<h1>Add framework</h1>
|
|
<!-- /TMPL_IF -->
|
|
<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
|
|
<input type="hidden" name="op" value="add_validate">
|
|
<input type="hidden" name="checked" value="0">
|
|
<!-- TMPL_IF NAME="frameworkcode" -->
|
|
<p><label class="label100">Framework type<label><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->"><!-- TMPL_VAR NAME="frameworkcode" --></p>
|
|
<!-- TMPL_ELSE -->
|
|
<p><label class="label100">Framework type<label><input type="text" name="frameworkcode" size="6" maxlength="4" onblur="toUC(this)"></p>
|
|
<!-- /TMPL_IF -->
|
|
<p>
|
|
<label class="label100">Description</label>
|
|
<input type="text" name="frameworktext" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="frameworktext" escape=HTML -->">
|
|
</p>
|
|
<p>
|
|
<input type="button" value="OK"class="button parameters" onclick="Check(this.form)">
|
|
</p>
|
|
</form>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="delete_confirm" -->
|
|
<div id="bloc25">
|
|
<h2 class="parameters">Framework for <!-- TMPL_VAR NAME="frameworktext" --> (<!-- TMPL_VAR NAME="frameworkcode" -->)</h2>
|
|
<!-- TMPL_IF NAME="total" -->
|
|
<p>
|
|
<b>This record is used <!-- TMPL_VAR NAME="total" --> times</b>
|
|
</p>
|
|
<!-- /TMPL_IF -->
|
|
<p>CONFIRM DELETION</p>
|
|
<p>
|
|
<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
|
|
<input type="hidden" name="op" value="delete_confirmed">
|
|
<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->">
|
|
<input type="submit" value="YES" class="button parameters">
|
|
</form>
|
|
<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
|
|
<input type="submit" value="NO" class="button parameters">
|
|
</form>
|
|
</p>
|
|
</div>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="else" -->
|
|
<h1>Biblio framework</h1>
|
|
<p>framework name, then go to MARC biblio to set MARC editor parameters</p>
|
|
<table>
|
|
<tr>
|
|
<th class="parameters">Code</th>
|
|
<th class="parameters">Description</th>
|
|
<th class="parameters"> </th>
|
|
<th class="parameters">Edit</th>
|
|
<th class="parameters">Delete</th>
|
|
</tr>
|
|
<tr>
|
|
<td> </td>
|
|
<td>Default framework</td>
|
|
<td><a href="marctagstructure.pl?frameworkcode=<!-- TMPL_VAR NAME="frameworkcode" -->" class="button parameters">MARC structure</td>
|
|
<td> </td>
|
|
<td> </td>
|
|
</tr>
|
|
|
|
<!-- TMPL_LOOP NAME="loop" -->
|
|
<tr>
|
|
<td><!-- TMPL_VAR name="frameworkcode" --></td>
|
|
<td><!-- TMPL_VAR name="frameworktext" --></td>
|
|
<td><a href="marctagstructure.pl?frameworkcode=<!-- TMPL_VAR name="frameworkcode" -->" class="button parameters" >MARC structure</a></td>
|
|
<td><a href="<!-- TMPL_VAR name="script_name" -->?op=add_form&frameworkcode=<!-- TMPL_VAR name="frameworkcode" escape="HTML" -->"><img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/fileopen.png" width=32 hspace=0 vspace=0 border=0></a></td>
|
|
<td><a href="<!-- TMPL_VAR name="script_name" -->?op=delete_confirm&frameworkcode=<!-- TMPL_VAR name="frameworkcode" escape="HTML" -->"><img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/edittrash.png" width=32 hspace=0 vspace=0 border=0></a></td>
|
|
</tr>
|
|
<!-- /TMPL_LOOP -->
|
|
</table>
|
|
<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
|
|
<input type="hidden" name="op" value="add_form">
|
|
<input type="submit" class="button" value="Add framework" title="Add framework" alt="Add framework" >
|
|
<td width="33%"><!-- TMPL_IF NAME="previous" --><a href="<!-- TMPL_VAR NAME="previous" -->"><input type="image" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/1leftarrow.png" title="previous" alt="previous" border="0"></a><!-- /TMPL_IF --></td>
|
|
<td width="33%"><!-- TMPL_IF NAME="next" --><a href="<!-- TMPL_VAR NAME="next" -->"><input type="image" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/1rightarrow.png" title="next" alt="next" border="0"></a><!-- /TMPL_IF --></td>
|
|
</form>
|
|
</div>
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_INCLUDE NAME="parameters-bottom.inc" -->
|