Compare commits

...

4 Commits
dev ... master

Author SHA1 Message Date
rulingcom ac3b22ef5b fix br issue 2025-12-04 19:34:34 +08:00
rulingcom 97e0766168 fix for update 2025-12-03 21:07:29 +08:00
rulingcom 3bdba0772f small fix for disbaled custom fields 2025-11-06 18:24:14 +08:00
rulingcom 9cc4585c44 small html fix 2025-11-04 16:51:56 +08:00
5 changed files with 6 additions and 6 deletions

View File

@ -275,14 +275,14 @@ class PropertyHiresController < ApplicationController
phire_id = booking_p[:id]
end
data = check_for_availability(start_time,end_time,booking_p[:property_id], booking_p[:recurring_interval], booking_p[:recurring_end_date], time_setting_id)
if data["success"] == true
if data["success"] == true || is_admin_page
error_messages = property.check_require_fields(booking_p)
if error_messages.present?
data["msg"] = error_messages
data["success"] = false
end
end
if data["success"] == true
if data["success"] == true || is_admin_page
hire = nil
if phire_id
hire = PHire.find(phire_id) rescue nil

View File

@ -110,7 +110,7 @@ module Admin::PropertyHiresHelper
when "datetime"
print_format = print_format.gsub("{#{field_name}}", phire.send(field_name).strftime("%Y/%m/%d %H:%M")) rescue print_format.gsub("{#{field_name}}", "")
else
print_format = print_format.gsub("{#{field_name}}", phire.send(field_name).to_s) rescue print_format.gsub("{#{field_name}}", "")
print_format = print_format.gsub("{#{field_name}}", phire.send(field_name).to_s).gsub(/\r\n|\r|\n/, "<br />") rescue print_format.gsub("{#{field_name}}", "")
end
else
field = PHireField.where(:key => field_name, :property_id => phire.property_id).first

View File

@ -4,7 +4,7 @@
%>
<div class="attributes-header clearfix">
<div class="toggle-control" style="float: right;">
<div class="togglebox <%= attribute_field.disabled ? 'disabled' : ''%>">
<div class="togglebox <%= attribute_field.disabled ? 'disable' : ''%>">
<%= hidden_field "#{@field_name}[p_hire_fields][#{@af_counter}]","disabled",:value=>attribute_field.disabled,:class=>"toggle-check", :data=>{:deploy=>"right"} %>
<label><b></b></label>
</div>

View File

@ -690,6 +690,7 @@
<a id="add_note_select_field" class="btn btn-primary"><%=t(:add)%></a>
</div>
</div>
</div>
</div>
<!-- print settings -->
<div class="tab-pane fade" id="printsettings">
@ -706,7 +707,6 @@
</tbody>
</table>
</div>
</div>
<!-- Language Tabs -->
<div class="nav-name"><strong><%= t(:language) %></strong></div>
<ul class="nav nav-pills language-nav">

View File

@ -23,7 +23,7 @@
<fieldset>
<div id="attributes-area" class="input-area">
<%= render partial: "attribute_field",collection: @attribute.p_hire_fields_enabled.asc(:_id)%>
<%= render partial: "attribute_field",collection: @attribute.p_hire_fields.asc(:_id)%>
</div>
<div class="form-actions">