mno-enterprise-api 2.0.9 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/mno_enterprise/config.js.coffee.erb +10 -0
- data/app/controllers/mno_enterprise/impersonate_controller.rb +5 -13
- data/app/controllers/mno_enterprise/jpi/v1/admin/audit_events_controller.rb +2 -2
- data/app/controllers/mno_enterprise/jpi/v1/admin/organizations_controller.rb +1 -1
- data/app/controllers/mno_enterprise/jpi/v1/admin/theme_controller.rb +109 -0
- data/app/controllers/mno_enterprise/jpi/v1/admin/users_controller.rb +1 -1
- data/app/controllers/mno_enterprise/jpi/v1/app_instances_sync_controller.rb +2 -2
- data/app/controllers/mno_enterprise/jpi/v1/impac/widgets_controller.rb +59 -1
- data/app/controllers/mno_enterprise/status_controller.rb +2 -4
- data/app/views/mno_enterprise/auth/confirmations/{default/_form.html.haml → _form.html.haml} +13 -17
- data/app/views/mno_enterprise/auth/confirmations/lounge.html.haml +32 -4
- data/app/views/mno_enterprise/auth/confirmations/new.html.haml +2 -2
- data/app/views/mno_enterprise/auth/confirmations/show.html.haml +10 -4
- data/app/views/mno_enterprise/auth/passwords/edit.html.haml +2 -13
- data/app/views/mno_enterprise/auth/passwords/new.html.haml +2 -2
- data/app/views/mno_enterprise/auth/registrations/{default/_form.html.haml → _form.html.haml} +12 -11
- data/app/views/mno_enterprise/auth/registrations/new.html.haml +11 -4
- data/app/views/mno_enterprise/auth/sessions/{default/_form.html.haml → _form.html.haml} +5 -4
- data/app/views/mno_enterprise/auth/sessions/new.html.haml +11 -4
- data/app/views/mno_enterprise/auth/shared/_links.html.haml +6 -6
- data/app/views/mno_enterprise/auth/unlocks/new.html.haml +3 -2
- data/app/views/mno_enterprise/jpi/v1/current_users/show.json.jbuilder +4 -2
- data/app/views/mno_enterprise/jpi/v1/impac/kpis/_kpi.json.jbuilder +1 -1
- data/app/views/mno_enterprise/jpi/v1/organizations/_credit_card.json.jbuilder +2 -2
- data/app/views/mno_enterprise/pages/app_access_unauthorized.html.haml +4 -7
- data/app/views/mno_enterprise/pages/app_logout.html.haml +3 -6
- data/app/views/mno_enterprise/pages/billing_details_required.html.haml +4 -7
- data/app/views/mno_enterprise/provision/_provision_apps.html.haml +7 -9
- data/app/views/mno_enterprise/provision/_select_organization.html.haml +4 -4
- data/app/views/mno_enterprise/webhook/o_auth/authorize.html.haml +4 -4
- data/app/views/mno_enterprise/webhook/o_auth/providers/myob.html.haml +12 -11
- data/app/views/mno_enterprise/webhook/o_auth/providers/xero.html.haml +11 -10
- data/config/initializers/sprockets.rb +11 -0
- data/config/routes.rb +6 -1
- data/lib/mno_enterprise/api/engine.rb +10 -0
- data/lib/mno_enterprise/concerns/controllers/org_invites_controller.rb +2 -6
- data/lib/mno_enterprise/concerns/controllers/pages_controller.rb +1 -1
- data/lib/mno_enterprise/concerns/controllers/provision_controller.rb +1 -7
- data/lib/mno_enterprise/concerns/controllers/webhook/o_auth_controller.rb +15 -1
- data/lib/mno_enterprise/concerns/mailers/system_notification_mailer.rb +1 -2
- data/lib/tasks/non_digested_assets.rake +46 -0
- data/spec/controllers/mno_enterprise/impersonate_controller_spec.rb +4 -15
- data/spec/controllers/mno_enterprise/jpi/v1/app_instances_sync_controller_spec.rb +0 -8
- data/spec/controllers/mno_enterprise/jpi/v1/current_users_controller_spec.rb +2 -4
- data/spec/controllers/mno_enterprise/jpi/v1/impac/kpis_controller_spec.rb +2 -2
- data/spec/controllers/mno_enterprise/org_invites_controller_spec.rb +19 -46
- data/spec/controllers/mno_enterprise/status_controller_spec.rb +0 -4
- data/spec/controllers/mno_enterprise/webhook/o_auth_controller_spec.rb +13 -2
- data/spec/routing/mno_enterprise/{impersonate_controller_routing.spec.rb → impersonate_controller_routing_spec.rb} +1 -1
- data/spec/routing/mno_enterprise/jpi/v1/admin/theme_controller_routing_spec.rb +15 -0
- metadata +57 -63
- data/app/views/mno_enterprise/auth/confirmations/default/_lounge.html.haml +0 -34
- data/app/views/mno_enterprise/auth/confirmations/default/_show.html.haml +0 -10
- data/app/views/mno_enterprise/auth/confirmations/material/_form.html.haml +0 -44
- data/app/views/mno_enterprise/auth/confirmations/material/_lounge.html.haml +0 -18
- data/app/views/mno_enterprise/auth/confirmations/material/_show.html.haml +0 -21
- data/app/views/mno_enterprise/auth/registrations/default/_new.html.haml +0 -11
- data/app/views/mno_enterprise/auth/registrations/material/_form.html.haml +0 -30
- data/app/views/mno_enterprise/auth/registrations/material/_new.html.haml +0 -10
- data/app/views/mno_enterprise/auth/sessions/default/_new.html.haml +0 -11
- data/app/views/mno_enterprise/auth/sessions/material/_form.html.haml +0 -26
- data/app/views/mno_enterprise/auth/sessions/material/_new.html.haml +0 -11
- data/lib/mno_enterprise/concerns/controllers/jpi/v1/impac/widgets_controller.rb +0 -72
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce57f9284f88612e924df7c0cd054f49e73b3966
|
4
|
+
data.tar.gz: 4a017727ef7501242222557b3473ed132cc59a49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79e4618c0754140515cf6146337607ef38be216a379e27235741c6553d7f1ef1dd6ee2659ed107c1e1e4b40859d0b5f8eb8ebf824af45f78e128897750f95aa4
|
7
|
+
data.tar.gz: a970b387a73880e4c33e5bd4df6ece4338f7fec48f6c7e95ce2e3421f482f5a5bf22cf3985a91f33015174a07b49dd06f993f30b1b779337b4623ed83845d6d3
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Configuration module
|
2
|
+
#
|
3
|
+
# Recompile if the settings change
|
4
|
+
# = depend_on_config
|
5
|
+
angular.module('mnoEnterprise.configuration', [])
|
6
|
+
.constant('IMPAC_CONFIG', <%= Settings.impac.to_json %>)
|
7
|
+
.constant('I18N_CONFIG', {
|
8
|
+
enabled: <%= MnoEnterprise.i18n_enabled %>,
|
9
|
+
available_locales: <%= I18n.available_locales.to_json %>
|
10
|
+
})
|
@@ -2,13 +2,12 @@ module MnoEnterprise
|
|
2
2
|
class ImpersonateController < ApplicationController
|
3
3
|
include MnoEnterprise::ImpersonateHelper
|
4
4
|
|
5
|
-
before_filter :authenticate_user!, except: [
|
6
|
-
before_filter :current_user_must_be_admin!, except: [
|
5
|
+
before_filter :authenticate_user!, except: [:destroy]
|
6
|
+
before_filter :current_user_must_be_admin!, except: [:destroy]
|
7
7
|
|
8
8
|
# Perform the user impersonate action
|
9
9
|
# GET /impersonate/user/123
|
10
10
|
def create
|
11
|
-
session[:impersonator_redirect_path] = params[:redirect_path].presence
|
12
11
|
@user = MnoEnterprise::User.find(params[:user_id])
|
13
12
|
if @user.present?
|
14
13
|
impersonate(@user)
|
@@ -19,20 +18,13 @@ module MnoEnterprise
|
|
19
18
|
end
|
20
19
|
|
21
20
|
# Revert the user impersonation
|
22
|
-
#
|
21
|
+
# GET /impersonation/revert
|
23
22
|
def destroy
|
24
23
|
if current_impersonator
|
25
|
-
user = current_user
|
24
|
+
# user = current_user
|
26
25
|
revert_impersonate
|
27
|
-
if user
|
28
|
-
flash[:notice] = "No longer impersonating #{user}"
|
29
|
-
else
|
30
|
-
flash[:notice] = "No longer impersonating a user"
|
31
|
-
end
|
32
|
-
else
|
33
|
-
flash[:notice] = "You weren't impersonating anyone"
|
34
26
|
end
|
35
|
-
redirect_to
|
27
|
+
redirect_to '/admin/'
|
36
28
|
end
|
37
29
|
|
38
30
|
private
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module MnoEnterprise
|
2
2
|
class Jpi::V1::Admin::AuditEventsController < Jpi::V1::Admin::BaseResourceController
|
3
|
-
|
3
|
+
|
4
4
|
# GET /mnoe/jpi/v1/admin/audit_events
|
5
5
|
def index
|
6
6
|
@audit_events = MnoEnterprise::AuditEvent
|
@@ -8,7 +8,7 @@ module MnoEnterprise
|
|
8
8
|
@audit_events = @audit_events.skip(params[:offset]) if params[:offset]
|
9
9
|
@audit_events = @audit_events.order_by(params[:order_by]) if params[:order_by]
|
10
10
|
@audit_events = @audit_events.where(params[:where]) if params[:where]
|
11
|
-
@audit_events = @audit_events.all
|
11
|
+
@audit_events = @audit_events.all
|
12
12
|
|
13
13
|
response.headers['X-Total-Count'] = @audit_events.metadata[:pagination][:count]
|
14
14
|
end
|
@@ -8,7 +8,7 @@ module MnoEnterprise
|
|
8
8
|
@organizations = @organizations.skip(params[:offset]) if params[:offset]
|
9
9
|
@organizations = @organizations.order_by(params[:order_by]) if params[:order_by]
|
10
10
|
@organizations = @organizations.where(params[:where]) if params[:where]
|
11
|
-
@organizations = @organizations.all
|
11
|
+
@organizations = @organizations.all
|
12
12
|
|
13
13
|
response.headers['X-Total-Count'] = @organizations.metadata[:pagination][:count]
|
14
14
|
end
|
@@ -0,0 +1,109 @@
|
|
1
|
+
require 'rake'
|
2
|
+
|
3
|
+
Rake::Task.clear # necessary to avoid tasks being loaded several times in dev mode
|
4
|
+
Rails.application.load_tasks # load application tasks
|
5
|
+
|
6
|
+
module MnoEnterprise
|
7
|
+
class Jpi::V1::Admin::ThemeController < Jpi::V1::Admin::BaseResourceController
|
8
|
+
# No xsrf
|
9
|
+
skip_before_filter :verify_authenticity_token
|
10
|
+
|
11
|
+
# POST /mnoe/jpi/v1/admin/theme/save
|
12
|
+
def save
|
13
|
+
if params[:publish]
|
14
|
+
# Recompile style for production use
|
15
|
+
apply_previewer_style(params[:theme])
|
16
|
+
publish_style
|
17
|
+
else
|
18
|
+
# Save and rebuild previewer style only
|
19
|
+
# (so it is kept across page reloads)
|
20
|
+
save_previewer_style(params[:theme])
|
21
|
+
rebuild_previewer_style
|
22
|
+
end
|
23
|
+
|
24
|
+
render json: {status: 'Ok'}, status: :created
|
25
|
+
end
|
26
|
+
|
27
|
+
# POST /mnoe/jpi/v1/admin/theme/reset
|
28
|
+
def reset
|
29
|
+
reset_previewer_style
|
30
|
+
rebuild_previewer_style
|
31
|
+
render json: {status: 'Ok'}
|
32
|
+
end
|
33
|
+
|
34
|
+
# POST /mnoe/jpi/v1/admin/theme/logo
|
35
|
+
def logo
|
36
|
+
logo_content = params[:logo].read
|
37
|
+
[
|
38
|
+
'frontend/src/images/main-logo.png',
|
39
|
+
'public/dashboard/images/main-logo.png',
|
40
|
+
'app/assets/images/mno_enterprise/main-logo.png'
|
41
|
+
].each do |filepath|
|
42
|
+
FileUtils.mkdir_p(File.dirname(Rails.root.join(filepath)))
|
43
|
+
File.open(Rails.root.join(filepath),'wb') { |f| f.write(logo_content) }
|
44
|
+
end
|
45
|
+
render json: {status: 'Ok'}, status: :created
|
46
|
+
end
|
47
|
+
|
48
|
+
#=====================================================
|
49
|
+
# Protected
|
50
|
+
#=====================================================
|
51
|
+
protected
|
52
|
+
|
53
|
+
# Save current style to theme-previewer-tmp.less stylesheet
|
54
|
+
# This file overrides theme-previewer-published.less
|
55
|
+
def save_previewer_style(theme)
|
56
|
+
target = Rails.root.join('frontend', 'src','app','stylesheets','theme-previewer-tmp.less')
|
57
|
+
File.open(target, 'w') { |f| f.write(theme_to_less(theme)) }
|
58
|
+
end
|
59
|
+
|
60
|
+
# Save style to theme-previewer-published.less and discard theme-previewer-tmp.less
|
61
|
+
def apply_previewer_style(theme)
|
62
|
+
target = Rails.root.join('frontend', 'src','app','stylesheets','theme-previewer-published.less')
|
63
|
+
File.open(target, 'w') { |f| f.write(theme_to_less(theme)) }
|
64
|
+
reset_previewer_style
|
65
|
+
end
|
66
|
+
|
67
|
+
def reset_previewer_style
|
68
|
+
target = Rails.root.join('frontend', 'src','app','stylesheets','theme-previewer-tmp.less')
|
69
|
+
File.exist?(target) && File.delete(target)
|
70
|
+
end
|
71
|
+
|
72
|
+
def rebuild_previewer_style
|
73
|
+
Rake::Task['mnoe:frontend:rebuild_previewer_style'].reenable
|
74
|
+
Rake::Task['mnoe:frontend:rebuild_previewer_style'].invoke
|
75
|
+
end
|
76
|
+
|
77
|
+
def publish_style
|
78
|
+
Rake::Task['mnoe:frontend:dist'].reenable
|
79
|
+
Rake::Task['mnoe:frontend:dist'].invoke
|
80
|
+
end
|
81
|
+
|
82
|
+
# Convert a theme provided as a hash into a properly
|
83
|
+
# formatted LESS file
|
84
|
+
def theme_to_less(theme)
|
85
|
+
out = "// Generated by the Express Theme Previewer\n"
|
86
|
+
|
87
|
+
if theme[:branding]
|
88
|
+
out += "\n//----------------------------------------\n"
|
89
|
+
out += "// General Branding\n"
|
90
|
+
out += "//----------------------------------------\n"
|
91
|
+
out += theme[:branding].map { |k,v| "#{k}: #{v};" }.join("\n")
|
92
|
+
out += "\n"
|
93
|
+
end
|
94
|
+
|
95
|
+
if theme[:variables]
|
96
|
+
out += "\n//----------------------------------------\n"
|
97
|
+
out += "// Theme Variables\n"
|
98
|
+
out += "//----------------------------------------\n"
|
99
|
+
theme[:variables].each do |section,vars|
|
100
|
+
out += "// #{section}\n"
|
101
|
+
out += vars.map { |k,v| "#{k}: #{v};" }.join("\n")
|
102
|
+
out += "\n\n"
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
return out
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
@@ -8,7 +8,7 @@ module MnoEnterprise
|
|
8
8
|
@users = @users.skip(params[:offset]) if params[:offset]
|
9
9
|
@users = @users.order_by(params[:order_by]) if params[:order_by]
|
10
10
|
@users = @users.where(params[:where]) if params[:where]
|
11
|
-
@users = @users.all
|
11
|
+
@users = @users.all
|
12
12
|
|
13
13
|
response.headers['X-Total-Count'] = @users.metadata[:pagination][:count]
|
14
14
|
end
|
@@ -1,6 +1,5 @@
|
|
1
1
|
module MnoEnterprise
|
2
2
|
class Jpi::V1::AppInstancesSyncController < Jpi::V1::BaseResourceController
|
3
|
-
CONNECTOR_STATUS_RUNNING = ['PENDING', 'RUNNING']
|
4
3
|
|
5
4
|
# GET /mnoe/jpi/v1/organization/org-fbba/app_instances_sync
|
6
5
|
def index
|
@@ -29,8 +28,9 @@ module MnoEnterprise
|
|
29
28
|
def results(connectors)
|
30
29
|
{
|
31
30
|
connectors: connectors,
|
32
|
-
is_syncing: connectors.any?
|
31
|
+
is_syncing: connectors.any?{|c| c[:status]=="RUNNING" }
|
33
32
|
}
|
34
33
|
end
|
34
|
+
|
35
35
|
end
|
36
36
|
end
|
@@ -1,5 +1,63 @@
|
|
1
1
|
module MnoEnterprise
|
2
2
|
class Jpi::V1::Impac::WidgetsController < Jpi::V1::BaseResourceController
|
3
|
-
|
3
|
+
respond_to :json
|
4
|
+
|
5
|
+
# POST /mnoe/jpi/v1/impac/dashboards/:id/widgets
|
6
|
+
# -> POST /api/mnoe/v1/dashboards/:id/widgets
|
7
|
+
def create
|
8
|
+
if widgets
|
9
|
+
if @widget = widgets.create(format_attrs(['widget_category','metadata']))
|
10
|
+
MnoEnterprise::EventLogger.info('widget_create', current_user.id, 'Widget Creation', nil, @widget)
|
11
|
+
@nocontent = true # no data fetch from Connec!
|
12
|
+
render 'show'
|
13
|
+
else
|
14
|
+
render json: @widget.errors, status: :bad_request
|
15
|
+
end
|
16
|
+
else
|
17
|
+
render json: { errors: "Dashboard id #{params[:id]} doesn't exist" }, status: :not_found
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
# PUT /mnoe/jpi/v1/impac/widgets/:id
|
22
|
+
def update
|
23
|
+
if widget.update(format_attrs(['name','metadata']))
|
24
|
+
@nocontent = !params['metadata']
|
25
|
+
render 'show'
|
26
|
+
else
|
27
|
+
render json: @widget.errors, status: :bad_request
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
# DELETE /mnoe/jpi/v1/impac/dashboards/1
|
32
|
+
def destroy
|
33
|
+
if widget.destroy
|
34
|
+
MnoEnterprise::EventLogger.info('widget_delete', current_user.id, 'Widget Deletion', nil, widget)
|
35
|
+
head status: :ok
|
36
|
+
else
|
37
|
+
render json: 'Unable to destroy widget', status: :bad_request
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
|
42
|
+
#=================================================
|
43
|
+
# Private methods
|
44
|
+
#=================================================
|
45
|
+
private
|
46
|
+
|
47
|
+
def widget
|
48
|
+
@widget ||= MnoEnterprise::Impac::Widget.find(params[:id])
|
49
|
+
end
|
50
|
+
|
51
|
+
def widgets
|
52
|
+
@widgets ||= MnoEnterprise::Impac::Dashboard.find(params[:dashboard_id]).widgets
|
53
|
+
end
|
54
|
+
|
55
|
+
def format_attrs(whitelist)
|
56
|
+
attrs = (params[:widget] || {}).select { |k,v| whitelist.include?(k.to_s) }
|
57
|
+
attrs['settings'] = widget ? widget.settings || {} : {}
|
58
|
+
attrs['settings'].merge!(attrs['metadata']) if attrs['metadata']
|
59
|
+
attrs.except!('metadata')
|
60
|
+
end
|
61
|
+
|
4
62
|
end
|
5
63
|
end
|
@@ -13,15 +13,13 @@ module MnoEnterprise
|
|
13
13
|
# {
|
14
14
|
# 'app-version': '9061048-6811c4a',
|
15
15
|
# 'mno-enterprise-version': '0.0.1',
|
16
|
-
# 'env': 'test'
|
17
|
-
# 'mno-api-host': 'https://uat.maestrano.io'
|
16
|
+
# 'env': 'test'
|
18
17
|
# }
|
19
18
|
def version
|
20
19
|
data = {
|
21
20
|
'app-version' => MnoEnterprise::APP_VERSION,
|
22
21
|
'mno-enteprise-version' => MnoEnterprise::VERSION,
|
23
|
-
'env' => Rails.env
|
24
|
-
'mno-api-host' => MnoEnterprise.mno_api_host
|
22
|
+
'env' => Rails.env
|
25
23
|
}
|
26
24
|
render json: data
|
27
25
|
end
|
data/app/views/mno_enterprise/auth/confirmations/{default/_form.html.haml → _form.html.haml}
RENAMED
@@ -1,49 +1,45 @@
|
|
1
|
-
%div{ 'ng-init' => "user = { $pwdScore: {}, name: '#{resource.name}', surname: '#{resource.surname}'
|
1
|
+
%div{ 'ng-init' => "user = { $pwdScore: {}, name: '#{resource.name}', surname: '#{resource.surname}' }" }
|
2
2
|
|
3
3
|
= form_for(resource, as: resource_name, :url => mno_enterprise.user_confirmation_finalize_path, :html => { 'name' => 'loginForm', :class => 'autofill-detect text-center' }) do |f|
|
4
4
|
|
5
5
|
.row
|
6
6
|
.col-sm-12
|
7
7
|
= f.text_field :name, placeholder: "*First Name", required: true, 'ng-model' => 'user.name', class:'form-control'
|
8
|
-
|
8
|
+
|
9
9
|
%br
|
10
|
-
|
10
|
+
|
11
11
|
.row
|
12
12
|
.col-sm-12
|
13
13
|
= f.text_field :surname, placeholder: "*Last Name", required: true, 'ng-model' => 'user.surname', class: 'form-control'
|
14
|
-
|
14
|
+
|
15
15
|
- if @phone_required && MnoEnterprise.style.devise.phone_required
|
16
16
|
%br
|
17
17
|
.row
|
18
18
|
.col-sm-12
|
19
19
|
.phone
|
20
20
|
= f.select :phone_country_code, options_for_select(Country.all.map { |country,code| c = Country.new(code); ["#{c.alpha2} +#{c.country_code}", code]}, MnoEnterprise.app_country), {}, class: 'form-control unstyled'
|
21
|
-
= f.text_field :phone, placeholder: "*Phone", required: true, 'ng-model' => 'user.
|
21
|
+
= f.text_field :phone, placeholder: "*Phone", required: true, 'ng-model' => 'user.phone_number', class: 'form-control'
|
22
22
|
|
23
23
|
%br
|
24
|
-
|
24
|
+
|
25
25
|
- # Password: two validation styles offered
|
26
26
|
.row
|
27
27
|
.col-sm-12
|
28
28
|
- if !!MnoEnterprise.style.devise.password_complexity_deep_check
|
29
29
|
%div{'mno-password' => 'user', form: "loginForm"}
|
30
|
-
|
31
|
-
.text-center.ng-hide{ 'ng-show' => 'user.$pwdScore.showTip' }
|
32
|
-
%small.text-danger Password is not strong enough. Try mixing letters, numbers and cases
|
33
|
-
|
30
|
+
|
34
31
|
- else
|
35
32
|
.input-group
|
36
33
|
= f.password_field :password, :placeholder => "*Choose Password", 'ng-model' => 'user.password', class: 'form-control', 'ng-minlength' => 6, 'mno-password-strength' => true, "password-score" => 'user.$pwdScore', :required => true
|
37
34
|
%span.input-group-addon.classic.pw-strength-indicator{'ng-class' => 'user.$pwdScore.class' }
|
38
35
|
{{ user.$pwdScore.value }}
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
36
|
+
|
37
|
+
.text-center.ng-hide{ 'ng-show' => 'user.$pwdScore.showTip' }
|
38
|
+
%small.text-danger= t('activemodel.errors.mno_enterprise/user.password_weak')
|
39
|
+
|
44
40
|
= f.hidden_field :confirmation_token, value: @confirmation_token
|
45
|
-
|
41
|
+
|
46
42
|
%br/
|
47
43
|
%div
|
48
|
-
%button{ :class => "btn btn-warning btn-login", :type => "submit", 'ng-click' => 'hasClicked = true', 'ng-disabled' => 'loginForm.$invalid', 'ng-hide' => 'hasClicked' }
|
44
|
+
%button{ :class => "btn btn-warning btn-login", :type => "submit", 'ng-click' => 'hasClicked = true', 'ng-disabled' => 'loginForm.$invalid', 'ng-hide' => 'hasClicked' }= t('mno_enterprise.auth.confirmations.show.confirm')
|
49
45
|
%img.ng-hide{ 'ng-src' => asset_path('mno_enterprise/loader-32x32-bg-inverse.gif'), 'ng-show' => 'hasClicked' }
|
@@ -1,4 +1,32 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
.banners.promo.dark.darkblue.confirmation-lounge
|
2
|
+
.container
|
3
|
+
.row
|
4
|
+
.col-md-8.col-md-offset-2
|
5
|
+
.row
|
6
|
+
.align-center
|
7
|
+
%i.fa.fa-envelope
|
8
|
+
%h4= t('mno_enterprise.auth.confirmations.lounge.title')
|
9
|
+
%h5= t('mno_enterprise.auth.confirmations.lounge.subtitle')
|
10
|
+
|
11
|
+
%div{ 'ng-init' => "email = '#{@resource.email}'"}
|
12
|
+
= form_for(@resource, :as => resource_name, :url => mno_enterprise.user_confirmation_path, :html => { 'name' => 'form', :class => 'dark form-horizontal', :autocomplete => "off" }) do |f|
|
13
|
+
- unless devise_error_messages!.empty?
|
14
|
+
%div
|
15
|
+
.alert.alert-error
|
16
|
+
%button.close{ 'data-dismiss' => "alert" } ×
|
17
|
+
= devise_error_messages!
|
18
|
+
.spacer2
|
19
|
+
.form-group
|
20
|
+
.col-sm-6.col-sm-offset-2
|
21
|
+
.input-prepend
|
22
|
+
= f.email_field :email, :placeholder => "Email", :required => true, 'ng-model' => 'email', :class => 'input-xlarge'
|
23
|
+
.col-sm-2
|
24
|
+
%button{ :class => "btn btn-lg btn-warning", :type => "submit", 'ng-click' => 'hasClicked = true', 'ng-disabled' => 'form.$invalid', 'ng-hide' => 'hasClicked' }= t('mno_enterprise.auth.confirmations.lounge.resend')
|
25
|
+
%img{ class: 'loader-sm', 'ng-src' => asset_path('mno_enterprise/loader-32x32-bg-main.gif'), 'ng-show' => 'hasClicked' }
|
26
|
+
|
27
|
+
.spacer2
|
28
|
+
.row
|
29
|
+
.col-md-12
|
30
|
+
.align-center
|
31
|
+
%h5
|
32
|
+
= t('mno_enterprise.auth.confirmations.lounge.support_tip_html', email: mail_to(support_email, t('mno_enterprise.auth.confirmations.lounge.support_team'), subject: t('mno_enterprise.auth.confirmations.lounge.support_email_subject')))
|
@@ -5,7 +5,7 @@
|
|
5
5
|
.row
|
6
6
|
.login-box-wrapper
|
7
7
|
.login-box-title
|
8
|
-
%h2
|
8
|
+
%h2= t('.title')
|
9
9
|
.login-box
|
10
10
|
.brand-logo
|
11
11
|
= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post, class: 'form-horizontal autofill-detect' }) do |f|
|
@@ -25,7 +25,7 @@
|
|
25
25
|
.row
|
26
26
|
.col-sm-12
|
27
27
|
.text-center
|
28
|
-
%button{ :class => "btn btn-warning", :type => "submit", 'ng-click' => 'hasClicked = true', 'ng-disabled' => 'form.$invalid', 'ng-hide' => 'hasClicked' }
|
28
|
+
%button{ :class => "btn btn-warning", :type => "submit", 'ng-click' => 'hasClicked = true', 'ng-disabled' => 'form.$invalid', 'ng-hide' => 'hasClicked' }= t('.resend')
|
29
29
|
%img.ng-hide{ 'ng-src' => asset_path('mno_enterprise/loader-32x32-bg-inverse.gif'), 'ng-show' => 'hasClicked' }
|
30
30
|
%hr
|
31
31
|
= render "devise/shared/links"
|
@@ -1,4 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
.registration
|
2
|
+
.container
|
3
|
+
.row
|
4
|
+
//.col-md-6.col-md-offset-3
|
5
|
+
.login-box-wrapper
|
6
|
+
.login-box-title
|
7
|
+
%h2= t('mno_enterprise.auth.confirmations.show.title')
|
8
|
+
.login-box
|
9
|
+
.brand-logo
|
10
|
+
= render "mno_enterprise/auth/confirmations/form"
|