mirror of
https://github.com/internetee/registry.git
synced 2025-06-12 07:34:45 +02:00
Merge branch 'master' into registry-790
This commit is contained in:
commit
3d51a93f95
104 changed files with 728 additions and 557 deletions
|
@ -11,9 +11,9 @@
|
|||
= f.text_field :username, required: true, autofocus: true, class: 'form-control'
|
||||
.form-group
|
||||
.col-md-4.control-label
|
||||
= f.label :password, nil, class: 'required'
|
||||
= f.label :plain_text_password, nil, class: 'required'
|
||||
.col-md-7
|
||||
= f.text_field :password, required: true, class: 'form-control'
|
||||
= f.text_field :plain_text_password, required: true, class: 'form-control'
|
||||
|
||||
.form-group
|
||||
.col-md-4.control-label
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
%dd= @api_user.username
|
||||
|
||||
%dt= t(:password)
|
||||
%dd= @api_user.password
|
||||
%dd= @api_user.plain_text_password
|
||||
|
||||
%dt= t(:registrar_name)
|
||||
%dd= link_to(@api_user.registrar, admin_registrar_path(@api_user.registrar))
|
||||
|
|
|
@ -39,6 +39,6 @@
|
|||
%li= link_to t('.repp_log'), admin_repp_logs_path(created_after: 'today')
|
||||
%li= link_to t('.que'), '/admin/que'
|
||||
|
||||
- if signed_in?
|
||||
%ul.nav.navbar-nav.navbar-right
|
||||
%li= link_to t(:log_out, user: current_user), '/admin/logout'
|
||||
%ul.nav.navbar-nav.navbar-right
|
||||
%li= link_to t('.sign_out'), destroy_admin_user_session_path, method: :delete,
|
||||
class: 'navbar-link'
|
29
app/views/admin/sessions/_links.html.erb
Normal file
29
app/views/admin/sessions/_links.html.erb
Normal file
|
@ -0,0 +1,29 @@
|
|||
<%- if controller_name != 'sessions' %>
|
||||
<%= link_to "Log in", new_session_path(resource_name) %><br/>
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
||||
<%= link_to "Sign up", new_registration_path(resource_name) %><br/>
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.recoverable? && controller_name != 'passwords' &&
|
||||
controller_name != 'registrations' %>
|
||||
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br/>
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
||||
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %>
|
||||
<br/>
|
||||
<% end -%>
|
||||
|
||||
<%- 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/>
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.omniauthable? %>
|
||||
<%- resource_class.omniauth_providers.each do |provider| %>
|
||||
<%= link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}",
|
||||
omniauth_authorize_path(resource_name, provider) %><br/>
|
||||
<% end -%>
|
||||
<% end -%>
|
|
@ -1,15 +0,0 @@
|
|||
.row
|
||||
.form-signin.col-md-6.center-block.text-center
|
||||
%h2.form-signin-heading.text-center Eesti Interneti SA
|
||||
%hr
|
||||
.form-signin
|
||||
= form_for(@admin_user, url: admin_sessions_path, method: :create, html: {class: 'form-signin'}) do |f|
|
||||
= render 'admin/shared/errors', object: f.object
|
||||
|
||||
- error_class = f.object.errors.any? ? 'has-error' : ''
|
||||
%div{class: error_class}
|
||||
= f.text_field :username, class: 'form-control', placeholder: t(:username), required: true
|
||||
= f.password_field :password, class: 'form-control',
|
||||
autocomplete: 'off', placeholder: t(:password), required: true
|
||||
%button.btn.btn-lg.btn-primary.btn-block{:type => 'submit'}= t(:log_in)
|
||||
|
29
app/views/admin/sessions/new.html.erb
Normal file
29
app/views/admin/sessions/new.html.erb
Normal file
|
@ -0,0 +1,29 @@
|
|||
<div class="row">
|
||||
<%= form_for resource, as: resource_name, url: session_path(resource_name),
|
||||
html: { class: 'col-md-6 form-signin center-block text-center' } do |f| %>
|
||||
<h1 class="form-signin-heading text-center"><%= t '.header_html' %></h1>
|
||||
|
||||
<hr>
|
||||
|
||||
<%= f.label :username, class: 'sr-only' %>
|
||||
<%= f.text_field :username, placeholder: AdminUser.human_attribute_name(:username),
|
||||
required: true,
|
||||
autofocus: true,
|
||||
class: 'form-control' %>
|
||||
|
||||
<%= f.label :password, class: 'sr-only' %>
|
||||
<%= f.password_field :password, placeholder: AdminUser.human_attribute_name(:password),
|
||||
required: true,
|
||||
class: 'form-control' %>
|
||||
|
||||
<% if devise_mapping.rememberable? -%>
|
||||
<div class="checkbox">
|
||||
<label><%= f.check_box :remember_me %> <%= t '.remember_checkbox' %> %></label>
|
||||
</div>
|
||||
<% end -%>
|
||||
|
||||
<%= f.submit t('.sign_in_btn'), class: 'btn btn-lg btn-primary btn-block' %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= render 'links' %>
|
|
@ -1,5 +0,0 @@
|
|||
- if object.errors.any?
|
||||
%p.text-danger
|
||||
- object.errors.each do |attr, err|
|
||||
= err
|
||||
%br
|
Loading…
Add table
Add a link
Reference in a new issue