mno-enterprise-api 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (208) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +1 -0
  3. data/Rakefile +12 -0
  4. data/app/assets/javascripts/mno_enterprise/angular/loading-page.app.js.coffee +156 -0
  5. data/app/assets/javascripts/mno_enterprise/application.js +13 -0
  6. data/app/controllers/devise/password_expired_controller.rb +55 -0
  7. data/app/controllers/mno_enterprise/auth/confirmations_controller.rb +5 -0
  8. data/app/controllers/mno_enterprise/auth/omniauth_callbacks_controller.rb +30 -0
  9. data/app/controllers/mno_enterprise/auth/passwords_controller.rb +5 -0
  10. data/app/controllers/mno_enterprise/auth/registrations_controller.rb +5 -0
  11. data/app/controllers/mno_enterprise/auth/sessions_controller.rb +7 -0
  12. data/app/controllers/mno_enterprise/auth/unlocks_controller.rb +5 -0
  13. data/app/controllers/mno_enterprise/deletion_requests_controller.rb +5 -0
  14. data/app/controllers/mno_enterprise/impersonate_controller.rb +48 -0
  15. data/app/controllers/mno_enterprise/jpi/v1/admin/audit_events_controller.rb +16 -0
  16. data/app/controllers/mno_enterprise/jpi/v1/admin/base_resource_controller.rb +5 -0
  17. data/app/controllers/mno_enterprise/jpi/v1/admin/cloud_apps_controller.rb +46 -0
  18. data/app/controllers/mno_enterprise/jpi/v1/admin/invoices_controller.rb +47 -0
  19. data/app/controllers/mno_enterprise/jpi/v1/admin/organizations_controller.rb +27 -0
  20. data/app/controllers/mno_enterprise/jpi/v1/admin/tenant_invoices_controller.rb +14 -0
  21. data/app/controllers/mno_enterprise/jpi/v1/admin/users_controller.rb +63 -0
  22. data/app/controllers/mno_enterprise/jpi/v1/app_instances_controller.rb +24 -0
  23. data/app/controllers/mno_enterprise/jpi/v1/app_instances_sync_controller.rb +36 -0
  24. data/app/controllers/mno_enterprise/jpi/v1/base_resource_controller.rb +32 -0
  25. data/app/controllers/mno_enterprise/jpi/v1/current_users_controller.rb +5 -0
  26. data/app/controllers/mno_enterprise/jpi/v1/deletion_requests_controller.rb +5 -0
  27. data/app/controllers/mno_enterprise/jpi/v1/impac/dashboards_controller.rb +5 -0
  28. data/app/controllers/mno_enterprise/jpi/v1/impac/kpis_controller.rb +80 -0
  29. data/app/controllers/mno_enterprise/jpi/v1/impac/widgets_controller.rb +63 -0
  30. data/app/controllers/mno_enterprise/jpi/v1/industry_bundle_controller.rb +25 -0
  31. data/app/controllers/mno_enterprise/jpi/v1/marketplace_controller.rb +22 -0
  32. data/app/controllers/mno_enterprise/jpi/v1/organizations_controller.rb +5 -0
  33. data/app/controllers/mno_enterprise/jpi/v1/shopping_cart_controller.rb +93 -0
  34. data/app/controllers/mno_enterprise/jpi/v1/teams_controller.rb +88 -0
  35. data/app/controllers/mno_enterprise/org_invites_controller.rb +5 -0
  36. data/app/controllers/mno_enterprise/pages_controller.rb +5 -0
  37. data/app/controllers/mno_enterprise/provision_controller.rb +5 -0
  38. data/app/controllers/mno_enterprise/status_controller.rb +27 -0
  39. data/app/controllers/mno_enterprise/webhook/o_auth_controller.rb +5 -0
  40. data/app/mailers/mno_enterprise/system_notification_mailer.rb +5 -0
  41. data/app/models/mno_enterprise/health_check.rb +16 -0
  42. data/app/views/devise/password_expired/show.html.haml +32 -0
  43. data/app/views/mno_enterprise/auth/confirmations/default/_form.html.haml +49 -0
  44. data/app/views/mno_enterprise/auth/confirmations/default/_lounge.html.haml +34 -0
  45. data/app/views/mno_enterprise/auth/confirmations/default/_show.html.haml +10 -0
  46. data/app/views/mno_enterprise/auth/confirmations/lounge.html.haml +4 -0
  47. data/app/views/mno_enterprise/auth/confirmations/material/_form.html.haml +44 -0
  48. data/app/views/mno_enterprise/auth/confirmations/material/_lounge.html.haml +18 -0
  49. data/app/views/mno_enterprise/auth/confirmations/material/_show.html.haml +21 -0
  50. data/app/views/mno_enterprise/auth/confirmations/new.html.haml +31 -0
  51. data/app/views/mno_enterprise/auth/confirmations/show.html.haml +4 -0
  52. data/app/views/mno_enterprise/auth/mailer/confirmation_instructions.html.haml +4 -0
  53. data/app/views/mno_enterprise/auth/mailer/reset_password_instructions.html.haml +6 -0
  54. data/app/views/mno_enterprise/auth/mailer/unlock_instructions.html.haml +5 -0
  55. data/app/views/mno_enterprise/auth/passwords/edit.html.haml +53 -0
  56. data/app/views/mno_enterprise/auth/passwords/new.html.haml +34 -0
  57. data/app/views/mno_enterprise/auth/registrations/default/_form.html.haml +35 -0
  58. data/app/views/mno_enterprise/auth/registrations/default/_new.html.haml +11 -0
  59. data/app/views/mno_enterprise/auth/registrations/material/_form.html.haml +30 -0
  60. data/app/views/mno_enterprise/auth/registrations/material/_new.html.haml +10 -0
  61. data/app/views/mno_enterprise/auth/registrations/new.html.haml +4 -0
  62. data/app/views/mno_enterprise/auth/sessions/default/_form.html.haml +17 -0
  63. data/app/views/mno_enterprise/auth/sessions/default/_new.html.haml +11 -0
  64. data/app/views/mno_enterprise/auth/sessions/material/_form.html.haml +26 -0
  65. data/app/views/mno_enterprise/auth/sessions/material/_new.html.haml +11 -0
  66. data/app/views/mno_enterprise/auth/sessions/new.html.haml +4 -0
  67. data/app/views/mno_enterprise/auth/shared/_links.html.haml +24 -0
  68. data/app/views/mno_enterprise/auth/unlocks/new.html.haml +10 -0
  69. data/app/views/mno_enterprise/deletion_requests/show.html.haml +131 -0
  70. data/app/views/mno_enterprise/jpi/v1/admin/audit_events/_audit_event.json.jbuilder +5 -0
  71. data/app/views/mno_enterprise/jpi/v1/admin/audit_events/index.json.jbuilder +4 -0
  72. data/app/views/mno_enterprise/jpi/v1/admin/cloud_apps/_cloud_app.json.jbuilder +1 -0
  73. data/app/views/mno_enterprise/jpi/v1/admin/cloud_apps/index.json.jbuilder +1 -0
  74. data/app/views/mno_enterprise/jpi/v1/admin/cloud_apps/show.json.jbuilder +1 -0
  75. data/app/views/mno_enterprise/jpi/v1/admin/invoices/_invoice.json.jbuilder +2 -0
  76. data/app/views/mno_enterprise/jpi/v1/admin/invoices/index.json.jbuilder +1 -0
  77. data/app/views/mno_enterprise/jpi/v1/admin/invoices/show.json.jbuilder +2 -0
  78. data/app/views/mno_enterprise/jpi/v1/admin/organizations/_credit_card.json.jbuilder +7 -0
  79. data/app/views/mno_enterprise/jpi/v1/admin/organizations/_invoices.json.jbuilder +8 -0
  80. data/app/views/mno_enterprise/jpi/v1/admin/organizations/_member.json.jbuilder +14 -0
  81. data/app/views/mno_enterprise/jpi/v1/admin/organizations/_organization.json.jbuilder +1 -0
  82. data/app/views/mno_enterprise/jpi/v1/admin/organizations/in_arrears.json.jbuilder +8 -0
  83. data/app/views/mno_enterprise/jpi/v1/admin/organizations/index.json.jbuilder +7 -0
  84. data/app/views/mno_enterprise/jpi/v1/admin/organizations/show.json.jbuilder +11 -0
  85. data/app/views/mno_enterprise/jpi/v1/admin/tenant_invoices/_tenant_invoice.json.jbuilder +5 -0
  86. data/app/views/mno_enterprise/jpi/v1/admin/tenant_invoices/index.json.jbuilder +1 -0
  87. data/app/views/mno_enterprise/jpi/v1/admin/tenant_invoices/show.json.jbuilder +1 -0
  88. data/app/views/mno_enterprise/jpi/v1/admin/users/_user.json.jbuilder +1 -0
  89. data/app/views/mno_enterprise/jpi/v1/admin/users/index.json.jbuilder +2 -0
  90. data/app/views/mno_enterprise/jpi/v1/admin/users/show.json.jbuilder +9 -0
  91. data/app/views/mno_enterprise/jpi/v1/app_instances/_resource.json.jbuilder +23 -0
  92. data/app/views/mno_enterprise/jpi/v1/app_instances/index.json.jbuilder +9 -0
  93. data/app/views/mno_enterprise/jpi/v1/app_instances/show.json.jbuilder +3 -0
  94. data/app/views/mno_enterprise/jpi/v1/billing/index.json.jbuilder +0 -0
  95. data/app/views/mno_enterprise/jpi/v1/current_users/show.json.jbuilder +37 -0
  96. data/app/views/mno_enterprise/jpi/v1/impac/dashboards/_dashboard.json.jbuilder +9 -0
  97. data/app/views/mno_enterprise/jpi/v1/impac/dashboards/index.json.jbuilder +1 -0
  98. data/app/views/mno_enterprise/jpi/v1/impac/dashboards/show.json.jbuilder +1 -0
  99. data/app/views/mno_enterprise/jpi/v1/impac/kpis/_kpi.json.jbuilder +1 -0
  100. data/app/views/mno_enterprise/jpi/v1/impac/kpis/show.json.jbuilder +1 -0
  101. data/app/views/mno_enterprise/jpi/v1/impac/widgets/_widget.json.jbuilder +6 -0
  102. data/app/views/mno_enterprise/jpi/v1/impac/widgets/show.json.jbuilder +1 -0
  103. data/app/views/mno_enterprise/jpi/v1/marketplace/_app.json.jbuilder +14 -0
  104. data/app/views/mno_enterprise/jpi/v1/marketplace/index.json.jbuilder +3 -0
  105. data/app/views/mno_enterprise/jpi/v1/marketplace/show.json.jbuilder +3 -0
  106. data/app/views/mno_enterprise/jpi/v1/organizations/_arrears.json.jbuilder +11 -0
  107. data/app/views/mno_enterprise/jpi/v1/organizations/_billing.json.jbuilder +4 -0
  108. data/app/views/mno_enterprise/jpi/v1/organizations/_credit_card.json.jbuilder +7 -0
  109. data/app/views/mno_enterprise/jpi/v1/organizations/_current_user.json.jbuilder +5 -0
  110. data/app/views/mno_enterprise/jpi/v1/organizations/_invoices.json.jbuilder +8 -0
  111. data/app/views/mno_enterprise/jpi/v1/organizations/_member.json.jbuilder +13 -0
  112. data/app/views/mno_enterprise/jpi/v1/organizations/_organization.json.jbuilder +13 -0
  113. data/app/views/mno_enterprise/jpi/v1/organizations/credit_card.json.jbuilder +1 -0
  114. data/app/views/mno_enterprise/jpi/v1/organizations/index.json.jbuilder +1 -0
  115. data/app/views/mno_enterprise/jpi/v1/organizations/members.json.jbuilder +3 -0
  116. data/app/views/mno_enterprise/jpi/v1/organizations/show.json.jbuilder +15 -0
  117. data/app/views/mno_enterprise/jpi/v1/organizations/show_reduced.json.jbuilder +3 -0
  118. data/app/views/mno_enterprise/jpi/v1/shopping_cart/organizations.json.jbuilder +5 -0
  119. data/app/views/mno_enterprise/jpi/v1/shopping_cart/show.json.jbuilder +59 -0
  120. data/app/views/mno_enterprise/jpi/v1/shopping_cart/show_item.json.jbuilder +34 -0
  121. data/app/views/mno_enterprise/jpi/v1/teams/_team.json.jbuilder +20 -0
  122. data/app/views/mno_enterprise/jpi/v1/teams/index.json.jbuilder +1 -0
  123. data/app/views/mno_enterprise/jpi/v1/teams/show.json.jbuilder +3 -0
  124. data/app/views/mno_enterprise/pages/app_access_unauthorized.html.haml +19 -0
  125. data/app/views/mno_enterprise/pages/app_logout.html.haml +18 -0
  126. data/app/views/mno_enterprise/pages/billing_details_required.html.haml +19 -0
  127. data/app/views/mno_enterprise/pages/loading.html.erb +69 -0
  128. data/app/views/mno_enterprise/provision/_provision_apps.html.haml +42 -0
  129. data/app/views/mno_enterprise/provision/_select_organization.html.haml +17 -0
  130. data/app/views/mno_enterprise/provision/new.html.haml +4 -0
  131. data/app/views/mno_enterprise/webhook/o_auth/authorize.html.haml +26 -0
  132. data/app/views/mno_enterprise/webhook/o_auth/providers/myob.html.haml +29 -0
  133. data/app/views/mno_enterprise/webhook/o_auth/providers/xero.html.haml +34 -0
  134. data/config/initializers/devise.rb +273 -0
  135. data/config/initializers/devise_extension.rb +9 -0
  136. data/config/initializers/devise_log.rb +12 -0
  137. data/config/initializers/health_check.rb +35 -0
  138. data/config/initializers/main_app_version.rb +6 -0
  139. data/config/routes.rb +152 -0
  140. data/lib/mno-enterprise-api.rb +1 -0
  141. data/lib/mno_enterprise/api.rb +14 -0
  142. data/lib/mno_enterprise/api/engine.rb +9 -0
  143. data/lib/mno_enterprise/concerns/controllers/deletion_requests_controller.rb +108 -0
  144. data/lib/mno_enterprise/concerns/controllers/jpi/v1/admin/base_resource_controller.rb +34 -0
  145. data/lib/mno_enterprise/concerns/controllers/jpi/v1/current_users_controller.rb +58 -0
  146. data/lib/mno_enterprise/concerns/controllers/jpi/v1/deletion_requests_controller.rb +69 -0
  147. data/lib/mno_enterprise/concerns/controllers/jpi/v1/impac/dashboards_controller.rb +76 -0
  148. data/lib/mno_enterprise/concerns/controllers/jpi/v1/organizations_controller.rb +180 -0
  149. data/lib/mno_enterprise/concerns/controllers/org_invites_controller.rb +44 -0
  150. data/lib/mno_enterprise/concerns/controllers/pages_controller.rb +78 -0
  151. data/lib/mno_enterprise/concerns/controllers/provision_controller.rb +71 -0
  152. data/lib/mno_enterprise/concerns/controllers/webhook/o_auth_controller.rb +107 -0
  153. data/lib/mno_enterprise/concerns/mailers/system_notification_mailer.rb +158 -0
  154. data/lib/mno_enterprise/event_logger.rb +32 -0
  155. data/spec/controllers/mno_enterprise/auth/confirmation_controller_spec.rb +68 -0
  156. data/spec/controllers/mno_enterprise/deletion_requests_controller_spec.rb +141 -0
  157. data/spec/controllers/mno_enterprise/impersonate_controller_spec.rb +48 -0
  158. data/spec/controllers/mno_enterprise/jpi/v1/admin/audit_events_controller_spec.rb +51 -0
  159. data/spec/controllers/mno_enterprise/jpi/v1/admin/cloud_apps_controller_spec.rb +92 -0
  160. data/spec/controllers/mno_enterprise/jpi/v1/admin/invoices_controller_spec.rb +159 -0
  161. data/spec/controllers/mno_enterprise/jpi/v1/admin/organizations_controller_spec.rb +116 -0
  162. data/spec/controllers/mno_enterprise/jpi/v1/admin/tenant_invoices_controller_spec.rb +92 -0
  163. data/spec/controllers/mno_enterprise/jpi/v1/admin/users_controller_spec.rb +136 -0
  164. data/spec/controllers/mno_enterprise/jpi/v1/app_instances_controller_spec.rb +76 -0
  165. data/spec/controllers/mno_enterprise/jpi/v1/app_instances_sync_controller_spec.rb +94 -0
  166. data/spec/controllers/mno_enterprise/jpi/v1/current_users_controller_spec.rb +128 -0
  167. data/spec/controllers/mno_enterprise/jpi/v1/deletion_requests_controller_spec.rb +72 -0
  168. data/spec/controllers/mno_enterprise/jpi/v1/impac/kpis_controller_spec.rb +80 -0
  169. data/spec/controllers/mno_enterprise/jpi/v1/marketplace_controller_spec.rb +115 -0
  170. data/spec/controllers/mno_enterprise/jpi/v1/organizations_controller_spec.rb +516 -0
  171. data/spec/controllers/mno_enterprise/jpi/v1/team_controller_spec.rb +86 -0
  172. data/spec/controllers/mno_enterprise/org_invites_controller_spec.rb +29 -0
  173. data/spec/controllers/mno_enterprise/pages_controller_spec.rb +49 -0
  174. data/spec/controllers/mno_enterprise/provision_controller_spec.rb +94 -0
  175. data/spec/controllers/mno_enterprise/status_controller_spec.rb +34 -0
  176. data/spec/controllers/mno_enterprise/webhook/o_auth_controller_spec.rb +104 -0
  177. data/spec/lib/mno_enterprise/event_logger_spec.rb +28 -0
  178. data/spec/mailer/mno_enterprise/system_notification_mailer_spec.rb +132 -0
  179. data/spec/rails_helper.rb +94 -0
  180. data/spec/requests/devise/authentication_spec.rb +43 -0
  181. data/spec/requests/devise/registration_spec.rb +64 -0
  182. data/spec/routing/devise/confirmation_routing_spec.rb +20 -0
  183. data/spec/routing/devise/passwords_routing_spec.rb +24 -0
  184. data/spec/routing/devise/registrations_routing_spec.rb +16 -0
  185. data/spec/routing/devise/sessions_routing_spec.rb +20 -0
  186. data/spec/routing/mno_enterprise/deletion_requests_controller_routing_spec.rb +20 -0
  187. data/spec/routing/mno_enterprise/impersonate_controller_routing.spec.rb +15 -0
  188. data/spec/routing/mno_enterprise/jpi/v1/admin/audit_events_controller_routing_spec.rb +11 -0
  189. data/spec/routing/mno_enterprise/jpi/v1/admin/cloud_apps_controller_routing_spec.rb +24 -0
  190. data/spec/routing/mno_enterprise/jpi/v1/admin/invoices_controller_routing_spec.rb +37 -0
  191. data/spec/routing/mno_enterprise/jpi/v1/admin/organizations_controller_routing_spec.rb +20 -0
  192. data/spec/routing/mno_enterprise/jpi/v1/admin/tenant_invoices_controller_routing_spec.rb +16 -0
  193. data/spec/routing/mno_enterprise/jpi/v1/admin/users_controller_routing_spec.rb +24 -0
  194. data/spec/routing/mno_enterprise/jpi/v1/app_instances_controller_routing_spec.rb +12 -0
  195. data/spec/routing/mno_enterprise/jpi/v1/app_instances_sync_controller_routing_spec.rb +15 -0
  196. data/spec/routing/mno_enterprise/jpi/v1/current_users_controller_routing_spec.rb +28 -0
  197. data/spec/routing/mno_enterprise/jpi/v1/deletion_requests_controller_routing_spec.rb +24 -0
  198. data/spec/routing/mno_enterprise/jpi/v1/impac/kpis_controller_routing_spec.rb +22 -0
  199. data/spec/routing/mno_enterprise/jpi/v1/marketplace_controller_routing_spec.rb +16 -0
  200. data/spec/routing/mno_enterprise/jpi/v1/organizations_controller_routing_spec.rb +44 -0
  201. data/spec/routing/mno_enterprise/jpi/v1/teams_controller_routing_spec.rb +36 -0
  202. data/spec/routing/mno_enterprise/org_invites_controller_routing_spec.rb +12 -0
  203. data/spec/routing/mno_enterprise/pages_controller_routing_spec.rb +29 -0
  204. data/spec/routing/mno_enterprise/provision_controller_routing_spec.rb +15 -0
  205. data/spec/routing/mno_enterprise/status_controller_routing_spec.rb +19 -0
  206. data/spec/routing/mno_enterprise/webhook/o_auth_controller_routing_spec.rb +27 -0
  207. data/spec/spec_helper.rb +88 -0
  208. metadata +402 -0
