mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 21:54:48 +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
|
|
@ -10,7 +10,7 @@
|
|||
= csrf_meta_tags
|
||||
= stylesheet_link_tag 'admin-manifest', media: 'all'
|
||||
= favicon_link_tag 'favicon.ico'
|
||||
%body{:style => env_style}
|
||||
%body{:style => env_style, class: body_css_class}
|
||||
.navbar.navbar-inverse.navbar-static-top{role: "navigation"}
|
||||
.container
|
||||
.navbar-header
|
||||
|
@ -19,7 +19,7 @@
|
|||
%span.icon-bar
|
||||
%span.icon-bar
|
||||
%span.icon-bar
|
||||
= link_to admin_dashboard_path, class: 'navbar-brand' do
|
||||
= link_to admin_root_path, class: 'navbar-brand' do
|
||||
= ENV['app_name']
|
||||
- if unstable_env.present?
|
||||
.text-center
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
= csrf_meta_tags
|
||||
= stylesheet_link_tag 'admin-manifest', media: 'all'
|
||||
= favicon_link_tag 'favicon.ico'
|
||||
%body{:style => env_style}
|
||||
%body{:style => env_style, class: body_css_class}
|
||||
.navbar.navbar-inverse.navbar-static-top{role: "navigation"}
|
||||
.container
|
||||
.navbar-header
|
||||
|
@ -18,7 +18,7 @@
|
|||
%span.icon-bar
|
||||
%span.icon-bar
|
||||
%span.icon-bar
|
||||
= link_to admin_dashboard_path, class: 'navbar-brand' do
|
||||
= link_to new_admin_user_session_path, class: 'navbar-brand' do
|
||||
= ENV['app_name']
|
||||
- if unstable_env.present?
|
||||
.text-center
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<%= stylesheet_link_tag 'registrant-manifest', media: 'all' %>
|
||||
<%= favicon_link_tag 'favicon.ico' %>
|
||||
</head>
|
||||
<body>
|
||||
<body class="<%= body_css_class %>">
|
||||
<!-- Fixed navbar
|
||||
-->
|
||||
<nav class="navbar navbar-default navbar-fixed-top">
|
||||
|
@ -37,7 +37,7 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if current_user %>
|
||||
<% if current_registrant_user %>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav public-nav">
|
||||
<% if can? :view, Depp::Domain %>
|
||||
|
@ -54,9 +54,9 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<% if user_signed_in? %>
|
||||
<% if registrant_user_signed_in? %>
|
||||
<li>
|
||||
<%= link_to t(:log_out, user: current_user), '/registrant/logout' %>
|
||||
<%= link_to t(:log_out, user: current_registrant_user), destroy_registrant_user_session_path, method: :delete %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<%= stylesheet_link_tag 'registrar-manifest', media: 'all' %>
|
||||
<%= favicon_link_tag 'favicon.ico' %>
|
||||
</head>
|
||||
<body>
|
||||
<body class="<%= body_css_class %>">
|
||||
<nav class="navbar navbar-default navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
|
@ -24,7 +24,8 @@
|
|||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<%= link_to registrar_root_path, class: 'navbar-brand' do %>
|
||||
<%= link_to can?(:show, :poll) ? registrar_root_path : registrar_profile_path,
|
||||
class: 'navbar-brand' do %>
|
||||
<%= t(:registrar_head_title) %>
|
||||
<% if unstable_env.present? %>
|
||||
<div class="text-center">
|
||||
|
|
|
@ -13,12 +13,11 @@
|
|||
<%= stylesheet_link_tag 'registrar-manifest', media: 'all' %>
|
||||
<%= javascript_include_tag 'registrar-manifest' %>
|
||||
</head>
|
||||
<body>
|
||||
<body class="<%= body_css_class %>">
|
||||
<nav class="navbar navbar-default navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<%= link_to registrar_root_path, class: 'navbar-brand',
|
||||
id: 'registrar-home-btn' do %>
|
||||
<%= link_to new_registrar_user_session_path, class: 'navbar-brand' do %>
|
||||
<%= t(:registrar_head_title) %>
|
||||
<% if unstable_env.present? %>
|
||||
<div class="text-center">
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
.row
|
||||
.form-signin.col-md-6.center-block.text-center
|
||||
%h2.form-signin-heading.text-center= t(:log_in)
|
||||
%hr
|
||||
.row
|
||||
=t "only_estonian_residets_can_signin"
|
||||
%br
|
||||
= link_to '/registrant/login/mid' do
|
||||
= image_tag 'mid.gif'
|
||||
= link_to '/registrant/id', method: :post do
|
||||
= image_tag 'id_card.gif'
|
|
@ -1,12 +1,12 @@
|
|||
.row
|
||||
.form-signin.col-md-4.center-block.text-center
|
||||
%h2.form-signin-heading.text-center= t(:log_in_with_mid)
|
||||
%h2.form-signin-heading.text-center= t '.header'
|
||||
%hr
|
||||
= form_for @user, url: registrant_mid_path, auto_html5_validation: false,
|
||||
html: {class: 'form-signin'} do |f|
|
||||
= f.text_field :phone, class: 'form-control',
|
||||
placeholder: t(:phone_no), autocomplete: 'off', required: true
|
||||
%button.btn.btn-lg.btn-primary.btn-block.js-login{:type => 'submit'}= t(:log_in)
|
||||
%button.btn.btn-lg.btn-primary.btn-block.js-login{:type => 'submit'}= t '.submit_btn'
|
||||
|
||||
- if ['development', 'alpha'].include?(Rails.env)
|
||||
%div.text-center
|
||||
|
|
18
app/views/registrant/sessions/new.html.erb
Normal file
18
app/views/registrant/sessions/new.html.erb
Normal file
|
@ -0,0 +1,18 @@
|
|||
<div class="row">
|
||||
<div class="form-signin col-md-6 center-block text-center">
|
||||
<h2 class="form-signin-heading text-center">
|
||||
<%= t '.header' %>
|
||||
</h2>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<%= t '.hint' %>
|
||||
</div>
|
||||
<br/>
|
||||
<%= link_to '/registrant/login/mid' do %>
|
||||
<%= image_tag 'mid.gif' %>
|
||||
<% end %>
|
||||
<%= link_to '/registrant/id', method: :post do %>
|
||||
<%= image_tag 'id_card.gif' %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
|
@ -1,5 +1,5 @@
|
|||
<% current_user_presenter = UserPresenter.new(user: current_user, view: self) %>
|
||||
<% current_user_presenter = UserPresenter.new(user: current_registrar_user, view: self) %>
|
||||
<%= link_to current_user_presenter.login_with_role, registrar_profile_path, id: 'registrar-profile-btn',
|
||||
class: 'navbar-link' %>
|
||||
<span class="text-muted">|</span>
|
||||
<%= link_to t('.sign_out'), registrar_destroy_user_session_path, method: :delete, class: 'navbar-link' %>
|
||||
<%= link_to t('.sign_out'), destroy_registrar_user_session_path, method: :delete, class: 'navbar-link' %>
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
.panel.panel-default
|
||||
.panel-body
|
||||
= t('welcome_to_eis_registrar_portal')
|
|
@ -4,8 +4,8 @@
|
|||
= render 'shared/title', name: t(:your_account)
|
||||
|
||||
= t(:your_current_account_balance_is,
|
||||
balance: currency(current_user.registrar.cash_account.balance),
|
||||
currency: current_user.registrar.cash_account.currency)
|
||||
balance: currency(current_registrar_user.registrar.cash_account.balance),
|
||||
currency: current_registrar_user.registrar.cash_account.currency)
|
||||
|
||||
%h1= t(:invoices)
|
||||
.row
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
.row
|
||||
.form-signin.col-md-6.center-block.text-center
|
||||
%h2.form-signin-heading.text-center= t(:log_in)
|
||||
%hr
|
||||
= form_for @depp_user, url: registrar_sessions_path, html: {class: 'form-signin'} do |f|
|
||||
= render 'registrar/shared/errors', object: f.object
|
||||
|
||||
- error_class = f.object.errors.any? ? 'has-error' : ''
|
||||
%div{class: error_class}
|
||||
= f.text_field :tag, 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('.login_btn')
|
||||
|
||||
%hr
|
||||
= link_to '/registrar/login/mid', id: 'login-with-mobile-id-btn' do
|
||||
= image_tag 'mid.gif'
|
||||
= link_to '/registrar/id', method: :post do
|
||||
= image_tag 'id_card.gif'
|
||||
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
.row
|
||||
.form-signin.col-md-4.center-block.text-center
|
||||
%h2.form-signin-heading.text-center= t(:log_in_with_mid)
|
||||
%h2.form-signin-heading.text-center= t '.header'
|
||||
%hr
|
||||
= form_for @user, url: registrar_mid_path, auto_html5_validation: false,
|
||||
html: {class: 'form-signin'} do |f|
|
||||
= f.text_field :phone, class: 'form-control',
|
||||
placeholder: t(:phone_no), autocomplete: 'off', required: true
|
||||
%button.btn.btn-lg.btn-primary.btn-block.js-login{:type => 'submit'}= t('.login_btn')
|
||||
%button.btn.btn-lg.btn-primary.btn-block.js-login{:type => 'submit'}= t '.submit_btn'
|
||||
|
||||
- if ['development', 'alpha'].include?(Rails.env)
|
||||
%div.text-center
|
||||
|
|
30
app/views/registrar/sessions/new.html.erb
Normal file
30
app/views/registrar/sessions/new.html.erb
Normal file
|
@ -0,0 +1,30 @@
|
|||
<div class="row">
|
||||
<div class="form-signin col-md-6 center-block text-center">
|
||||
<h1 class="form-signin-heading text-center"><%= t '.header_html' %></h1>
|
||||
|
||||
<hr>
|
||||
|
||||
<%= form_for resource, as: resource_name, url: session_path(resource_name) do |f| %>
|
||||
<%= f.text_field :username, placeholder: ApiUser.human_attribute_name(:username),
|
||||
autofocus: true,
|
||||
required: true,
|
||||
class: 'form-control' %>
|
||||
<%= f.password_field :password,
|
||||
placeholder: ApiUser.human_attribute_name(:password),
|
||||
required: true,
|
||||
class: 'form-control' %>
|
||||
|
||||
<%= f.submit t('.submit_btn'), class: 'btn btn-lg btn-primary btn-block' %>
|
||||
<% end %>
|
||||
|
||||
<hr>
|
||||
|
||||
<%= link_to '/registrar/login/mid', id: 'login-with-mobile-id-btn' do %>
|
||||
<%= image_tag 'mid.gif' %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to '/registrar/id', method: :post do %>
|
||||
<%= image_tag 'id_card.gif' %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
|
@ -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