Bug 16047 [Follow-up] Software error on deleting a group with no category code
This follow-up take the original patch a little further, making category name required on the entry form as well. Without a category name there is no label in the interface when selecting a category. That doens't make any sense. Also changed on the group entry form: - Added "required" attribute to labels on required fields. - Changed "Update" submit button label to "Submit." - Added a "Cancel" link. - Added the "validated" class to the form so that our built-in validation script will process it (not strictly necessary but makes the validation appearance more consistent). Followed test plan, form displays and behaves as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com (cherry picked from commitdf127ebad8) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> (cherry picked from commitc514e1fee2) Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
This commit is contained in:
parent
67acc63bd1
commit
7eb3fc2738
|
|
@ -308,7 +308,7 @@ tinyMCE.init({
|
|||
|
||||
[% IF ( editcategory ) %]
|
||||
<h3>[% IF ( categorycode ) %]Edit group [% categorycode %][% ELSE %]Add group[% END %]</h3>
|
||||
<form action="[% action %]" name="Aform" method="post">
|
||||
<form action="[% action %]" name="Aform" method="post" class="validated">
|
||||
<input type="hidden" name="op" value="addcategory_validate" />
|
||||
[% IF ( categorycode ) %]
|
||||
<input type="hidden" name="add" value="0">
|
||||
|
|
@ -323,14 +323,15 @@ tinyMCE.init({
|
|||
<input type="hidden" name="categorycode" id="categorycode" value="[% categorycode |html %]" />
|
||||
[% categorycode %]
|
||||
[% ELSE %]
|
||||
<label for="categorycode">Category code:</label>
|
||||
<label for="categorycode" class="required">Category code:</label>
|
||||
<input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" class="required" required="required" />
|
||||
<span class="required">Required</span>
|
||||
[% END %]
|
||||
</li>
|
||||
<li>
|
||||
<label for="categoryname">Name: </label>
|
||||
<input type="text" name="categoryname" id="categoryname" size="32" maxlength="32" value="[% categoryname |html %]" />
|
||||
<label for="categoryname" class="required">Name: </label>
|
||||
<input type="text" name="categoryname" id="categoryname" size="32" maxlength="32" value="[% categoryname |html %]" class="required" required="required"/>
|
||||
<span class="required">Required</span>
|
||||
</li>
|
||||
<li>
|
||||
<label for="codedescription">Description: </label>
|
||||
|
|
@ -358,7 +359,10 @@ tinyMCE.init({
|
|||
</li>
|
||||
</ol>
|
||||
</fieldset>
|
||||
<fieldset class="action"><input type="submit" value="Update" /></fieldset>
|
||||
<fieldset class="action">
|
||||
<input type="submit" value="Submit" />
|
||||
<a href="/cgi-bin/koha/admin/branches.pl" class="cancel">Cancel</a>
|
||||
</fieldset>
|
||||
</form>
|
||||
[% END %]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue