wordjelly-auth 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +35 -0
- data/app/assets/images/auth/activity.jpg +0 -0
- data/app/assets/images/auth/facebook.svg +1 -0
- data/app/assets/images/auth/google_oauth2.svg +1 -0
- data/app/assets/images/auth/js_pic3.jpg +0 -0
- data/app/assets/images/auth/profile.jpg +0 -0
- data/app/assets/javascripts/auth/admin_create_users.js +2 -0
- data/app/assets/javascripts/auth/application.js +20 -0
- data/app/assets/javascripts/auth/auth_dependencies.js +12 -0
- data/app/assets/javascripts/auth/auth_modals_and_navbar.js +218 -0
- data/app/assets/javascripts/auth/clients.js +2 -0
- data/app/assets/javascripts/auth/search.js +2 -0
- data/app/assets/javascripts/auth/shopping/discounts.js +2 -0
- data/app/assets/javascripts/auth/users/profiles.js +188 -0
- data/app/assets/stylesheets/auth/admin_create_users.css +4 -0
- data/app/assets/stylesheets/auth/application.scss +14 -0
- data/app/assets/stylesheets/auth/auth_default_css.scss +13 -0
- data/app/assets/stylesheets/auth/common-styles.scss +579 -0
- data/app/assets/stylesheets/auth/overrides.scss +26 -0
- data/app/assets/stylesheets/auth/search.css +4 -0
- data/app/assets/stylesheets/auth/shopping/discounts.css +4 -0
- data/app/assets/stylesheets/auth/users/profiles.scss +40 -0
- data/app/assets/stylesheets/scaffold.css +56 -0
- data/app/controllers/auth/admin_create_users_controller.rb +89 -0
- data/app/controllers/auth/application_controller.rb +97 -0
- data/app/controllers/auth/clients_controller.rb +105 -0
- data/app/controllers/auth/concerns/activity_controller_concern.rb +32 -0
- data/app/controllers/auth/concerns/devise_concern.rb +193 -0
- data/app/controllers/auth/concerns/omni_concern.rb +310 -0
- data/app/controllers/auth/concerns/otp_concern.rb +251 -0
- data/app/controllers/auth/concerns/shopping/cart_controller_concern.rb +105 -0
- data/app/controllers/auth/concerns/shopping/cart_item_controller_concern.rb +150 -0
- data/app/controllers/auth/concerns/shopping/discount_controller_concern.rb +97 -0
- data/app/controllers/auth/concerns/shopping/pay_u_money_controller_concern.rb +38 -0
- data/app/controllers/auth/concerns/shopping/payment_controller_concern.rb +101 -0
- data/app/controllers/auth/concerns/shopping/product_controller_concern.rb +68 -0
- data/app/controllers/auth/concerns/token_concern.rb +187 -0
- data/app/controllers/auth/confirmations_controller.rb +3 -0
- data/app/controllers/auth/mailgun_controller.rb +8 -0
- data/app/controllers/auth/omniauth_callbacks_controller.rb +6 -0
- data/app/controllers/auth/passwords_controller.rb +4 -0
- data/app/controllers/auth/profiles_controller.rb +156 -0
- data/app/controllers/auth/registrations_controller.rb +99 -0
- data/app/controllers/auth/search_controller.rb +61 -0
- data/app/controllers/auth/sessions_controller.rb +20 -0
- data/app/controllers/auth/shopping/cart_items_controller.rb +14 -0
- data/app/controllers/auth/shopping/carts_controller.rb +13 -0
- data/app/controllers/auth/shopping/discounts_controller.rb +19 -0
- data/app/controllers/auth/shopping/payments_controller.rb +13 -0
- data/app/controllers/auth/shopping/products_controller.rb +17 -0
- data/app/controllers/auth/shopping/shopping_controller.rb +86 -0
- data/app/controllers/auth/unlocks_controller.rb +3 -0
- data/app/controllers/auth/webhooks_controller.rb +3 -0
- data/app/helpers/auth/admin_create_users_helper.rb +2 -0
- data/app/helpers/auth/application_helper.rb +136 -0
- data/app/helpers/auth/clients_helper.rb +4 -0
- data/app/helpers/auth/resource_helper.rb +10 -0
- data/app/helpers/auth/search_helper.rb +2 -0
- data/app/helpers/auth/shopping/cart_items/cart_items_helper.rb +29 -0
- data/app/helpers/auth/shopping/carts/carts_helper.rb +25 -0
- data/app/helpers/auth/shopping/discounts/discounts_helper.rb +39 -0
- data/app/helpers/auth/shopping/payments/pay_u_money_helper.rb +56 -0
- data/app/helpers/auth/shopping/payments/payments_helper.rb +54 -0
- data/app/helpers/auth/shopping/products/products_helper.rb +52 -0
- data/app/helpers/auth/shopping/shopping_helper.rb +3 -0
- data/app/helpers/auth/users/profiles_helper.rb +12 -0
- data/app/jobs/otp_job.rb +92 -0
- data/app/mailers/application_mailer.rb +4 -0
- data/app/mailers/auth/notifier.rb +9 -0
- data/app/models/auth/admin_create_user.rb +3 -0
- data/app/models/auth/client.rb +52 -0
- data/app/models/auth/concerns/activity_concern.rb +112 -0
- data/app/models/auth/concerns/chief_model_concern.rb +73 -0
- data/app/models/auth/concerns/es_concern.rb +21 -0
- data/app/models/auth/concerns/notification_concern.rb +232 -0
- data/app/models/auth/concerns/notification_response_concern.rb +71 -0
- data/app/models/auth/concerns/owner_concern.rb +81 -0
- data/app/models/auth/concerns/shopping/cart_concern.rb +329 -0
- data/app/models/auth/concerns/shopping/cart_item_concern.rb +437 -0
- data/app/models/auth/concerns/shopping/discount_concern.rb +482 -0
- data/app/models/auth/concerns/shopping/discount_flow.txt +11 -0
- data/app/models/auth/concerns/shopping/pay_u_money_concern.rb +184 -0
- data/app/models/auth/concerns/shopping/payment_concern.rb +613 -0
- data/app/models/auth/concerns/shopping/product_concern.rb +102 -0
- data/app/models/auth/concerns/sms_otp_concern.rb +68 -0
- data/app/models/auth/concerns/user_concern.rb +788 -0
- data/app/models/auth/identity.rb +23 -0
- data/app/models/auth/shopping/cart.rb +3 -0
- data/app/models/auth/shopping/cart_item.rb +6 -0
- data/app/models/auth/shopping/cart_item_payment_result.rb +7 -0
- data/app/models/auth/shopping/discount.rb +4 -0
- data/app/models/auth/shopping/payment.rb +5 -0
- data/app/models/auth/shopping/product.rb +5 -0
- data/app/models/auth/user.rb +3 -0
- data/app/views/auth/admin_create_users/_admin_actions.html.erb +46 -0
- data/app/views/auth/admin_create_users/_form.html.erb +19 -0
- data/app/views/auth/admin_create_users/edit.html.erb +6 -0
- data/app/views/auth/admin_create_users/index.html.erb +25 -0
- data/app/views/auth/admin_create_users/new.html.erb +5 -0
- data/app/views/auth/admin_create_users/show.html.erb +8 -0
- data/app/views/auth/clients/_form.html.erb +41 -0
- data/app/views/auth/clients/edit.html.erb +6 -0
- data/app/views/auth/clients/index.html.erb +33 -0
- data/app/views/auth/clients/new.html.erb +5 -0
- data/app/views/auth/clients/show.html.erb +21 -0
- data/app/views/auth/confirmations/_enter_otp.html.erb +27 -0
- data/app/views/auth/confirmations/_get_otp_status.html.erb +25 -0
- data/app/views/auth/confirmations/_new_otp_input.js.erb +11 -0
- data/app/views/auth/confirmations/_resend_otp.js.erb +8 -0
- data/app/views/auth/confirmations/_resend_sms_otp.html.erb +18 -0
- data/app/views/auth/confirmations/_verify_otp.js.erb +64 -0
- data/app/views/auth/confirmations/create.js.erb +8 -0
- data/app/views/auth/confirmations/enter_otp.html.erb +7 -0
- data/app/views/auth/confirmations/get_otp_status.html.erb +3 -0
- data/app/views/auth/confirmations/new.html.erb +1 -0
- data/app/views/auth/confirmations/new.js.erb +16 -0
- data/app/views/auth/confirmations/otp_status_result.html.erb +20 -0
- data/app/views/auth/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/auth/mailer/password_change.html.erb +3 -0
- data/app/views/auth/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/auth/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/auth/modals/_ajax_error_modal.html.erb +3 -0
- data/app/views/auth/modals/_ajax_error_modal_content.html.erb +0 -0
- data/app/views/auth/modals/_edit_account_content.html.erb +68 -0
- data/app/views/auth/modals/_edit_account_success_content.html.erb +5 -0
- data/app/views/auth/modals/_error_notification.html.erb +8 -0
- data/app/views/auth/modals/_forgot_password_content.html.erb +18 -0
- data/app/views/auth/modals/_forgot_password_success_content.html.erb +8 -0
- data/app/views/auth/modals/_login_default_content.html.erb +3 -0
- data/app/views/auth/modals/_login_forms.html.erb +13 -0
- data/app/views/auth/modals/_login_navigation_options.html.erb +12 -0
- data/app/views/auth/modals/_new_otp_input.html.erb +28 -0
- data/app/views/auth/modals/_oauth_and_submit.html.erb +21 -0
- data/app/views/auth/modals/_recaptcha_tags.html.erb +4 -0
- data/app/views/auth/modals/_resend_confirmation_content.html.erb +17 -0
- data/app/views/auth/modals/_resend_confirmation_success_content.html.erb +8 -0
- data/app/views/auth/modals/_resend_otp.html.erb +23 -0
- data/app/views/auth/modals/_resource_errors.js.erb +24 -0
- data/app/views/auth/modals/_sign_in_inputs.html.erb +10 -0
- data/app/views/auth/modals/_sign_in_needed_modal.html.erb +3 -0
- data/app/views/auth/modals/_sign_in_success_content.html.erb +5 -0
- data/app/views/auth/modals/_sign_up_inputs.html.erb +9 -0
- data/app/views/auth/modals/_sign_up_success_content.html.erb +1 -0
- data/app/views/auth/modals/_sign_up_success_inactive_content.html.erb +2 -0
- data/app/views/auth/modals/_unlock_content.html.erb +17 -0
- data/app/views/auth/modals/_verify_otp.html.erb +1 -0
- data/app/views/auth/modals/base_modal/_base.html.erb +25 -0
- data/app/views/auth/modals/login.js.erb +120 -0
- data/app/views/auth/modals/unlock_success_content.html.erb +8 -0
- data/app/views/auth/notifier/_email.html.erb +3 -0
- data/app/views/auth/notifier/notification.html.erb +2 -0
- data/app/views/auth/notifier/notification.text.erb +1 -0
- data/app/views/auth/omniauth_callbacks/failure.html.erb +4 -0
- data/app/views/auth/passwords/create.js.erb +12 -0
- data/app/views/auth/passwords/edit.html.erb +25 -0
- data/app/views/auth/passwords/new.html.erb +16 -0
- data/app/views/auth/passwords/new.js.erb +19 -0
- data/app/views/auth/profiles/_proxy_resource.html.erb +5 -0
- data/app/views/auth/profiles/set_proxy_resource.js.erb +1 -0
- data/app/views/auth/profiles/show.html.erb +8 -0
- data/app/views/auth/registrations/create.js.erb +40 -0
- data/app/views/auth/registrations/edit.html.erb +2 -0
- data/app/views/auth/registrations/edit.js.erb +5 -0
- data/app/views/auth/registrations/new.html.erb +33 -0
- data/app/views/auth/registrations/update.js.erb +47 -0
- data/app/views/auth/search/_search_bar.html.erb +11 -0
- data/app/views/auth/search/_search_result.html.erb +7 -0
- data/app/views/auth/search/_search_results.html.erb +4 -0
- data/app/views/auth/search/authenticated_user_search.js.erb +45 -0
- data/app/views/auth/search/authenticated_user_search.json +7 -0
- data/app/views/auth/sessions/create.js.erb +5 -0
- data/app/views/auth/sessions/new.html.erb +4 -0
- data/app/views/auth/sessions/new.js.erb +20 -0
- data/app/views/auth/shared/_devise_error_messages.html.erb +9 -0
- data/app/views/auth/shared/_links.html.erb +25 -0
- data/app/views/auth/shared/_object_errors.html.erb +12 -0
- data/app/views/auth/shared/_proxy_resource.html.erb +18 -0
- data/app/views/auth/shopping/cart_items/_form.html.erb +34 -0
- data/app/views/auth/shopping/cart_items/_show_cart_items_collection.html.erb +31 -0
- data/app/views/auth/shopping/cart_items/create_multiple.html.erb +6 -0
- data/app/views/auth/shopping/cart_items/create_multiple.json.erb +9 -0
- data/app/views/auth/shopping/cart_items/edit.html.erb +6 -0
- data/app/views/auth/shopping/cart_items/index.html.erb +52 -0
- data/app/views/auth/shopping/cart_items/new.html.erb +5 -0
- data/app/views/auth/shopping/cart_items/show.html.erb +13 -0
- data/app/views/auth/shopping/carts/_form.html.erb +35 -0
- data/app/views/auth/shopping/carts/_payment_links.html.erb +27 -0
- data/app/views/auth/shopping/carts/_remove_cart_item.html.erb +11 -0
- data/app/views/auth/shopping/carts/_show_cart_balance_info.html.erb +35 -0
- data/app/views/auth/shopping/carts/edit.html.erb +6 -0
- data/app/views/auth/shopping/carts/index.html.erb +43 -0
- data/app/views/auth/shopping/carts/new.html.erb +5 -0
- data/app/views/auth/shopping/carts/show.html.erb +46 -0
- data/app/views/auth/shopping/discounts/_form.html.erb +18 -0
- data/app/views/auth/shopping/discounts/_form_for_create_multiple_cart_items.html.erb +17 -0
- data/app/views/auth/shopping/discounts/_show_pending_discount_request.html.erb +17 -0
- data/app/views/auth/shopping/discounts/destroy.html.erb +2 -0
- data/app/views/auth/shopping/discounts/edit.html.erb +29 -0
- data/app/views/auth/shopping/discounts/index.html.erb +40 -0
- data/app/views/auth/shopping/discounts/new.html.erb +1 -0
- data/app/views/auth/shopping/discounts/show.html.erb +18 -0
- data/app/views/auth/shopping/discounts/update.html.erb +2 -0
- data/app/views/auth/shopping/payments/_approve_payment.html.erb +7 -0
- data/app/views/auth/shopping/payments/_cash_card_cheque.html.erb +24 -0
- data/app/views/auth/shopping/payments/_create_discount_coupon.html.erb +5 -0
- data/app/views/auth/shopping/payments/_form.html.erb +19 -0
- data/app/views/auth/shopping/payments/_gateway.html.erb +21 -0
- data/app/views/auth/shopping/payments/_proceed_to_gateway_or_verify_payment.html.erb +18 -0
- data/app/views/auth/shopping/payments/_refresh_payment.html.erb +7 -0
- data/app/views/auth/shopping/payments/_refund.html.erb +10 -0
- data/app/views/auth/shopping/payments/_show_payment_receipt.html.erb +12 -0
- data/app/views/auth/shopping/payments/edit.html.erb +6 -0
- data/app/views/auth/shopping/payments/index.html.erb +43 -0
- data/app/views/auth/shopping/payments/new.html.erb +13 -0
- data/app/views/auth/shopping/payments/show.html.erb +36 -0
- data/app/views/auth/shopping/products/_form.html.erb +27 -0
- data/app/views/auth/shopping/products/edit.html.erb +6 -0
- data/app/views/auth/shopping/products/index.html.erb +48 -0
- data/app/views/auth/shopping/products/index.json.erb +7 -0
- data/app/views/auth/shopping/products/new.html.erb +5 -0
- data/app/views/auth/shopping/products/show.html.erb +12 -0
- data/app/views/auth/shopping/products/show.json.erb +1 -0
- data/app/views/auth/unlocks/create.js.erb +12 -0
- data/app/views/auth/unlocks/new.html.erb +14 -0
- data/app/views/auth/unlocks/new.js.erb +17 -0
- data/app/views/auth/users/_search_result.html.erb +8 -0
- data/app/views/auth/users/profiles/_user_data.html.erb +4 -0
- data/app/views/auth/users/profiles/show.html.erb +54 -0
- data/app/views/layouts/auth/_modals.html.erb +2 -0
- data/app/views/layouts/auth/application.html.erb +17 -0
- data/app/views/layouts/auth/navbar/_navbar.html.erb +49 -0
- data/app/views/layouts/auth/navbar/_personalization.html.erb +17 -0
- data/app/views/layouts/auth/navbar/_progress_spinner.html.erb +11 -0
- data/app/views/layouts/mailer.html.erb +5 -0
- data/app/views/layouts/mailer.text.erb +1 -0
- data/config/initializers/active_model.rb +36 -0
- data/config/initializers/devise.rb +623 -0
- data/config/initializers/json.rb +10 -0
- data/config/initializers/omniauth.rb +447 -0
- data/config/initializers/redis.rb +2 -0
- data/config/initializers/redis.yml +14 -0
- data/config/locales/devise.en.yml +63 -0
- data/config/routes.rb +1 -0
- data/lib/assets/javascripts/data.js +126 -0
- data/lib/assets/javascripts/jquery.calendario.js +394 -0
- data/lib/assets/javascripts/jquery.tagcloud.js +92 -0
- data/lib/assets/javascripts/leanModal.js +236 -0
- data/lib/assets/javascripts/main.js +668 -0
- data/lib/assets/javascripts/modernizr.custom.63321.js +4 -0
- data/lib/assets/javascripts/payumoney.js +9 -0
- data/lib/assets/javascripts/search.js +36 -0
- data/lib/assets/javascripts/spinner.js +77 -0
- data/lib/assets/javascripts/trianglify.min.js +2 -0
- data/lib/assets/javascripts/you_need_to_sign_in.js.erb +478 -0
- data/lib/assets/stylesheets/calendar.css +111 -0
- data/lib/assets/stylesheets/calendar_modifications.scss +276 -0
- data/lib/auth.rb +32 -0
- data/lib/auth/custom_failure.rb +3 -0
- data/lib/auth/engine.rb +231 -0
- data/lib/auth/job_exception_handler.rb +7 -0
- data/lib/auth/mailgun.rb +28 -0
- data/lib/auth/notify.rb +8 -0
- data/lib/auth/omniauth/path.rb +104 -0
- data/lib/auth/partials.rb +12 -0
- data/lib/auth/rails/routes.rb +169 -0
- data/lib/auth/search/main.rb +97 -0
- data/lib/auth/sidekiq_up.rb +16 -0
- data/lib/auth/two_factor_otp.rb +202 -0
- data/lib/auth/url_shortener.rb +29 -0
- data/lib/auth/version.rb +3 -0
- data/lib/tasks/auth_tasks.rake +4 -0
- metadata +863 -0
@@ -0,0 +1 @@
|
|
1
|
+
<div id="verify_otp_result">Verifying your OTP.....</div>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<div class="modal-content">
|
2
|
+
<h4 class="fs-16">
|
3
|
+
<i class="mdi-content-clear right cursor-pointer modal-close"></i>
|
4
|
+
</h4>
|
5
|
+
<div class="row m-0-top">
|
6
|
+
<div class="section p-0-top" id="login_header<%= namespace %>">
|
7
|
+
<div class="row center">
|
8
|
+
<div class="col l6 offset-l3 m8 offset-m2 s12">
|
9
|
+
<h3 class="teal-text fw-200 m-10-bottom center" id="login_title<%= namespace %>"><%=modal_title %></h3>
|
10
|
+
<%= render 'auth/modals/error_notification.html.erb' %>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
<div class="section" id="login_content<%= namespace %>">
|
15
|
+
<% if !modal_content.nil? %>
|
16
|
+
<%= render modal_content %>
|
17
|
+
<% end %>
|
18
|
+
</div>
|
19
|
+
<div class="section p-0-top m-0-top" id="login_footer<%= namespace %>">
|
20
|
+
<% if !modal_footer.nil? %>
|
21
|
+
<%= render modal_footer %>
|
22
|
+
<% end %>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</div>
|
@@ -0,0 +1,120 @@
|
|
1
|
+
var case_it = "<%= case_it %>";
|
2
|
+
console.log("case is :" + case_it);
|
3
|
+
//controller=>sessions,action=>new,success/failure -> here meaningless
|
4
|
+
if(case_it == "sessions_new_success"){
|
5
|
+
//TITLE
|
6
|
+
$("#login_title").html("Sign In").show();
|
7
|
+
//CONTENT
|
8
|
+
$("#login_content").html("<%= escape_javascript(render partial: 'modals/login_default_content.html.erb') %>").show();
|
9
|
+
$("#login_forms").html("<%= escape_javascript(render partial: 'modals/login_forms.html.erb', locals: {resource: login_opts['resource']}) %>").show();
|
10
|
+
$("#recaptcha_tags").html("<%= escape_javascript(render partial: 'modals/recaptcha_tags.html.erb') %>").show();
|
11
|
+
//FOOTER
|
12
|
+
$("#login_footer").html("<%= escape_javascript(render partial: 'modals/login_navigation_options.html.erb') %>").show();
|
13
|
+
}
|
14
|
+
else if(case_it == "sessions_create_success"){
|
15
|
+
mark_all_input_fields_valid();
|
16
|
+
$("#personalization").html("<%= escape_javascript(render partial: 'layouts/personalization.html.erb') %>");
|
17
|
+
$("#login_title").html("Sign In Successfull !").show();
|
18
|
+
$("#login_content").html("<%= escape_javascript(render partial:'modals/sign_in_success_content.html.erb' ) %>").show();
|
19
|
+
$("#login_footer").html("<%= escape_javascript(render partial: 'modals/login_navigation_options.html.erb') %>").hide();
|
20
|
+
}
|
21
|
+
else if(case_it == "registrations_create_success"){
|
22
|
+
mark_all_input_fields_valid();
|
23
|
+
//TITLE
|
24
|
+
$("#login_title").html("Sign Up Successfull");
|
25
|
+
//CONTENT
|
26
|
+
var resource_active = "<%= login_opts['resource'].active_for_authentication? %>";
|
27
|
+
|
28
|
+
if(resource_active == "true"){
|
29
|
+
$("#login_content").html("<%= escape_javascript(render partial: 'modals/sign_up_success_content.html.erb', locals: {name: login_opts['resource'].name, email: login_opts['resource'].email}) %>").show();
|
30
|
+
window.location.href = "<%= profile_user_path(login_opts['resource'].id) %>";
|
31
|
+
$("#login_footer").html("Redirecting you to your Profile").show();
|
32
|
+
}
|
33
|
+
else{
|
34
|
+
$("#login_content").html("<%= escape_javascript(render partial: 'modals/sign_up_success_inactive_content.html.erb', locals: {name: login_opts['resource'].name, email: login_opts['resource'].email}) %>").show();
|
35
|
+
//FOOTER
|
36
|
+
$("#login_footer").html("<%= escape_javascript(render partial: 'modals/login_navigation_options.html.erb') %>").show();
|
37
|
+
$("#show_sign_up").hide();
|
38
|
+
$("#forgot_password").hide();
|
39
|
+
$("#resend_confirmation_email").show();
|
40
|
+
}
|
41
|
+
}
|
42
|
+
else if(case_it == "registrations_create_failed"){
|
43
|
+
mark_all_input_fields_valid();
|
44
|
+
<% login_opts['resource'].errors.each do |attrib,message| %>
|
45
|
+
<% if attrib =~ /recaptcha/ %>
|
46
|
+
show_modal_error_message("<%= escape_javascript(message) %>");
|
47
|
+
<% else %>
|
48
|
+
var resource_name = "<%= login_opts['resource'].class.name.underscore %>";
|
49
|
+
var field_id = resource_name + "_" + "<%= attrib %>";
|
50
|
+
invalidate_input_field(field_id,"<%= message.html_safe %>");
|
51
|
+
<% end %>
|
52
|
+
<% end %>
|
53
|
+
//should focus on the first invalid field.
|
54
|
+
}
|
55
|
+
else if(case_it == "registrations_edit_success"){
|
56
|
+
$("#login_title").html("Edit Account Settings");
|
57
|
+
$("#login_content").html("<%= escape_javascript(render partial:'modals/edit_account_content.html.erb', locals: {resource: login_opts['resource']} ) %>");
|
58
|
+
hide_oauth();
|
59
|
+
$("#login_footer").hide();
|
60
|
+
}
|
61
|
+
else if(case_it == "registrations_update_success"){
|
62
|
+
$("#login_title").html("Account Settings Successfully Updated!");
|
63
|
+
$("#login_content").html("<%= escape_javascript(render partial:'modals/edit_account_success_content.html.erb', locals: {resource: login_opts['resource']} ) %>");
|
64
|
+
hide_oauth();
|
65
|
+
$("#login_footer").hide();
|
66
|
+
}
|
67
|
+
else if(case_it == "registrations_update_failed"){
|
68
|
+
//first make all fields valid.
|
69
|
+
mark_all_input_fields_valid();
|
70
|
+
<% login_opts['resource'].errors.each do |attrib,message| %>
|
71
|
+
var resource_name = "<%= login_opts['resource'].class.name.underscore %>";
|
72
|
+
var field_id = resource_name + "_" + "<%= attrib %>";
|
73
|
+
invalidate_input_field(field_id,"<%= message.html_safe %>");
|
74
|
+
<% end %>
|
75
|
+
}
|
76
|
+
else if(case_it == "passwords_new_success"){
|
77
|
+
$("#login_title").show().html("Forgot Password");
|
78
|
+
$("#login_content").html("<%= escape_javascript(render partial:'modals/forgot_password_content.html.erb', locals: {resource: login_opts['resource']}) %>").show();
|
79
|
+
$("#login_footer").html("<%= escape_javascript(render partial: 'modals/login_navigation_options.html.erb') %>").show();
|
80
|
+
toggle_oauth();
|
81
|
+
toggle_sign_up_text("Sign In or Sign Up");
|
82
|
+
$("#show_sign_up").show();
|
83
|
+
$("#forgot_password").hide();
|
84
|
+
$("#resend_confirmation_email").hide();
|
85
|
+
}
|
86
|
+
else if(case_it == "passwords_create_success"){
|
87
|
+
$("#login_title").hide();
|
88
|
+
$("#login_content").html("<%= escape_javascript(render partial:'modals/forgot_password_success_content.html.erb', locals: {resource: login_opts['resource']}) %>").show();
|
89
|
+
$("#login_footer").hide();
|
90
|
+
}
|
91
|
+
else if(case_it == "passwords_create_failed"){
|
92
|
+
<% login_opts['resource'].errors.each do |attrib,message| %>
|
93
|
+
var resource_name = "<%= login_opts['resource'].class.name.underscore %>";
|
94
|
+
var field_id = resource_name + "_" + "<%= attrib %>";
|
95
|
+
invalidate_input_field(field_id,"<%= message.html_safe %>");
|
96
|
+
<% end %>
|
97
|
+
}
|
98
|
+
else if(case_it == "confirmations_new_success"){
|
99
|
+
$("#login_title").show().html("Resend Confirmation Email");
|
100
|
+
$("#login_content").html("<%= escape_javascript(render partial:'modals/resend_confirmation_content.html.erb', locals: {resource: login_opts['resource']}) %>").show();
|
101
|
+
$("#login_footer").html("<%= escape_javascript(render partial: 'modals/login_navigation_options.html.erb') %>").show();
|
102
|
+
toggle_oauth();
|
103
|
+
toggle_sign_up_text("Sign In or Sign Up");
|
104
|
+
$("#show_sign_up").show();
|
105
|
+
$("#forgot_password").hide();
|
106
|
+
$("#resend_confirmation_email").hide();
|
107
|
+
}
|
108
|
+
else if(case_it == "confirmations_create_success"){
|
109
|
+
$("#login_title").hide();
|
110
|
+
$("#login_content").html("<%= escape_javascript(render partial:'modals/resend_confirmation_success_content.html.erb', locals: {resource: login_opts['resource']}) %>").show();
|
111
|
+
$("#login_footer").hide();
|
112
|
+
}
|
113
|
+
else if(case_it == "confirmations_create_failed"){
|
114
|
+
<% login_opts['resource'].errors.each do |attrib,message| %>
|
115
|
+
var resource_name = "<%= login_opts['resource'].class.name.underscore %>";
|
116
|
+
var field_id = resource_name + "_" + "<%= attrib %>";
|
117
|
+
invalidate_input_field(field_id,"<%= message.html_safe %>");
|
118
|
+
<% end %>
|
119
|
+
}
|
120
|
+
open_sign_in_modal_if_closed();
|
@@ -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 unlocking your account 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 @@
|
|
1
|
+
another file.
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<% if resource.errors.size > 0 %>
|
2
|
+
<% resource.errors.each do |attrib,message| %>
|
3
|
+
var resource_name = "<%= resource.class.name.underscore %>";
|
4
|
+
var field_id = resource_name + "_" + "<%= attrib %>";
|
5
|
+
invalidate_input_field(field_id,"<%= message.html_safe %>");
|
6
|
+
<% end %>
|
7
|
+
<% else %>
|
8
|
+
$("#login_title").hide();
|
9
|
+
$("#login_content").html("<%= escape_javascript(render partial:'auth/modals/forgot_password_success_content.html.erb', locals: {resource: resource}) %>").show();
|
10
|
+
$("#login_footer").hide();
|
11
|
+
<% end %>
|
12
|
+
open_sign_in_modal_if_closed();
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<h2>Change your password</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
<%= f.hidden_field :reset_password_token %>
|
6
|
+
|
7
|
+
<div class="field">
|
8
|
+
<%= f.label :password, "New password" %><br />
|
9
|
+
<% if @minimum_password_length %>
|
10
|
+
<em>(<%= @minimum_password_length %> characters minimum)</em><br />
|
11
|
+
<% end %>
|
12
|
+
<%= f.password_field :password, autofocus: true, autocomplete: "off" %>
|
13
|
+
</div>
|
14
|
+
|
15
|
+
<div class="field">
|
16
|
+
<%= f.label :password_confirmation, "Confirm new password" %><br />
|
17
|
+
<%= f.password_field :password_confirmation, autocomplete: "off" %>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div class="actions">
|
21
|
+
<%= f.submit "Change my password" %>
|
22
|
+
</div>
|
23
|
+
<% end %>
|
24
|
+
|
25
|
+
<%= render "devise/shared/links" %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<h2>Forgot your password?</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<div class="field">
|
7
|
+
<%= f.label :email %><br />
|
8
|
+
<%= f.email_field :email, autofocus: true %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class="actions">
|
12
|
+
<%= f.submit "Send me reset password instructions" %>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<%= render "devise/shared/links" %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
$("#login_title").show().html("Forgot Password");
|
2
|
+
$("#login_content").html("<%= escape_javascript(render partial:'auth/modals/forgot_password_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
|
+
// Initialize the validator
|
11
|
+
try{
|
12
|
+
var validator = new WJ_Validator(val_settings("email"),"materialize",true);
|
13
|
+
}
|
14
|
+
catch(err){
|
15
|
+
console.log(err);
|
16
|
+
}
|
17
|
+
|
18
|
+
|
19
|
+
open_sign_in_modal_if_closed();
|
@@ -0,0 +1 @@
|
|
1
|
+
$("#proxy_user").html("<%= escape_javascript(render partial: 'auth/profiles/proxy_resource.html.erb', locals: {proxy_resource: @profile_resource}) %>").show();
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<h4><%= flash[:notice] %></h4>
|
2
|
+
<%= render :partial => "auth/shared/object_errors.html.erb", locals: {active_model_object: @profile_resource} %>
|
3
|
+
<!-- if the current signed in resource is admin -->
|
4
|
+
<!-- give options to resend sms otp, resend confirmation email, basically render the options partial from admin_create_users -->
|
5
|
+
<%= render :partial => "auth/admin_create_users/admin_actions.html.erb", locals: {user: @profile_resource} %>
|
6
|
+
<!-- else -->
|
7
|
+
|
8
|
+
<!-- end -->
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<%= render :partial => "auth/modals/resource_errors.js.erb", locals: {resource: resource} %>
|
2
|
+
|
3
|
+
<% if resource.errors.size == 0 %>
|
4
|
+
|
5
|
+
var resource_active = "<%= resource.active_for_authentication? %>";
|
6
|
+
|
7
|
+
var additional_login_param_status_pending = "<%= resource.additional_login_param_status == 1 %>";
|
8
|
+
|
9
|
+
if(resource_active === "true"){
|
10
|
+
$("#login_footer").html("Redirecting you to your Profile").show();
|
11
|
+
window.location.href = "<%= profile_path(resource.id) %>";
|
12
|
+
|
13
|
+
}
|
14
|
+
else{
|
15
|
+
console.log("status pending is true");
|
16
|
+
//this needs to be written in the dummy app,
|
17
|
+
//depending on what is the additional-login_param
|
18
|
+
$("#login_title").html("Verify your Account");
|
19
|
+
if(additional_login_param_status_pending === "true"){
|
20
|
+
|
21
|
+
$("#login_content").html("<%= escape_javascript(render partial: Auth::Partials.additional_login_param_new_otp_partial(resource), locals: {resource: resource, intent: ''}) %>").show();
|
22
|
+
//$("#sign_up_inputs").hide();
|
23
|
+
$("#login_footer").html("<%= escape_javascript(render partial: 'auth/modals/login_navigation_options.html.erb', locals: {resource: resource}) %>").show();
|
24
|
+
$("#show_sign_up").hide();
|
25
|
+
$("#forgot_password").hide();
|
26
|
+
$("#resend_confirmation_email").hide();
|
27
|
+
|
28
|
+
}
|
29
|
+
else
|
30
|
+
{
|
31
|
+
|
32
|
+
$("#login_content").html("<%= escape_javascript(render partial: 'auth/modals/sign_up_success_inactive_content.html.erb', locals: {resource: resource}) %>").show();
|
33
|
+
$("#login_footer").html("<%= escape_javascript(render partial: 'auth/modals/login_navigation_options.html.erb') %>").show();
|
34
|
+
$("#show_sign_up").hide();
|
35
|
+
$("#forgot_password").hide();
|
36
|
+
$("#resend_confirmation_email").show();
|
37
|
+
}
|
38
|
+
}
|
39
|
+
open_sign_in_modal_if_closed();
|
40
|
+
<% end %>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
$("#login_title").html("Edit Account Settings");
|
2
|
+
$("#login_content").html("<%= escape_javascript(render partial:'auth/modals/edit_account_content.html.erb', locals: {resource: resource} ) %>");
|
3
|
+
hide_oauth();
|
4
|
+
$("#login_footer").hide();
|
5
|
+
open_sign_in_modal_if_closed();
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<h2>Sign up</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
<% if !session[:client].nil? %>
|
6
|
+
<%= "client in session" %>
|
7
|
+
<% end %>
|
8
|
+
<div class="field">
|
9
|
+
<%= f.label :email %><br />
|
10
|
+
<%= f.email_field :email, autofocus: true %>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div class="field">
|
14
|
+
<%= f.label :password %>
|
15
|
+
<% if @minimum_password_length %>
|
16
|
+
<em>(<%= @minimum_password_length %> characters minimum)</em>
|
17
|
+
<% end %><br />
|
18
|
+
<%= f.password_field :password, autocomplete: "off" %>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<div class="field">
|
22
|
+
<%= f.label :password_confirmation %><br />
|
23
|
+
<%= f.password_field :password_confirmation, autocomplete: "off" %>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
|
27
|
+
<div class="actions">
|
28
|
+
<%= f.submit "Sign up" %>
|
29
|
+
</div>
|
30
|
+
<% end %>
|
31
|
+
|
32
|
+
<%= link_to "test", omniauth_failure_path_for(resource) %>
|
33
|
+
<%= render "devise/shared/links" %>
|
@@ -0,0 +1,47 @@
|
|
1
|
+
mark_all_input_fields_valid();
|
2
|
+
<%= render :partial => "auth/modals/resource_errors.js.erb", locals: {resource: resource} %>
|
3
|
+
<% if resource.errors.size == 0 %>
|
4
|
+
var resource_active = "<%= resource.authentication_keys_confirmed? %>";
|
5
|
+
var additional_login_param_status_pending = "<%= resource.additional_login_param_status == 1 %>";
|
6
|
+
var email_changed = "<%= !resource.previous_changes['unconfirmed_email'].nil? %>";
|
7
|
+
|
8
|
+
|
9
|
+
//if something else is changed then that has to be handled seperately.
|
10
|
+
if(resource_active === "true"){
|
11
|
+
$("#login_title").html("Account Settings Successfully Updated!");
|
12
|
+
$("#login_content").html("<%= escape_javascript(render partial:'auth/modals/edit_account_success_content.html.erb', locals: {resource: resource} ) %>");
|
13
|
+
hide_oauth();
|
14
|
+
$("#login_footer").hide();
|
15
|
+
}
|
16
|
+
else{
|
17
|
+
//this needs to be written in the dummy app,
|
18
|
+
//depending on what is the additional-login_param
|
19
|
+
$("#login_title").html("Verify your Account");
|
20
|
+
if(additional_login_param_status_pending === "true"){
|
21
|
+
|
22
|
+
$("#login_content").html("<%= escape_javascript(render partial: Auth.configuration.auth_resources[resource.class.to_s.capitalize][:additional_login_param_new_otp_partial], locals: {resource: resource}) %>").show();
|
23
|
+
//$("#sign_up_inputs").hide();
|
24
|
+
$("#login_footer").html("<%= escape_javascript(render partial: 'auth/modals/login_navigation_options.html.erb', locals: {resource: resource}) %>").show();
|
25
|
+
$("#show_sign_up").hide();
|
26
|
+
$("#forgot_password").hide();
|
27
|
+
$("#resend_confirmation_email").hide();
|
28
|
+
|
29
|
+
}
|
30
|
+
else if(email_changed === "true")
|
31
|
+
{
|
32
|
+
|
33
|
+
$("#login_content").html("<%= escape_javascript(render partial: 'auth/modals/sign_up_success_inactive_content.html.erb', locals: {resource: resource}) %>").show();
|
34
|
+
$("#login_footer").html("<%= escape_javascript(render partial: 'auth/modals/login_navigation_options.html.erb') %>").show();
|
35
|
+
$("#show_sign_up").hide();
|
36
|
+
$("#forgot_password").hide();
|
37
|
+
$("#resend_confirmation_email").show();
|
38
|
+
}
|
39
|
+
else{
|
40
|
+
$("#login_title").html("Account Settings Successfully Updated!").show();
|
41
|
+
$("#login_content").html("<%= escape_javascript(render partial:'auth/modals/edit_account_success_content.html.erb', locals: {resource: resource} ) %>").show();
|
42
|
+
hide_oauth();
|
43
|
+
$("#login_footer").hide();
|
44
|
+
}
|
45
|
+
}
|
46
|
+
open_sign_in_modal_if_closed();
|
47
|
+
<% end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<div class="row m-0-bottom">
|
2
|
+
<div class="col l6 m6 s6 offset-l3">
|
3
|
+
<form autocomplete="off">
|
4
|
+
<div class="input-field">
|
5
|
+
<input id="search" type="search" required>
|
6
|
+
<label class="label-icon" for="search"><i class="material-icons">search</i></label>
|
7
|
+
<i class="material-icons">close</i>
|
8
|
+
</div>
|
9
|
+
</form>
|
10
|
+
</div>
|
11
|
+
</div>
|