Bug 15925 [Revised] Correct some markup issues with patron lists pages

This patch makes some markup changes to the patron lists interface in
order to make them more consistent with other areas of Koha.

Change to look for when testing:

Tools -> Patron lists:

- Wrap "New patron list" button in standard <div id="toolbar">
- Place toolbar above page heading.

Tools -> Patron lists -> New patron list:

- Use built-in form validation for required fields
- Clarify page title and breadcrumbs on list add and edit

Validation errors have been corrected on all three templates, including
removal of an extra </div>.

Revision: I was wrong about the frequency of use of "Modify." There's no
clear-cut reason to replace it with "Edit" so I have undone that change.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  Works as expected. No regression. Better texts. Consistent validation.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
This commit is contained in:
Owen Leonard 2016-02-26 09:17:52 -05:00 committed by Brendan A Gallagher
parent 3f70b4660b
commit f8647c1aae
3 changed files with 31 additions and 30 deletions

View file

@ -1,28 +1,24 @@
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Tools &rsaquo; Patron lists &rsaquo; New list</title>
<title>Koha &rsaquo; Tools &rsaquo; Patron lists &rsaquo;
[% IF list.patron_list_id %]
Modify patron list
[% ELSE %]
New patron list
[% END %]
</title>
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript">
//<![CDATA[
function CheckForm() {
if ( !$("#list-name").val() ) {
alert( _("Name is a required field!") );
return false;
}
return true;
}
//]]>
</script>
</head>
<body id="patlist_add_modify" class="pat patlist">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; <a href="lists.pl">Patron lists</a> &rsaquo; Add / modify list</div>
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; <a href="lists.pl">Patron lists</a> &rsaquo;
[% IF list.patron_list_id %]
Modify patron list
[% ELSE %]
New patron list
[% END %]
</div>
<div class="yui-t7">
@ -35,7 +31,7 @@ function CheckForm() {
[% END %]
</h1>
<form method="post" onsubmit="return CheckForm()">
<form method="post" action="/cgi-bin/koha/patron_lists/add-modify.pl" class="validated">
<fieldset class="rows">
<legend>
@ -48,8 +44,8 @@ function CheckForm() {
<ol>
<li>
<label class="required" for="name">Name:</label>
<input id="list-name" name="name" type="text" value="[% list.name %]" />
<label class="required" for="list-name">Name:</label>
<input id="list-name" name="name" type="text" class="required" required="required" value="[% list.name %]" />
</li>
<li>
@ -59,10 +55,12 @@ function CheckForm() {
</fieldset>
<input type="hidden" name="patron_list_id" value="[% list.patron_list_id %]" />
<input type="submit" class="btn" value="Save" />
<a href="lists.pl" class="cancel">Cancel</a>
<fieldset class="action">
<input type="hidden" name="patron_list_id" value="[% list.patron_list_id %]" />
<input type="submit" value="Save" />
<a href="lists.pl" class="cancel">Cancel</a>
</fieldset>
</form>
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]

View file

@ -152,5 +152,5 @@ $(document).ready(function() {
<input type="submit" value="Remove selected patrons" />
</form>
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]

View file

@ -32,12 +32,15 @@
<div class="yui-t7">
<div class="yui-main">
<h1>Your patron lists</h1>
<div class="btn-group">
<a class="btn btn-small" href="add-modify.pl"><i class="fa fa-plus"></i> New patron list</a>
<div id="toolbar" class="btn-toolbar">
<div class="btn-group">
<a class="btn btn-small" href="add-modify.pl"><i class="fa fa-plus"></i> New patron list</a>
</div>
</div>
<h1>Your patron lists</h1>
[% IF ( lists ) %]
<table id="patron-lists-table">
@ -75,5 +78,5 @@
<div class="dialog message">There are no patron lists.</div>
[% END %]
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]