[Koha-patches] [PATCH] Bug 3132: Reformatting guarantor entry based on C vs. P patron types

Joe Atzberger joe.atzberger at liblime.com
Mon Apr 20 19:45:26 CEST 2009


Do we actually have TMPL variables assigned named "P" and "C"?  This seems
like a bad naming convention to introduce.  Something like patron_catagory_C
or category_class_C would be more conventional and less likely to cause
namespace collision down the road.

--Joe

On Sat, Apr 18, 2009 at 2:42 PM, Owen Leonard <oleonard at myacpl.org> wrote:

> Professional patrons might have Organizations as guarantors, so display the
> guarantor entry form with a single line labelled appropriately. For Child
> patrons display the form fields as before.
> ---
>  .../prog/en/modules/members/memberentrygen.tmpl    |   99
> ++++++++++++--------
>  1 files changed, 60 insertions(+), 39 deletions(-)
>
> diff --git
> a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl
> b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl
> index 71736ed..85d29d5 100644
> --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl
> +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl
> @@ -276,45 +276,66 @@
>     <fieldset class="rows">
>         <legend>Guarantor Information</legend>
>         <ol>
> -        <!-- TMPL_IF NAME="guarantorid" -->
> -        <li id="contact-details">
> -        <!-- TMPL_ELSE -->
> -        <li id="contact-details" style="display: none">
> -        <!-- /TMPL_IF -->
> -            <span class="label">Patron #:</span> <!-- TMPL_IF
> NAME="guarantorid" --> <a
> href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR
> NAME="guarantorid" -->" target="blank"><!-- TMPL_VAR NAME="guarantorid"
> --></a><!-- /TMPL_IF -->
> -        </li>
> -        <li>
> -            <label for="contactname">Surname: </label>
> -            <!-- TMPL_IF NAME="guarantorid" -->
> -            <span><!-- TMPL_VAR NAME="contactname" --></span>
> -            <input name="contactname" id="contactname" type="hidden"
> size="20" value="<!-- TMPL_VAR NAME="contactname" -->" />
> -            <!-- TMPL_ELSE -->
> -            <input name="contactname" id="contactname" type="text"
> size="20" value="<!-- TMPL_VAR NAME="contactname" -->" />
> -            <!-- /TMPL_IF -->
> -        </li>
> -        <li>
> -            <label for="contactfirstname">First name: </label>
> -            <!-- TMPL_IF NAME="guarantorid" -->
> -            <span><!-- TMPL_VAR NAME="contactfirstname" --></span>
> -            <input name="contactfirstname" id="contactfirstname"
> type="hidden" size="20" value="<!-- TMPL_VAR NAME="contactfirstname" -->" />
> -            <!-- TMPL_ELSE -->
> -            <input name="contactfirstname" id="contactfirstname"
> type="text" size="20" value="<!-- TMPL_VAR NAME="contactfirstname" -->" />
> -            <!-- /TMPL_IF -->
> -        </li>
> -        <!-- TMPL_IF name="relshiploop" -->
> -        <li>
> -            <label for="relationship">Relationship: </label>
> -            <select name="relationship" id="relationship" >
> -                <!-- TMPL_LOOP name="relshiploop" -->
> -                <!-- TMPL_IF name="selected" -->
> -                <option value="<!-- TMPL_VAR name="relationship" -->"
> selected="selected" ><!-- TMPL_VAR name="relationship" --></option>
> -                <!-- TMPL_ELSE -->
> -                <option value="<!-- TMPL_VAR name="relationship" -->"><!--
> TMPL_VAR name="relationship" --></option>
> -                <!-- /TMPL_IF -->
> -                <!-- /TMPL_LOOP -->
> -            </select>
> -        </li>
> -        <!-- /TMPL_IF -->
> +<!--TMPL_IF Name="P"-->
> +               <!-- TMPL_IF NAME="guarantorid" -->
> +               <li id="contact-details">
> +               <!-- TMPL_ELSE -->
> +               <li id="contact-details" style="display: none">
> +               <!-- /TMPL_IF -->
> +                   <span class="label">Organization #:</span> <!-- TMPL_IF
> NAME="guarantorid" --> <a
> href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR
> NAME="guarantorid" -->" target="blank"><!-- TMPL_VAR NAME="guarantorid"
> --></a><!-- /TMPL_IF -->
> +               </li>
> +               <li>
> +                   <label for="contactname">Organization name: </label>
> +                   <!-- TMPL_IF NAME="guarantorid" -->
> +                   <span><!-- TMPL_VAR NAME="contactname" --></span>
> +                   <input name="contactname" id="contactname"
> type="hidden" size="20" value="<!-- TMPL_VAR NAME="contactname" -->" />
> +                   <!-- TMPL_ELSE -->
> +                   <input name="contactname" id="contactname" type="text"
> size="20" value="<!-- TMPL_VAR NAME="contactname" -->" />
> +                   <!-- /TMPL_IF -->
> +               </li>
> +<!-- TMPL_ELSE -->
> + <!-- TMPL_IF NAME="C" -->
> + <!-- TMPL_IF NAME="guarantorid" -->
> + <li id="contact-details">
> + <!-- TMPL_ELSE -->
> + <li id="contact-details" style="display: none">
> + <!-- /TMPL_IF -->
> +     <span class="label">Patron #:</span> <!-- TMPL_IF NAME="guarantorid"
> --> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!--
> TMPL_VAR NAME="guarantorid" -->" target="blank"><!-- TMPL_VAR
> NAME="guarantorid" --></a><!-- /TMPL_IF -->
> + </li>
> + <li>
> +     <label for="contactname">Surname: </label>
> +     <!-- TMPL_IF NAME="guarantorid" -->
> +     <span><!-- TMPL_VAR NAME="contactname" --></span>
> +     <input name="contactname" id="contactname" type="hidden" size="20"
> value="<!-- TMPL_VAR NAME="contactname" -->" />
> +     <!-- TMPL_ELSE -->
> +     <input name="contactname" id="contactname" type="text" size="20"
> value="<!-- TMPL_VAR NAME="contactname" -->" />
> +     <!-- /TMPL_IF -->
> + </li>
> + <li>
> +     <label for="contactfirstname">First name: </label>
> +     <!-- TMPL_IF NAME="guarantorid" -->
> +     <span><!-- TMPL_VAR NAME="contactfirstname" --></span>
> +     <input name="contactfirstname" id="contactfirstname" type="hidden"
> size="20" value="<!-- TMPL_VAR NAME="contactfirstname" -->" />
> +     <!-- TMPL_ELSE -->
> +     <input name="contactfirstname" id="contactfirstname" type="text"
> size="20" value="<!-- TMPL_VAR NAME="contactfirstname" -->" />
> +     <!-- /TMPL_IF -->
> + </li>
> + <!-- TMPL_IF name="relshiploop" -->
> + <li>
> +     <label for="relationship">Relationship: </label>
> +     <select name="relationship" id="relationship" >
> +         <!-- TMPL_LOOP name="relshiploop" -->
> +         <!-- TMPL_IF name="selected" -->
> +         <option value="<!-- TMPL_VAR name="relationship" -->"
> selected="selected" ><!-- TMPL_VAR name="relationship" --></option>
> +         <!-- TMPL_ELSE -->
> +         <option value="<!-- TMPL_VAR name="relationship" -->"><!--
> TMPL_VAR name="relationship" --></option>
> +         <!-- /TMPL_IF -->
> +         <!-- /TMPL_LOOP -->
> +     </select>
> + </li>
> + <!-- /TMPL_IF -->
> + <!-- /TMPL_IF -->
> +<!--/TMPL_IF -->
>         <li>
>             <span class="label">&nbsp;</span>
>             <!-- TMPL_IF NAME="guarantorid" -->
> --
> 1.5.6.5
>
> _______________________________________________
> Koha-patches mailing list
> Koha-patches at lists.koha.org
> http://lists.koha.org/mailman/listinfo/koha-patches
>



-- 
Joe Atzberger
LibLime - Open Source Library Solutions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-patches/attachments/20090420/07f7ad81/attachment-0002.htm>


More information about the Koha-patches mailing list