[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/parameters mediatype.tmpl,NONE,1.1

Waylon Robertson genjimoto at users.sourceforge.net
Thu Jun 2 05:56:01 CEST 2005


Update of /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/parameters
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10341

Added Files:
	mediatype.tmpl 
Log Message:
template to edit the mediatype table.

--- NEW FILE ---
<!-- 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.mediatypecode.value.length==0) {
		_alertString += "\n- " + _("mediatypecode missing");
	}
	if (!(isNotNull(window.document.Aform.description,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="itemtype" -->
		<h1 class="parameters">Modify mediatype</h1>
	<!-- TMPL_ELSE -->
		<h1 class="parameters">Add mediatype</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="mediatypecode" -->
				<p><label class="label100">mediatype Code<label><input type="hidden" name="mediatypecode" value="<!-- TMPL_VAR NAME="mediatypecode" -->"><!-- TMPL_VAR NAME="mediatypecode" --></p>
			<!-- TMPL_ELSE -->
				<p><label class="label100">mediatype Code<label><input type="text" name="mediatypecode" size="6" maxlength="4" onblur="toUC(this)"></p>
			<!-- /TMPL_IF -->
			<p>
				<label class="label100">Description</label>
				<input type="text" name="description" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="description" escape=HTML -->">
			</p>
			<p>
				<label class="label100">Itemtypes assigned</label>
                <!-- TMPL_VAR NAME="itemtypes" -->

			</p>

			<p>
				<input type="button" value="OK" class="button" onclick="Check(this.form)">
			</p>
	</form>
<!-- /TMPL_IF -->

<!-- TMPL_IF NAME="delete_confirm" -->
		<p><label>mediatype Code</label><!-- TMPL_VAR NAME="mediatypecode" --></p>
	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
		<input type="hidden" name="op" value="delete_confirmed"><input type="hidden" name="mediatypecode" value="<!-- TMPL_VAR NAME="mediatypecode" -->">
	<p><label>Description</label><!-- TMPL_VAR NAME="description" --></p>
		<p>CONFIRM DELETION</p>
		<p>
			<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>


<!-- /TMPL_IF -->

<!-- TMPL_IF NAME="else" -->
<h1 class="parameters">mediatype Admin</h1>
<table>
	<tr>
		<th class="parameters">Code</th>
		<th class="parameters">Description</th>
        <th class="parameters">Itemtype codes</th>
		<th class="parameters">Edit</th>
		<th class="parameters">Delete</th>
	</tr>
	<!-- TMPL_LOOP NAME="loop" -->
		<tr>
			<td><!-- TMPL_VAR NAME="mediatypecode" --></td>
			<td><!-- TMPL_VAR NAME="description" --></td>
			<td><!-- TMPL_VAR NAME="itemtypecodes" --></td>
			<td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&mediatypecode=<!-- TMPL_VAR NAME="mediatypecode" 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&mediatypecode=<!-- TMPL_VAR NAME="mediatypecode" 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 parameters" value="Add mediatype" title="Add mediatype" alt="Add mediatype" >
	<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" -->





More information about the Koha-cvs mailing list