[refs #230] edit password page

This commit is contained in:
Alexander Machehin 2012-03-01 22:05:00 +06:00
parent 53c7fc0424
commit 4931dc773b
10 changed files with 62 additions and 52 deletions

View File

@ -221,7 +221,3 @@ div.error {
&.password { &.password {
margin-top: -101px; margin-top: -101px;
margin-left: 650px; } } margin-left: 650px; } }
div.error.forgot {
margin-top: 8px;
margin-left: 308px; }

View File

@ -12,4 +12,12 @@ nav {
margin: 0; margin: 0;
padding: 0; padding: 0;
padding-top: 10px; padding-top: 10px;
text-decoration: none;} } text-decoration: none;} }
div.error.forgot {
margin-top: 8px;
margin-left: 308px; }
div.error.reset {
margin-top: -141px;
margin-left: 645px; }

View File

@ -1,28 +1,30 @@
.block .wrap
%h2= title t('devise.passwords.edit') %nav
.content %a{:href => new_register_request_path}
- if resource.errors.present? %p=t("layout.devise.shared_links.sign_up")
.flash / Top block
.message.error %header
- messages = resource.errors.full_messages.map { |msg| content_tag(:p, msg) }.join.html_safe .logo
= messages / Page
%article
%br
%h1= title t('devise.passwords.edit')
%br
.content
- is_error = resource.errors.present?
= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put, :class => "form" }) do |f| = form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put, :class => "form" }) do |f|
= f.hidden_field :reset_password_token = f.hidden_field :reset_password_token
.group.wat-cf .left.first=t('activerecord.attributes.user.password')
.left .right.first
= f.label :password, :class => "label" = f.text_field :password, :id => 'pass', :class => "registartion-input #{is_error ? "registartion-input-error" : ''}", :onblur => "if(this.value==''){this.value='';this.className='registartion-input';}else{this.className='registartion-input-no-focus';};", :onfocus => "if(this.value==''){this.value='';this.className='registartion-input-focus';};"
.right .both
= f.text_field :password, :class => "text_field" .left=t('activerecord.attributes.user.password_confirm')
.group.wat-cf .right
.left = f.text_field :password_confirmation, :id => 'pass2', :class => "registartion-input #{is_error ? "registartion-input-error" : ''}", :onClick => "this.className='registartion-input-focus';disError(this);", :onblur => "if(this.value==''){this.value='';this.className='registartion-input';}else{this.className='registartion-input-no-focus';};buttonCheck();", :onfocus => "if(this.value==''){this.value='';this.className='registartion-input-focus';};", :onkeydown => "buttonCheck();"
= f.label :password_confirmation, :class => "label" .both
.right %br
= f.text_field :password_confirmation, :class => "text_field" =f.submit t("devise.passwords.edit_button"), :class => 'button', :id => 'btnLogin'
.group.navform.wat-cf #hint.error.reset{:style => is_error ? 'display: block;' : ''}
%button.button{:tyle => "submit"} %p=resource.errors.full_messages.first
= image_tag("code.png", :alt => t("devise.passwords.edit_button"))
= t("devise.passwords.edit_button")
%span.text_button_padding
= render :partial => "devise/shared/links"

View File

@ -6,7 +6,7 @@
- if controller_name == 'sessions' && action_name == 'new' - if controller_name == 'sessions' && action_name == 'new'
= stylesheet_link_tag "login" = stylesheet_link_tag "login"
= javascript_include_tag "login" = javascript_include_tag "login"
- elsif ['registrations', 'passwords'].include?(controller_name) && ['new', 'create'].include?(action_name) - elsif ['registrations', 'passwords'].include?(controller_name) && ['new', 'create', 'edit', 'update'].include?(action_name)
= stylesheet_link_tag "reg_session" = stylesheet_link_tag "reg_session"
= csrf_meta_tag = csrf_meta_tag

View File

