diff --git a/app/assets/stylesheets/devise/registration.scss b/app/assets/stylesheets/devise/registration.scss index a7834dadc..098b9021b 100644 --- a/app/assets/stylesheets/devise/registration.scss +++ b/app/assets/stylesheets/devise/registration.scss @@ -221,7 +221,3 @@ div.error { &.password { margin-top: -101px; margin-left: 650px; } } - -div.error.forgot { - margin-top: 8px; - margin-left: 308px; } diff --git a/app/assets/stylesheets/reg_session.scss b/app/assets/stylesheets/reg_session.scss index 88ca94688..025ea5b34 100644 --- a/app/assets/stylesheets/reg_session.scss +++ b/app/assets/stylesheets/reg_session.scss @@ -12,4 +12,12 @@ nav { margin: 0; padding: 0; padding-top: 10px; - text-decoration: none;} } \ No newline at end of file + text-decoration: none;} } + +div.error.forgot { + margin-top: 8px; + margin-left: 308px; } + +div.error.reset { + margin-top: -141px; + margin-left: 645px; } diff --git a/app/views/devise/passwords/edit.html.haml b/app/views/devise/passwords/edit.html.haml index 267e855bf..0eff4ec82 100644 --- a/app/views/devise/passwords/edit.html.haml +++ b/app/views/devise/passwords/edit.html.haml @@ -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 \ No newline at end of file diff --git a/app/views/layouts/sessions.html.haml b/app/views/layouts/sessions.html.haml index 7593d1b50..6bf94f40e 100644 --- a/app/views/layouts/sessions.html.haml +++ b/app/views/layouts/sessions.html.haml @@ -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 diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml index d1627aed5..bc4385e28 100644 --- a/config/locales/devise.en.yml +++ b/config/locales/devise.en.yml @@ -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.' diff --git a/config/locales/devise.ru.yml b/config/locales/devise.ru.yml index 58a5b5e4b..19a9ed1ae 100644 --- a/config/locales/devise.ru.yml +++ b/config/locales/devise.ru.yml @@ -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 с инструкциями по подтверждению вашей учётной записи.' diff --git a/config/locales/en.yml b/config/locales/en.yml index 29f4f7bdc..50e88d31d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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 diff --git a/config/locales/pluralization.en.yml b/config/locales/pluralization.en.yml index dcf1efb12..5baff28e7 100644 --- a/config/locales/pluralization.en.yml +++ b/config/locales/pluralization.en.yml @@ -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" diff --git a/config/locales/pluralization.ru.yml b/config/locales/pluralization.ru.yml index 117eb525b..2ec2d215c 100644 --- a/config/locales/pluralization.ru.yml +++ b/config/locales/pluralization.ru.yml @@ -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} символа" diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 24b1e6a87..b243ce5da 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -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: Новый комментарий к Вашей задаче