[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 {
margin-top: -101px;
margin-left: 650px; } }
div.error.forgot {
margin-top: 8px;
margin-left: 308px; }

View File

@ -12,4 +12,12 @@ nav {
margin: 0;
padding: 0;
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
%h2= title t('devise.passwords.edit')
.content
- if resource.errors.present?
.flash
.message.error
- messages = resource.errors.full_messages.map { |msg| content_tag(:p, msg) }.join.html_safe
= messages
.wrap
%nav
%a{:href => new_register_request_path}
%p=t("layout.devise.shared_links.sign_up")
/ Top block
%header
.logo
/ 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|
= f.hidden_field :reset_password_token
.group.wat-cf
.left
= f.label :password, :class => "label"
.right
= f.text_field :password, :class => "text_field"
.group.wat-cf
.left
= f.label :password_confirmation, :class => "label"
.right
= f.text_field :password_confirmation, :class => "text_field"
.left.first=t('activerecord.attributes.user.password')
.right.first
= 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';};"
.both
.left=t('activerecord.attributes.user.password_confirm')
.right
= 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();"
.both
%br
=f.submit t("devise.passwords.edit_button"), :class => 'button', :id => 'btnLogin'
.group.navform.wat-cf
%button.button{:tyle => "submit"}
= image_tag("code.png", :alt => t("devise.passwords.edit_button"))
= t("devise.passwords.edit_button")
%span.text_button_padding
= render :partial => "devise/shared/links"
#hint.error.reset{:style => is_error ? 'display: block;' : ''}
%p=resource.errors.full_messages.first

View File

@ -6,7 +6,7 @@
- if controller_name == 'sessions' && action_name == 'new'
= stylesheet_link_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"
= 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"
forgot: 'Forgot password'
send: 'Send'
edit_button: 'Change'
confirmations:
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.'

View File

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

View File

@ -617,15 +617,6 @@ en:
platform: Platform
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:
subjects:
new_comment_notification: New comment to your task

View File

@ -20,3 +20,13 @@ en:
inline_changes_count:
one: "%{count} change"
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} изменение"
few: "%{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: Архитектура
counter: Закачки
errors:
messages:
too_long:
one: "не может быть больше чем %{count} символ"
few: "не может быть больше чем %{count} символа"
many: "не может быть больше чем %{count} символов"
other: "не может быть больше чем %{count} символа"
too_short:
one: "не может быть меньше %{count} символа"
few: "не может быть меньше %{count} символов"
many: "не может быть меньше %{count} символов"
other: "не может быть меньше %{count} символа"
notifications:
subjects:
new_comment_notification: Новый комментарий к Вашей задаче