Merge pull request #17 from paviliondev/fix-redirect-after-login
fix redirect after login
Dieser Commit ist enthalten in:
Commit
71386efff7
2 geänderte Dateien mit 4 neuen und 9 gelöschten Zeilen
|
@ -1,3 +1,4 @@
|
||||||
(function () {
|
(function () {
|
||||||
window.location.href = "/login";
|
document.cookie = 'destination_url=' + window.location.href + ';path=/';
|
||||||
})();
|
window.location.href = '/login'
|
||||||
|
})()
|
||||||
|
|
|
@ -5,12 +5,6 @@ class CustomWizard::WizardController < ::ApplicationController
|
||||||
helper_method :wizard_page_title
|
helper_method :wizard_page_title
|
||||||
helper_method :theme_ids
|
helper_method :theme_ids
|
||||||
|
|
||||||
before_action :handle_login_redirect, unless: :current_user
|
|
||||||
|
|
||||||
def handle_login_redirect
|
|
||||||
cookies[:destination_url] = "/w/#{params[:wizard_id]}"
|
|
||||||
end
|
|
||||||
|
|
||||||
def wizard
|
def wizard
|
||||||
CustomWizard::Template.new(PluginStore.get('custom_wizard', params[:wizard_id].underscore))
|
CustomWizard::Template.new(PluginStore.get('custom_wizard', params[:wizard_id].underscore))
|
||||||
end
|
end
|
||||||
|
|
Laden …
In neuem Issue referenzieren