Browse Source

* update user pages

master
Alex 'AdUser' Z 10 years ago
parent
commit
2f169f480c
  1. 12
      lib/LDV/I18N/ru.pm
  2. 10
      templates/user/login.html.ep
  3. 16
      templates/user/profile.html.ep

12
lib/LDV/I18N/ru.pm

@ -10,21 +10,23 @@ our %Lexicon =
_AUTO => 1, # enable fallback
'Create new user' => 'Создать нового юзера',
'Update user' => 'Обновить пользователя',
'Login' => 'Логин',
'User profile' => 'Профиль пользователя',
'Login' => 'Имя входа',
'Log in' => 'Войти',
'Password' => 'Пароль',
'Current password' => 'Текущий пароль',
'Current password' => 'Действующий пароль',
'Display name' => 'Отображаемое имя',
'Email' => 'Эл. почта',
'Create' => 'Создать',
'John Doe' => 'Иван Петров',
'Organization' => 'Организация',
'Mobile' => 'Сотовый',
'Cell phone' => 'Сотовый',
'Avatar' => 'Аватар',
'Update' => 'Обновить',
'Auth required' => 'Требуется авторизация',
'John Doe' => 'Иван Петров',
'JSC Vector' => 'ООО "Рога и копыта"',
# zerobin
'Keep for' => 'Хранить',
'Save' => 'Сохранить',

10
templates/user/login.html.ep

@ -2,15 +2,15 @@
% title l('Auth required');
<h2><%= l('Auth required') %></h2>
% my @attrs = (method => 'POST');
%= form_for "/user/update" => (@attrs) => begin
%= form_for "/user/auth" => (@attrs) => begin
<table>
<tr>
<td><%= l('Login') %></td>
<td><%= text_field 'login', required => 1, placeholder => 'username' %></td>
<td><%= text_field 'username', required => 1, placeholder => 'username' %></td>
</tr>
<tr>
<td><%= l('Password') %></td>
<td><%= password_field 'pass', required => 1, placeholder => '******' %></td>
<td><%= password_field 'password', required => 1, placeholder => '******' %></td>
</tr>
<tr><td colspan='2'><hr/></td></tr>
<tr>
@ -18,4 +18,8 @@
</tr>
</table>
% end
% if (my $error = flash('result')) {
<p><%= $error %></p>
% } else {
<p>Чтобы поменять свои данные, необходимо представиться системе.</p>
% }

16
templates/user/profile.html.ep

@ -1,9 +1,13 @@
% layout 'default';
% title l('Update user');
<h2><%= l('Update user') %></h2>
% 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>
@ -14,11 +18,11 @@
</tr>
<tr>
<td><%= l('Organization') %></td>
<td><%= text_field 'org' %></td>
<td><%= text_field 'org', placeholder => l('JSC Vector') %></td>
</tr>
<tr>
<td><%= l('Mobile') %></td>
<td><%= text_field 'mobile' %></td>
<td><%= l('Cell phone') %></td>
<td><%= text_field 'mobile', placeholder => '+79081235689' %></td>
</tr>
<tr>
<td><%= l('Avatar') %></td>
@ -27,7 +31,7 @@
<tr><td colspan='2'><hr/></td></tr>
<tr>
<td><%= l('Current password') %></td>
<td><%= password_field 'pass', required => 1, placeholder => '******' %></td>
<td><%= password_field 'password', required => 1, placeholder => '******' %></td>
</tr>
<tr><td colspan='2'><hr/></td></tr>
<tr>

Loading…
Cancel
Save