Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-23 01:40:29 +01:00
javascript based cookie setting and redirect, removed ruby cookie handling
Dieser Commit ist enthalten in:
Ursprung
6d63a7927b
Commit
7dc42c24ea
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}`
|
||||||
})();
|
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