From 54e0667b23466043de2ddd73b0b0e37f9632ea06 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 10 Aug 2011 11:16:42 -0400 Subject: [PATCH] Fix for Bug 6695 - Layout of patron category add/edit form slightly broken 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 Signed-off-by: Ian Walls Signed-off-by: Chris Cormack --- .../prog/en/modules/admin/categorie.tt | 30 ++++++++++++------- 1 file 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 c2e5062c7a..6f3489d2e1 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 %] -- 2.39.5