|
|
|
% layout 'default';
|
|
|
|
% title l('User profile');
|
|
|
|
<h2><%= l('User profile') %></h2>
|
|
|
|
% my @attrs = (method => 'POST', enctype => 'multipart/form-data');
|
|
|
|
%= form_for "/user/update" => (@attrs) => begin
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td><%= l('Login') %></td>
|
|
|
|
<td><%= session('useruid') %></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td><%= l('Display name') %></td>
|
|
|
|
<td><%= text_field 'displayname', placeholder => l('John Doe') %></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td><%= l('Email') %></td>
|
|
|
|
<td><%= text_field 'mail', type => 'email', placeholder => 'petrov@example.com' %></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td><%= l('Organization') %></td>
|
|
|
|
<td><%= text_field 'org', placeholder => l('JSC Vector') %></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td><%= l('Cell phone') %></td>
|
|
|
|
<td><%= text_field 'mobile', placeholder => '+79081235689' %></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td><%= l('Avatar') %></td>
|
|
|
|
<td><%= file_field 'photo' %></td>
|
|
|
|
</tr>
|
|
|
|
<tr><td colspan='2'><hr/></td></tr>
|
|
|
|
<tr>
|
|
|
|
<td><%= l('Current password') %></td>
|
|
|
|
<td><%= password_field 'password', required => 1, placeholder => '******' %></td>
|
|
|
|
</tr>
|
|
|
|
<tr><td colspan='2'><hr/></td></tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan='2'><%= submit_button l('Update') %></td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
% end
|
|
|
|
% my $result = (flash 'result') || '';
|
|
|
|
% if ($result) {
|
|
|
|
%= tag 'p' => $result;
|
|
|
|
% }
|