View | Details | Raw Unified | Return to bug 11769
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt (-38 / +3 lines)
Lines 8-47 Link Here
8
</title>
8
</title>
9
[% INCLUDE 'doc-head-close.inc' %]
9
[% INCLUDE 'doc-head-close.inc' %]
10
<script type="text/javascript">
10
<script type="text/javascript">
11
//<![CDATA[
12
13
function isNotNull(f,noalert) {
14
    if (f.value.length ==0) {
15
        return false;
16
    }
17
    return true;
18
}
19
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
20
function Check(f) {
21
    var ok=1;
22
    var _alertString="";
23
    var alertString2;
24
    if (f.frameworkcode.value.length==0) {
25
        _alertString += "\n- " + _("Framework code missing");
26
    }
27
    if (!(isNotNull(window.document.Aform.frameworktext))) {
28
        _alertString += "\n- " + _("Description missing");
29
    }
30
    if (_alertString.length==0) {
31
        document.Aform.submit();
32
    } else {
33
        alertString2  = _("Form not submitted because of the following problem(s)");
34
        alertString2 += "\n------------------------------------------------------------------------------------\n";
35
        alertString2 += _alertString;
36
        alert(alertString2);
37
        return false;
38
    }
39
    return true;
40
}
41
42
//]]>
43
</script>
44
<script type="text/javascript">
45
/* Import/Export from/to spreadsheet */
11
/* Import/Export from/to spreadsheet */
46
12
47
    var importing = false;
13
    var importing = false;
Lines 141-147 function Check(f) { Link Here
141
107
142
[% IF ( add_form ) %]
108
[% IF ( add_form ) %]
143
    <h1>[% IF ( frameworkcode ) %]Modify framework text[% ELSE %]Add framework[% END %]</h1>
109
    <h1>[% IF ( frameworkcode ) %]Modify framework text[% ELSE %]Add framework[% END %]</h1>
144
    <form action="[% script_name %]" name="Aform" method="post" onsubmit="return Check(this);">
110
    <form action="[% script_name %]" name="Aform" method="post" class="validated">
145
        <input type="hidden" name="op" value="add_validate" />
111
        <input type="hidden" name="op" value="add_validate" />
146
    <fieldset class="rows">
112
    <fieldset class="rows">
147
    <ol>
113
    <ol>
Lines 150-159 function Check(f) { Link Here
150
            <input type="hidden" name="modif" value="1" />
116
            <input type="hidden" name="modif" value="1" />
151
        </li>
117
        </li>
152
	[% ELSE %]
118
	[% ELSE %]
153
        <li><label for="frameworkcode">Framework code: </label><input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" onblur="toUC(this)" /></li>
119
        <li><label for="frameworkcode">Framework code: </label><input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" onblur="toUC(this)" required="required" class="required" /></li>
154
	[% END %]
120
	[% END %]
155
        <li><label for="description">Description: </label>
121
        <li><label for="description">Description: </label>
156
        <input type="text" name="frameworktext" id="description" size="40" maxlength="80" value="[% frameworktext |html %]" /></li></ol></fieldset>
122
        <input type="text" name="frameworktext" id="description" size="40" maxlength="80" value="[% frameworktext |html %]" required="required" class="required" /></li></ol></fieldset>
157
        <fieldset class="action">	<input type="submit" value="Submit" class="submit" /></fieldset>
123
        <fieldset class="action">	<input type="submit" value="Submit" class="submit" /></fieldset>
158
    </form>
124
    </form>
159
[% END %]
125
[% END %]
160
- 

Return to bug 11769