<!-- TMPL_IF NAME= "Ask_data" -->
<!-- TMPL_IF NAME="OpacPasswordChange" -->
- <form action="/cgi-bin/koha/opac-passwd.pl" name="mainform" id="mainform" method="get"><fieldset class="rows">
+ <form action="/cgi-bin/koha/opac-passwd.pl" name="mainform" id="mainform" method="post"><fieldset class="rows">
<!-- TMPL_UNLESS NAME= "ShortPass" --><div class="hint">Your password must be at least <!-- TMPL_VAR NAME="minpasslen" --> characters long.</div><!-- /TMPL_UNLESS -->
<ol> <li><label for="password">Current Password:</label> <input type="password" id="Oldkey" size="25" name="Oldkey" /></li>
<li><label for="Newkey">New Password:</label> <input type="password" id="Newkey" size="25" name="Newkey" /></li>
}
}
else {
-
+
# Called Empty, Ask for data.
$template->param( 'Ask_data' => '1' );
+ if (!$query->param('Oldkey') && ($query->param('Newkey') || $query->param('Confirm'))){
+ # Old password is empty but one of the others isnt
+ $template->param( 'Error_messages' => '1' );
+ $template->param( 'WrongPass' => '1' );
+ }
+ elsif ($query->param('Oldkey') && (!$query->param('Newkey') || !$query->param('Confirm'))){
+ # Oldpassword is entered but one of the other fields is empty
+ $template->param( 'Error_messages' => '1' );
+ $template->param( 'PassMismatch' => '1' );
+ }
}
$template->param(firstname => $borr->{'firstname'},