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

(-)a/admin/auth_tag_structure.pl (-5 / +1 lines)
Lines 111-128 if ($op eq 'add_form') { Link Here
111
            -id=>'authorised_value',
111
            -id=>'authorised_value',
112
            -values=> \@authorised_values,
112
            -values=> \@authorised_values,
113
            -size=>1,
113
            -size=>1,
114
            -tabindex=>'',
115
            -multiple=>0,
114
            -multiple=>0,
116
            -default => $data->{'authorised_value'},
115
            -default => $data->{'authorised_value'},
117
            );
116
            );
118
117
119
    if ($searchfield) {
118
    if ($searchfield) {
120
        $template->param(action => "Modify tag",
119
        $template->param('searchfield' => $searchfield);
121
                                searchfield => "<input type=\"hidden\" name=\"tagfield\" value=\"$searchfield\" />$searchfield");
122
        $template->param('heading_modify_tag_p' => 1);
120
        $template->param('heading_modify_tag_p' => 1);
123
    } else {
121
    } else {
124
        $template->param(action => "Add tag",
125
                                searchfield => "<input type=\"text\" name=\"tagfield\" size=\"5\" maxlength=\"3\" />");
126
        $template->param('heading_add_tag_p' => 1);
122
        $template->param('heading_add_tag_p' => 1);
127
    }
123
    }
128
    $template->param('use_heading_flags_p' => 1);
124
    $template->param('use_heading_flags_p' => 1);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt (-44 / +18 lines)
Lines 19-61 Link Here
19
        "sPaginationType": "four_button"
19
        "sPaginationType": "four_button"
20
    }));
20
    }));
21
 });
21
 });
22
22
//]]>
23
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
24
    function isNotNull(f,noalert) {
25
        if (f.value.length ==0) {
26
return false;
27
        }
28
        return true;
29
    }
30
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
31
    function isNum(v,maybenull) {
32
    var n = new Number(v.value);
33
    if (isNaN(n)) {
34
        return false;
35
        }
36
    if (maybenull==0 && v.value=='') {
37
        return false;
38
    }
39
    return true;
40
    }
41
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
42
    function Check(f) {
43
        var ok=1;
44
        var _alertString="";
45
        var alertString2;
46
        if (f.tagfield.value.length==0) {
47
            _alertString += "\n- " + _("tag number missing");
48
        }
49
        if (_alertString.length==0) {
50
            document.Aform.submit();
51
        } else {
52
            alertString2  = _("Form not submitted because of the following problem(s)");
53
            alertString2 += "\n------------------------------------------------------------------------------------\n";
54
            alertString2 += _alertString;
55
            alert(alertString2);
56
        }
57
    }
58
    //]]>
59
</script>
23
</script>
60
</head>
24
</head>
61
<body id="admin_auth_tag_structure" class="admin">
25
<body id="admin_auth_tag_structure" class="admin">
Lines 112-128 return false; Link Here
112
[% IF ( add_form ) %]
76
[% IF ( add_form ) %]
113
77
114
    <h2>
78
    <h2>
115
    [% IF ( use_heading_flags_p ) %]
116
    [% IF ( heading_modify_tag_p ) %]Modify tag[% END %]
79
    [% IF ( heading_modify_tag_p ) %]Modify tag[% END %]
117
    [% IF ( heading_add_tag_p ) %]New tag[% END %]
80
    [% IF ( heading_add_tag_p ) %]New tag[% END %]
118
    [% ELSE %][% action %][% END %]
119
    </h2>
81
    </h2>
120
    <form action="[% script_name %]" name="Aform" method="post">
82
    <form action="[% script_name %]" name="Aform" method="post" class="validated">
121
        <input type="hidden" name="op" value="add_validate" />
83
        <input type="hidden" name="op" value="add_validate" />
122
        [% IF ( heading_modify_tag_p ) %]<input type="hidden" name="modif" value="1" />[% END %]
84
        [% IF ( heading_modify_tag_p ) %]<input type="hidden" name="modif" value="1" />[% END %]
123
        <input type="hidden" name="authtypecode" value="[% authtypecode %]" />
85
        <input type="hidden" name="authtypecode" value="[% authtypecode %]" />
124
        <fieldset class="rows"><ol>
86
        <fieldset class="rows">
125
        <li><span class="label">Tag: </span>[% searchfield %]</li>
87
            <ol>
88
                [% IF ( heading_modify_tag_p ) %]
89
                    <li>
90
                        <span class="label">Tag: </span>
91
                        <input type="hidden" name="tagfield" value="[% searchfield %]" />
92
                        [% searchfield %]
93
                    </li>
94
                [% ELSE %]
95
                    <li><label for="tagfield" class="required">Tag: </label><input type="text" id="tagfield" name="tagfield" size="5" maxlength="3" required="required" class="required" /></li>
96
                [% END %]
97
126
        <li><label for="liblibrarian">Text for librarians: </label><input type="text" name="liblibrarian" id="liblibrarian" value="[% liblibrarian |html %]" size="40" maxlength="100" /></li>
98
        <li><label for="liblibrarian">Text for librarians: </label><input type="text" name="liblibrarian" id="liblibrarian" value="[% liblibrarian |html %]" size="40" maxlength="100" /></li>
127
        <li><label for="libopac">Text for opac: </label><input type="text" name="libopac" id="libopac" value="[% libopac |html %]" size="40" maxlength="100" /></li>
99
        <li><label for="libopac">Text for opac: </label><input type="text" name="libopac" id="libopac" value="[% libopac |html %]" size="40" maxlength="100" /></li>
128
        <li><label for="repeatable">Repeatable: </label>
100
        <li><label for="repeatable">Repeatable: </label>
Lines 141-147 return false; Link Here
141
            </li>
113
            </li>
142
        <li><label for="authorised_value">Authorized value: </label>[% authorised_value %] (if you select a value here, the indicators will be limited to the authorized value list)</li>
114
        <li><label for="authorised_value">Authorized value: </label>[% authorised_value %] (if you select a value here, the indicators will be limited to the authorized value list)</li>
143
</ol></fieldset>
115
</ol></fieldset>
144
        <p><input type="button" value="Submit" class="button" onclick="Check(this.form)" /></p>
116
        <fieldset class="action">
117
            <input type="submit" value="Submit" />
118
            <a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode %]" class="cancel">Cancel</a>
119
        </fieldset>
145
    </form>
120
    </form>
146
[% END %]
121
[% END %]
147
122
148
- 

Return to bug 11767