Permalink
Browse files

edit account info form layout

  • Loading branch information...
ck3g committed Mar 17, 2013
1 parent c4e5c80 commit 071edb1c8f9a8567ba1bc9a13f7e95e263e5682d
@@ -45,16 +45,16 @@ form.top-login {
}
}
-$form-signin-border-radius: 5px;
+$form-border-radius: 5px;
.form-signin {
max-width: 300px;
padding: 19px 29px 29px;
margin: 0 auto 20px;
background-color: #fff;
border: 1px solid #e5e5e5;
- -webkit-border-radius: $form-signin-border-radius;
- -moz-border-radius: $form-signin-border-radius;
- border-radius: $form-signin-border-radius;
+ -webkit-border-radius: $form-border-radius;
+ -moz-border-radius: $form-border-radius;
+ border-radius: $form-border-radius;
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
@@ -1,15 +1,18 @@
-%h2
- Edit #{resource_name.to_s.humanize}
-= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f|
- = f.error_notification
- .form-inputs
- = f.input :email, :required => true, :autofocus => true
- = f.input :password, :autocomplete => "off", :hint => "leave it blank if you don't want to change it", :required => false
- = f.input :password_confirmation, :required => false
- = f.input :current_password, :hint => "we need your current password to confirm your changes", :required => true
- .form-actions
- = f.button :submit, "Update"
-%h3 Cancel my account
-%p
- Unhappy? #{link_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete}.
-= link_to "Back", :back
+.well
+ %h2= t("users.edit_account")
+ - html = { method: :put }
+ - defaults = { label: false, required: true }
+ = simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: html, defaults: defaults) do |f|
+ = f.error_notification
+ .form-inputs
+ = f.input :username
+ = f.input :email, autofocus: true
+ = f.input :password, autocomplete: "off", hint: t("hints.user.password"), required: false
+ = f.input :password_confirmation, required: false
+ = f.input :current_password, hint: t("hints.user.current_password")
+ .form-actions
+ = f.button :submit, class: "btn btn-primary"
+ -# %h3 Cancel my account
+ -# %p
+ -# Unhappy? #{link_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete}.
+ -# = link_to "Back", :back
@@ -24,7 +24,8 @@
= current_user.name
%span.caret
%ul.dropdown-menu
- %li= link_to t("users.profile"), current_user
+ %li= link_to t("users.profile"), "#"
+ %li= link_to t("users.account"), edit_user_registration_path
%li.divider
%li= link_to t("users.logout"), :destroy_user_session, method: :delete
- else
View
@@ -39,8 +39,15 @@ ru:
welcome: "Добро пожаловать"
logout: "Выйти"
profile: "Профиль"
+ account: "Учетная запись"
+ edit_account: "Редактирование учетной записи"
must_sign_in: "Залогинтесь для чата"
+ hints:
+ user:
+ password: "Оставьте поле пустым, если не хотите менять пароль"
+ current_password: "Для подтверждения изменений необхоим текущий пароль"
+
wait: "..."
"true": "Да"
"false": "Нет"
@@ -8,6 +8,8 @@ ru:
page:
create: Создать страницу
update: Обновить страницу
+ user:
+ update: Обновить
simple_form:
"yes": 'Да'
@@ -45,7 +47,9 @@ ru:
title: Заголовок
body: Содержимое новости
user:
+ username: Никнейм
email: Email
password: Пароль
password_confirmation: Подтверждение пароля
+ current_password: Текущий пароль

0 comments on commit 071edb1

Please sign in to comment.