wordjelly-auth 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (275) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +35 -0
  5. data/app/assets/images/auth/activity.jpg +0 -0
  6. data/app/assets/images/auth/facebook.svg +1 -0
  7. data/app/assets/images/auth/google_oauth2.svg +1 -0
  8. data/app/assets/images/auth/js_pic3.jpg +0 -0
  9. data/app/assets/images/auth/profile.jpg +0 -0
  10. data/app/assets/javascripts/auth/admin_create_users.js +2 -0
  11. data/app/assets/javascripts/auth/application.js +20 -0
  12. data/app/assets/javascripts/auth/auth_dependencies.js +12 -0
  13. data/app/assets/javascripts/auth/auth_modals_and_navbar.js +218 -0
  14. data/app/assets/javascripts/auth/clients.js +2 -0
  15. data/app/assets/javascripts/auth/search.js +2 -0
  16. data/app/assets/javascripts/auth/shopping/discounts.js +2 -0
  17. data/app/assets/javascripts/auth/users/profiles.js +188 -0
  18. data/app/assets/stylesheets/auth/admin_create_users.css +4 -0
  19. data/app/assets/stylesheets/auth/application.scss +14 -0
  20. data/app/assets/stylesheets/auth/auth_default_css.scss +13 -0
  21. data/app/assets/stylesheets/auth/common-styles.scss +579 -0
  22. data/app/assets/stylesheets/auth/overrides.scss +26 -0
  23. data/app/assets/stylesheets/auth/search.css +4 -0
  24. data/app/assets/stylesheets/auth/shopping/discounts.css +4 -0
  25. data/app/assets/stylesheets/auth/users/profiles.scss +40 -0
  26. data/app/assets/stylesheets/scaffold.css +56 -0
  27. data/app/controllers/auth/admin_create_users_controller.rb +89 -0
  28. data/app/controllers/auth/application_controller.rb +97 -0
  29. data/app/controllers/auth/clients_controller.rb +105 -0
  30. data/app/controllers/auth/concerns/activity_controller_concern.rb +32 -0
  31. data/app/controllers/auth/concerns/devise_concern.rb +193 -0
  32. data/app/controllers/auth/concerns/omni_concern.rb +310 -0
  33. data/app/controllers/auth/concerns/otp_concern.rb +251 -0
  34. data/app/controllers/auth/concerns/shopping/cart_controller_concern.rb +105 -0
  35. data/app/controllers/auth/concerns/shopping/cart_item_controller_concern.rb +150 -0
  36. data/app/controllers/auth/concerns/shopping/discount_controller_concern.rb +97 -0
  37. data/app/controllers/auth/concerns/shopping/pay_u_money_controller_concern.rb +38 -0
  38. data/app/controllers/auth/concerns/shopping/payment_controller_concern.rb +101 -0
  39. data/app/controllers/auth/concerns/shopping/product_controller_concern.rb +68 -0
  40. data/app/controllers/auth/concerns/token_concern.rb +187 -0
  41. data/app/controllers/auth/confirmations_controller.rb +3 -0
  42. data/app/controllers/auth/mailgun_controller.rb +8 -0
  43. data/app/controllers/auth/omniauth_callbacks_controller.rb +6 -0
  44. data/app/controllers/auth/passwords_controller.rb +4 -0
  45. data/app/controllers/auth/profiles_controller.rb +156 -0
  46. data/app/controllers/auth/registrations_controller.rb +99 -0
  47. data/app/controllers/auth/search_controller.rb +61 -0
  48. data/app/controllers/auth/sessions_controller.rb +20 -0
  49. data/app/controllers/auth/shopping/cart_items_controller.rb +14 -0
  50. data/app/controllers/auth/shopping/carts_controller.rb +13 -0
  51. data/app/controllers/auth/shopping/discounts_controller.rb +19 -0
  52. data/app/controllers/auth/shopping/payments_controller.rb +13 -0
  53. data/app/controllers/auth/shopping/products_controller.rb +17 -0
  54. data/app/controllers/auth/shopping/shopping_controller.rb +86 -0
  55. data/app/controllers/auth/unlocks_controller.rb +3 -0
  56. data/app/controllers/auth/webhooks_controller.rb +3 -0
  57. data/app/helpers/auth/admin_create_users_helper.rb +2 -0
  58. data/app/helpers/auth/application_helper.rb +136 -0
  59. data/app/helpers/auth/clients_helper.rb +4 -0
  60. data/app/helpers/auth/resource_helper.rb +10 -0
  61. data/app/helpers/auth/search_helper.rb +2 -0
  62. data/app/helpers/auth/shopping/cart_items/cart_items_helper.rb +29 -0
  63. data/app/helpers/auth/shopping/carts/carts_helper.rb +25 -0
  64. data/app/helpers/auth/shopping/discounts/discounts_helper.rb +39 -0
  65. data/app/helpers/auth/shopping/payments/pay_u_money_helper.rb +56 -0
  66. data/app/helpers/auth/shopping/payments/payments_helper.rb +54 -0
  67. data/app/helpers/auth/shopping/products/products_helper.rb +52 -0
  68. data/app/helpers/auth/shopping/shopping_helper.rb +3 -0
  69. data/app/helpers/auth/users/profiles_helper.rb +12 -0
  70. data/app/jobs/otp_job.rb +92 -0
  71. data/app/mailers/application_mailer.rb +4 -0
  72. data/app/mailers/auth/notifier.rb +9 -0
  73. data/app/models/auth/admin_create_user.rb +3 -0
  74. data/app/models/auth/client.rb +52 -0
  75. data/app/models/auth/concerns/activity_concern.rb +112 -0
  76. data/app/models/auth/concerns/chief_model_concern.rb +73 -0
  77. data/app/models/auth/concerns/es_concern.rb +21 -0
  78. data/app/models/auth/concerns/notification_concern.rb +232 -0
  79. data/app/models/auth/concerns/notification_response_concern.rb +71 -0
  80. data/app/models/auth/concerns/owner_concern.rb +81 -0
  81. data/app/models/auth/concerns/shopping/cart_concern.rb +329 -0
  82. data/app/models/auth/concerns/shopping/cart_item_concern.rb +437 -0
  83. data/app/models/auth/concerns/shopping/discount_concern.rb +482 -0
  84. data/app/models/auth/concerns/shopping/discount_flow.txt +11 -0
  85. data/app/models/auth/concerns/shopping/pay_u_money_concern.rb +184 -0
  86. data/app/models/auth/concerns/shopping/payment_concern.rb +613 -0
  87. data/app/models/auth/concerns/shopping/product_concern.rb +102 -0
  88. data/app/models/auth/concerns/sms_otp_concern.rb +68 -0
  89. data/app/models/auth/concerns/user_concern.rb +788 -0
  90. data/app/models/auth/identity.rb +23 -0
  91. data/app/models/auth/shopping/cart.rb +3 -0
  92. data/app/models/auth/shopping/cart_item.rb +6 -0
  93. data/app/models/auth/shopping/cart_item_payment_result.rb +7 -0
  94. data/app/models/auth/shopping/discount.rb +4 -0
  95. data/app/models/auth/shopping/payment.rb +5 -0
  96. data/app/models/auth/shopping/product.rb +5 -0
  97. data/app/models/auth/user.rb +3 -0
  98. data/app/views/auth/admin_create_users/_admin_actions.html.erb +46 -0
  99. data/app/views/auth/admin_create_users/_form.html.erb +19 -0
  100. data/app/views/auth/admin_create_users/edit.html.erb +6 -0
  101. data/app/views/auth/admin_create_users/index.html.erb +25 -0
  102. data/app/views/auth/admin_create_users/new.html.erb +5 -0
  103. data/app/views/auth/admin_create_users/show.html.erb +8 -0
  104. data/app/views/auth/clients/_form.html.erb +41 -0
  105. data/app/views/auth/clients/edit.html.erb +6 -0
  106. data/app/views/auth/clients/index.html.erb +33 -0
  107. data/app/views/auth/clients/new.html.erb +5 -0
  108. data/app/views/auth/clients/show.html.erb +21 -0
  109. data/app/views/auth/confirmations/_enter_otp.html.erb +27 -0
  110. data/app/views/auth/confirmations/_get_otp_status.html.erb +25 -0
  111. data/app/views/auth/confirmations/_new_otp_input.js.erb +11 -0
  112. data/app/views/auth/confirmations/_resend_otp.js.erb +8 -0
  113. data/app/views/auth/confirmations/_resend_sms_otp.html.erb +18 -0
  114. data/app/views/auth/confirmations/_verify_otp.js.erb +64 -0
  115. data/app/views/auth/confirmations/create.js.erb +8 -0
  116. data/app/views/auth/confirmations/enter_otp.html.erb +7 -0
  117. data/app/views/auth/confirmations/get_otp_status.html.erb +3 -0
  118. data/app/views/auth/confirmations/new.html.erb +1 -0
  119. data/app/views/auth/confirmations/new.js.erb +16 -0
  120. data/app/views/auth/confirmations/otp_status_result.html.erb +20 -0
  121. data/app/views/auth/mailer/confirmation_instructions.html.erb +5 -0
  122. data/app/views/auth/mailer/password_change.html.erb +3 -0
  123. data/app/views/auth/mailer/reset_password_instructions.html.erb +8 -0
  124. data/app/views/auth/mailer/unlock_instructions.html.erb +7 -0
  125. data/app/views/auth/modals/_ajax_error_modal.html.erb +3 -0
  126. data/app/views/auth/modals/_ajax_error_modal_content.html.erb +0 -0
  127. data/app/views/auth/modals/_edit_account_content.html.erb +68 -0
  128. data/app/views/auth/modals/_edit_account_success_content.html.erb +5 -0
  129. data/app/views/auth/modals/_error_notification.html.erb +8 -0
  130. data/app/views/auth/modals/_forgot_password_content.html.erb +18 -0
  131. data/app/views/auth/modals/_forgot_password_success_content.html.erb +8 -0
  132. data/app/views/auth/modals/_login_default_content.html.erb +3 -0
  133. data/app/views/auth/modals/_login_forms.html.erb +13 -0
  134. data/app/views/auth/modals/_login_navigation_options.html.erb +12 -0
  135. data/app/views/auth/modals/_new_otp_input.html.erb +28 -0
  136. data/app/views/auth/modals/_oauth_and_submit.html.erb +21 -0
  137. data/app/views/auth/modals/_recaptcha_tags.html.erb +4 -0
  138. data/app/views/auth/modals/_resend_confirmation_content.html.erb +17 -0
  139. data/app/views/auth/modals/_resend_confirmation_success_content.html.erb +8 -0
  140. data/app/views/auth/modals/_resend_otp.html.erb +23 -0
  141. data/app/views/auth/modals/_resource_errors.js.erb +24 -0
  142. data/app/views/auth/modals/_sign_in_inputs.html.erb +10 -0
  143. data/app/views/auth/modals/_sign_in_needed_modal.html.erb +3 -0
  144. data/app/views/auth/modals/_sign_in_success_content.html.erb +5 -0
  145. data/app/views/auth/modals/_sign_up_inputs.html.erb +9 -0
  146. data/app/views/auth/modals/_sign_up_success_content.html.erb +1 -0
  147. data/app/views/auth/modals/_sign_up_success_inactive_content.html.erb +2 -0
  148. data/app/views/auth/modals/_unlock_content.html.erb +17 -0
  149. data/app/views/auth/modals/_verify_otp.html.erb +1 -0
  150. data/app/views/auth/modals/base_modal/_base.html.erb +25 -0
  151. data/app/views/auth/modals/login.js.erb +120 -0
  152. data/app/views/auth/modals/unlock_success_content.html.erb +8 -0
  153. data/app/views/auth/notifier/_email.html.erb +3 -0
  154. data/app/views/auth/notifier/notification.html.erb +2 -0
  155. data/app/views/auth/notifier/notification.text.erb +1 -0
  156. data/app/views/auth/omniauth_callbacks/failure.html.erb +4 -0
  157. data/app/views/auth/passwords/create.js.erb +12 -0
  158. data/app/views/auth/passwords/edit.html.erb +25 -0
  159. data/app/views/auth/passwords/new.html.erb +16 -0
  160. data/app/views/auth/passwords/new.js.erb +19 -0
  161. data/app/views/auth/profiles/_proxy_resource.html.erb +5 -0
  162. data/app/views/auth/profiles/set_proxy_resource.js.erb +1 -0
  163. data/app/views/auth/profiles/show.html.erb +8 -0
  164. data/app/views/auth/registrations/create.js.erb +40 -0
  165. data/app/views/auth/registrations/edit.html.erb +2 -0
  166. data/app/views/auth/registrations/edit.js.erb +5 -0
  167. data/app/views/auth/registrations/new.html.erb +33 -0
  168. data/app/views/auth/registrations/update.js.erb +47 -0
  169. data/app/views/auth/search/_search_bar.html.erb +11 -0
  170. data/app/views/auth/search/_search_result.html.erb +7 -0
  171. data/app/views/auth/search/_search_results.html.erb +4 -0
  172. data/app/views/auth/search/authenticated_user_search.js.erb +45 -0
  173. data/app/views/auth/search/authenticated_user_search.json +7 -0
  174. data/app/views/auth/sessions/create.js.erb +5 -0
  175. data/app/views/auth/sessions/new.html.erb +4 -0
  176. data/app/views/auth/sessions/new.js.erb +20 -0
  177. data/app/views/auth/shared/_devise_error_messages.html.erb +9 -0
  178. data/app/views/auth/shared/_links.html.erb +25 -0
  179. data/app/views/auth/shared/_object_errors.html.erb +12 -0
  180. data/app/views/auth/shared/_proxy_resource.html.erb +18 -0
  181. data/app/views/auth/shopping/cart_items/_form.html.erb +34 -0
  182. data/app/views/auth/shopping/cart_items/_show_cart_items_collection.html.erb +31 -0
  183. data/app/views/auth/shopping/cart_items/create_multiple.html.erb +6 -0
  184. data/app/views/auth/shopping/cart_items/create_multiple.json.erb +9 -0
  185. data/app/views/auth/shopping/cart_items/edit.html.erb +6 -0
  186. data/app/views/auth/shopping/cart_items/index.html.erb +52 -0
  187. data/app/views/auth/shopping/cart_items/new.html.erb +5 -0
  188. data/app/views/auth/shopping/cart_items/show.html.erb +13 -0
  189. data/app/views/auth/shopping/carts/_form.html.erb +35 -0
  190. data/app/views/auth/shopping/carts/_payment_links.html.erb +27 -0
  191. data/app/views/auth/shopping/carts/_remove_cart_item.html.erb +11 -0
  192. data/app/views/auth/shopping/carts/_show_cart_balance_info.html.erb +35 -0
  193. data/app/views/auth/shopping/carts/edit.html.erb +6 -0
  194. data/app/views/auth/shopping/carts/index.html.erb +43 -0
  195. data/app/views/auth/shopping/carts/new.html.erb +5 -0
  196. data/app/views/auth/shopping/carts/show.html.erb +46 -0
  197. data/app/views/auth/shopping/discounts/_form.html.erb +18 -0
  198. data/app/views/auth/shopping/discounts/_form_for_create_multiple_cart_items.html.erb +17 -0
  199. data/app/views/auth/shopping/discounts/_show_pending_discount_request.html.erb +17 -0
  200. data/app/views/auth/shopping/discounts/destroy.html.erb +2 -0
  201. data/app/views/auth/shopping/discounts/edit.html.erb +29 -0
  202. data/app/views/auth/shopping/discounts/index.html.erb +40 -0
  203. data/app/views/auth/shopping/discounts/new.html.erb +1 -0
  204. data/app/views/auth/shopping/discounts/show.html.erb +18 -0
  205. data/app/views/auth/shopping/discounts/update.html.erb +2 -0
  206. data/app/views/auth/shopping/payments/_approve_payment.html.erb +7 -0
  207. data/app/views/auth/shopping/payments/_cash_card_cheque.html.erb +24 -0
  208. data/app/views/auth/shopping/payments/_create_discount_coupon.html.erb +5 -0
  209. data/app/views/auth/shopping/payments/_form.html.erb +19 -0
  210. data/app/views/auth/shopping/payments/_gateway.html.erb +21 -0
  211. data/app/views/auth/shopping/payments/_proceed_to_gateway_or_verify_payment.html.erb +18 -0
  212. data/app/views/auth/shopping/payments/_refresh_payment.html.erb +7 -0
  213. data/app/views/auth/shopping/payments/_refund.html.erb +10 -0
  214. data/app/views/auth/shopping/payments/_show_payment_receipt.html.erb +12 -0
  215. data/app/views/auth/shopping/payments/edit.html.erb +6 -0
  216. data/app/views/auth/shopping/payments/index.html.erb +43 -0
  217. data/app/views/auth/shopping/payments/new.html.erb +13 -0
  218. data/app/views/auth/shopping/payments/show.html.erb +36 -0
  219. data/app/views/auth/shopping/products/_form.html.erb +27 -0
  220. data/app/views/auth/shopping/products/edit.html.erb +6 -0
  221. data/app/views/auth/shopping/products/index.html.erb +48 -0
  222. data/app/views/auth/shopping/products/index.json.erb +7 -0
  223. data/app/views/auth/shopping/products/new.html.erb +5 -0
  224. data/app/views/auth/shopping/products/show.html.erb +12 -0
  225. data/app/views/auth/shopping/products/show.json.erb +1 -0
  226. data/app/views/auth/unlocks/create.js.erb +12 -0
  227. data/app/views/auth/unlocks/new.html.erb +14 -0
  228. data/app/views/auth/unlocks/new.js.erb +17 -0
  229. data/app/views/auth/users/_search_result.html.erb +8 -0
  230. data/app/views/auth/users/profiles/_user_data.html.erb +4 -0
  231. data/app/views/auth/users/profiles/show.html.erb +54 -0
  232. data/app/views/layouts/auth/_modals.html.erb +2 -0
  233. data/app/views/layouts/auth/application.html.erb +17 -0
  234. data/app/views/layouts/auth/navbar/_navbar.html.erb +49 -0
  235. data/app/views/layouts/auth/navbar/_personalization.html.erb +17 -0
  236. data/app/views/layouts/auth/navbar/_progress_spinner.html.erb +11 -0
  237. data/app/views/layouts/mailer.html.erb +5 -0
  238. data/app/views/layouts/mailer.text.erb +1 -0
  239. data/config/initializers/active_model.rb +36 -0
  240. data/config/initializers/devise.rb +623 -0
  241. data/config/initializers/json.rb +10 -0
  242. data/config/initializers/omniauth.rb +447 -0
  243. data/config/initializers/redis.rb +2 -0
  244. data/config/initializers/redis.yml +14 -0
  245. data/config/locales/devise.en.yml +63 -0
  246. data/config/routes.rb +1 -0
  247. data/lib/assets/javascripts/data.js +126 -0
  248. data/lib/assets/javascripts/jquery.calendario.js +394 -0
  249. data/lib/assets/javascripts/jquery.tagcloud.js +92 -0
  250. data/lib/assets/javascripts/leanModal.js +236 -0
  251. data/lib/assets/javascripts/main.js +668 -0
  252. data/lib/assets/javascripts/modernizr.custom.63321.js +4 -0
  253. data/lib/assets/javascripts/payumoney.js +9 -0
  254. data/lib/assets/javascripts/search.js +36 -0
  255. data/lib/assets/javascripts/spinner.js +77 -0
  256. data/lib/assets/javascripts/trianglify.min.js +2 -0
  257. data/lib/assets/javascripts/you_need_to_sign_in.js.erb +478 -0
  258. data/lib/assets/stylesheets/calendar.css +111 -0
  259. data/lib/assets/stylesheets/calendar_modifications.scss +276 -0
  260. data/lib/auth.rb +32 -0
  261. data/lib/auth/custom_failure.rb +3 -0
  262. data/lib/auth/engine.rb +231 -0
  263. data/lib/auth/job_exception_handler.rb +7 -0
  264. data/lib/auth/mailgun.rb +28 -0
  265. data/lib/auth/notify.rb +8 -0
  266. data/lib/auth/omniauth/path.rb +104 -0
  267. data/lib/auth/partials.rb +12 -0
  268. data/lib/auth/rails/routes.rb +169 -0
  269. data/lib/auth/search/main.rb +97 -0
  270. data/lib/auth/sidekiq_up.rb +16 -0
  271. data/lib/auth/two_factor_otp.rb +202 -0
  272. data/lib/auth/url_shortener.rb +29 -0
  273. data/lib/auth/version.rb +3 -0
  274. data/lib/tasks/auth_tasks.rake +4 -0
  275. metadata +863 -0
