Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 17:30: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() {
|
||||
window.location.href = "/login";
|
||||
})();
|
||||
(function () {
|
||||
document.cookie = `destination_url=${window.location.href}`
|
||||
window.location.href = '/login'
|
||||
})()
|
||||
|
|
|
@ -4,12 +4,6 @@ class CustomWizard::WizardController < ::ApplicationController
|
|||
|
||||
helper_method :wizard_page_title
|
||||
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
|
||||
CustomWizard::Template.new(PluginStore.get('custom_wizard', params[:wizard_id].underscore))
|
||||
|
|
Laden …
In neuem Issue referenzieren