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

(-)a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc (-2 lines)
Lines 5-13 Link Here
5
  <!-- TMPL_IF NAME="OPACFinesTab" -->
5
  <!-- TMPL_IF NAME="OPACFinesTab" -->
6
  <!-- TMPL_IF NAME="accountview" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a href="/cgi-bin/koha/opac-account.pl">my fines</a></li>
6
  <!-- TMPL_IF NAME="accountview" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a href="/cgi-bin/koha/opac-account.pl">my fines</a></li>
7
  <!-- /TMPL_IF -->
7
  <!-- /TMPL_IF -->
8
  <!-- TMPL_IF NAME="OPACPatronDetails" -->
9
  <!-- TMPL_IF NAME="userupdateview" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a href="/cgi-bin/koha/opac-userupdate.pl">my personal details</a></li>
8
  <!-- TMPL_IF NAME="userupdateview" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a href="/cgi-bin/koha/opac-userupdate.pl">my personal details</a></li>
10
    <!-- /TMPL_IF -->
11
  <!-- TMPL_IF NAME="TagsEnabled" -->
9
  <!-- TMPL_IF NAME="TagsEnabled" -->
12
    <!-- TMPL_IF NAME="tagsview" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a href="/cgi-bin/koha/opac-tags.pl">my tags</a></li>
10
    <!-- TMPL_IF NAME="tagsview" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a href="/cgi-bin/koha/opac-tags.pl">my tags</a></li>
13
  <!-- /TMPL_IF -->
11
  <!-- /TMPL_IF -->
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tmpl (-1 / +1 lines)
Lines 100-110 Link Here
100
100
101
</fieldset>
101
</fieldset>
102
102
103
104
<fieldset class="action">
103
<fieldset class="action">
105
  <input type="submit" value="Submit Changes" /> <a class="cancel" href="/cgi-bin/koha/opac-user.pl">Cancel</a>
104
  <input type="submit" value="Submit Changes" /> <a class="cancel" href="/cgi-bin/koha/opac-user.pl">Cancel</a>
106
</fieldset>
105
</fieldset>
107
106
107
108
</form>
108
</form>
109
</div>
109
</div>
110
</div>
110
</div>
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tmpl (-56 / +87 lines)
Lines 9-32 Link Here
9
	<div id="yui-main">
9
	<div id="yui-main">
10
	<div class="yui-b"><div class="yui-g" id="userupdate">
10
	<div class="yui-b"><div class="yui-g" id="userupdate">
11
11
12
<div class="container" style="overflow:auto;">
12
<div class="container">
13
<!-- TMPL_LOOP name="BORROWER_INFO" -->
13
<!-- TMPL_LOOP name="BORROWER_INFO" -->
14
<h3><a href="/cgi-bin/koha/opac-user.pl"><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->'s account</a> <img src="<!-- TMPL_VAR NAME="themelang" -->../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Your Personal Details</h3>
14
<h3><a href="/cgi-bin/koha/opac-user.pl"><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->'s account</a> <img src="<!-- TMPL_VAR NAME="themelang" -->../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Your Personal Details</h3>
15
15
16
<!-- TMPL_IF NAME="OPACPatronDetails" -->
16
<form action="/cgi-bin/koha/opac-userupdate.pl" method="get">
17
<form action="/cgi-bin/koha/opac-userupdate.pl" method="get">
17
<div class="yui-u first">
18
<div class="yui-u first">
18
19
<input type="hidden" name="modify" value="yes" />
19
<input type="hidden" name="modify" value="yes" />
20
<fieldset class="brief"><legend>Name</legend><ol>
20
<fieldset class="brief"><legend>Name</legend><ol>
21
<li><label for="firstname">First Name:</label> <input id="firstname" type="text" value="<!-- TMPL_VAR name="firstname" -->"  name="firstname" /></li>
21
<li><label for="firstname">First Name:</label> <input id="firstname" type="text" value="<!-- TMPL_VAR name="firstname" -->"  name="firstname" /></li>
22
<li><label for="othernames">Other Name:</label> <input id="othernames" type="text" value="<!-- TMPL_VAR name="othernames" -->"  name="othernames" /></li>
22
<li><label for="surname">Last Name:</label> <input id="surname" type="text" value="<!-- TMPL_VAR name="surname" -->"  name="surname" /></li>
23
<li><label for="surname">Last Name:</label> <input id="surname" type="text" value="<!-- TMPL_VAR name="surname" -->"  name="surname" /></li>
23
</ol>
24
</ol>
24
</fieldset>
25
</fieldset>
25
26
26
<fieldset class="brief"><legend>Contact Information</legend>
27
<fieldset class="brief"><legend>Contact Information</legend>
27
<ol>
28
<ol>
28
<li>
29
<li><label for="address">Address:</label>
29
    <label for="address">Address:</label>
