Bugzilla – Attachment 10122 Details for
Bug 6698
Detail page for organisations should show only valid fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix for Bug 6698, Detail page for organisations should show only valid fields
Fix-for-Bug-6698-Detail-page-for-organisations-sho.patch (text/plain), 5.58 KB, created by
MJ Ray (software.coop)
on 2012-06-10 14:51:27 UTC
(
hide
)
Description:
Fix for Bug 6698, Detail page for organisations should show only valid fields
Filename:
MIME Type:
Creator:
MJ Ray (software.coop)
Created:
2012-06-10 14:51:27 UTC
Size:
5.58 KB
patch
obsolete
>From a7b229dcb690b942f92f90dcd907068c4ff760a3 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 15 Aug 2011 14:21:29 -0400 >Subject: [PATCH] Fix for Bug 6698, Detail page for organisations should show only valid fields > >The output of moremember.pl is supposed to change if the patron >in question is an organization (has a category which is of type "I"). >The script was checking borrowers.categorycode when it should have >been checking categories.category_type. With this correction the >right variable is passed to the template. > >The template needed additional corrections to be sure the correct >fields were appearing. The patron entry form offers only phonepro >and emailpro, so moremember.pl should output those fields in >particular. This patch hides other fields as suggested by the Bug >report. >--- > .../prog/en/modules/members/memberentrygen.tt | 13 +++++++++---- > .../prog/en/modules/members/moremember.tt | 3 ++- > members/moremember.pl | 3 +++ > 3 files changed, 14 insertions(+), 5 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 8a31738..8e15922 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -250,7 +250,7 @@ > [% ELSE %] > <label for="surname"> > [% END %] >- Surname: </label> >+ [% IF ( I ) %] Name: [% ELSE %] Surname: [% END %]</label> > [% IF ( uppercasesurnames ) %] > [% IF ( opduplicate ) %] > <input style="text-transform:uppercase;" type="text" id="surname" name="surname" size="20" value="[% surname %]" onclick="this.value=''" /> >@@ -607,6 +607,7 @@ > > [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %] > <fieldset class="rows" id="memberentry_contact"> >+ [% UNLESS ( I ) %] > <legend id="contact_lgd">Contact</legend><ol> > [% UNLESS nophone %] > <li> >@@ -624,6 +625,7 @@ > [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div> > > </li> >+ [% END %] > [% END %] > [% UNLESS nophonepro %] > <li> >@@ -632,7 +634,7 @@ > [% ELSE %] > <label for="phonepro"> > [% END %] >- Secondary Phone: </label> >+ [% IF ( I ) %]Phone: [% ELSE %]Secondary Phone:[% END %] </label> > [% IF ( opduplicate ) %] > <input type="text" id="phonepro" name="phonepro" value="[% phonepro %]" onclick="this.value=''" /> > [% ELSE %] >@@ -642,6 +644,7 @@ > </li> > [% END %] > [% UNLESS nomobile %] >+ [% UNLESS ( I ) %] > <li> > [% IF ( mandatorymobile ) %] > <label for="mobile" class="required"> >@@ -657,6 +660,8 @@ > [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %] > </li> > [% END %] >+ [% END %] >+ [% UNLESS ( I ) %] > [% UNLESS noemail %] > <li> > [% IF ( mandatoryemail ) %] >@@ -671,9 +676,9 @@ > <input type="text" id="email" name="email" size="45" value="[% email %]" /> > [% END %] > [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div> >- > </li> > [% END %] >+ [% END %] > [% UNLESS noemailpro %] > <li> > [% IF ( mandatoryemailpro ) %] >@@ -681,7 +686,7 @@ > [% ELSE %] > <label for="emailpro"> > [% END %] >- Secondary Email: </label> >+ [% IF ( I ) %]Email: [% ELSE %]Secondary Email:[% END %] </label> > [% IF ( opduplicate ) %] > <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro %]" onclick="this.value=''" /> > [% ELSE %] >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 b568ec9..d2b1140 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -182,7 +182,7 @@ function validate1(date) { > <div class="yui-u first"> > <div id="patron-information" style="padding : .5em;"> > >- [% UNLESS ( I ) %][% IF ( othernames ) %]“[% othernames %]”[% END %] >+ [% UNLESS ( I ) %][% IF ( othernames ) %]“[% othernames %]”[% END %][% END %] > > <p class="address">[% streetnumber %] > [% IF ( roaddetails ) %] >@@ -215,6 +215,7 @@ function validate1(date) { > [% IF ( email ) %]<li><span class="label">Primary email:</span><a href="mailto:[% email %]">[% email %]</a></li>[% END %] > [% IF ( emailpro ) %]<li><span class="label">Secondary email: </span><a href="mailto:[% emailpro %]">[% emailpro %]</a></li>[% END %] > [% END %] >+ [% UNLESS ( I ) %] > [% IF ( initials ) %]<li><span class="label">Initials: </span>[% initials %]</li>[% END %] > [% IF ( dateofbirth ) %]<li><span class="label">Date of birth:</span>[% dateofbirth %]</li>[% END %] > [% IF ( sex ) %]<li><span class="label">Gender:</span> >diff --git a/members/moremember.pl b/members/moremember.pl >index 32541c9..7122882 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -134,6 +134,9 @@ my $category_type = $data->{'category_type'}; > > ### $category_type > >+# in template <TMPL_IF name="I"> => instutitional (A for Adult& C for children) >+$template->param( $data->{'category_type'} => 1 ); >+ > $debug and printf STDERR "dates (enrolled,expiry,birthdate) raw: (%s, %s, %s)\n", map {$data->{$_}} qw(dateenrolled dateexpiry dateofbirth); > foreach (qw(dateenrolled dateexpiry dateofbirth)) { > my $userdate = $data->{$_}; >-- >1.7.2.5
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 6698
:
4931
|
4932
|
4950
|
5021
| 10122 |
10330