Letters / alert system, continuing...
[koha.git] / koha-tmpl / intranet-tmpl / default / en / parameters / stopwords.tmpl
1 <!-- TMPL_INCLUDE NAME="parameters-top.inc" -->
2 <div id="mainbloc">
3         <!-- TMPL_IF NAME="add_form" -->
4                 <script language="javascript" type="text/javascript">
5                         function _(s) { return s } // dummy function for gettext
6                         /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
7                         function isNotNull(f,noalert) {
8                                         if (f.value.length ==0) {
9                                                 return false;
10                                         }
11                                         return true;
12                         }
13                         /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
14                         function toUC(f) {
15                                 var x=f.value.toUpperCase();
16                                 f.value=x;
17                                 return true;
18                         }
19                         /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
20                         function isNum(v,maybenull) {
21                         var n = new Number(v.value);
22                         if (isNaN(n)) {
23                                         return false;
24                                         }
25                         if (maybenull==0 && v.value=='') {
26                                         return false;
27                         }
28                         return true;
29                         }
30                         /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
31                         function isDate(f) {
32                                         var t = Date.parse(f.value);
33                                         if (isNaN(t)) {
34                                                         return false;
35                                         }
36                         }
37                         /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
38                         function Check(f) {
39                                         var ok=1;
40                                         var _alertString="";
41                                         var alertString2;
42                                         if (f.word.value.length==0) {
43                                                         _alertString += "\n- " + _("word missing");
44                                         }
45                                         if (_alertString.length==0) {
46                                                         document.Aform.submit();
47                                         } else {
48                                                         alertString2  = _("Form not submitted because of the following problem(s)");
49                                                         alertString2 += "\n------------------------------------------------------------------------------------\n";
50                                                         alertString2 += _alertString;
51                                                         alert(alertString2);
52                                         }
53                         }
54                         </script>
55         
56                         <!-- TMPL_IF NAME="searchfield" -->
57                                         <h1>Modify word</h1>
58                         <!-- TMPL_ELSE -->
59                                         <h1>Add word</h1>
60                         <!-- /TMPL_IF -->
61                         <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
62                         <input type="hidden" name="op" value="add_validate">
63                         <!-- TMPL_IF NAME="searchfield" -->
64                                 <p>
65                                         <label>Word</label>
66                                         <label>
67                                                 <input type="hidden" name="word" value="<!-- TMPL_VAR NAME="searchfield" -->"><!-- TMPL_VAR NAME="searchfield" -->
68                                         </label>
69                                 </p>
70                         <!-- TMPL_ELSE -->
71                                 <p>
72                                         <label>Word</label>
73                                         <input type="text" name="word" size="80" maxlength="250" onblur="toUC(this)">
74                                 </p>
75                         <!-- /TMPL_IF -->
76                                         <p>
77                                                 <td><input type="button" value="OK" onclick="Check(this.form)" class="button"></td>
78                                         </p>
79                         </form>
80         <!-- /TMPL_IF -->
81         
82         <!-- TMPL_IF NAME="add_validate" -->
83                         Data recorded
84                         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
85                         <input type="submit" value="OK">
86                         </form>
87         <!-- /TMPL_IF -->
88         
89         <!-- TMPL_IF NAME="delete_confirm" -->
90                 <p>CONFIRM DELETION of <!-- TMPL_VAR NAME="searchfield" --></p>
91                 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
92                         <input type="hidden" name="op" value="delete_confirmed">
93                         <input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->">
94                         <input type="submit" value="YES" class="button">
95                 </form>
96                 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
97                         <input type="submit" value="NO" class="button">
98                 </form>
99         <!-- /TMPL_IF -->
100         
101         <!-- TMPL_IF NAME="delete_confirmed" -->
102                         Data deleted
103                         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
104                                         <input type="submit" value="OK" class="button">
105                         </form>
106         <!-- /TMPL_IF -->
107         
108         <!-- TMPL_IF NAME="else" -->
109                 <h1 class="parameters">Stop words admin</h1>
110                 <b>NOTE : if you change something in this table, ask your administrator to run misc/rebuildnonmarc.pl script.</b>
111                         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
112                                         <input type="text" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->">
113                                         <input type="submit" name="ok" value="OK" class="button">
114                         </form>
115         
116                         <!-- TMPL_IF NAME="searchfield" -->
117                                         You searched for <b><!-- TMPL_VAR NAME="searchfield" --></b>
118                         <!-- /TMPL_IF -->
119         
120                         <table class="small">
121                                 <tr>
122                                         <th>Word</th>
123                                         <th> </th>
124                                 </tr>
125                                 <!-- TMPL_LOOP NAME="loop" -->
126                                         <tr bgcolor="<!-- TMPL_VAR NAME="toggle" -->">
127                                                 <td><!-- TMPL_VAR NAME="word" --></td>
128                                                 <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&amp;searchfield=<!-- TMPL_VAR NAME="word" -->" class="button">Delete</a></td>
129                                         </tr>
130                                 <!-- /TMPL_LOOP -->
131                         </table>
132                         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
133                                 <input type="hidden" name="op" value="add_form">
134                                 <!-- TMPL_IF NAME="offsetgtzero" -->
135                                                 <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="prevpage" -->" class="button">&lt;&lt; Prev</a>
136                                 <!-- /TMPL_IF -->
137                                 <!-- TMPL_IF NAME="ltcount" -->
138                                         <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="nextpage" -->" class="button">Next &gt;&gt;</a>
139                                 <!-- /TMPL_iF -->
140                                 <input type="submit" class="button" value="Add Stop word" alt="Add Stop word">
141                         </form>
142         <!-- /TMPL_IF -->
143 </div>
144
145 <!-- TMPL_INCLUDE NAME="parameters-bottom.inc" -->