30
	<input id="streetnumber" size ="7" type="text" value="<!-- TMPL_VAR name="streetnumber" -->"  name="streetnumber" /> 
30
	<input type="text" name="address" value="<!-- TMPL_VAR NAME="address" -->" id="address" />
31
	<input type="text" name="address" value="<!-- TMPL_VAR NAME="address" -->" id="address" />
31
	<input type="text" name="address2" value="<!-- TMPL_VAR NAME="address2" -->" id="address2" /></li>
32
	<input type="text" name="address2" value="<!-- TMPL_VAR NAME="address2" -->" id="address2" /></li>
32
<li><label for="city">City, State:</label> <input id="city" type="text" value="<!-- TMPL_VAR name="city" -->"  name="city" /></li>
33
<li><label for="city">City, State:</label> <input id="city" type="text" value="<!-- TMPL_VAR name="city" -->"  name="city" /></li>
Lines 34-104 Link Here
34
<li><label for="country">Country: </label><input id="country" name="country" value="<!-- TMPL_VAR NAME="country" -->" name="country" /></li>
35
<li><label for="country">Country: </label><input id="country" name="country" value="<!-- TMPL_VAR NAME="country" -->" name="country" /></li>
35
<li><label for="phone">Home Phone:</label> <input id="phone" type="text" value="<!-- TMPL_VAR name="phone" -->"  name="phone" /></li>
36
<li><label for="phone">Home Phone:</label> <input id="phone" type="text" value="<!-- TMPL_VAR name="phone" -->"  name="phone" /></li>
36
<li><label for="mobile">Mobile Phone:</label> <input id="mobile" type="text" value="<!-- TMPL_VAR name="mobile" -->"  name="mobile" /></li>
37
<li><label for="mobile">Mobile Phone:</label> <input id="mobile" type="text" value="<!-- TMPL_VAR name="mobile" -->"  name="mobile" /></li>
37
<li><label for="fax">Fax:</label> <input id="fax" type="text" value="<!-- TMPL_VAR name="fax" -->"  name="fax" /></li>
38
39
<li><label for="phonepro">Work phone:</label> <input id="phonepro"  type="text" value="<!-- TMPL_VAR name="phonepro" -->"  name="phonepro" /></li>
38
<li><label for="phonepro">Work phone:</label> <input id="phonepro"  type="text" value="<!-- TMPL_VAR name="phonepro" -->"  name="phonepro" /></li>
40
39
<li><label for="fax">Fax:</label> <input id="fax" type="text" value="<!-- TMPL_VAR name="fax" -->"  name="fax" /></li>
41
<li><label for="emailaddress">Email:</label> <input id="emailaddress" type="text" value="<!-- TMPL_VAR name="email" -->"  name="emailaddress" /></li>
40
<li><label for="emailaddress">Email:</label> <input id="emailaddress" type="text" value="<!-- TMPL_VAR name="email" -->"  name="emailaddress" /></li>
42
</ol>
41
<li><label for="emailpro">Work Email:</label> <input id="emailpro" type="text" value="<!-- TMPL_VAR name="emailpro" -->"  name="emailpro" /></li>
43
</fieldset>
44
45
<fieldset class="brief">
46
<legend>Items Borrowed Notifications</legend>
47
<ol>
48
<li>
49
  <label for="items_borrowed_email">Email:</label>
50
  <!-- TMPL_IF items_borrowed_email -->
51
  <input type="checkbox" id="items_borrowed_email" name="items_borrowed_email" value="1" checked="checked" />
52
  <!-- TMPL_ELSE -->
53
  <input type="checkbox" id="items_borrowed_email" name="items_borrowed_email" value="1" />
54
  <!-- /TMPL_IF -->
55
</li>
56
<li>
57
  <label for="items_borrowed_sms">Text Message:</label>
58
  <!-- TMPL_IF items_borrowed_sms -->
