From 2f169f480c3d421581bffbb672e3de0111f5f62a Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Fri, 21 Nov 2014 13:24:40 +1000 Subject: [PATCH] * update user pages --- lib/LDV/I18N/ru.pm | 12 +++++++----- templates/user/login.html.ep | 10 +++++++--- templates/user/profile.html.ep | 16 ++++++++++------ 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/lib/LDV/I18N/ru.pm b/lib/LDV/I18N/ru.pm index b61541e..1393935 100644 --- a/lib/LDV/I18N/ru.pm +++ b/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' => 'Сохранить', diff --git a/templates/user/login.html.ep b/templates/user/login.html.ep index f7153c8..4fec426 100644 --- a/templates/user/login.html.ep +++ b/templates/user/login.html.ep @@ -2,15 +2,15 @@ % title l('Auth required');

<%= l('Auth required') %>

% my @attrs = (method => 'POST'); -%= form_for "/user/update" => (@attrs) => begin +%= form_for "/user/auth" => (@attrs) => begin - + - + @@ -18,4 +18,8 @@
<%= l('Login') %><%= text_field 'login', required => 1, placeholder => 'username' %><%= text_field 'username', required => 1, placeholder => 'username' %>
<%= l('Password') %><%= password_field 'pass', required => 1, placeholder => '******' %><%= password_field 'password', required => 1, placeholder => '******' %>

% end +% if (my $error = flash('result')) { +

<%= $error %>

+% } else {

Чтобы поменять свои данные, необходимо представиться системе.

+% } diff --git a/templates/user/profile.html.ep b/templates/user/profile.html.ep index c95e118..1f23b48 100644 --- a/templates/user/profile.html.ep +++ b/templates/user/profile.html.ep @@ -1,9 +1,13 @@ % layout 'default'; -% title l('Update user'); -

<%= l('Update user') %>

+% title l('User profile'); +

<%= l('User profile') %>

% my @attrs = (method => 'POST', enctype => 'multipart/form-data'); %= form_for "/user/update" => (@attrs) => begin + + + + @@ -14,11 +18,11 @@ - + - - + + @@ -27,7 +31,7 @@ - +
<%= l('Login') %><%= session('useruid') %>
<%= l('Display name') %> <%= text_field 'displayname', placeholder => l('John Doe') %>
<%= l('Organization') %><%= text_field 'org' %><%= text_field 'org', placeholder => l('JSC Vector') %>
<%= l('Mobile') %><%= text_field 'mobile' %><%= l('Cell phone') %><%= text_field 'mobile', placeholder => '+79081235689' %>
<%= l('Avatar') %>

<%= l('Current password') %><%= password_field 'pass', required => 1, placeholder => '******' %><%= password_field 'password', required => 1, placeholder => '******' %>