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 15582-15588 foreach my $file ( sort readdir $dirh ) { Link Here
15582
    }
15582
    }
15583
}
15583
}
15584
15584
15585
15586
=head1 FUNCTIONS
15585
=head1 FUNCTIONS
15587
15586
15588
=head2 TableExists($table)
15587
=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 166-203 Link Here
166
                [% ELSE %]
166
                [% ELSE %]
167
                    [% guarantor.firstname | html %] [% guarantor.surname | html %]
167
                    [% guarantor.firstname | html %] [% guarantor.surname | html %]
168
                [% END %]
168
                [% END %]
169
            </ul>
169
            </li>
170
        </li>
170
        [% END %]
171
    [% ELSIF guarantor %]
171
        [% IF ( primary_contact_method ) %]
172
        <li>
172
            <li>
173
            <span class="label">Guarantor:</span>
173
                <span class="label">Main contact method: </span>
174
            [% IF guarantor.borrowernumber %]
174
                [% SWITCH primary_contact_method %]
175
                <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber %]">[% guarantor.firstname | html %] [% guarantor.surname | html %]</a>
175
                    [% CASE 'phone' %]
176
            [% ELSE %]
176
                        Primary phone
177
                [% guarantor.firstname | html %] [% guarantor.surname | html %]
177
                    [% CASE 'phonepro' %]
178
            [% END %]
178
                        Secondary phone
179
        </li>
179
                    [% CASE 'mobile' %]
180
    [% END %]
180
                        Other phone
181
    [% IF ( primary_contact_method ) %]
181
                    [% CASE 'email' %]
182
       <li>
182
                        Primary email
183
            <span class="label">Main contact method: </span>
183
                    [% CASE 'emailpro' %]
184
            [% SWITCH primary_contact_method %]
184
                        Secondary email
185
                [% CASE 'phone' %]
185
                    [% CASE 'fax' %]
186
                    Primary phone
186
                        Fax
187
                [% CASE 'phonepro' %]
187
                [% END %]
188
                    Secondary phone
188
            </li>
189
                [% CASE 'mobile' %]
189
        [% END %]
190
                    Other phone
190
    </ol>
191
                [% CASE 'email' %]
192
                    Primary email
193
                [% CASE 'emailpro' %]
194
                    Secondary email
195
                [% CASE 'fax' %]
196
                    Fax
197
            [% END %]
198
        </li>
199
    [% END %]
200
</ol>
201
</div>
191
</div>
202
      <div class="action">
192
      <div class="action">
203
        [% IF ( guarantor.borrowernumber ) %]
193
        [% IF ( guarantor.borrowernumber ) %]
(-)a/members/moremember.pl (-3 lines)
Lines 343-351 $template->param( Link Here
343
    patron          => $patron,
343
    patron          => $patron,
344
    translated_language => $translated_language,
344
    translated_language => $translated_language,
345
    detailview      => 1,
345
    detailview      => 1,
346
    borrowernumber  => $borrowernumber,
347
    othernames      => $data->{'othernames'},
348
    categoryname    => $patron->category->description,
349
    primary_contact_method  => $data->{'primary_contact_method'},
346
    primary_contact_method  => $data->{'primary_contact_method'},
350
    was_renewed     => scalar $input->param('was_renewed') ? 1 : 0,
347
    was_renewed     => scalar $input->param('was_renewed') ? 1 : 0,
351
    todaysdate      => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
348
    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