[freeside-commits] freeside/httemplate/pref pref.html, NONE,
1.1 pref-process.html, NONE, 1.1
Ivan,,,
ivan at wavetail.420.am
Sun Nov 12 17:09:19 PST 2006
Update of /home/cvs/cvsroot/freeside/httemplate/pref
In directory wavetail:/tmp/cvs-serv11124/httemplate/pref
Added Files:
pref.html pref-process.html
Log Message:
add preference page, start with just a password changer
--- NEW FILE: pref-process.html ---
% my $error = '';
%
% my $access_user = qsearchs( 'access_user', {
% 'username' => getotaker,
% '_password' => $cgi->param('_password'),
% } );
%
% $error = 'Current password incorrect; password not changed'
% unless $access_user;
%
% $error ||= "New passwords don't match"
% unless $cgi->param('new_password') eq $cgi->param('new_password2');
%
% $error ||= "No new password entered"
% unless length($cgi->param('new_password'));
%
% $access_user->_password($cgi->param('new_password')) unless $error;
% $error ||= $access_user->replace;
%
% if ( $error ) {
% $cgi->param('error', $error);
% print $cgi->redirect(popurl(1). "pref.html?". $cgi->query_string );
% } else {
<% include('/elements/header.html', 'Password changed') %>
<% include('/elements/footer.html') %>
% }
--- NEW FILE: pref.html ---
<% include('/elements/header.html', 'Preferences for '. getotaker ) %>
<FORM METHOD="POST" ACTION="pref-process.html">
<% include('/elements/error.html') %>
<% ntable("#cccccc",2) %>
<TR>
<TD ALIGN="right">Current password: </TD>
<TD><INPUT TYPE="password" NAME="_password"></TD>
</TR>
<TR>
<TD ALIGN="right">New password: </TD>
<TD><INPUT TYPE="password" NAME="new_password"></TD>
</TR>
<TR>
<TD ALIGN="right">Re-enter new password: </TD>
<TD><INPUT TYPE="password" NAME="new_password2"></TD>
</TR>
</TABLE>
<INPUT TYPE="submit" VALUE="Change password">
<% include('/elements/footer.html') %>
More information about the freeside-commits
mailing list