@@ -0,0 +1,18 @@
1
+ .registration-material
2
+ .action-box{ layout: "row", 'layout-align' => "center center" }
3
+
4
+ .md-whiteframe-z1{ layout: "column", flex: '33' }
5
+
6
+ %md-toolbar.success
7
+ .md-toolbar-tools
8
+ %md-icon{ 'md-font-icon' => 'fa fa-check-circle', style: 'font-size: 28px; margin-right: 10px;' }
9
+ %h3 Thanks for signing up!
10
+ %span{ flex: '' }
11
+
12
+ %md-content{ "layout-padding" => "", style: 'min-height: 300px; padding: 40px; text-align: left;' }
13
+ %p
14
+ We have just sent an email to
15
+ = @resource.email
16
+
17
+ %p
18
+ Please check your email and click on the 'Verify my Account' link.
@@ -0,0 +1,21 @@
1
+ .registration-material
2
+ .action-box{ layout: "row", 'layout-align' => "center center" }
3
+ %md-content.md-whiteframe-z1{ "layout-padding" => "", flex: '33' }
4
+ %div{ layout: 'row', 'layout-align' => 'center center' }
5
+ %h2 Verify my account
6
+
7
+ %div{ layout: 'column' }
8
+ = render "mno_enterprise/auth/confirmations/material/form"
9
+
10
+
11
+
12
+ / .registration
13
+ / .container
14
+ / .row
15
+ / //.col-md-6.col-md-offset-3
16
+ / .login-box-wrapper
17
+ / .login-box-title
18
+ / %h2 Almost there
19
+ / .login-box
20
+ / .brand-logo
21
+ / = render "mno_enterprise/auth/confirmations/material/form"
@@ -0,0 +1,31 @@
1
+ %div{ 'ng-init' => "user = {}" }
2
+
3
+ .registration
4
+ .container
5
+ .row
6
+ .login-box-wrapper
7
+ .login-box-title
8
+ %h2 Confirmation
9
+ .login-box
10
+ .brand-logo
11
+ = form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post, class: 'form-horizontal autofill-detect' }) do |f|
12
+
13
+ - unless devise_error_messages!.empty?
14
+ .row
15
+ .alert.alert-error
16
+ %button.close ×
17
+ = devise_error_messages!
18
+
19
+ .row
20
+ .col-sm-12
21
+ = f.email_field :email, placeholder: "*Email", autofocus: true, required: true, 'ng-model' => 'user.email', :class => 'form-control'
22
+
23
+ %br
24
+
25
+ .row
26
+ .col-sm-12
27
+ .text-center
28
+ %button{ :class => "btn btn-warning", :type => "submit", 'ng-click' => 'hasClicked = true', 'ng-disabled' => 'form.$invalid', 'ng-hide' => 'hasClicked' } Resend confirmation instructions
29
+ %img.ng-hide{ 'ng-src' => asset_path('mno_enterprise/loader-32x32-bg-inverse.gif'), 'ng-show' => 'hasClicked' }
30
+ %hr
31
+ = render "devise/shared/links"
@@ -0,0 +1,4 @@
1
+ - if MnoEnterprise.style.design.material
2
+ = render "mno_enterprise/auth/confirmations/material/show"
3
+ - else
4
+ = render "mno_enterprise/auth/confirmations/default/show"
@@ -0,0 +1,4 @@
1
+ %p
2
+ Welcome #{@email}!
3
+ %p You can confirm your account email through the link below:
4
+ %p= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token)
@@ -0,0 +1,6 @@
1
+ %p
2
+ Hello #{@resource.email}!
3
+ %p Someone has requested a link to change your password. You can do this through the link below.
4
+ %p= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token)
5
+ %p If you didn't request this, please ignore this email.
6
+ %p Your password won't change until you access the link above and create a new one.
@@ -0,0 +1,5 @@
1
+ %p
2
+ Hello #{@resource.email}!
3
+ %p Your account has been locked due to an excessive number of unsuccessful sign in attempts.
4
+ %p Click the link below to unlock your account:
5
+ %p= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token)
@@ -0,0 +1,53 @@
1
+ %div{ 'ng-init' => "user = {}" }
2
+
3
+ .registration
4
+ .container
5
+ .row
6
+ .login-box-wrapper
7
+ .login-box-title
8
+ %h2 Change your password
9
+ .login-box
10
+ .brand-logo
11
+ = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: 'form-horizontal autofill-detect' }) do |f|
12
+
13
+ - unless devise_error_messages!.empty?
14
+ .row
15
+ .alert.alert-error
16
+ %button.close ×
17
+ = devise_error_messages!
18
+
19
+ = f.hidden_field :reset_password_token
20
+
21
+ .row
22
+ .col-sm-12
23
+ = f.password_field :password, placeholder: "*Password", required: true, autofocus: true, autocomplete: "off", 'ng-model' => 'user.password', class: 'form-control'
24
+
25
+ %br
26
+
27
+ .row
28
+ .col-sm-12
29
+ = f.password_field :password_confirmation, placeholder: "*Confirm Password", required: true, autofocus: true, autocomplete: "off", 'ng-model' => 'user.password_confirmation', class: 'form-control'
30
+
31
+ %br
32
+
33
+ .row
34
+ .col-sm-12
35
+ .text-center
36
+ %button{ :class => "btn btn-warning", :type => "submit", 'ng-click' => 'hasClicked = true', 'ng-disabled' => 'form.$invalid', 'ng-hide' => 'hasClicked' } Change my password
37
+ %img.ng-hide{ 'ng-src' => asset_path('mno_enterprise/loader-32x32-bg-inverse.gif'), 'ng-show' => 'hasClicked' }
38
+
39
+
40
+ / .field
41
+ / = f.label :password, "New password"
42
+ / %br/
43
+ / = f.password_field :password, autofocus: true, autocomplete: "off", 'ng-model' => 'user.company', class: 'form-control'
44
+ / .field
45
+ / = f.label :password_confirmation, "Confirm new password"
46
+ / %br/
47
+ / = f.password_field :password_confirmation, autocomplete: "off"
48
+ / .actions
49
+ / = f.submit "Change my password"
50
+
51
+ %hr
52
+
53
+ = render "devise/shared/links"
@@ -0,0 +1,34 @@
1
+ %div{ 'ng-init' => "user = {}" }
2
+
3
+ .registration
4
+ .container
5
+ .row
6
+ .login-box-wrapper
7
+ .login-box-title
8
+ %h2 Password Recovery
9
+ .login-box
10
+ .brand-logo
11
+
12
+ = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post, class: 'form-horizontal autofill-detect' }) do |f|
13
+
14
+ - unless devise_error_messages!.empty?
15
+ .row
16
+ .alert.alert-error
17
+ %button.close ×
18
+ = devise_error_messages!
19
+
20
+ .row
21
+ .col-sm-12
22
+ = f.email_field :email, placeholder: "*Email", required: true, 'ng-model' => 'user.email', :class => 'form-control'
23
+
24
+ %br
25
+
26
+ .row
27
+ .col-sm-12
28
+ .text-center
29
+ %button{ :class => "btn btn-warning", :type => "submit", 'ng-click' => 'hasClicked = true', 'ng-disabled' => 'form.$invalid', 'ng-hide' => 'hasClicked' } Recover my password
30
+ %img.ng-hide{ 'ng-src' => asset_path('mno_enterprise/loader-32x32-bg-inverse.gif'), 'ng-show' => 'hasClicked' }
31
+
32
+ %hr
33
+
34
+ = render "devise/shared/links"
@@ -0,0 +1,35 @@
1
+ %div{ 'ng-init' => "user = { $pwdScore: {}, email: '#{params['email']}' }" }
2
+
3
+ = form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { 'name' => 'form', :class => 'form-horizontal autofill-detect', :autocomplete => "off" }) do |f|
4
+
5
+ - unless devise_error_messages!.empty?
6
+ .row
7
+ .alert.alert-error
8
+ %button.close ×
9
+ = devise_error_messages!
10
+
11
+ .row
12
+ .col-sm-12
13
+ = f.email_field :email, placeholder: "*Email", :required => true, 'ng-model' => 'user.email', :class => 'form-control'
14
+
15
+ %br
16
+
17
+ .row
18
+ .col-sm-12
19
+ = f.text_field :company, placeholder: "Company", 'ng-model' => 'user.company', class: 'form-control'
20
+
21
+ %br
22
+
23
+ .row
24
+ .col-sm-12
25
+ .checkbox-section.text-center
26
+ = check_box_tag 'tos', 'accept', false, :required => true, :style => "margin-top: -3px;", 'ng-model' => 'acceptTos'
27
+ %label{for: 'tos'} I accept the
28
+ = link_to "Terms of Use", MnoEnterprise.router.terms_url, :target => '_blank'
29
+
30
+ %br
31
+ .row
32
+ .col-sm-12
33
+ .text-center
34
+ %button{ :class => "btn btn-warning", :type => "submit", 'ng-click' => 'hasClicked = true', 'ng-disabled' => 'form.$invalid', 'ng-hide' => 'hasClicked' } Create my account!
35
+ %img.ng-hide{ 'ng-src' => asset_path('mno_enterprise/loader-32x32-bg-inverse.gif'), 'ng-show' => 'hasClicked' }
@@ -0,0 +1,11 @@
1
+ .registration
2
+ .container
3
+ .row
4
+ .login-box-wrapper
5
+ .login-box-title
6
+ %h2 Sign Up
7
+ .login-box
8
+ .brand-logo
9
+ = render "mno_enterprise/auth/registrations/default/form"
10
+ %hr
11
+ = render "mno_enterprise/auth/shared/links"
@@ -0,0 +1,30 @@
1
+ %div{ 'ng-init' => "user = { $pwdScore: {}, email: '#{params['email']}' }" }
2
+
3
+ = form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { 'name' => 'form', :class => 'form-horizontal autofill-detect', :autocomplete => "off" }) do |f|
4
+
5
+ - unless devise_error_messages!.empty?
6
+ .row
7
+ .alert.alert-error
8
+ %button.close ×
9
+ = devise_error_messages!
10
+
11
+ %md-input-container
12
+ %label Email
13
+ = f.email_field :email, :placeholder => "Email", required: true, 'ng-model' => 'user.email'
14
+
15
+ %br
16
+
17
+ %md-input-container
18
+ %label Company
19
+ = f.text_field :company, placeholder: "Company", required: true, 'ng-model' => 'user.company'
20
+
21
+ %br/
22
+ %md-checkbox{ 'ng-model' => 'user.acceptTos', name: 'tos' }
23
+ I accept the
24
+ = link_to "Terms of Use", MnoEnterprise.router.terms_url, :target => '_blank'
25
+
26
+ %br
27
+
28
+ %div
29
+ %button{ class: "md-raised md-accent", 'md-button' => true, type: "submit", 'ng-click' => 'hasClicked = true', 'ng-disabled' => 'form.$invalid' } Create my account!
30
+ %md-progress-linear{ 'md-mode' => "indeterminate", 'ng-show' => 'hasClicked' }
@@ -0,0 +1,10 @@
1
+ .registration-material
2
+ .action-box{ layout: "row", 'layout-align' => "center center" }
3
+ %md-content.md-whiteframe-z1{ "layout-padding" => "", flex: '33' }
4
+ %div{ layout: 'row', 'layout-align' => 'center center' }
5
+ %h2 Sign Up
6
+
7
+ %div{ layout: 'column' }
8
+ = render "mno_enterprise/auth/registrations/material/form"
9
+ %hr
10
+ = render "mno_enterprise/auth/shared/links"
@@ -0,0 +1,4 @@
1
+ - if MnoEnterprise.style.design.material
2
+ = render "mno_enterprise/auth/registrations/material/new"
3
+ - else
4
+ = render "mno_enterprise/auth/registrations/default/new"
@@ -0,0 +1,17 @@
1
+ = form_for(resource, :as => resource_name, :url => "#{session_path(resource_name)}?ltype=#{@login_type}", :html => { 'name' => 'loginForm', :class => 'autofill-detect text-center' }) do |f|
2
+ %div
3
+ = f.email_field :email, :placeholder => "Email", :required => true, 'ng-model' => 'email', :class => 'form-control'
4
+ %br
5
+ %div
6
+ = f.password_field :password, :placeholder => "Password", :required => true, 'ng-model' => 'password', :class => 'form-control', :autocomplete => "off"
7
+
8
+ %br/
9
+ %div
10
+ %button{ :class => "btn btn-warning btn-login", :type => "submit", 'ng-click' => 'hasClicked = true', 'ng-disabled' => 'loginForm.$invalid', 'ng-hide' => 'hasClicked' } Sign in
11
+ %img.ng-hide{ 'ng-src' => asset_path('mno_enterprise/loader-32x32-bg-inverse.gif'), 'ng-show' => 'hasClicked' }
12
+
13
+ - if devise_mapping.rememberable? && MnoEnterprise.style.devise.remember_checkbox_shown
14
+ %br/
15
+ %div.form-inline.checkbox-section
16
+ = f.check_box :remember_me, { checked: true }
17
+ = f.label :remember_me
@@ -0,0 +1,11 @@
1
+ .registration
2
+ .container
3
+ .row
4
+ .login-box-wrapper
5
+ .login-box-title
6
+ %h2 Sign In
7
+ .login-box
8
+ .brand-logo
9
+ = render "mno_enterprise/auth/sessions/default/form"
10
+ %hr
11
+ = render "mno_enterprise/auth/shared/links"
@@ -0,0 +1,26 @@
1
+ %div{ 'ng-init' => "user = { }" }
2
+
3
+ = form_for(resource, :as => resource_name, :url => "#{session_path(resource_name)}?ltype=#{@login_type}", :html => { 'name' => 'loginForm', :class => 'autofill-detect text-center' }) do |f|
4
+
5
+ %md-input-container
6
+ %label Email
7
+ = f.email_field :email, :placeholder => "Email", :required => true, 'ng-model' => 'user.email'
8
+
9
+ %br
10
+
11
+ %md-input-container
12
+ %label Password
13
+ = f.password_field :password, :placeholder => "Password", :required => true, 'ng-model' => 'user.password', :autocomplete => "off"
14
+
15
+ - if devise_mapping.rememberable? && MnoEnterprise.style.devise.remember_checkbox_shown
16
+ %br/
17
+ %md-checkbox{ 'ng-model' => 'user.rememberMe', name: 'user[remember_me]' }
18
+ Remember Me
19
+
20
+ %br
21
+
22
+ %div
23
+ %button{ class: "md-raised md-accent", 'md-button' => true, type: "submit", 'ng-click' => 'hasClicked = true', 'ng-disabled' => 'loginForm.$invalid' } Sign in
24
+ %md-progress-linear{ 'md-mode' => "indeterminate", 'ng-show' => 'hasClicked' }
25
+
26
+
@@ -0,0 +1,11 @@
1
+ .registration-material
2
+ .action-box{ layout: "row", 'layout-align' => "center center" }
3
+ %md-content.md-whiteframe-z1{ "layout-padding" => "", flex: '33' }
4
+ %div{ layout: 'row', 'layout-align' => 'center center' }
5
+ %h2 Log in
6
+
7
+ %div{ layout: 'column' }
8
+ = render "mno_enterprise/auth/sessions/material/form"
9
+ %hr
10
+ = render "mno_enterprise/auth/shared/links"
11
+
@@ -0,0 +1,4 @@
1
+ - if MnoEnterprise.style.design.material
2
+ = render "mno_enterprise/auth/sessions/material/new"
3
+ - else
4
+ = render "mno_enterprise/auth/sessions/default/new"
@@ -0,0 +1,24 @@
1
+ - if controller_name != 'sessions'
2
+ = link_to "Already have an account? Log in", new_session_path(resource_name)
3
+ %br/
4
+
5
+ - if devise_mapping.registerable? && controller_name != 'registrations'
6
+ = link_to "Don't have an account? Sign up", new_registration_path(resource_name)
7
+ %br/
8
+
9
+ - if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' && MnoEnterprise.style.devise.forgot_password_link_shown
10
+ = link_to "Forgot your password?", new_password_path(resource_name)
11
+ %br/
12
+
13
+ - if devise_mapping.confirmable? && controller_name != 'confirmations' && MnoEnterprise.style.devise.confirmation_link_shown
14
+ = link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name)
15
+ %br/
16
+
17
+ - if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' && MnoEnterprise.style.devise.unlock_link_shown
18
+ = link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name)
19
+ %br/
20
+
21
+ - if devise_mapping.omniauthable? && MnoEnterprise.style.devise.omniauth_link_shown
22
+ - resource_class.omniauth_providers.each do |provider|
23
+ = link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider)
24
+ %br/
@@ -0,0 +1,10 @@
1
+ %h2 Resend unlock instructions
2
+ = form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f|
3
+ = devise_error_messages!
4
+ .field
5
+ = f.label :email
6
+ %br/
7
+ = f.email_field :email, autofocus: true
8
+ .actions
9
+ = f.submit "Resend unlock instructions"
10
+ = render "devise/shared/links"
@@ -0,0 +1,131 @@
1
+ .container
2
+ .row
3
+ .col-md-8.col-md-offset-2
4
+ %div{ "mno-flash-msg" => true }
5
+ %h4 Account termination
6
+ %p You have requested the termination of your account. This page will proceed to the checkout of any amount due and delete your account permanently.
7
+
8
+ - if @deletion_request.status == 'pending'
9
+ .row
10
+ .col-md-8.col-md-offset-2
11
+ %hr
12
+ %h4 Step 1 - Freeze my account
13
+ %p
14
+ First we need to freeze your account. Upon clicking the button below
15
+ %strong all your apps (and apps from organizations you are the sole member) will be terminated.
16
+ The final invoices for your account and organizations you are the sole member will be generated and displayed.
17
+ %p After clicking the button below you will not be able to launch apps anymore or access your dashboard.
18
+
19
+ %h5 Termination Checklist
20
+ %ol
21
+ %li I have transferred all my personal critical apps to coworkers via organizations
22
+ %li I have transferred all critical apps from organizations I am the sole member to coworkers via organizations
23
+ %li I have verified that all my transfer requests of critical apps have been accepted
24
+
25
+ %label
26
+ %input{ type: 'checkbox', id: "deletion-request-before-freeze-checklist", 'ng-click' => 'checklistAccepted = !checklistAccepted' }   I have verified all the items of the termination checklist
27
+
28
+ .align-center
29
+ = form_for @deletion_request, url: freeze_account_deletion_request_path(@deletion_request) do |f|
30
+ %button.btn.btn-danger{type: "submit", id: "deletion-request-freeze-button", 'ng-disabled' => '!checklistAccepted' }
31
+ %i.fa.fa-lock.fa-inverse
32
+   Freeze my account
33
+
34
+ - if @deletion_request.status == 'account_frozen'
35
+ .row
36
+ .col-md-8.col-md-offset-2
37
+ %hr
38
+ %h4 Step 2 - Pay your final invoices
39
+ %p The table below shows you the final invoices created for your personal account and organizations for which you are the sole member.
40
+ %p Please click on each invoice to review/update the credit card details that should be used for checkout. You do not need to provide credit card details for $0 invoices.
41
+ - # List of invoices with Credit Cards
42
+ = form_for @deletion_request, url: checkout_deletion_request_path(@deletion_request), html: { class: 'form-horizontal'} do |f|
43
+ .accordion{ accordion:true, 'close-others'=>'true' }
44
+ - @final_invoices.each_with_index do |record, index|
45
+ %div#invoices_list{ 'accordion-group'=>true }
46
+ %div{ 'accordion-heading'=>true }
47
+ = record[:invoice].total_due.format
48
+ = " - "
49
+ = record[:description]
50
+ = " - Paid" if record[:invoice].paid?
51
+
52
+ %h5 Invoice PDF
53
+ %p
54
+ %a.btn.btn-info{ href: invoice_path(record[:invoice]), target: '_blank' }
55
+ %i.fa.fa-file
56
+ View Invoice
57
+ %em.muted
58
+ Click this button to see/download a detailed PDF version of this final invoice
59
+
60
+ - unless record[:invoice].paid?
61
+ %hr
62
+ %h5 Edit Credit Card information
63
+ = f.fields_for "credit_card[#{index}]", record[:invoicable].credit_card || MnoEnteprise::CreditCard.new do |cc|
64
+ .hidden
65
+ = cc.hidden_field :owner_id, value: record[:invoicable].id
66
+ = cc.hidden_field :owner_type, value: record[:invoicable].class
67
+ .input-group
68
+ .input-group-addon Title
69
+ =# cc.select :title, CreditCard::VALID_TITLES, {}, :class => 'form-control'
70
+ %br
71
+ .input-group
72
+ .input-group-addon First Name
73
+ = cc.text_field :first_name, class: 'form-control'
74
+ %br
75
+ .input-group
76
+ .input-group-addon Last Name
77
+ = cc.text_field :last_name, class: 'form-control'
78
+ %br
79
+ .input-group
80
+ .input-group-addon Country
81
+ =# cc.select :country, Country::Data.map { |k,v| [v['name'],k] }, {}, {:class => 'form-control'}
82
+ %br
83
+ .input-group
84
+ .input-group-addon Number
85
+ = cc.text_field :number, value: cc.object.masked_number, class: 'form-control'
86
+ %br
87
+ .input-group
88
+ .input-group-addon Month
89
+ = cc.select :month, (1..12), {}, class: 'form-control'
90
+ %br
91
+ .input-group
92
+ .input-group-addon Year
93
+ = cc.select :year, ((Time.now.year)..(Time.now.year + 20)), {}, class: 'form-control'
94
+ %br
95
+ .input-group
96
+ .input-group-addon CVV
97
+ = cc.text_field :verification_value, value: 'cvv', class: 'form-control'
98
+ %br
99
+ %hr
100
+ %h6 Billing Address
101
+ .input-group
102
+ .input-group-addon Address
103
+ = cc.text_field :billing_address, class: 'form-control'
104
+ %br
105
+ .input-group
106
+ .input-group-addon City
107
+ = cc.text_field :billing_city, class: 'form-control'
108
+ %br
109
+ .input-group
110
+ .input-group-addon Postcode
111
+ = cc.text_field :billing_postcode, class: 'form-control'
112
+ %br
113
+ .input-group
114
+ .input-group-addon Country
115
+ =# cc.select :billing_country, Country::Data.map { |k,v| [v['name'],k] }, {}, :class => 'form-control'
116
+ %br
117
+
118
+ .align-center
119
+ %button.btn.btn-success{type: "submit"}
120
+ %i.fa.fa-shopping-cart.fa-inverse
121
+   Checkout
122
+
123
+
124
+ .row
125
+ .col-md-8.col-md-offset-2
126
+ %hr
127
+ %p.muted
128
+ / = image_tag('question_pic.png')
129
+ %i.fa.fa-question-circle.fa-lg
130
+ Need help during the termination process? Just send us an email at:
131
+ = mail_to support_email