59
  <input type="checkbox" id="items_borrowed_sms" name="items_borrowed_sms" value="1" checked="checked" />
60
  <!-- TMPL_ELSE -->
61
  <input type="checkbox" id="items_borrowed_sms" name="items_borrowed_sms" value="1" />
62
  <!-- /TMPL_IF -->
63
</li>
64
</ol>
65
</fieldset>
66
67
<fieldset class="brief">
68
<legend>Items Returned Notifications</legend>
69
<ol>
70
<li>
71
  <label for="items_returned_email">Email:</label>
72
  <!-- TMPL_IF items_returned_email -->
73
  <input type="checkbox" id="items_returned_email" name="items_returned_email" value="1" checked="checked" />
74
  <!-- TMPL_ELSE -->
75
  <input type="checkbox" id="items_returned_email" name="items_returned_email" value="1" />
76
  <!-- /TMPL_IF -->
77
</li>
78
<li>
79
  <label for="items_returned_sms">Text Message:</label>
80
  <!-- TMPL_IF items_returned_sms -->
81
  <input type="checkbox" id="items_returned_sms" name="items_returned_sms" value="1" checked="checked" />
82
  <!-- TMPL_ELSE -->
83
  <input type="checkbox" id="items_returned_sms" name="items_returned_sms" value="1" />
84
  <!-- /TMPL_IF -->
85
</li>
86
</ol>
42
</ol>
87
</fieldset>
43
</fieldset>
88
44
89
</div>
45
</div>
90
<div class="yui-u">
46
<div class="yui-u">
91
<fieldset class="brief">
47
<fieldset class="brief">
92
<legend>Permanent Address</legend>
48
<legend>Alternate Contact Information</legend>
93
<ol>
49
<ol>
94
<li>
50
<li>
95
    <label for="B_streetaddress">Permanent or Alternate Address:</label>
51
    <label for="B_streetaddress">Alternate Address:</label> 
96
        <textarea id="B_streetaddress" cols="25" rows="3" name="B_streetaddress"><!--TMPL_VAR NAME="B_streetnumber"--> <!-- TMPL_VAR name="B_address" --> <!-- TMPL_VAR name="B_address2" --></textarea>
52
    <input id="B_streetnumber" size ="7" type="text" value="<!-- TMPL_VAR name="B_streetnumber" -->"  name="B_streetnumber" /> 
53
    <input id="B_address" type="text" value="<!-- TMPL_VAR name="B_address" -->"  name="B_address" /> 
54
    <input id="B_address2" type="text" value="<!-- TMPL_VAR name="B_address2" -->"  name="B_address2" />