@ -32,6 +32,7 @@ en:
send_paranoid_instructions: "If your e-mail exists on our database, you will receive a password recovery link on your e-mail" send_paranoid_instructions: "If your e-mail exists on our database, you will receive a password recovery link on your e-mail"
forgot: 'Forgot password' forgot: 'Forgot password'
send: 'Send' send: 'Send'
edit_button: 'Change'
confirmations: confirmations:
send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.' send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
send_paranoid_instructions: 'If your e-mail exists on our database, you will receive an email with instructions about how to confirm your account in a few minutes.' send_paranoid_instructions: 'If your e-mail exists on our database, you will receive an email with instructions about how to confirm your account in a few minutes.'

View File

@ -34,6 +34,7 @@ ru:
send_paranoid_instructions: "Если Ваш e-mail существует, в течение нескольких минут вы получите e-mail с инструкциями по восстановлению вашего пароля." send_paranoid_instructions: "Если Ваш e-mail существует, в течение нескольких минут вы получите e-mail с инструкциями по восстановлению вашего пароля."
forgot: 'Забыли пароль' forgot: 'Забыли пароль'
send: 'Послать' send: 'Послать'
edit_button: 'Изменить'
confirmations: confirmations:
send_instructions: "В течение нескольких минут вы получите e-mail с инструкциями по подтверждению вашей учётной записи." send_instructions: "В течение нескольких минут вы получите e-mail с инструкциями по подтверждению вашей учётной записи."
send_paranoid_instructions: 'Если Ваш e-mail существует, то в течение нескольких минут вы получите e-mail с инструкциями по подтверждению вашей учётной записи.' send_paranoid_instructions: 'Если Ваш e-mail существует, то в течение нескольких минут вы получите e-mail с инструкциями по подтверждению вашей учётной записи.'

View File

@ -617,15 +617,6 @@ en:
platform: Platform platform: Platform
counter: Downloads counter: Downloads
errors:
messages:
too_long:
one: "maximum is %{count} character"
other: "maximum is %{count} characters"
too_short:
one: "minimum is %{count} character"
other: "minimum is %{count} characters"
notifications: notifications:
subjects: subjects:
new_comment_notification: New comment to your task new_comment_notification: New comment to your task

View File

@ -20,3 +20,13 @@ en:
inline_changes_count: inline_changes_count:
one: "%{count} change" one: "%{count} change"
other: "%{count} changes" other: "%{count} changes"
activerecord:
errors:
messages:
too_long:
one: "maximum is %{count} character"
other: "maximum is %{count} characters"
too_short:
one: "minimum is %{count} character"
other: "minimum is %{count} characters"

View File

@ -26,3 +26,17 @@ ru:
one: "%{count} изменение" one: "%{count} изменение"
few: "%{count} изменения" few: "%{count} изменения"
many: "%{count} изменений" many: "%{count} изменений"
activerecord:
errors:
messages:
too_long:
one: "не может быть больше чем %{count} символ"
few: "не может быть больше чем %{count} символа"
many: "не может быть больше чем %{count} символов"
other: "не может быть больше чем %{count} символа"
too_short:
one: "не может быть меньше %{count} символа"
few: "не может быть меньше %{count} символов"
many: "не может быть меньше %{count} символов"
other: "не может быть меньше %{count} символа"

View File

@ -612,19 +612,6 @@ ru:
platform: Архитектура platform: Архитектура
counter: Закачки counter: Закачки
errors:
messages:
too_long:
one: "не может быть больше чем %{count} символ"
few: "не может быть больше чем %{count} символа"
many: "не может быть больше чем %{count} символов"
other: "не может быть больше чем %{count} символа"
too_short:
one: "не может быть меньше %{count} символа"
few: "не может быть меньше %{count} символов"
many: "не может быть меньше %{count} символов"
other: "не может быть меньше %{count} символа"
notifications: notifications:
subjects: subjects:
new_comment_notification: Новый комментарий к Вашей задаче new_comment_notification: Новый комментарий к Вашей задаче