View | Details | Raw Unified | Return to bug 11879
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/borrowers_primary_contact_method.sql (-1 / +1 lines)
Lines 1-3 Link Here
1
ALTER TABLE `borrowers` ADD COLUMN `primary_contact_method` VARCHAR(45) NULL DEFAULT NULL AFTER `lastseen`;
1
ALTER TABLE `borrowers` ADD COLUMN `primary_contact_method` VARCHAR(45) NULL DEFAULT NULL AFTER `overdrive_auth_token`;
2
ALTER TABLE `deletedborrowers` ADD COLUMN `primary_contact_method` VARCHAR(45) NULL DEFAULT NULL AFTER `overdrive_auth_token`;
2
ALTER TABLE `deletedborrowers` ADD COLUMN `primary_contact_method` VARCHAR(45) NULL DEFAULT NULL AFTER `overdrive_auth_token`;
3
ALTER TABLE `borrower_modifications` ADD COLUMN `primary_contact_method` VARCHAR(45) NULL DEFAULT NULL AFTER `extended_attributes`;
3
ALTER TABLE `borrower_modifications` ADD COLUMN `primary_contact_method` VARCHAR(45) NULL DEFAULT NULL AFTER `extended_attributes`;
(-)a/installer/data/mysql/updatedatabase.pl (-1 lines)
Lines 15837-15843 foreach my $file ( sort readdir $dirh ) { Link Here
15837
    }
15837
    }
