From 61aa758c3ce322cbcb93889267cb6cc906214c8c Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 10 Aug 2011 11:16:42 -0400 Subject: [PATCH] [SIGNED-OFF] Fix for Bug 6695 - Layout of patron category add/edit form slightly broken Content-Type: text/plain; charset="utf-8" The markup for the fields for enrollment period "in months" and "until date" was non-standard I think because the two fields are supposed to be visually and functionally linked (having the same purpose and being mutually exclusive). This patch changes the markup so that the two fields share a fieldset having "choose one" as the legend. The "hint" is now hidden unless it is triggered by the javascript validation on submit. I wanted to trigger the validation of the two fields onblur instead of just onsubmit, but found that the datepicker widget doesn't consistently trigger a change or a blur event on that field. Signed-off-by: Katrin Fischer - Layout problems are fixed - Layout is more clear about choosing either 'In months' or 'Until date' - Clear error message shows when you enter values in both fields --- .../prog/en/modules/admin/categorie.tt | 30 ++++++++++++------- 1 files changed, 19 insertions(+), 11 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt index c2e5062..6f3489d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt @@ -87,6 +87,7 @@ } //]]> + [% INCLUDE 'header.inc' %] @@ -122,12 +123,16 @@
  • Category code[% categorycode |html %]
  • [% ELSE %] -
  •  
  • +
  • [% END %] -
  •  
  • -
  •   - months
    -   +
  • +
  • +
    + Choose one +
      +
    1. + months
    2. +
    3. Show Calendar -
      Cannot have "months" and "until date" at the same time
      +
      Cannot have "months" and "until date" at the same time
    4. -
    5.   years
    6. -
    7.   years
    8. +
    +
    +
  • +
  • years
  • +
  • years
  • -
  •   [% IF ( overduenoticerequired ) %] @@ -152,7 +160,7 @@ [% END %]
  • -
  •   [% IF ( hidelostitems ) %] @@ -162,7 +170,7 @@ [% END %]
  • -
  •   [% IF ( type_n ) %][% ELSE %][% END %] [% IF ( type_A ) %][% ELSE %][% END %] [% IF ( type_C ) %][% ELSE %][% END %] -- 1.7.4.1