Bug 7743: Update opac-userupdate.pl to use KohaDates TT plugin
[koha.git] / koha-tmpl / opac-tmpl / prog / en / modules / opac-userupdate.tt
index 9a68851..3a7fb9d 100644 (file)
@@ -1,4 +1,6 @@
-[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %][% ELSE %]Koha Online[% END %] Catalog ›  Updating Details for [% FOREACH BORROWER_INF IN BORROWER_INFO %][% BORROWER_INF.firstname %] [% BORROWER_INF.surname %][% END %]
+[% USE KohaDates %]
+
+[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %][% ELSE %]Koha Online[% END %] Catalog ›  Your personal details
 [% INCLUDE 'doc-head-close.inc' %]
 </head>
 <body id="opac-userupdate">
 
 <div id="userupdatecontainer" class="container">
 [% FOREACH BORROWER_INF IN BORROWER_INFO %]
-<h3><a href="/cgi-bin/koha/opac-user.pl">[% BORROWER_INF.firstname %] [% BORROWER_INF.surname %]'s account</a> <img src="[% themelang %]../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Your Personal Details</h3>
+<h3><a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' firstname = BORROWER_INF.firstname surname = BORROWER_INF.surname othernames = BORROWER_INF.othernames cardnumber = BORROWER_INF.cardnumber %]'s account</a> <img src="[% themelang %]../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Your Personal Details</h3>
 
 [% IF ( OPACPatronDetails ) %]
 <form action="/cgi-bin/koha/opac-userupdate.pl" method="get">
 <div class="yui-u first">
 <input type="hidden" name="modify" value="yes" />
+[% IF ( display_patron_image ) %]<p class="patronimage edit">
+    <img src="/cgi-bin/koha/opac-patron-image.pl" alt="" />
+</p>[% END %]
 <fieldset class="brief"><legend>Name</legend><ol>
 <li><label for="firstname">First Name:</label> <input id="firstname" type="text" value="[% BORROWER_INF.firstname %]"  name="firstname" /></li>
 <li><label for="othernames">Other Name:</label> <input id="othernames" type="text" value="[% BORROWER_INF.othernames %]"  name="othernames" /></li>
@@ -34,9 +39,9 @@
 <li><label for="state">State:</label> <input id="state" type="text" value="[% BORROWER_INF.state %]"  name="state" /></li>
 <li><label for="zipcode">Zip Code: </label><input type="text" id="zipcode" value="[% BORROWER_INF.zipcode %]" name="zipcode" /></li>
 <li><label for="country">Country: </label><input type="text" id="country" value="[% BORROWER_INF.country %]" name="country" /></li>
-<li><label for="phone">Home Phone:</label> <input id="phone" type="text" value="[% BORROWER_INF.phone %]"  name="phone" /></li>
-<li><label for="mobile">Mobile Phone:</label> <input id="mobile" type="text" value="[% BORROWER_INF.mobile %]"  name="mobile" /></li>
-<li><label for="phonepro">Work phone:</label> <input id="phonepro"  type="text" value="[% BORROWER_INF.phonepro %]"  name="phonepro" /></li>
+<li><label for="phone">Primary Phone:</label> <input id="phone" type="text" value="[% BORROWER_INF.phone %]"  name="phone" /></li>
+<li><label for="mobile">Secondary Phone:</label> <input id="mobile" type="text" value="[% BORROWER_INF.mobile %]"  name="mobile" /></li>
+<li><label for="phonepro">Other Phone:</label> <input id="phonepro"  type="text" value="[% BORROWER_INF.phonepro %]"  name="phonepro" /></li>
 <li><label for="fax">Fax:</label> <input id="fax" type="text" value="[% BORROWER_INF.fax %]"  name="fax" /></li>
 <li><label for="emailaddress">Primary Email:</label> <input id="emailaddress" type="text" value="[% BORROWER_INF.email %]"  name="emailaddress" /></li>
 <li><label for="emailpro">Secondary Email:</label> <input id="emailpro" type="text" value="[% BORROWER_INF.emailpro %]"  name="emailpro" /></li>
@@ -65,7 +70,7 @@
 </fieldset>
 <fieldset class="brief">
 <ol>
-<li><label for="dob">Date of Birth: </label> <input id="dob" type="text" size="10" value="[% BORROWER_INF.dateofbirth %]" name="dateofbirth" /></li>
+<li><label for="dob">Date of Birth: </label> <input id="dob" type="text" size="10" value="[% BORROWER_INF.dateofbirth | $KohaDates %]" name="dateofbirth" /></li>
 <li><label for="sex">Gender: </label> <select name="sex" id="sex"><option></option>
 [% IF ( BORROWER_INF.sex == 'F' ) %]<option value="F" selected="selected">Female</option>[% ELSE %]<option value="F">Female</option>[% END %]
 [% IF ( BORROWER_INF.sex == 'M' ) %]<option value="M" selected="selected">Male</option>[% ELSE %]<option value="M">Male</option>[% END %]