97
</li>
55
</li>
98
56
99
<li><label for="B_city">City, State:</label> <input id="B_city" type="text" value="<!-- TMPL_VAR name="B_city" -->"  name="B_city" /></li>
57
<li><label for="B_city">City, State:</label> <input id="B_city" type="text" value="<!-- TMPL_VAR name="B_city" -->"  name="B_city" /></li>
100
<li><label for="B_zipcode">Zip Code</label> <input type="text" id="B_zipcode" name="B_zipcode" value="<!-- TMPL_VAR NAME="B_zipcode" -->" name="B_zipcode" /></li>
58
<li><label for="B_zipcode">Zip Code:</label> <input type="text" id="B_zipcode" name="B_zipcode" value="<!-- TMPL_VAR NAME="B_zipcode" -->" name="B_zipcode" /></li>
101
<li><label for="B_country">Country</label> <input type="text" id="B_country" name="B_country" value="<!-- TMPL_VAR NAME="B_country" -->" name="B_country" /></li>
59
<li><label for="B_country">Country:</label> <input type="text" id="B_country" name="B_country" value="<!-- TMPL_VAR NAME="B_country" -->" name="B_country" /></li>
60
<li><label for="B_phone">Phone:</label> <input type="text" id="B_phone" name="B_phone" value="<!-- TMPL_VAR NAME="B_phone" -->" name="B_phone" /></li>
61
<li><label for="B_email">Email:</label> <input type="text" id="B_email" name="B_email" value="<!-- TMPL_VAR NAME="B_email" -->" name="B_email" /></li>
102
</ol>
62
</ol>
103
</fieldset>
63
</fieldset>
104
<fieldset class="brief">
64
<fieldset class="brief">
Lines 136-141 Link Here
136
</div>
96
</div>
137
97
138
</form>
98
</form>
99
<!-- TMPL_ELSE -->
100
<p style="clear:left;padding:1em 0">To make changes to your record please contact the library.</p>
101
<div class="yui-u first">
102
<fieldset class="rows">
103
<legend>Contact Information</legend>
104
<ol>
105
<li><span class="label">Name:</span> <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></li>
106
<li><span class="label">Other Name:</span> <!-- TMPL_VAR NAME="othernames" --></li>
107
<li><span class="label">Address:</span> <!-- TMPL_VAR NAME="streetnumber" --> <!-- TMPL_VAR NAME="address" --></li>
108
<li><span class="label">&nbsp;</span><!-- TMPL_VAR NAME="address2" --></li>
109
<li><span class="label">City, State:</span>  <!-- TMPL_VAR name="city" --></li>
110
<li><span class="label">Zip Code:</span>  <!-- TMPL_VAR NAME="zipcode" --></li>
111
<li><span class="label">Country:</span>  <!-- TMPL_VAR NAME="country" --></li>
112
<li><span class="label">Home Phone:</span>  <!-- TMPL_VAR name="phone" --></li>
113
<li><span class="label">Mobile Phone:</span>  <!-- TMPL_VAR name="mobile" --></li>
114
<li><span class="label">Work phone:</span>  <!-- TMPL_VAR name="phonepro" --></li>
115
<li><span class="label">Fax:</span>  <!-- TMPL_VAR name="fax" --></li>
116
<li><span class="label">Email:</span>  <!-- TMPL_VAR name="email" --></li>
117
<li><span class="label">Work Email:</span>  <!-- TMPL_VAR name="emailpro" --></li>
118
</ol>
119
</fieldset>
120
121
<fieldset class="rows">
122
<legend>Personal Information</legend>
123
<ol>
124
<li><span class="label">Date of Birth:</span> <!-- TMPL_VAR NAME="dateofbirth" --></li>
125
<li><span class="label">Sex:</span>
126
<!-- TMPL_IF EXPR="sex eq 'F'" -->Female<!-- /TMPL_IF -->
127
<!-- TMPL_IF EXPR="sex eq 'M'" -->Male<!-- /TMPL_IF -->
128
</li>
129
</ol>
130
</fieldset>
131
</div>
132
133
<div class="yui-u">
134
<fieldset class="rows">
135
<legend>Alternate Contact Information</legend>
136
<ol>
137
<li><span class="label">Alternate Address:</span> <!--TMPL_VAR NAME="B_streetnumber"--> <!-- TMPL_VAR name="B_address" --> </li>
138
<li><span class="label">&nbsp;</span><!-- TMPL_VAR NAME="B_address2" --></li>
139
<li><span class="label">City, State:</span> <!-- TMPL_VAR name="B_city" --></li>
140
<li><span class="label">Zip Code:</span> <!-- TMPL_VAR NAME="B_zipcode" --></li>
141
<li><span class="label">Country:</span> <!-- TMPL_VAR NAME="B_country" --></li>
142
<li><span class="label">Phone:</span> <!-- TMPL_VAR NAME="B_phone" --></li>
143
<li><span class="label">Email:</span> <!-- TMPL_VAR NAME="B_email" --></li>
144
</ol>
145
</fieldset>
146
147
<fieldset class="rows">
148
<legend>Library Use:</legend>
149
<ol>
150
<li><span class="label">Card number:</span> <!-- TMPL_VAR NAME="cardnumber" --></li>
151
<li><span class="label">Patron Number:</span> <!-- TMPL_VAR NAME="borrowernumber" --></li>
152
<li><span class="label">Patron Category:</span> <!-- TMPL_VAR NAME="description" --> (<!-- TMPL_VAR NAME="categorycode" -->)</li>
153
<li><span class="label">Joined:</span> <!-- TMPL_VAR NAME="dateenrolled" --></li>
154
<li><span class="label">Expires:</span> <!-- TMPL_VAR NAME="dateexpiry" --></li>
155
   <!-- TMPL_IF NAME="ExtendedPatronAttributes" -->
156
    <!-- TMPL_LOOP NAME="patron_attributes" -->
157
        <li><span class="label"><!-- TMPL_VAR NAME="description" --></span>
158
        <!-- TMPL_IF NAME="value_description" -->
159
            <!-- TMPL_VAR NAME="value_description" -->
160
        <!-- TMPL_ELSE -->
