Fix bug.
This commit is contained in:
parent
c0261a90d8
commit
e98009f659
|
@ -170,8 +170,13 @@ class PropertyHiresController < ApplicationController
|
||||||
params = OrbitHelper.params
|
params = OrbitHelper.params
|
||||||
@property = Property.where(:uid => params[:uid]).first rescue nil
|
@property = Property.where(:uid => params[:uid]).first rescue nil
|
||||||
page = OrbitHelper.page rescue Page.where(:page_id => params[:page_id]).first
|
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_button_text = I18n.t("property_hire.go_to_infos_page")
|
||||||
{"back_url"=>back_url}
|
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
|
end
|
||||||
def make_booking
|
def make_booking
|
||||||
booking_p = booking_params
|
booking_p = booking_params
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
<%
|
<%
|
||||||
data = action_data
|
data = action_data
|
||||||
back_url = data["back_url"]
|
back_url = data["back_url"]
|
||||||
|
back_button_text = data["back_button_text"]
|
||||||
%>
|
%>
|
||||||
<h4><%=t("property_hire.the_reservation_was_successfully_sent")%></h4>
|
<h4><%=t("property_hire.the_reservation_was_successfully_sent")%></h4>
|
||||||
<div>
|
<div>
|
||||||
<a href="<%=back_url%>" class="btn btn-warning"><%=t("property_hire.go_to_infos_page")%></a>
|
<a href="<%=back_url%>" class="btn btn-warning"><%=back_button_text%></a>
|
||||||
</div>
|
</div>
|
|
@ -5,6 +5,7 @@ en:
|
||||||
restful_actions:
|
restful_actions:
|
||||||
fields_display_order: "Fields display order"
|
fields_display_order: "Fields display order"
|
||||||
property_hire:
|
property_hire:
|
||||||
|
back_to_hire_page: "Back to Reserve Page"
|
||||||
apply_default_time_settings: Apply default time settings
|
apply_default_time_settings: Apply default time settings
|
||||||
default_time_settings: Default time settings
|
default_time_settings: Default time settings
|
||||||
the_reservation_was_successfully_sent: "The reservation was successfully sent!Please see email to get more information"
|
the_reservation_was_successfully_sent: "The reservation was successfully sent!Please see email to get more information"
|
||||||
|
|
|
@ -5,6 +5,7 @@ zh_tw:
|
||||||
restful_actions:
|
restful_actions:
|
||||||
fields_display_order: "欄位顯示順序"
|
fields_display_order: "欄位顯示順序"
|
||||||
property_hire:
|
property_hire:
|
||||||
|
back_to_hire_page: "回到預約頁面"
|
||||||
apply_default_time_settings: 套用預設時段設定
|
apply_default_time_settings: 套用預設時段設定
|
||||||
default_time_settings: 預設時段設定
|
default_time_settings: 預設時段設定
|
||||||
the_reservation_was_successfully_sent: "預約成功送出,請查看Email確認預約資訊!"
|
the_reservation_was_successfully_sent: "預約成功送出,請查看Email確認預約資訊!"
|
||||||
|
|
Loading…
Reference in New Issue