Permalink
Browse files
styles for signin, signup and reset password pages
- Loading branch information...
|
@@ -12,7 +12,7 @@ gem 'jquery-rails' |
|
|
gem 'tiny_tds', "~> 0.5.1"
|
|
|
gem 'activerecord-sqlserver-adapter', '~> 3.2.10'
|
|
|
|
|
|
-gem 'haml', '~> 3.1.6'
|
|
|
+gem 'haml'
|
|
|
gem 'meta-tags', '~> 1.2.6', :require => 'meta_tags'
|
|
|
gem 'kaminari' , "~> 0.13.0"
|
|
|
gem 'devise', "~> 2.1.2"
|
|
|
|
@@ -114,7 +114,8 @@ GEM |
|
|
faraday (>= 0.7.4, < 0.9)
|
|
|
ffaker (1.15.0)
|
|
|
ffi (1.3.1)
|
|
|
- haml (3.1.7)
|
|
|
+ haml (4.0.1.rc.1)
|
|
|
+ tilt
|
|
|
has_scope (0.5.1)
|
|
|
hashie (1.2.0)
|
|
|
highline (1.6.15)
|
|
@@ -318,7 +319,7 @@ DEPENDENCIES |
|
|
exception_notification
|
|
|
factory_girl_rails (~> 3.5.0)
|
|
|
ffaker (~> 1.15.0)
|
|
|
- haml (~> 3.1.6)
|
|
|
+ haml
|
|
|
has_scope (~> 0.5.1)
|
|
|
jquery-rails
|
|
|
kaminari (~> 0.13.0)
|
|
|
|
@@ -38,10 +38,45 @@ $baseLineHeight: 18px; |
|
|
}
|
|
|
|
|
|
form.top-login {
|
|
|
- input[type=email], input[type=password] {
|
|
|
- margin-top: 5px;
|
|
|
+ input {
|
|
|
+ &[type="email"], &[type="password"] {
|
|
|
+ margin-top: 5px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+$form-signin-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-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);
|
|
|
+ .form-signin-heading, .checkbox {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
+ input {
|
|
|
+ &[type="text"], &[type="password"], &[type="email"] {
|
|
|
+ font-size: 16px;
|
|
|
+ height: auto;
|
|
|
+ margin-bottom: 15px;
|
|
|
+ padding: 7px 9px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .shared-links {
|
|
|
+ padding-top: 5px;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@import "twitter/bootstrap";
|
|
|
+.main-container {
|
|
|
+ padding-top: 20px;
|
|
|
+}
|
|
|
@import "twitter/bootstrap-responsive";
|
|
|
@@ -0,0 +1,8 @@ |
|
|
+%h2 Resend confirmation instructions
|
|
|
+= simple_form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f|
|
|
|
+ = f.error_notification
|
|
|
+ .form-inputs
|
|
|
+ = f.input :email, :required => true
|
|
|
+ .form-actions
|
|
|
+ = f.button :submit, "Resend confirmation instructions"
|
|
|
+= render "devise/shared/links"
|
|
|
@@ -0,0 +1,4 @@ |
|
|
+%p
|
|
|
+ Welcome #{@resource.email}!
|
|
|
+%p You can confirm your account email through the link below:
|
|
|
+%p= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token)
|
|
|
@@ -0,0 +1,6 @@ |
|
|
+%p
|
|
|
+ Hello #{@resource.email}!
|
|
|
+%p Someone has requested a link to change your password, and you can do this through the link below.
|
|
|
+%p= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token)
|
|
|
+%p If you didn't request this, please ignore this email.
|
|
|
+%p Your password won't change until you access the link above and create a new one.
|
|
|
@@ -0,0 +1,5 @@ |
|
|
+%p
|
|
|
+ Hello #{@resource.email}!
|
|
|
+%p Your account has been locked due to an excessive amount of unsuccessful sign in attempts.
|
|
|
+%p Click the link below to unlock your account:
|
|
|
+%p= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token)
|
|
|
@@ -0,0 +1,11 @@ |
|
|
+%h2 Change your password
|
|
|
+= simple_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f|
|
|
|
+ = f.error_notification
|
|
|
+ = f.input :reset_password_token, :as => :hidden
|
|
|
+ = f.full_error :reset_password_token
|
|
|
+ .form-inputs
|
|
|
+ = f.input :password, :label => "New password", :required => true
|
|
|
+ = f.input :password_confirmation, :label => "Confirm your new password", :required => true
|
|
|
+ .form-actions
|
|
|
+ = f.button :submit, "Change my password"
|
|
|
+= render "devise/shared/links"
|
|
|
@@ -0,0 +1,10 @@ |
|
|
+- html = { method: :post, class: "form-signin" }
|
|
|
+- defaults = { label: false, input_html: { class: "input-xlarge" } }
|
|
|
+= simple_form_for resource, as: resource_name, url: password_path(resource_name), html: html, defaults: defaults do |f|
|
|
|
+ %h2.form-signin-heading= t(:forgot_password)
|
|
|
+ = f.error_notification
|
|
|
+ .form-inputs
|
|
|
+ = f.input :email, required: true
|
|
|
+ = f.button :submit, t(:send_me_reset_password_instructions), class: "btn btn-primary"
|
|
|
+ .shared-links
|
|
|
+ = render "devise/shared/links"
|
|
|
@@ -0,0 +1,15 @@ |
|
|
+%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
|
|
|
@@ -0,0 +1,12 @@ |
|
|
+- html = { class: "form-signin" }
|
|
|
+- defaults = { label: false, required: true, input_html: { class: "input-xlarge" } }
|
|
|
+= simple_form_for resource, as: resource_name, url: registration_path(resource_name), html: html, defaults: defaults do |f|
|
|
|
+ %h2.form-sighin-heading= t(:sign_up)
|
|
|
+ = f.error_notification
|
|
|
+ .form-inputs
|
|
|
+ = f.input :email, autofocus: true
|
|
|
+ = f.input :password
|
|
|
+ = f.input :password_confirmation
|
|
|
+ = f.button :submit, t(:do_sign_up), class: "btn btn-primary"
|
|
|
+ .shared-links
|
|
|
+ = render "devise/shared/links"
|
|
|
@@ -0,0 +1,11 @@ |
|
|
+- html = { class: "form-signin" }
|
|
|
+- defaults = { label: false, required: false, input_html: { class: "input-xlarge" } }
|
|
|
+= simple_form_for resource, as: resource_name, url: session_path(resource_name), html: html, defaults: defaults do |f|
|
|
|
+ %h2.form-signin-heading= t(:sign_in)
|
|
|
+ .form-inputs
|
|
|
+ = f.input :email, autofocus: true
|
|
|
+ = f.input :password
|
|
|
+ = f.input :remember_me, as: :boolean, inline_label: User.human_attribute_name(:remember_me) if devise_mapping.rememberable?
|
|
|
+ = f.button :submit, t(:do_sign_in), class: "btn btn-primary"
|
|
|
+ .shared-links
|
|
|
+ = render "devise/shared/links"
|
|
|
@@ -0,0 +1,19 @@ |
|
|
+- if controller_name != 'sessions'
|
|
|
+ = link_to t(:sign_in), new_session_path(resource_name)
|
|
|
+ %br/
|
|
|
+- if devise_mapping.registerable? && controller_name != 'registrations'
|
|
|
+ = link_to t(:sign_up), new_registration_path(resource_name)
|
|
|
+ %br/
|
|
|
+- if devise_mapping.recoverable? && controller_name != 'passwords'
|
|
|
+ = link_to t(:forgot_password), new_password_path(resource_name)
|
|
|
+ %br/
|
|
|
+- if devise_mapping.confirmable? && controller_name != 'confirmations'
|
|
|
+ = link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name)
|
|
|
+ %br/
|
|
|
+- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
|
|
|
+ = link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name)
|
|
|
+ %br/
|
|
|
+- if devise_mapping.omniauthable?
|
|
|
+ - resource_class.omniauth_providers.each do |provider|
|
|
|
+ = link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider)
|
|
|
+ %br/
|
|
|
@@ -0,0 +1,8 @@ |
|
|
+%h2 Resend unlock instructions
|
|
|
+= simple_form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f|
|
|
|
+ = f.error_notification
|
|
|
+ .form-inputs
|
|
|
+ = f.input :email, :required => true
|
|
|
+ .form-actions
|
|
|
+ = f.button :submit, "Resend unlock instructions"
|
|
|
+= render "devise/shared/links"
|
|
@@ -28,7 +28,7 @@ |
|
|
%li.divider
|
|
|
%li= link_to t("users.logout"), :destroy_user_session, method: :delete
|
|
|
- else
|
|
|
- = form_for "user", url: user_session_path, html: {action: user_session, class: "form-inline pull-right top-login"} do |f|
|
|
|
+ = form_for User.new, url: user_session_path, html: {action: user_session, class: "form-inline pull-right top-login"} do |f|
|
|
|
= f.email_field :email, placeholder: User.human_attribute_name(:email), class: "input-small"
|
|
|
= f.password_field :password, placeholder: User.human_attribute_name(:password), class: "input-small"
|
|
|
= f.submit t(:do_sign_in), class: "btn"
|
|
|
|
@@ -6,3 +6,4 @@ ru: |
|
|
email: Email
|
|
|
password: Пароль
|
|
|
password_confirmation: Подтверждение пароля
|
|
|
+ remember_me: Не выходить из системы
|
|
@@ -99,4 +99,6 @@ ru: |
|
|
sign_in: Вход
|
|
|
do_sign_up: Зарегистрироваться
|
|
|
do_sign_in: Войти
|
|
|
+ forgot_password: Забыли пароль?
|
|
|
+ send_me_reset_password_instructions: Выслать мне инструкции по сбросу пароля
|
|
|
|
|
@@ -10,16 +10,16 @@ ru: |
|
|
update: Обновить страницу
|
|
|
|
|
|
simple_form:
|
|
|
- "yes": 'Yes'
|
|
|
- "no": 'No'
|
|
|
+ "yes": 'Да'
|
|
|
+ "no": 'Нет'
|
|
|
required:
|
|
|
- text: 'required'
|
|
|
+ text: 'обязательное'
|
|
|
mark: '*'
|
|
|
# You can uncomment the line below if you need to overwrite the whole required html.
|
|
|
# When using html, text and mark won't be used.
|
|
|
# html: '<abbr title="required">*</abbr>'
|
|
|
error_notification:
|
|
|
- default_message: "Please review the problems below:"
|
|
|
+ default_message: "Возникли следующие ошибки:"
|
|
|
# Labels and hints examples
|
|
|
# labels:
|
|
|
# defaults:
|
|
@@ -44,4 +44,8 @@ ru: |
|
|
article:
|
|
|
title: Заголовок
|
|
|
body: Содержимое новости
|
|
|
+ user:
|
|
|
+ email: Email
|
|
|
+ password: Пароль
|
|
|
+ password_confirmation: Подтверждение пароля
|
|
|
|
0 comments on commit
c4e5c80