Bugzilla – Attachment 14552 Details for
Bug 9383
Bad logic, missing params, and irregular labeling for Members scripts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9383 - Bad logic, missing params, and irregular labeling for Members scripts
0001-Bug-9383-Bad-logic-missing-params-and-irregular-labe.patch (text/plain), 9.07 KB, created by
David Cook
on 2013-01-14 05:57:12 UTC
(
hide
)
Description:
Bug 9383 - Bad logic, missing params, and irregular labeling for Members scripts
Filename:
MIME Type:
Creator:
David Cook
Created:
2013-01-14 05:57:12 UTC
Size:
9.07 KB
patch
obsolete
>From 72e5f6fa2f7e49bc423957846228038f3eb20015 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Mon, 14 Jan 2013 16:37:26 +1100 >Subject: [PATCH] Bug 9383 - Bad logic, missing params, and irregular labeling > for Members scripts >Content-Type: text/plain; charset="utf-8" > >Before Patch: > >1) Category_type not being passed from moremember.pl to applicable templates > >2) Logic in moremembers.pl doesn't work without category_type param. > >However, with the param, it runs category_type conditions one after another (if/else, if/else), rather than nesting them (if/elsif/else), which creates duplicate data for the P category type. > >3) Labels are inconsistent between memberentrygen.pl page and moremember.pl page > >--- > >After Patch: > >1) Category_type is passed to moremember.tt and moremember-brief.tt > >2) Conditions based on category_type are nested, so as to exploit an if/elsif/else structure that prevents incorrect data being printed. > >3) Labels are now consistent between moremember.pl and memberentrygen.pl. >--- > .../prog/en/modules/members/memberentrygen.tt | 18 ++++++++++++---- > .../prog/en/modules/members/moremember-brief.tt | 17 +++++++-------- > .../prog/en/modules/members/moremember.tt | 21 +++++++++---------- > members/moremember.pl | 1 + > 4 files changed, 32 insertions(+), 25 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >index e327d03..5766c12 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -595,7 +595,11 @@ > [% ELSE %] > <label for="phone"> > [% END %] >- Primary phone: </label> >+ [% IF ( I ) %] >+ Organization phone: >+ [% ELSE %] >+ Primary phone: >+ [% END %] </label> > [% IF ( opduplicate ) %] > <input type="text" id="phone" name="phone" value="[% phone %]" onclick="this.value=''" /> > [% ELSE %] >@@ -605,7 +609,7 @@ > > </li> > [% END %] >- [% UNLESS nophonepro %] >+ [% UNLESS nophonepro || I %] > <li> > [% IF ( mandatoryphonepro ) %] > <label for="phonepro" class="required"> >@@ -621,7 +625,7 @@ > [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %] > </li> > [% END %] >- [% UNLESS nomobile %] >+ [% UNLESS nomobile || I || P %] > <li> > [% IF ( mandatorymobile ) %] > <label for="mobile" class="required"> >@@ -644,7 +648,11 @@ > [% ELSE %] > <label for="email"> > [% END %] >- Primary email: </label> >+ [% IF ( I ) %] >+ Organization email: >+ [% ELSE %] >+ Primary email: >+ [% END %] </label> > [% IF ( opduplicate ) %] > <input type="text" id="email" name="email" size="45" value="[% email %]" onclick="this.value=''" /> > [% ELSE %] >@@ -654,7 +662,7 @@ > > </li> > [% END %] >- [% UNLESS noemailpro %] >+ [% UNLESS noemailpro || I %] > <li> > [% IF ( mandatoryemailpro ) %] > <label for="emailpro" class="required"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt >index efe7f20..97a7498 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt >@@ -14,7 +14,7 @@ > <div class="yui-u first"> > <div id="patron-information" style="padding: .5em;"> > >- [% UNLESS ( I ) %][% IF ( othernames ) %]“[% othernames %]”[% END %] >+ [% IF ( othernames ) %]“[% othernames %]”[% END %] > > <p class="address">[% streetnumber %] > [% IF ( roaddetails ) %] >@@ -29,18 +29,17 @@ > <div class="rows"> > <ol> > [% IF ( I ) %] >- [% IF ( phonepro ) %]<li><span class="label">Organization phone: </span>[% phonepro %]</li>[% END %] >- [% IF ( emailpro ) %]<li><span class="label">Organization email: </span>[% emailpro %]</li>[% END %] >+ [% IF ( phone ) %]<li><span class="label">Organization phone: </span>[% phone %]</li>[% END %] >+ [% IF ( email ) %]<li><span class="label">Organization email: </span>[% email %]</li>[% END %] >+ [% ELSIF ( P ) %] >+ [% IF ( phone ) %]<li><span class="label">Primary phone: </span>[% phone %]</li>[% END %] >+ [% IF ( phonepro ) %]<li><span class="label">Secondary phone: </span>[% phonepro %]</li>[% END %] > [% ELSE %] > [% IF ( phone ) %]<li><span class="label">Primary phone: </span>[% phone %]</li>[% END %] >- [% IF ( mobile ) %]<li><span class="label">Secondary phone: </span>[% mobile %]</li>[% END %] >- [% IF ( phonepro ) %]<li><span class="label">Other phone: </span>[% phonepro %]</li>[% END %] >+ [% IF ( phonepro ) %]<li><span class="label">Secondary phone: </span>[% phonepro %]</li>[% END %] >+ [% IF ( mobile ) %]<li><span class="label">Mobile phone: </span>[% mobile %]</li>[% END %] > [% END %] > >- [% IF ( P ) %] >- [% IF ( phone ) %]<li><span class="label">Primary phone: </span>[% phone %]</li>[% END %] >- [% IF ( mobile ) %]<li><span class="label">Secondary mobile: </span>[% mobile %]</li>[% END %] >- [% END %] > [% IF ( fax ) %]<li><span class="label">Fax: </span>[% fax %]</li>[% END %] > [% UNLESS ( I ) %] > [% IF ( email ) %]<li><span class="label">Primary email:</span><a href="mailto:[% email %]">[% email %]</a></li>[% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index 4e6271f..1da5864 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -190,7 +190,7 @@ function validate1(date) { > <div class="yui-u first"> > <div id="patron-information" style="padding : .5em;"> > >- [% UNLESS ( I ) %][% IF ( othernames ) %]“[% othernames %]”[% END %] >+ [% IF ( othernames ) %]“[% othernames %]”[% END %] > > <p class="address">[% streetnumber %] > [% IF ( roaddetails ) %] >@@ -206,18 +206,17 @@ function validate1(date) { > <div class="rows"> > <ol> > [% IF ( I ) %] >- [% IF ( phonepro ) %]<li><span class="label">Organization phone: </span>[% phonepro %]</li>[% END %] >- [% IF ( emailpro ) %]<li><span class="label">Organization email: </span>[% emailpro %]</li>[% END %] >+ [% IF ( phone ) %]<li><span class="label">Organization phone: </span>[% phone %]</li>[% END %] >+ [% IF ( email ) %]<li><span class="label">Organization email: </span>[% email %]</li>[% END %] >+ [% ELSIF ( P ) %] >+ [% IF ( phone ) %]<li><span class="label">Primary phone: </span>[% phone %]</li>[% END %] >+ [% IF ( phonepro ) %]<li><span class="label">Secondary phone: </span>[% phonepro %]</li>[% END %] > [% ELSE %] > [% IF ( phone ) %]<li><span class="label">Primary phone: </span>[% phone %]</li>[% END %] >- [% IF ( mobile ) %]<li><span class="label">Secondary phone: </span>[% mobile %]</li>[% END %] >- [% IF ( phonepro ) %]<li><span class="label">Other phone: </span>[% phonepro %]</li>[% END %] >+ [% IF ( phonepro ) %]<li><span class="label">Secondary phone: </span>[% phonepro %]</li>[% END %] >+ [% IF ( mobile ) %]<li><span class="label">Mobile phone: </span>[% mobile %]</li>[% END %] > [% END %] >- >- [% IF ( P ) %] >- [% IF ( phone ) %]<li><span class="label">Primary phone: </span>[% phone %]</li>[% END %] >- [% IF ( mobile ) %]<li><span class="label">Secondary phone: </span>[% mobile %]</li>[% END %] >- [% END %] >+ > [% IF ( fax ) %]<li><span class="label">Fax: </span>[% fax %]</li>[% END %] > [% UNLESS ( I ) %] > [% IF ( email ) %]<li><span class="label">Primary email:</span><a href="mailto:[% email %]">[% email %]</a></li>[% END %] >@@ -227,7 +226,7 @@ function validate1(date) { > [% IF ( dateofbirth ) %]<li><span class="label">Date of birth:</span>[% dateofbirth %]</li>[% END %] > [% IF ( sex ) %]<li><span class="label">Gender:</span> > [% IF ( sex == 'F' ) %]Female[% ELSIF ( sex == 'M' ) %]Male[% ELSE %][% sex %][% END %] >- </li>[% END %][% END %] >+ </li>[% END %] > [% IF ( printethnicityline ) %] > <li><span class="label">Ethnicity:</span>[% ethnicity %]</li> > <li><span class="label">Ethnicity notes: </span>[% ethnotes %]</li> >diff --git a/members/moremember.pl b/members/moremember.pl >index 3928286..679c65c 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -426,6 +426,7 @@ $template->param( > error => $error, > StaffMember => ($category_type eq 'S'), > is_child => ($category_type eq 'C'), >+ "$category_type" => 1, #passes category type (e.g. C, A, S, P, I, X) to template like in memberentry.pl > # reserveloop => \@reservedata, > dateformat => C4::Context->preference("dateformat"), > "dateformat_" . (C4::Context->preference("dateformat") || '') => 1, >-- >1.7.7.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9383
: 14552