|
|
|
|
@ -100,6 +100,7 @@
|
|
|
|
|
<li><a href="#available_time" data-toggle="tab"><%= t('property_hire.available_time')%></a></li>
|
|
|
|
|
<li><a href="#auto_send_email_set" data-toggle="tab"><%= t('property_hire.auto_send_email_set') %></a></li>
|
|
|
|
|
<li><a href="#settings" data-toggle="tab"><%= t('property_hire.reservation_fields') %></a></li>
|
|
|
|
|
<li><a href="#printsettings" data-toggle="tab"><%= t('property_hire.print_settings') %></a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
<!-- Module -->
|
|
|
|
|
<div class="tab-content module-area">
|
|
|
|
|
@ -136,16 +137,6 @@
|
|
|
|
|
<%= f.text_field :other_location %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<%
|
|
|
|
|
=begin%>
|
|
|
|
|
<div class="control-group">
|
|
|
|
|
<%= f.label :property_number, t("property_hire.property_number"), :class => "control-label muted" %>
|
|
|
|
|
<div class="controls">
|
|
|
|
|
<%= f.text_field :property_number %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<%
|
|
|
|
|
=end%>
|
|
|
|
|
<div class="control-group">
|
|
|
|
|
<%= f.label :p_display_start_time, t("property_hire.p_display_start_time"), :class => "control-label muted" %>
|
|
|
|
|
<div class="controls">
|
|
|
|
|
@ -193,16 +184,6 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<%
|
|
|
|
|
=begin%>
|
|
|
|
|
<div class="control-group">
|
|
|
|
|
<%= f.label :purchase_date, t("property_hire.purchase_date"), :class => "control-label muted" %>
|
|
|
|
|
<div class="controls">
|
|
|
|
|
<%= f.datetime_picker :purchase_date, :no_label => true, :new_record => @property.new_record?, :picker_type => "date", :format => "yyyy/MM/dd" %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<%
|
|
|
|
|
=end%>
|
|
|
|
|
<div class="control-group">
|
|
|
|
|
<%= f.label :owners, t("property_hire.owners"), :class => "control-label muted" %>
|
|
|
|
|
<div class="controls">
|
|
|
|
|
@ -233,16 +214,6 @@
|
|
|
|
|
<%= f.text_field :owner_phone %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<%
|
|
|
|
|
=begin%>
|
|
|
|
|
<div class="control-group">
|
|
|
|
|
<%= f.label :price, t("property_hire.price"), :class => "control-label muted" %>
|
|
|
|
|
<div class="controls">
|
|
|
|
|
<%= f.text_field :price %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<%
|
|
|
|
|
=end%>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- page_setting -->
|
|
|
|
|
<div class="tab-pane fade" id="page_setting">
|
|
|
|
|
@ -597,66 +568,66 @@
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- reservation fields -->
|
|
|
|
|
<div class="tab-pane fade" id="settings">
|
|
|
|
|
<% fields_name = f.object.class::FIELDSNAME %>
|
|
|
|
|
<div style="padding: 1.2em;">
|
|
|
|
|
<table style="margin: 0;">
|
|
|
|
|
<thead>
|
|
|
|
|
<th style="padding:0 5px;"><%= t('property_hire.field_name') %></th>
|
|
|
|
|
<th style="padding:0 5px;"><%= t('property_hire.name') %></th>
|
|
|
|
|
<th style="padding:0 5px;"><%= t('property_hire.placeholder') %></th>
|
|
|
|
|
<th style="padding:0 5px;"><%= t('property_hire.disable') %></th>
|
|
|
|
|
<th style="padding:0 5px;"><%= t('property_hire.required') %></th>
|
|
|
|
|
<th style="padding:0 5px;"><%= t('property_hire.for_label') %></th>
|
|
|
|
|
<th style="padding:0 5px;"><%= t('property_hire.for_display') %></th>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<% fields_name.each do |field_name| %>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="padding:0 5px;">
|
|
|
|
|
<%= t("property_hire.#{field_name}") %>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="padding:0 5px;">
|
|
|
|
|
<%= render_custom_text_field(f,field_name,"name") %>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="padding:0 5px;">
|
|
|
|
|
<%= render_custom_text_field(f,field_name,"placeholder") %>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="padding:0 5px;">
|
|
|
|
|
<input type="hidden" name='<%= "#{f.object_name}[#{field_name}][enable]" %>' value="1">
|
|
|
|
|
<%= check_box_tag("#{f.object_name}[#{field_name}][enable]", "0" , (f.object.send(field_name)["enable"] == "0" rescue false)) %>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="padding:0 5px;">
|
|
|
|
|
<input type="hidden" name='<%= "#{f.object_name}[#{field_name}][required]" %>' value="false">
|
|
|
|
|
<%= check_box_tag("#{f.object_name}[#{field_name}][required]", "true" , (f.object.send(field_name)["required"] == "true" rescue false), class: "for_required") %>
|
|
|
|
|
<% for_label = f.object.send(field_name)["required"] == "true" ? true : false %>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="padding:0 5px;">
|
|
|
|
|
<%= f.radio_button :calendar_label_field_name, field_name, {:class => "for_label_selection #{(for_label == true ? '' : 'hide')}" } %>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="padding:0 5px;">
|
|
|
|
|
<input type="hidden" name='<%= "#{f.object_name}[#{field_name}][for_display]" %>' value="false">
|
|
|
|
|
<%= check_box_tag("#{f.object_name}[#{field_name}][for_display]", "true" , (f.object.send(field_name)["for_display"] == "true" rescue false), class: "for_display") %>
|
|
|
|
|
<% for_label = f.object.send(field_name)["for_display"] == "true" ? true : false %>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<% end %>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
<table style="margin: 0;">
|
|
|
|
|
<thead>
|
|
|
|
|
<th style="padding:0 5px;"><%= t('property_hire.field_name') %></th>
|
|
|
|
|
<th style="padding:0 5px;"><%= t('property_hire.name') %></th>
|
|
|
|
|
<th style="padding:0 5px;"><%= t('property_hire.placeholder') %></th>
|
|
|
|
|
<th style="padding:0 5px;"><%= t('property_hire.disable') %></th>
|
|
|
|
|
<th style="padding:0 5px;"><%= t('property_hire.required') %></th>
|
|
|
|
|
<th style="padding:0 5px;"><%= t('property_hire.for_label') %></th>
|
|
|
|
|
<th style="padding:0 5px;"><%= t('property_hire.for_display') %></th>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<% fields_name.each do |field_name| %>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="padding:0 5px;">
|
|
|
|
|
<%= t("property_hire.#{field_name}") %>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="padding:0 5px;">
|
|
|
|
|
<%= render_custom_text_field(f,field_name,"name") %>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="padding:0 5px;">
|
|
|
|
|
<%= render_custom_text_field(f,field_name,"placeholder") %>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="padding:0 5px;">
|
|
|
|
|
<input type="hidden" name='<%= "#{f.object_name}[#{field_name}][enable]" %>' value="1">
|
|
|
|
|
<%= check_box_tag("#{f.object_name}[#{field_name}][enable]", "0" , (f.object.send(field_name)["enable"] == "0" rescue false)) %>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="padding:0 5px;">
|
|
|
|
|
<input type="hidden" name='<%= "#{f.object_name}[#{field_name}][required]" %>' value="false">
|
|
|
|
|
<%= check_box_tag("#{f.object_name}[#{field_name}][required]", "true" , (f.object.send(field_name)["required"] == "true" rescue false), class: "for_required") %>
|
|
|
|
|
<% for_label = f.object.send(field_name)["required"] == "true" ? true : false %>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="padding:0 5px;">
|
|
|
|
|
<%= f.radio_button :calendar_label_field_name, field_name, {:class => "for_label_selection #{(for_label == true ? '' : 'hide')}" } %>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="padding:0 5px;">
|
|
|
|
|
<input type="hidden" name='<%= "#{f.object_name}[#{field_name}][for_display]" %>' value="false">
|
|
|
|
|
<%= check_box_tag("#{f.object_name}[#{field_name}][for_display]", "true" , (f.object.send(field_name)["for_display"] == "true" rescue false), class: "for_display") %>
|
|
|
|
|
<% for_label = f.object.send(field_name)["for_display"] == "true" ? true : false %>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<% end %>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
<hr style="border-color: black; ">
|
|
|
|
|
<div class="control-group">
|
|
|
|
|
<% field_name = "enable_notes_selector" %>
|
|
|
|
|
<label class="control-label muted"><%= t("property_hire.#{field_name}") %></label>
|
|
|
|
|
<div class="controls">
|
|
|
|
|
<label for="act_enabled_name" class="checkbox inline">
|
|
|
|
|
<%= hidden_field_tag "property[#{field_name}]", "0" %>
|
|
|
|
|
<%= f.check_box_tag "property[#{field_name}]", "1" , (@property[field_name] rescue false) %>
|
|
|
|
|
Enable
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="control-group" id="selector_block">
|
|
|
|
|
<% field_name = "enable_notes_selector" %>
|
|
|
|
|
<label class="control-label muted"><%= t("property_hire.#{field_name}") %></label>
|
|
|
|
|
<div class="controls">
|
|
|
|
|
<label for="act_enabled_name" class="checkbox inline">
|
|
|
|
|
<%= hidden_field_tag "property[#{field_name}]", "0" %>
|
|
|
|
|
<%= f.check_box_tag "property[#{field_name}]", "1" , (@property[field_name] rescue false) %>
|
|
|
|
|
Enable
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="control-group" id="selector_block">
|
|
|
|
|
<% field_name = "notes_selector" %>
|
|
|
|
|
<label class="control-label muted"><%= t("property_hire.#{field_name}") %></label>
|
|
|
|
|
<div class="controls">
|
|
|
|
|
@ -718,8 +689,23 @@
|
|
|
|
|
</div>
|
|
|
|
|
<a id="add_note_select_field" class="btn btn-primary"><%=t(:add)%></a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- print settings -->
|
|
|
|
|
<div class="tab-pane fade" id="printsettings">
|
|
|
|
|
<table>
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<%= label_tag t('property_hire.print_format') %>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<%= f.text_area :print_format,class: 'ckeditor' %>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- Language Tabs -->
|
|
|
|
|
<div class="nav-name"><strong><%= t(:language) %></strong></div>
|
|
|
|
|
@ -762,17 +748,17 @@
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- Form Actions -->
|
|
|
|
|
<div class="form-actions">
|
|
|
|
|
<% referer = request.referer rescue nil %>
|
|
|
|
|
<% referer = get_referer_url if referer.blank? || request.host != URI.parse(URI.encode(referer)).host %>
|
|
|
|
|
<input type="hidden" name="referer_url" value="<%= referer %>">
|
|
|
|
|
<% unless @property.new_record? %>
|
|
|
|
|
<%= hidden_field_tag("property[id]", @property.id) %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<%= f.submit t('submit'), class: 'btn btn-primary' %>
|
|
|
|
|
<%= link_to t('cancel'), referer, :class=>"btn" %>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- Form Actions -->
|
|
|
|
|
<div class="form-actions">
|
|
|
|
|
<% referer = request.referer rescue nil %>
|
|
|
|
|
<% referer = get_referer_url if referer.blank? || request.host != URI.parse(URI.encode(referer)).host %>
|
|
|
|
|
<input type="hidden" name="referer_url" value="<%= referer %>">
|
|
|
|
|
<% unless @property.new_record? %>
|
|
|
|
|
<%= hidden_field_tag("property[id]", @property.id) %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<%= f.submit t('submit'), class: 'btn btn-primary' %>
|
|
|
|
|
<%= link_to t('cancel'), referer, :class=>"btn" %>
|
|
|
|
|
</div>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$("#bulletin_display_img").click(function(){$("#image_display_setting").toggleClass("hide")})
|
|
|
|
|
$(document).ready(function(){
|
|
|
|
|
|