161
            <!-- TMPL_VAR NAME="value" -->
162
        <!-- /TMPL_IF -->
163
        </li>
164
    <!-- /TMPL_LOOP -->
165
   <!-- /TMPL_IF  -->
166
</ol>
167
</fieldset>
168
</div>
169
<!-- /TMPL_IF  -->
139
<!-- /TMPL_LOOP -->
170
<!-- /TMPL_LOOP -->
140
</div>
171
</div>
141
</div>
172
</div>
(-)a/opac/opac-userupdate.pl (-6 / +14 lines)
Lines 53-65 my $lib = GetBranchDetail($borr->{'branchcode'}); Link Here
53
# handle the new information....
53
# handle the new information....
54
# collect the form values and send an email.
54
# collect the form values and send an email.
55
my @fields = (
55
my @fields = (
56
    'surname',       'firstname', 
56
    'surname','firstname','othernames','streetaddress','city','zipcode','country','phone','mobile','fax','phonepro', 'emailaddress','emailpro','B_streetnumber','B_streetaddress','B_city','B_zipcode','B_country','B_phone','B_email','dateofbirth','sex'
57
    'address','address2','city','zipcode','phone','mobile','fax','phonepro', 'emailaddress','B_streetaddress','B_city','B_zipcode','dateofbirth','sex'
58
);
57
);
59
my $update;
58
my $update;
60
my $updateemailaddress = $lib->{'branchemail'};
59
my $updateemailaddress = $lib->{'branchemail'};
61
$updateemailaddress = C4::Context->preference('KohaAdminEmailAddress') unless( $updateemailaddress =~ /\w+@\w+/);
60
$updateemailaddress = C4::Context->preference('KohaAdminEmailAddress') unless( $updateemailaddress =~ /\w+@\w+/);
62
if ( $updateemailaddress eq '' ) {
61
if ( !$updateemailaddress || $updateemailaddress eq '' ) {
63
    warn
62
    warn
64
"KohaAdminEmailAddress system preference not set.  Couldn't send patron update information for $borr->{'firstname'} $borr->{'surname'} (#$borrowernumber)\n";
63
"KohaAdminEmailAddress system preference not set.  Couldn't send patron update information for $borr->{'firstname'} $borr->{'surname'} (#$borrowernumber)\n";
65
    my ($template) = get_template_and_user(
64
    my ($template) = get_template_and_user(
Lines 91-98 has requested to change her/his personal details. Link Here
91
Please check these new details and make the changes:
90
Please check these new details and make the changes:
92
EOF
91
EOF
93
92
93
    my $streetnumber = $borr->{'streetnumber'} || '';
94
    my $address = $borr->{'address'} || '';
95
    my $address2 = $borr->{'address2'} || '';
94
    my $B_streetnumber = $borr->{'B_streetnumber'} || '';
96
    my $B_streetnumber = $borr->{'B_streetnumber'} || '';
95
    my $B_address = $borr->{'B_address'} || '';
97
    my $B_address = $borr->{'B_address'} || '';
98
    my $B_address2 = $borr->{'B_address2'} || '';
96
99
97
    foreach my $field (@fields) {
100
    foreach my $field (@fields) {
98
        my $newfield = $query->param($field) || '';
101
        my $newfield = $query->param($field) || '';
Lines 100-110 EOF Link Here
100
        if($borr->{$field}) {
103
        if($borr->{$field}) {
101
            $borrowerfield = $borr->{$field};
104
            $borrowerfield = $borr->{$field};
102
        }
105
        }
106
        
107
        # reconstruct the address
108
        if($field eq "streetaddress") {
109
            $borrowerfield = "$streetnumber $address, $address2";
110
        }
111
        
103
        # reconstruct the alternate address
112
        # reconstruct the alternate address
104
        if($field eq "B_streetaddress") {
113
        if($field eq "B_streetaddress") {
105
            $borrowerfield = "$B_streetnumber $B_address";
114
            $borrowerfield = "$B_streetnumber $B_address, $B_address2";
106
        }
115
        }
107
116
        
108
        if($field eq "dateofbirth") {
117
        if($field eq "dateofbirth") {
109
           $borrowerfield  = format_date( $borr->{'dateofbirth'} ) || '';
118
           $borrowerfield  = format_date( $borr->{'dateofbirth'} ) || '';
110
        }
119
        }
111
- 

Return to bug 3596