@@ -0,0 +1,8 @@
1
+ <%= render :partial => "auth/modals/resource_errors.js.erb", locals: {resource: resource} %>
2
+ <% if resource.errors.size == 0 %>
3
+ console.log("there are no resource errors");
4
+ $("#login_title").hide();
5
+ $("#login_content").html("<%= escape_javascript(render partial: 'auth/modals/sign_up_success_inactive_content.html.erb', locals: {resource: resource}) %>").show();
6
+ $("#login_footer").hide();
7
+ <% end %>
8
+ open_sign_in_modal_if_closed();
@@ -0,0 +1,7 @@
1
+ <!-- this goes to the otp controller, here i will have to enable html responses -->
2
+
3
+
4
+ <%= render :partial => "auth/confirmations/enter_otp.html.erb", locals: {user: @auth_user} %>
5
+
6
+ <h3>Click below to resend the SMS OTP</h3>
7
+ <%= render :partial => "auth/confirmations/resend_sms_otp.html.erb", locals: {user: @auth_user} %>
@@ -0,0 +1,3 @@
1
+ <!-- here we want to provide a form that can query the otp controller to see what is the status of the otp processing -->
2
+ <%= render :partial => "auth/confirmations/get_otp_status", locals: {resource: @auth_user} %>
3
+ <!-- end -->
@@ -0,0 +1 @@
1
+ <%= render :partial => 'auth/shared/devise_error_messages.html.erb', locals:{resource: resource} %>
@@ -0,0 +1,16 @@
1
+ $("#login_title").show().html("Resend Confirmation Email");
2
+ $("#login_content").html("<%= escape_javascript(render partial:'auth/modals/resend_confirmation_content.html.erb', locals: {resource: resource}) %>").show();
3
+ $("#login_footer").html("<%= escape_javascript(render partial: 'auth/modals/login_navigation_options.html.erb') %>").show();
4
+ toggle_oauth();
5
+ toggle_sign_up_text("Sign In or Sign Up");
6
+ $("#show_sign_up").show();
7
+ $("#forgot_password").hide();
8
+ $("#resend_confirmation_email").hide();
9
+ //remove the remote from the user_email validation settings, if it is ther.
10
+ try{
11
+ var validator = new WJ_Validator(val_settings("email"),"materialize",true);
12
+ }
13
+ catch(err){
14
+ console.log(err);
15
+ }
16
+ open_sign_in_modal_if_closed();
@@ -0,0 +1,20 @@
1
+ <!-- shows the result of querying for the otp status -->
2
+ <%= render :partial => "auth/shared/object_errors.html.erb", locals: {active_model_object: @auth_user} %>
3
+ <% if @auth_user.additional_login_param_confirmed? && @auth_user.errors.empty? %>
4
+ The user is confirmed.
5
+ <% else %>
6
+ <% if @auth_user.additional_login_param_status == 1 %>
7
+ Confirmation is pending.
8
+ <!-- render the form to query again the otp status here -->
9
+ <%= render :partial => "auth/confirmations/get_otp_status", locals: {resource: @auth_user} %>
10
+ <!-- end -->
11
+ <% else %>
12
+ <% if @auth_user.additional_login_param_status == 2 %>
13
+ The status is confirmed.
14
+ <% else %>
15
+ Failed to confirm the user.
16
+ <% end %>
17
+
18
+ <% end %>
19
+ <% end %>
20
+ <!-- -->
@@ -0,0 +1,5 @@
1
+ <p>Welcome <%= @email %>!</p>
2
+
3
+ <p>You can confirm your account email through the link below:</p>
4
+
5
+ <p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
@@ -0,0 +1,3 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>We're contacting you to notify you that your password has been changed.</p>
@@ -0,0 +1,8 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Someone has requested a link to change your password. You can do this through the link below.</p>
4
+
5
+ <p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
6
+
7
+ <p>If you didn't request this, please ignore this email.</p>
8
+ <p>Your password won't change until you access the link above and create a new one.</p>
@@ -0,0 +1,7 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
4
+
5
+ <p>Click the link below to unlock your account:</p>
6
+
7
+ <p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
@@ -0,0 +1,3 @@
1
+ <div id="ajax_error_modal" class="modal">
2
+ <%= render :partial => "auth/modals/base_modal/base", :locals => {:modal_content => "auth/modals/ajax_error_modal_content.html.erb", :modal_footer => nil, :modal_title => "Oops!", :namespace => "_ajax_error"} %>
3
+ </div>
@@ -0,0 +1,68 @@
1
+ <% if !resource.nil? %>
2
+ <%= form_for(resource, as: resource.class.name.underscore, url: registration_path(resource.class.name.underscore), remote: true, :authenticity_token => true, data: {type: "script"}, html: {id: "login_form"}) do |f| %>
3
+ <div class="row" id="login_inputs">
4
+ <div class="col l8 m10 s10 offset-l2 offset-m1 offset-s1">
5
+ <div class="input-field">
6
+ <input <%=
7
+ if resource.has_oauth_identity?
8
+ "disabled"
9
+ end
10
+ %> id="<%= resource.class.name.downcase %>_email" type="email" name="<%= resource.class.name.downcase %>[email]" class="virgin" autofocus="false" value="<%=
11
+
12
+ resource.email
13
+
14
+ %>"></input>
15
+ <label for="<%= resource.class.name.downcase %>_email" autofocus="false">"E-mail"</label>
16
+ <!-- if there is an unconfirmed email, then show it here with a link to resend confirmation email to it -->
17
+ <% if !resource.confirmed? || resource.pending_reconfirmation? %>
18
+ <%= content_tag(:span,"Your email") %>
19
+ <%= content_tag(:span,(resource.unconfirmed_email || resource.email ),:id => "#{resource.class.name.downcase}_unconfirmed_email", :data => {:unconfirmed_email => (resource.unconfirmed_email || resource.email )}) %>
20
+ <%= content_tag(:span," is pending confirmation") %>
21
+ <%= content_tag(:div,"Resend Confirmation Email", :class => "resend_confirmation_email") %>
22
+ <% end %>
23
+ </div>
24
+ <% if !resource.has_oauth_identity? %>
25
+ <div class="input-field m-50-top">
26
+ <input id="<%= resource.class.name.downcase %>_password" type="password" name="<%= resource.class.name.downcase %>[password]" class="virgin"></input>
27
+ <label for="<%= resource.class.name.downcase %>_password">New Password</label>
28
+ </div>
29
+
30
+ <div class="input-field m-50-top">
31
+ <input id="<%= resource.class.name.downcase %>_password_confirmation" type="password" name="<%= resource.class.name.downcase %>[password_confirmation]" class="virgin">
32
+ </input>
33
+ <label for="<%= resource.class.name.downcase %>_password_confirmation">Confirm New Password</label>
34
+ </div>
35
+ <!--- -->
36
+
37
+ <% if !Auth.configuration.auth_resources[resource.class.to_s.singularize.capitalize][:additional_login_param_name].nil? %>
38
+ <div class="input-field m-50-top">
39
+ <input id="<%= resource.class.name.downcase %>_additional_login_param" type="text" name="<%= resource.class.name.downcase %>[additional_login_param]" class="virgin" value="<%=
40
+ if !resource.additional_login_param.nil?
41
+ resource.additional_login_param
42
+ end
43
+ %>">
44
+ </input>
45
+ <label for="<%= resource.class.name.downcase %>_additional_login_param"><%= Auth.configuration.auth_resources[resource.class.name.singularize.capitalize][:additional_login_param_name] %></label>
46
+ <% if resource.additional_login_param_status == 1 %>
47
+ <%= content_tag :div,nil,:id => "additional_login_param_resend_block", :data => {:additional_login_param => resource.additional_login_param} do %>
48
+ <%= content_tag(:div,"Your #{Auth.configuration.auth_resources[resource.class.name.singularize.capitalize][:additional_login_param_name]} needs to be verified.") %>
49
+ <%= content_tag(:div,"#{Auth.configuration.auth_resources[resource.class.name.singularize.capitalize][:additional_login_param_resend_confirmation_message]}",:class => "additional_login_param_resend_confirmation_message", :data => {:additional_login_param => resource.additional_login_param}) %>
50
+ <% end %>
51
+ <% end %>
52
+ </div>
53
+ <% end %>
54
+ <!--- -->
55
+ <div class="input-field m-50-top">
56
+ <input id="<%= resource.class.name.downcase %>_current_password" type="password" name="<%= resource.class.name.downcase %>[current_password]" class="virgin">
57
+ </input>
58
+ <label for="<%= resource.class.name.downcase %>_current_password">Your Current Password</label>
59
+ </div>
60
+ <% end %>
61
+ <!-- add the field for the additional_login_param -->
62
+ <!-- passed in skip_oauth_options so that it doesn't show the oauth icons here -->
63
+ <%= render :partial => 'auth/modals/oauth_and_submit.html.erb', locals: {skip_oauth_options: true} %>
64
+ </div>
65
+ </div>
66
+ <%= f.submit "Update", id: "login_submit", style: "display:none;" %>
67
+ <% end %>
68
+ <% end %>
@@ -0,0 +1,5 @@
1
+ <div class="row m-30-bottom">
2
+ <div class="col l6 offset-l3 m6 s12 center">
3
+ <i class="teal-text mdi-action-thumb-up fs-100"></i>
4
+ </div>
5
+ </div>
@@ -0,0 +1,8 @@
1
+ <div class="row m-40-top p-20-top p-20-bottom white fs-18 error_notification" style="border:1px solid gainsboro; border-radius:10px; min-height:67px; display:none;">
2
+ <div class="col l1 m1 s1 offset-l2 amber-text text-darken-4">
3
+ <i class="mdi-alert-error"></i>
4
+ </div>
5
+ <div class="col l6 m6 s12 blue-grey-text text-darken-2 error_message">
6
+
7
+ </div>
8
+ </div>
@@ -0,0 +1,18 @@
1
+ <h5 class="teal-text fw-200 center m-0-top p-0-top">Enter the <%= login_label_text(resource) %> with which you registered</h5>
2
+ <% if !resource.nil? %>
3
+
4
+ <%= form_for(resource, as: resource.class.name.underscore, url: password_path(resource.class.name.underscore), remote: true, :authenticity_token => true, data: {type: "script"}, html: { method: :post, id: "login_form_password" }) do |f| %>
5
+ <div class="row m-50-bottom">
6
+ <div class="col l6 m6 s12 offset-l3 offset-m3">
7
+ <div class="input-field m-30-top" style="margin-bottom:-30px;">
8
+ <input autofocus="autofocus" type="text" value="" name="<%= resource.class.name.underscore %>[email]" id="<%= resource.class.name.underscore %>_email">
9
+ <label for="<%= resource.class.name.underscore %>_email" class=""><%= login_label_text(resource) %></label>
10
+ </div>
11
+ <%= render 'auth/modals/oauth_and_submit.html.erb' %>
12
+ <div class="actions">
13
+ <%= f.submit "Send me reset password instructions", style: "display:none;", id:"login_submit" %>
14
+ </div>
15
+ </div>
16
+ </div>
17
+ <% end %>
18
+ <% end %>
@@ -0,0 +1,8 @@
1
+ <% if !resource.nil? %>
2
+ <h5 class="teal-text fw-200 center m-0-top p-0-top">We sent an Email with instructions on changing your password to <%= content_tag(:span, resource.email,{:class => "pink-text text-darken-2 fw-400"}) %></h5>
3
+ <div class="row m-30-top center">
4
+ <div class="col l6 m12 s12 offset-l3">
5
+ <i class="mdi-communication-email fs-150"></i>
6
+ </div>
7
+ </div>
8
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <div id="login_forms">
2
+
3
+ </div>
@@ -0,0 +1,13 @@
1
+ <!-- REGISTRATION FORM. -->
2
+ <% if !resource.nil? %>
3
+ <%= form_for(resource, as: resource.class.name.underscore, url: new_session_path(resource.class.name.underscore), remote: true, :authenticity_token => true, data: {type: "script"}, html: {id: "login_form"}) do |f| %>
4
+ <div class="row" id="login_inputs">
5
+ <div class="col l8 m10 s10 offset-l2 offset-m1 offset-s1">
6
+ <%= render 'auth/modals/sign_in_inputs.html.erb', locals: {:resource => resource} %>
7
+ <%= render 'auth/modals/sign_up_inputs.html.erb', locals: {:resource => resource} %>
8
+ <%= render 'auth/modals/oauth_and_submit.html.erb', locals: {:resource => resource} %>
9
+ </div>
10
+ </div>
11
+ <%= f.submit "Log In", id: "login_submit", style: "display:none;" %>
12
+ <% end %>
13
+ <% end %>
@@ -0,0 +1,12 @@
1
+ <div class="row">
2
+ <div class="col l6 m6 s12 offset-l3 offset-m3 center teal-text text-darken-2 fs-12">
3
+ <div id="show_sign_up" class="cursor-pointer">Don't have an Account? Sign Up For Free</div>
4
+ <div id="forgot_password" class="cursor-pointer">Forgot Your Password?</div>
5
+ <div id="unlock_account" class="cursor-pointer">Unlock Your Account</div>
6
+ <div id="resend_confirmation_email" class="cursor-pointer">Resend Confirmation Email</div>
7
+ <% if resource.additional_login_param_name %>
8
+ <div id="additional_login_param_resend_confirmation_message" class="cursor-pointer"><%= Auth.configuration.auth_resources[resource.class.to_s.capitalize][:additional_login_param_resend_confirmation_message] %>
9
+ </div>
10
+ <% end %>
11
+ </div>
12
+ </div>
@@ -0,0 +1,28 @@
1
+ <div class="col l8 m10 s10 offset-l2 offset-m1 offset-s1 center">
2
+ A SMS with an One-Time-Password was sent to <%= resource.additional_login_param %>. Please enter it below to complete verification.
3
+ <% if defined?(intent) == nil %>
4
+ <% intent = "" %>
5
+ <% end %>
6
+ <% if !resource.nil? %>
7
+ <%= form_for(resource, as: resource.class.name.underscore, url: verify_otp_url(resource.class.name.underscore.downcase.pluralize,{:intent => intent}), remote: true, :authenticity_token => true, data: {type: "script"}, html: {id: "otp_form"}, method: "GET") do |f| %>
8
+
9
+ <div class="input-field">
10
+ <input autofocus="autofocus" type="text" value="" name="<%= resource.class.name.downcase %>[otp]" id="<%= resource.class.name.downcase %>_otp">
11
+ <label for="<%= resource.class.name.downcase %>_otp" class="">Enter the OTP sent on your mobile</label>
12
+ <input type="hidden" value="<%= resource.additional_login_param %>" name="<%= resource.class.name.downcase %>[additional_login_param]" id="<%= resource.class.name.downcase %>_additional_login_param"></input>
13
+ </div>
14
+ <div style="text-align:center; padding-top:1.5rem; padding-bottom:1.5rem;" id="recaptcha_tags">
15
+ <% if Auth.configuration.recaptcha %>
16
+ <%= recaptcha_tags %>
17
+ <% end %>
18
+ </div>
19
+
20
+ <%= f.submit "Log In", id: "otp_form_submit", style: "display:none;" %>
21
+ <% end %>
22
+ <div class="m-20-bottom" id="otp_submit">
23
+
24
+ <i class="mdi-hardware-keyboard-tab grey-text center cursor-pointer" style="height:60px; width:60px; border:1px solid #9e9e9e; border-radius:5px; font-size:1.8em; padding-top:0.75rem; text-align:center;" id="submit_icon"></i>
25
+
26
+ </div>
27
+ <% end %>
28
+ </div>
@@ -0,0 +1,21 @@
1
+ <div class="m-50-top row m-0-left m-0-right m-0-bottom" id="oauth_and_submit">
2
+ <% if defined?(skip_oauth_options) != nil && skip_oauth_options == true %>
3
+ <% else %>
4
+ <div class="col l6 m6 s6 left p-0-left p-0-right" id="oauth_icons">
5
+ <% Auth.configuration.oauth_credentials.keys.each_with_index {|provider,index| %>
6
+ <a href="<%= Auth::OmniAuth::Path.omniauth_request_path(resource.class.name.to_s,provider) %>"><img src="/assets/auth/<%= provider %>.svg" height="60" width="60" class="oauth_icon
7
+ <% if index > 0 %>
8
+ m-10-left
9
+ <% end %>
10
+ "/></a>
11
+ <% } %>
12
+ </div>
13
+ <% end %>
14
+
15
+ <div class="col l6 m6 s6 p-0-left p-0-right" id="submit">
16
+
17
+ <i class="mdi-hardware-keyboard-tab grey-text right cursor-pointer" style="height:60px; width:60px; border:1px solid #9e9e9e; border-radius:5px; font-size:1.8em; padding-top:0.75rem; text-align:center;" id="submit_icon"></i>
18
+
19
+ </div>
20
+
21
+ </div>
@@ -0,0 +1,4 @@
1
+ <% puts "auth recaptcha configuration is:#{Auth.configuration.recaptcha}" %>
2
+ <% if Auth.configuration.recaptcha %>
3
+ <%= recaptcha_tags %>
4
+ <% end %>
@@ -0,0 +1,17 @@
1
+ <h5 class="teal-text fw-200 center m-0-top p-0-top">Enter your Email Address</h5>
2
+ <% if !resource.nil? && resource.respond_to?("pending_reconfirmation?") %>
3
+ <%= form_for(resource, as: resource.class.name.underscore, url: confirmation_path(resource.class.name.underscore), remote: true, :authenticity_token => true, data: {type: "script"}, html: { method: :post, id: "login_form" }) do |f| %>
4
+ <div class="row m-50-bottom">
5
+ <div class="col l6 m6 s12 offset-l3 offset-m3">
6
+ <div class="input-field m-30-top" style="margin-bottom:-30px;">
7
+ <input autofocus="autofocus" type="text" value="" name="<%= resource.class.name.underscore %>[email]" id="<%= resource.class.name.underscore %>_email">
8
+ <label for="<%= resource.class.name.underscore %>_email" class=""><%= login_label_text(resource) %></label>
9
+ </div>
10
+ <%= render 'auth/modals/oauth_and_submit.html.erb' %>
11
+ <div class="actions">
12
+ <%= f.submit "Resend confirmation instructions", style: "display:none;", id:"login_submit" %>
13
+ </div>
14
+ </div>
15
+ </div>
16
+ <% end %>
17
+ <% end %>
@@ -0,0 +1,8 @@
1
+ <% if !resource.nil? %>
2
+ <h5 class="teal-text fw-200 center m-0-top p-0-top">We sent an Email with confirmation instructions to <%= content_tag(:span, resource.unconfirmed_email,{:class => "pink-text text-darken-2 fw-400"}) %></h5>
3
+ <div class="row m-30-top center">
4
+ <div class="col l6 m12 s12 offset-l3">
5
+ <i class="mdi-communication-email fs-150"></i>
6
+ </div>
7
+ </div>
8
+ <% end %>
@@ -0,0 +1,23 @@
1
+ <div class="col l8 m10 s10 offset-l2 offset-m1 offset-s1 center">
2
+ Please enter your 10 digit mobile number.
3
+ <% if !resource.nil? %>
4
+
5
+ <%= form_for(resource, as: resource.class.name.underscore, url: send_sms_otp_url(resource.class.name.underscore.downcase.pluralize,{:intent => intent}), remote: true, :authenticity_token => true, data: {type: "script"}, html: {id: "otp_form"}, method: "GET") do |f| %>
6
+ <div class="input-field" style="text-align: center">
7
+ <input autofocus="autofocus" type="text" value="" name="<%= resource.class.name.downcase %>[additional_login_param]" id="<%= resource.class.name.downcase %>_additional_login_param">
8
+ <label for="<%= resource.class.name.downcase %>_additional_login_param" class="">Mobile Number</label>
9
+ </div>
10
+ <div style="text-align:center; padding-top: 1.5rem; padding-bottom: 1.5rem" id="recaptcha_tags">
11
+ <% if Auth.configuration.recaptcha %>
12
+ <%= recaptcha_tags %>
13
+ <% end %>
14
+ </div>
15
+
16
+ <%= f.submit "Log In", id: "otp_form_submit", style: "display:none;" %>
17
+ <% end %>
18
+ <div id="otp_submit" class="m-20-bottom">
19
+ <i class="mdi-hardware-keyboard-tab grey-text center cursor-pointer" style="height:60px; width:60px; border:1px solid #9e9e9e; border-radius:5px; font-size:1.8em; padding-top:0.75rem; text-align:center;" id="submit_icon"></i>
20
+ </div>
21
+
22
+ <% end %>
23
+ </div>
@@ -0,0 +1,24 @@
1
+ mark_all_input_fields_valid();
2
+ <% if (defined?(resource) != nil) && !resource.nil? %>
3
+ <% if resource.errors.size > 0 %>
4
+ <% resource.errors.each do |attrib,message| %>
5
+ <% if attrib =~ /recaptcha/ %>
6
+ show_modal_error_message("<%= escape_javascript(message) %>");
7
+ <% else %>
8
+ var resource_name = "<%= resource.class.name.underscore %>";
9
+ var attribute_name = "<%= attrib %>";
10
+ var field_id = resource_name + "_" + attribute_name;
11
+ var message = "<%= message.html_safe %>";
12
+ //invalidate_input_field internally checks to see if the field exists, otherwise it internally calls show_modal_error_message to show the error in the callout box above the form fields.
13
+ //this currently happens when errors are returned on additional_login_param, which as a field never exists.
14
+ invalidate_input_field(field_id,"<%= message.html_safe %>");
15
+ <% end %>
16
+ <% end %>
17
+ <% end %>
18
+ <% end %>
19
+ //this conditions happens if an errors variable has been explicitly passed to this errors modal.
20
+ //currently this is only done when a ActionController::RoutingError is raised , that too at the moment via the not_found def in the otpcontroller.
21
+ <% if (defined?(errors) != nil) %>
22
+ show_modal_error_message("<%= errors[0].to_s %>");
23
+ <% end %>
24
+
@@ -0,0 +1,10 @@
1
+ <div id="sign_in_inputs">
2
+ <div class="input-field">
3
+ <input autofocus="autofocus" type="text" value="" name="<%= resource.class.name.downcase %>[login]" id="<%= resource.class.name.downcase %>_login">
4
+ <label for="<%= resource.class.name.downcase %>_login" class=""><%= login_label_text(resource) %></label>
5
+ </div>
6
+ <div class="input-field m-50-top">
7
+ <input autocomplete="off" type="password" name="<%= resource.class.name.downcase %>[password]" id="<%= resource.class.name.downcase %>_password">
8
+ <label for="<%= resource.class.name.downcase %>_password" class="">Password</label>
9
+ </div>
10
+ </div>
@@ -0,0 +1,3 @@
1
+ <div id="sign_in_needed_modal" class="modal">
2
+ <%= render :partial => "auth/modals/base_modal/base", :locals => {:modal_content => 'auth/modals/login_default_content.html.erb', :modal_footer => nil, :modal_title => 'Sign In', :namespace => ""} %>
3
+ </div>
@@ -0,0 +1,5 @@
1
+ <div class="row m-30-bottom">
2
+ <div class="col l6 offset-l3 m6 s12 center">
3
+ <i class="teal-text mdi-action-thumb-up fs-100"></i>
4
+ </div>
5
+ </div>
@@ -0,0 +1,9 @@
1
+ <div id="sign_up_inputs" style="display:none;">
2
+ <div class="input-field m-50-top">
3
+ <input autocomplete="off" type="password" name="<%= resource.class.name.downcase %>[password_confirmation]" id="<%= resource.class.name.downcase %>_password_confirmation">
4
+ <label for="<%= resource.class.name.downcase %>_password_confirmation">Password confirmation</label>
5
+ </div>
6
+ <div style="text-align:center; padding-top:3rem;" id="recaptcha_tags">
7
+
8
+ </div>
9
+ </div>
@@ -0,0 +1 @@
1
+ <h5 class="teal-text text-darken-3 fw-200">Redirecting you to your Profile</h5>
@@ -0,0 +1,2 @@
1
+ <h5 class="teal-text center text-darken-3 fw-200">Hi <%= resource.name %> We sent an email with a confirmation link to <span class="teal-text text-darken-4"><%= resource.unconfirmed_email || resource.email %></span></h4>
2
+ <h5 class="teal-text center text-darken-3 fw-200">Please click on the link to activate your account.</h4>
@@ -0,0 +1,17 @@
1
+ <h5 class="teal-text fw-200 center m-0-top p-0-top">Enter the Email-Address or Mobile Number with which you registered</h5>
2
+ <% if !resource.nil? %>
3
+ <%= form_for(resource, as: resource.class.name.underscore, url: unlock_path(resource.class.name.underscore), remote: true, :authenticity_token => true, data: {type: "script"}, html: { method: :post, id: "login_form_unlock" }) do |f| %>
4
+ <div class="row m-50-bottom">
5
+ <div class="col l6 m6 s12 offset-l3 offset-m3">
6
+ <div class="input-field m-30-top" style="margin-bottom:-30px;">
7
+ <input autofocus="autofocus" type="text" value="" name="<%= resource.class.name.underscore %>[email]" id="<%= resource.class.name.underscore %>_email">
8
+ <label for="<%= resource.class.name.underscore %>_email" class=""><%= login_label_text(resource) %></label>
9
+ </div>
10
+ <%= render 'auth/modals/oauth_and_submit.html.erb' %>
11
+ <div class="actions">
12
+ <%= f.submit "Send me unlock instructions", style: "display:none;", id:"login_submit" %>
13
+ </div>
14
+ </div>
15
+ </div>
16
+ <% end %>
17
+ <% end %>