15838
}
15838
}
15839
15839
15840
15841
=head1 FUNCTIONS
15840
=head1 FUNCTIONS
15842
15841
15843
=head2 TableExists($table)
15842
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-3 / +2 lines)
Lines 405-412 Link Here
405
405
406
[% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
406
[% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
407
  <fieldset class="rows" id="memberentry_contact">
407
  <fieldset class="rows" id="memberentry_contact">
408
    <legend id="contact_lgd">Contact</legend>
408
    <legend id="contact_lgd">Contact</legend><ol>
409
<ol>
410
        [% UNLESS nophone %]
409
        [% UNLESS nophone %]
411
      <li>
410
      <li>
412
      [% IF ( mandatoryphone ) %]
411
      [% IF ( mandatoryphone ) %]
Lines 469-475 Link Here
469
	  [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
468
	  [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
470
    </li>
469
    </li>
471
        [% END %]
470
        [% END %]
472
    [% UNLESS nofax %]
471
        [% UNLESS nofax %]
473
    <li>
472
    <li>
474
      [% IF ( mandatoryfax ) %]
473
      [% IF ( mandatoryfax ) %]
475
      <label for="fax" class="required">
474
      <label for="fax" class="required">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt (-4 / +4 lines)
Lines 19-25 Link Here
19
            <div class="col-xs-6">
19
            <div class="col-xs-6">
20
                <div id="patron-information">
20
                <div id="patron-information">
21
21
22
     [% UNLESS ( I ) %][% IF ( othernames ) %]&ldquo;[% othernames %]&rdquo;[% END %]
22
     [% UNLESS ( I ) %][% IF ( patron.othernames ) %]&ldquo;[% patron.othernames %]&rdquo;[% END %]
23
        <div class = "address">
23
        <div class = "address">
24
            <ul>
24
            <ul>
25
                [% IF Koha.Preference( 'AddressFormat' ) %]
25
                [% IF Koha.Preference( 'AddressFormat' ) %]
Lines 61-69 Link Here
61
	<h3>Library use</h3>
61
	<h3>Library use</h3>
62
	<div class="rows">
62
	<div class="rows">
63
	<ol>
63
	<ol>
64
    <li><span class="label">Card number: </span>[% cardnumber %]</li>
64
    <li><span class="label">Card number: </span>[% patron.cardnumber %]</li>
65
	<li><span class="label">Borrowernumber: </span> [% borrowernumber %]</li>
65
    <li><span class="label">Borrowernumber: </span> [% patron.borrowernumber %]</li>
66
    <li><span class="label">Category: </span>[% categoryname %] ([% categorycode %])</li>
66
    <li><span class="label">Category: </span>[% patron.category.description %] ([% patron.categorycode %])</li>
67
    <li><span class="label">Registration date: </span>[% dateenrolled | $KohaDates %]</li>
67
    <li><span class="label">Registration date: </span>[% dateenrolled | $KohaDates %]</li>
68
    <li><span class="label">Expiration date: </span>
68
    <li><span class="label">Expiration date: </span>
69
    [% IF ( was_renewed ) %]
69
    [% IF ( was_renewed ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-32 / +22 lines)
Lines 169-206 Link Here
169
                [% ELSE %]
169
                [% ELSE %]
170
                    [% guarantor.firstname | html %] [% guarantor.surname | html %]
170
                    [% guarantor.firstname | html %] [% guarantor.surname | html %]
171
                [% END %]
171
                [% END %]
172
            </ul>
172
            </li>
173
        </li>
173
        [% END %]
174
    [% ELSIF guarantor %]
174
        [% IF ( primary_contact_method ) %]
175
        <li>
175
            <li>
176
            <span class="label">Guarantor:</span>
176
                <span class="label">Main contact method: </span>
177
            [% IF guarantor.borrowernumber %]
177
                [% SWITCH primary_contact_method %]
178
                <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber %]">[% guarantor.firstname | html %] [% guarantor.surname | html %]</a>
178
                    [% CASE 'phone' %]
179
            [% ELSE %]
179
                        Primary phone
180
                [% guarantor.firstname | html %] [% guarantor.surname | html %]
180
                    [% CASE 'phonepro' %]
181
            [% END %]
181
                        Secondary phone
182
        </li>
182
                    [% CASE 'mobile' %]
183
    [% END %]
183
                        Other phone
184
    [% IF ( primary_contact_method ) %]
184
                    [% CASE 'email' %]
185
       <li>
185
                        Primary email
186
            <span class="label">Main contact method: </span>
186
                    [% CASE 'emailpro' %]
187
            [% SWITCH primary_contact_method %]
187
                        Secondary email
188
                [% CASE 'phone' %]
188
                    [% CASE 'fax' %]
189
                    Primary phone
189
                        Fax
190
                [% CASE 'phonepro' %]
190
                [% END %]
191
                    Secondary phone
191
            </li>
192
                [% CASE 'mobile' %]
192
        [% END %]
193
                    Other phone
193
    </ol>
194
                [% CASE 'email' %]
195
                    Primary email
196
                [% CASE 'emailpro' %]
197
                    Secondary email
198
                [% CASE 'fax' %]
199
                    Fax
200
            [% END %]
201
        </li>
202
    [% END %]
203
</ol>
204
</div>
194
</div>
205
      <div class="action">
195
      <div class="action">
206
        [% IF ( guarantor.borrowernumber ) %]
196
        [% IF ( guarantor.borrowernumber ) %]
(-)a/members/moremember.pl (-3 lines)
Lines 342-350 $template->param( Link Here
342
    patron          => $patron,
342
    patron          => $patron,
343
    translated_language => $translated_language,
343
    translated_language => $translated_language,
344
    detailview      => 1,
344
    detailview      => 1,
345
    borrowernumber  => $borrowernumber,
346
    othernames      => $data->{'othernames'},
347
    categoryname    => $patron->category->description,
348
    primary_contact_method  => $data->{'primary_contact_method'},
345
    primary_contact_method  => $data->{'primary_contact_method'},
349
    was_renewed     => scalar $input->param('was_renewed') ? 1 : 0,
346
    was_renewed     => scalar $input->param('was_renewed') ? 1 : 0,
350
    todaysdate      => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
347
    todaysdate      => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
(-)a/opac/opac-memberentry.pl (-12 / +11 lines)
Lines 94-111 $template->param( Link Here
94
    OPACPatronDetails => C4::Context->preference('OPACPatronDetails'),
94
    OPACPatronDetails => C4::Context->preference('OPACPatronDetails'),
95
);
95
);
96
my $check_BorrowerMandatoryField=C4::Context->preference("BorrowerMandatoryField");
96
my $check_BorrowerMandatoryField=C4::Context->preference("BorrowerMandatoryField");
97
        my @field_check=split(/\|/,$check_BorrowerMandatoryField);
97
my @field_check=split(/\|/,$check_BorrowerMandatoryField);
98
        my @contactprincipalloop;
98
my @contactprincipalloop;
99
        my @fieldArray = qw(phone phonepro mobile email emailpro fax);
99
my @fieldArray = qw(phone phonepro mobile email emailpro fax);
100
        foreach my $field (@fieldArray) {
100
foreach my $field (@fieldArray) {
101
           if ( !(grep { $field eq $_ } @field_check)){
101
   if ( !(grep { $field eq $_ } @field_check)){
102
                push @contactprincipalloop,{
102
        push @contactprincipalloop,{
103
                    'currentis_' . $field => 1
103
            'currentis_' . $field => 1
104
                };
104
        };
105
            }
105
    }
106
        }
106
}
107
107
108
        $template->param('contactprincipalloop' => \@contactprincipalloop);
108
$template->param('contactprincipalloop' => \@contactprincipalloop);
109
109
110
my $attributes = ParsePatronAttributes($borrowernumber,$cgi);
110
my $attributes = ParsePatronAttributes($borrowernumber,$cgi);
111
my $conflicting_attribute = 0;
111
my $conflicting_attribute = 0;
112
- 

Return to bug 11879