app/helpers/decidim/consultations/questions_helper.rb in decidim-consultations-0.26.10 vs app/helpers/decidim/consultations/questions_helper.rb in decidim-consultations-0.27.0.rc1
- old
+ new
@@ -32,14 +32,14 @@
return if current_user && action_authorized_to(:vote, resource: nil, permissions_holder: question).ok?
tag = "button"
html_options ||= {}
- if !current_user
- html_options["data-open"] = "loginModal"
- else
+ if current_user
html_options["data-open"] = "authorizationModal"
html_options["data-open-url"] = decidim_consultations.authorization_vote_modal_question_path(question)
+ else
+ html_options["data-open"] = "loginModal"
end
html_options["onclick"] = "event.preventDefault();"
send("#{tag}_to", "", html_options, &block)