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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-us.inc (+4 lines)
Lines 141-147 Link Here
141
          <label for="B_email">
141
          <label for="B_email">
142
        [% END %]
142
        [% END %]
143
        Email: </label>
143
        Email: </label>
144
        [% IF ( NoUpdateEmail ) %]
145
            <input type="text" id="B_email" name="B_email" size="45" value="[% patron.B_email | html %]" disabled="disabled" />
146
        [% ELSE %]
144
            <input type="text" id="B_email" name="B_email" size="45" value="[% patron.B_email | html %]" />
147
            <input type="text" id="B_email" name="B_email" size="45" value="[% patron.B_email | html %]" />
148
        [% END %]
145
        [% IF ( mandatoryB_email ) %]<span class="required">Required</span>[% END %] </li>
149
        [% IF ( mandatoryB_email ) %]<span class="required">Required</span>[% END %] </li>
146
        [% END %]
150
        [% END %]
147
        [% UNLESS nocontactnote %]
151
        [% UNLESS nocontactnote %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-2 / +10 lines)
Lines 552-558 Link Here
552
                    <label for="email">
552
                    <label for="email">
553
                [% END %]
553
                [% END %]
554
                Primary email: </label>
554
                Primary email: </label>
555
                <input type="text" id="email" name="email" size="45" value="[% email | html %]" />
555
                [% IF ( NoUpdateEmail ) %]
556
                    <input type="text" id="email" name="email" size="45" value="[% email | html %]" disabled="disabled" />
557
                [% ELSE %]
558
                    <input type="text" id="email" name="email" size="45" value="[% email | html %]" />
559
                [% END %]
556
                [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
560
                [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
557
            </li>
561
            </li>
558
        [% END %]
562
        [% END %]
Lines 565-571 Link Here
565
                    <label for="emailpro">
569
                    <label for="emailpro">
566
                [% END %]
570
                [% END %]
567
                Secondary email: </label>
571
                Secondary email: </label>
568
                <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro | html %]" />
572
                [% IF ( NoUpdateEmail ) %]
573
                    <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro | html %]" disabled="disabled"/>
574
                [% ELSE %]
575
                    <input type="text" id="emailpro" name="emailpro" size="45" value="[% emailpro | html %]" />
576
                [% END %]
569
                [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
577
                [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
570
            </li>
578
            </li>
571
        [% END %]
579
        [% END %]
(-)a/members/memberentry.pl (-2 / +9 lines)
Lines 102-107 my $step = $input->param('step') || 0; Link Here
102
my @errors;
102
my @errors;
103
my $borrower_data;
103
my $borrower_data;
104
my $NoUpdateLogin;
104
my $NoUpdateLogin;
105
my $NoUpdateEmail;
105
my $userenv = C4::Context->userenv;
106
my $userenv = C4::Context->userenv;
106
107
107
## Deal with guarantor stuff
108
## Deal with guarantor stuff
Lines 166-171 if ( $op eq 'modify' or $op eq 'save' or $op eq 'duplicate' ) { Link Here
166
    my $logged_in_user = Koha::Patrons->find( $loggedinuser );
167
    my $logged_in_user = Koha::Patrons->find( $loggedinuser );
167
    output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
168
    output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
168
169
170
    # check permission to modify email info.
171
    if ( $patron->is_superlibrarian && !$logged_in_user->is_superlibrarian ) {
172
        $NoUpdateEmail = 1;
173
    }
174
169
    $borrower_data = $patron->unblessed;
175
    $borrower_data = $patron->unblessed;
170
    $borrower_data->{category_type} = $patron->category->category_type;
176
    $borrower_data->{category_type} = $patron->category->category_type;
171
}
177
}
Lines 206-212 if ( $op eq 'insert' || $op eq 'modify' || $op eq 'save' || $op eq 'duplicate' ) Link Here
206
            push(@errors,"ERROR_$_");
212
            push(@errors,"ERROR_$_");
207
        }
213
        }
208
    }
214
    }
209
  # check permission to modify login info.
215
216
    # check permission to modify login info.
210
    if (ref($borrower_data) && ($borrower_data->{'category_type'} eq 'S') && ! (C4::Auth::haspermission($userenv->{'id'},{'staffaccess'=>1})) )  {
217
    if (ref($borrower_data) && ($borrower_data->{'category_type'} eq 'S') && ! (C4::Auth::haspermission($userenv->{'id'},{'staffaccess'=>1})) )  {
211
        $NoUpdateLogin = 1;
218
        $NoUpdateLogin = 1;
212
    }
219
    }
Lines 795-800 $template->param( Link Here
795
  modify          => $modify,
802
  modify          => $modify,
796
  nok     => $nok,#flag to know if an error
803
  nok     => $nok,#flag to know if an error
797
  NoUpdateLogin =>  $NoUpdateLogin,
804
  NoUpdateLogin =>  $NoUpdateLogin,
805
  NoUpdateEmail =>  $NoUpdateEmail,
798
  );
806
  );
799
807
800
# Generate CSRF token
808
# Generate CSRF token
801
- 

Return to bug 23634