@@ -78,8 +83,8 @@
     <li><label for="branchname">Home library:</label><input type="text" id="branchname" disabled="disabled" readonly="readonly" value="[% BORROWER_INF.branchname %]" /></li>
        <li><label for="borrowernumber">Patron Number:</label><input type="text" id="borrowernumber" disabled="disabled" readonly="readonly" value="[% BORROWER_INF.borrowernumber %]" /></li>
        <li><label for="categorycode">Patron Category:</label><input type="text" id="categorycode" disabled="disabled" readonly="readonly" value="[% BORROWER_INF.description %] ([% BORROWER_INF.categorycode %])" /></li>
-       <li><label for="dateenrolled">Joined: </label><input type="text" id="dateenrolled" disabled="disabled" readonly="readonly" value="[% BORROWER_INF.dateenrolled %]" /></li>
-       <li><label for="dateexpiry">Expires: </label><input type="text" id="dateexpiry" disabled="disabled" readonly="readonly" value="[% BORROWER_INF.dateexpiry %]" /></li>
+       <li><label for="dateenrolled">Joined: </label><input type="text" id="dateenrolled" disabled="disabled" readonly="readonly" value="[% BORROWER_INF.dateenrolled | $KohaDates %]" /></li>
+       <li><label for="dateexpiry">Expires: </label><input type="text" id="dateexpiry" disabled="disabled" readonly="readonly" value="[% BORROWER_INF.dateexpiry | $KohaDates %]" /></li>
    [% IF ( BORROWER_INF.ExtendedPatronAttributes ) %]
     [% FOREACH patron_attribute IN BORROWER_INF.patron_attributes %]
         <li><label>[% patron_attribute.description %]</label>
 [% ELSE %]
 <p style="clear:left;padding:1em 0">To make changes to your record please contact the library.</p>
 <div class="yui-u first">
+[% IF ( display_patron_image ) %]<p class="patronimage">
+    <img src="/cgi-bin/koha/opac-patron-image.pl" alt="" />
+</p>[% END %]
 <fieldset class="rows">
 <legend>Contact Information</legend>
 <ol>
 <li><span class="label">State:</span>  [% BORROWER_INF.state %]</li>
 <li><span class="label">Zip Code:</span>  [% BORROWER_INF.zipcode %]</li>
 <li><span class="label">Country:</span>  [% BORROWER_INF.country %]</li>
-<li><span class="label">Home Phone:</span>  [% BORROWER_INF.phone %]</li>
-<li><span class="label">Mobile Phone:</span>  [% BORROWER_INF.mobile %]</li>
-<li><span class="label">Work phone:</span>  [% BORROWER_INF.phonepro %]</li>
+<li><span class="label">Primary Phone:</span>  [% BORROWER_INF.phone %]</li>
+<li><span class="label">Secondary Phone:</span>  [% BORROWER_INF.mobile %]</li>
+<li><span class="label">Other Phone:</span>  [% BORROWER_INF.phonepro %]</li>
 <li><span class="label">Fax:</span>  [% BORROWER_INF.fax %]</li>
 <li><span class="label">Primary Email:</span>  [% BORROWER_INF.email %]</li>
 <li><span class="label">Secondary Email:</span>  [% BORROWER_INF.emailpro %]</li>
 <fieldset class="rows">
 <legend>Personal Information</legend>
 <ol>
-<li><span class="label">Date of Birth:</span> [% BORROWER_INF.dateofbirth %]</li>
+<li><span class="label">Date of Birth:</span> [% BORROWER_INF.dateofbirth | $KohaDates %]</li>
 <li><span class="label">Gender:</span>
 [% IF ( sex == 'F' ) %]Female[% END %]
 [% IF ( sex == 'M' ) %]Male[% END %]
 <li><span class="label">Home library:</span> [% BORROWER_INF.branchname %]</li>
 <li><span class="label">Patron Number:</span> [% BORROWER_INF.borrowernumber %]</li>
 <li><span class="label">Patron Category:</span> [% BORROWER_INF.description %] ([% BORROWER_INF.categorycode %])</li>
-<li><span class="label">Joined:</span> [% BORROWER_INF.dateenrolled %]</li>
-<li><span class="label">Expires:</span> [% BORROWER_INF.dateexpiry %]</li>
+<li><span class="label">Joined:</span> [% BORROWER_INF.dateenrolled | $KohaDates %]</li>
+<li><span class="label">Expires:</span> [% BORROWER_INF.dateexpiry | $KohaDates %]</li>
    [% IF ( BORROWER_INF.ExtendedPatronAttributes ) %]
     [% FOREACH patron_attribute IN BORROWER_INF.patron_attributes %]
         <li><span class="label">[% patron_attribute.description %]</span>
 </div>
 <div class="yui-b">
 <div id="leftmenus" class="container">
-[% INCLUDE 'navigation.inc' %]
-[% INCLUDE 'usermenu.inc' %]
+[% INCLUDE 'navigation.inc' IsPatronPage=1 %]
 </div>
 </div>
 </div>