<% hire_method = Admin::PropertyHiresHelper::HireMethod hire_method.set_input_name('property') %> <% content_for :page_specific_css do %> <%= stylesheet_link_tag "lib/main-forms" %> <%= stylesheet_link_tag "lib/fileupload" %> <%= stylesheet_link_tag "lib/main-list" %> <%= stylesheet_link_tag "admin/card" %> <% end %> <% content_for :page_specific_javascript do %> <%= javascript_include_tag "lib/bootstrap-fileupload" %> <%= javascript_include_tag "lib/bootstrap-datetimepicker" %> <%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %> <%= javascript_include_tag "lib/file-type" %> <%= javascript_include_tag "lib/module-area" %> <% end %>
<%= select_category(f, @module_app) %>
<%= f.label :property_location, t("property_hire.property_location"), :class => "control-label muted" %>
<% if @property.new_record? %> <%= f.select :property_location, @locations %> <% elsif @property.property_location.nil? %> <%= f.select :property_location, @locations, {:selected => "other_location"} %> <% else %> <%= f.select :property_location, @locations %> <% end %>
"> <%= f.label :other_location, t("property_hire.other_location"), :class => "control-label muted" %>
<%= f.text_field :other_location %>
<%= f.label :property_number, t("property_hire.property_number"), :class => "control-label muted" %>
<%= f.text_field :property_number %>
<%= f.label :can_be_hired, t("property_hire.can_be_hired"), :class => "control-label muted" %>
<%= f.check_box :can_be_hired %>
<%= f.label :purchase_date, t("property_hire.purchase_date"), :class => "control-label muted" %>
<%= f.datetime_picker :purchase_date, :no_label => true, :new_record => @property.new_record?, :picker_type => "date", :format => "yyyy/MM/dd" %>
<%= f.label :owners, t("property_hire.owners"), :class => "control-label muted" %>
<%= render partial: 'admin/member_selects/email_selection_box', locals: {field: 'property[owners][]', email_members: @property.owner_profiles} %>
<%= f.label :other_owner, t("property_hire.other_owner"), :class => "control-label muted" %>
<%= f.text_field :other_owner %>
<%= f.label :owner_email, t("property_hire.owner_email"), :class => "control-label muted" %>
<%= f.text_field :owner_email %>
<%= f.label :owner_phone, t("property_hire.owner_phone"), :class => "control-label muted" %>
<%= f.text_field :owner_phone %>
<%= f.label :price, t("property_hire.price"), :class => "control-label muted" %>
<%= f.text_field :price %>
<%= f.label :custom_calendar_type, t("property_hire.display_calendar"), :class => "control-label muted" %>
<%= f.select :custom_calendar_type, options_for_select(Property::CAlENDARTYPE.map.with_index{|type,i| [t("property_hire.custom_calendar_type.#{type}"), i]}, f.object.custom_calendar_type) %>
<%= select_tags(f, @module_app) %>
<% if @property.image.file %> <%= image_tag @property.image %> <% else %> <% end %>
<%= t(:select_image) %> <%= t(:change) %> <%= f.file_field :image %> <%= t(:cancel) %>
<%= f.label :display_img, t("property_hire.display_img"), :class => "control-label muted" %>
<%= f.check_box :display_img %>
<% image_display_class_relation = {"full_width"=>"full-size-img","up_left_corner"=>"pull-left","up_right_corner"=>"pull-right"} %>
<%= f.label :image_display_class, t("property_hire.cover_image_display_setting"), :class => "control-label muted" %>
<% image_display_class_relation.each.with_index do |(key,value),i| %> <% end %>
<% (0..2).each do |index1| %> <% active_email_set = index1==0 ? ' active' : '' %>
<%= t('disable') %> <%= check_box_tag("property[hire_email_sets][#{index1}][disabled]", true ,@email_set[index1].disabled) %>
<%= t('property_hire.email_title') %> <%= hire_method.show_set_field(@email_set[index1].id,@email_set[index1]['title'],'hire_email_sets',index1,'title','text_field',action_name != 'new') %>
<%= t('property_hire.email_content') %>
<%= hire_method.show_set_field(@email_set[index1].id,@email_set[index1]['content'],'hire_email_sets',index1,'content','text_area',action_name != 'new') %>
<%= hidden_field_tag("property[hire_email_sets][#{index1}][field_name]",@email_set[index1]['field_name']) %> <%= hidden_field_tag("property[hire_email_sets][#{index1}][property_id]",@property.id) %>
<% end %>
<%= f.label :set_unavailibility, t("property_hire.set_unavailibility"), :class => "control-label muted" %>
<%= f.check_box :set_unavailibility %>
<% if @property.new_record? %>