Moving inline script blocks to <head> where possible
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / biblio_framework.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; System Administration: <!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME="frameworkcode" -->Modify framework text<!-- TMPL_ELSE -->Add framework<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- TMPL_IF NAME="delete_confirm" -->Delete Framework for <!-- TMPL_VAR NAME="frameworktext" --> (<!-- TMPL_VAR NAME="frameworkcode" -->)?<!-- /TMPL_IF --><!-- TMPL_IF NAME="else" -->Biblio Framework<!-- /TMPL_IF --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <script type="text/javascript">
5 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
6 function isNotNull(f,noalert) {
7     if (f.value.length ==0) {
8         return false;
9     }
10     return true;
11 }
12 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
13 function toUC(f) {
14     var x=f.value.toUpperCase();
15     f.value=x;
16     return true;
17 }
18 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
19 function isNum(v,maybenull) {
20 var n = new Number(v.value);
21 if (isNaN(n)) {
22     return false;
23     }
24 if (maybenull==0 && v.value=='') {
25     return false;
26 }
27 return true;
28 }
29 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
30 function isDate(f) {
31     var t = Date.parse(f.value);
32     if (isNaN(t)) {
33         return false;
34     }
35 }
36 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
37 function Check(f) {
38     var ok=1;
39     var _alertString="";
40     var alertString2;
41     if (f.frameworkcode.value.length==0) {
42         _alertString += "\n- " + _("Framework code missing");
43     }
44     if (!(isNotNull(window.document.Aform.frameworktext,1))) {
45         _alertString += "\n- " + _("Description missing");
46     }
47     if (_alertString.length==0) {
48         document.Aform.submit();
49     } else {
50         alertString2  = _("Form not submitted because of the following problem(s)");
51         alertString2 += "\n------------------------------------------------------------------------------------\n";
52         alertString2 += _alertString;
53         alert(alertString2);
54     }
55 }
56 </script>
57 </head>
58 <body>
59 <!-- TMPL_INCLUDE NAME="header.inc" -->
60
61 <!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
62
63
64
65 <div id="doc3" class="yui-t2">
66    
67    <div id="bd">
68         <div id="yui-main">
69         <div class="yui-b"><div class="yui-g">
70
71 <!-- TMPL_IF NAME="add_form" -->
72     <h1><!-- TMPL_IF NAME="frameworkcode" -->Modify framework text<!-- TMPL_ELSE -->Add framework<!-- /TMPL_IF --></h1>
73     <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
74         <input type="hidden" name="op" value="add_validate" />
75         <input type="hidden" name="checked" value="0" />
76         <!-- TMPL_IF NAME="frameworkcode" -->
77             <p><label for="frameworkcode">Framework Code</label><input type="hidden" id="frameworkcode" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /><!-- TMPL_VAR NAME="frameworkcode" --></p>
78         <!-- TMPL_ELSE -->
79             <p><label for="frameworkcode">Framework Code</label><input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" onblur="toUC(this)" /></p>
80         <!-- /TMPL_IF -->
81         <p><label for="description">Description</label>
82         <input type="text" name="frameworktext" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="frameworktext" ESCAPE="HTML" -->" /></p>
83         <p>     <input type="button" value="Submit" class="submit" onclick="Check(this.form)" /></p>
84     </form>
85 <!-- /TMPL_IF -->
86
87 <!-- TMPL_IF NAME="delete_confirm" -->
88 <h3>Delete ramework for <!-- TMPL_VAR NAME="frameworktext" --> (<!-- TMPL_VAR NAME="frameworkcode" -->)?</h3>
89     <!-- TMPL_IF NAME="total" -->
90         <div class="error">This framework is used <!-- TMPL_VAR NAME="total" --> times
91     <!-- /TMPL_IF -->
92     <p>
93         <form class="inline" 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, Delete this Framework!" />
94         </form>
95         <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="No, Do not Delete!" /></form>
96     </p>
97 <!-- /TMPL_IF -->
98
99 <!-- TMPL_IF NAME="else" -->
100 <h1>Biblio framework</h1>
101 <p>Framework name, then go to MARC biblio to set MARC editor parameters</p>
102 <table>
103     <tr>
104         <th>Code</th>
105         <th>Description</th>
106         <th>&nbsp;</th>
107         <th>Edit</th>
108         <th>Delete</th>
109     </tr>
110     <tr>
111         <td>&nbsp;</td>
112         <td>Default framework</td>
113         <td><a href="marctagstructure.pl?frameworkcode=<!-- TMPL_VAR NAME="frameworkcode" -->">MARC structure</td>
114         <td>&nbsp;</td>
115         <td>&nbsp;</td>
116     </tr>
117     
118     <!-- TMPL_LOOP NAME="loop" -->
119         <tr>
120             <td><!-- TMPL_VAR name="frameworkcode" --></td>
121             <td><!-- TMPL_VAR name="frameworktext" --></td>
122             <td><a href="marctagstructure.pl?frameworkcode=<!-- TMPL_VAR name="frameworkcode" -->" >MARC structure</a></td>
123             <td><a href="<!-- TMPL_VAR name="script_name" -->?op=add_form&amp;frameworkcode=<!-- TMPL_VAR name="frameworkcode" escape="HTML" -->">Edit</a></td>
124             <td><a href="<!-- TMPL_VAR name="script_name" -->?op=delete_confirm&amp;frameworkcode=<!-- TMPL_VAR name="frameworkcode" escape="HTML" -->">Delete</a></td>
125         </tr>
126     <!-- /TMPL_LOOP -->
127 </table>
128 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
129     <input type="hidden" name="op" value="add_form" />
130     <input type="submit" value="Add framework" />
131     <td><!-- TMPL_IF NAME="previous" --><a href="<!-- TMPL_VAR NAME="previous" -->">&lt;&lt; Previous</a><!-- /TMPL_IF --></td>
132     <td><!-- TMPL_IF NAME="next" --><a href="<!-- TMPL_VAR NAME="next" -->">Next &gt;&gt;</a><!-- /TMPL_IF --></td>
133 </form>
134
135 <!-- /TMPL_IF -->
136 </div>
137 </div>
138 </div>
139
140 <!-- TMPL_INCLUDE NAME="mainmenu.inc" -->
141 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->