<%= 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 :set_unavailibility, t("property_hire.set_unavailibility"), :class => "control-label muted" %>
<%= f.check_box :set_unavailibility %>
<% if @property.new_record? %>
<% elsif @property.set_unavailibility %>
<% else %>
<% end %>
<%= f.label :start_time, t("property_hire.start_time"), :class => "control-label muted" %>
<%= f.datetime_picker :start_time, :picker_type => "time", :no_label => true, :new_record => @property.new_record?, :value => (Time.parse(@property.start_time) rescue "") %>
<%= f.label :end_time, t("property_hire.end_time"), :class => "control-label muted" %>
<%= f.datetime_picker :end_time, :picker_type => "time", :no_label => true, :new_record => @property.new_record?, :value => (Time.parse(@property.end_time) rescue "") %>
<%= f.label :start_date, t("property_hire.start_date"), :class => "control-label muted" %>
<%= f.datetime_picker :start_date, :picker_type => "date", :no_label => true, :new_record => @property.new_record?, :data=>{"picker-type" => "range", "range" => "start"}, :format => "yyyy/MM/dd" %>
<%= f.label :end_date, t("property_hire.end_date"), :class => "control-label muted" %>
<%= f.datetime_picker :end_date, :picker_type => "date", :no_label => true, :new_record => @property.new_record?, :data=>{"picker-type" => "range", "range" => "end"}, :format => "yyyy/MM/dd" %>
<% @site_in_use_locales.each do |locale| %>
<%= f.fields_for :description_translations do |f| %>
<%= f.text_field locale, value: (@property.description_translations[locale.to_s] rescue nil) %>
<% end %>
<% end %>
<% @site_in_use_locales.each do |locale| %>
<%= f.fields_for :unavailibility_note_translations do |f| %>
<%= f.text_area locale, value: (@property.unavailibility_note_translations[locale.to_s] rescue nil) %>
<% end %>
<% end %>
<% fields_name = ["organization" ,"person_in_charge" , "tel_of_person_in_charge" , "department" , "contact_person" , "tel_of_contact_person" , "mobile_phone_of_contact_person" , "contact_person_Email" , "contact_person_department"] %>
<% fields_name.each do |field_name| %>
<%= f.fields_for field_name do |sub_f|%>
<% end %>
<% end %>
<% @site_in_use_locales.each_with_index do |locale, i| %>
<% end %>