diff --git a/app/controllers/property_hires_controller.rb b/app/controllers/property_hires_controller.rb index d54eab1..a606650 100644 --- a/app/controllers/property_hires_controller.rb +++ b/app/controllers/property_hires_controller.rb @@ -170,8 +170,13 @@ class PropertyHiresController < ApplicationController params = OrbitHelper.params @property = Property.where(:uid => params[:uid]).first rescue nil page = OrbitHelper.page rescue Page.where(:page_id => params[:page_id]).first - back_url = (page.url + (params[:slug].present? ? "/#{params[:slug]}#{property.disable_content_page ? "?method=hire" : ""}" : "") rescue "#") - {"back_url"=>back_url} + back_button_text = I18n.t("property_hire.go_to_infos_page") + back_url = (page.url + (params[:slug].present? ? "/#{params[:slug]}" : "") rescue "#") + if @property.disable_content_page + back_url += "?method=hire" if params[:slug].present? + back_button_text = I18n.t("property_hire.back_to_hire_page") + end + {"back_url"=>back_url,"back_button_text"=>back_button_text} end def make_booking booking_p = booking_params diff --git a/app/views/property_hires/hire_success.html.erb b/app/views/property_hires/hire_success.html.erb index 4e1583f..9a9bf4e 100644 --- a/app/views/property_hires/hire_success.html.erb +++ b/app/views/property_hires/hire_success.html.erb @@ -1,8 +1,9 @@ <% data = action_data back_url = data["back_url"] + back_button_text = data["back_button_text"] %>