Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--- Main form start here -->
- <div class="body_bg">
- <%= form_for ([:users, @business]), :html => { :multipart =>true } do |f| %>
- <% if @business.errors.any? %>
- <div id="error_explanation">
- <ul>
- <% @business.errors.full_messages.each do |message| %>
- <li class="error"><%= message %></li>
- <% end %>
- </ul>
- </div>
- <% end %>
- <!-- Form container start here -->
- <div class="main_oth_section">
- <div class="liting_oth_inner">
- <div class="left_section_listing">
- <!-- Business name start here -->
- <div class="list_top">
- <h3>List a stylish business</h3>
- <em><%= link_to "What defines stylish?", main_site_page_path(:slug => "what-define-styles"), :target=>"_blank" %></em>
- <div class="input_bus_oth">
- <div class="business_name_oth">
- <%= f.text_field :name, :class => "form-control demo", autofocus: true, placeholder: 'Business Name*' %>
- </div>
- <div class="business_type_oth selectpicker_inner">
- <%= f.label :business_type_id, 'Business Type *', class: 'lbl_carrot' %>
- <%= f.select :business_type_id, BusinessType.all.map { |t| [t.name.humanize, t.id] },{include_blank: "Business Type"}, :class=>"selectpicker" %>
- <span style="display:none;" for="business_business_type" generated="true" class="error">Select business type</span>
- </div>
- </div>
- <div class="input_bus_oth">
- <span class="required_text">* = required</span>
- </div>
- </div>
- <!-- Business box2 start here -->
- <div class="list_top">
- <h3>Business Details</h3>
- <div class="country_oth">
- <div class="business_type_oth selectpicker_inner">
- <%= f.label :country_id, 'Country *', class: 'lbl_carrot' %>
- <%= f.select :country_id, Country.all.map { |c| [c.iso_code+' - '+c.name, c.id] }, {:selected=>'', include_blank: 'Please choose*'}, :class => 'selectpicker' %>
- </div>
- </div>
- <div class="add_list_oth">
- <!-- Map and location start here -->
- <div id="map_view">
- <div class="add_list_input_left login_row_oth add_mobile">
- <%= f.label :address, 'Address *', class:"lbl_carrot" %>
- <%= f.text_field :address, :class => 'form-control demo', :id=>"f_address", placeholder: 'Type in the address or move the pin below.*' %>
- <%= f.hidden_field :latitude, :id=>"f_lat" %>
- <%= f.hidden_field :longitude, :id=>"f_lng" %>
- </div>
- <div class="update_profile_btn locate_btn"><input type="button" value="Locate" id='f_btn_locate'></div>
- <select id="reverseGeocode" style="display:none;">
- <option value="false">No</option>
- <option value="true" selected>Yes</option>
- </select>
- <div class="map_oth" id="map"></div>
- </div> <!-- map end here -->
- <div class="map_oth" id="homepage_online">
- <div class="homepage add_list_input_left login_row_oth add_list_input_left_2 list_tel ">
- <%= f.label :homepage, 'Homepage *', class:"lbl_carrot" %>
- <%= f.text_field :homepage, :class => 'form-control demo', :id=>"website", placeholder: 'www.stylecarte.com' %>
- </div>
- <div class="add_list_input_left list_tel list_tel_margin login_row_oth width_change_width">
- <%= f.label :email, 'Email', class:"lbl_carrot" %>
- <%= f.text_field :email, placeholder: "example@example.com", :class=>"form-control demo" %>
- </div>
- </div>
- <div class="map_oth">
- <div class="add_list_input_left list_tel login_row_oth width_change_width">
- <%= f.label :telephone, 'Telephone', class:"lbl_carrot" %>
- <%= f.text_field :telephone, :class => 'form-control demo', placeholder: "+_ _ ()_ _ _ _ _ _ _" %>
- <div id="errmsg"></div>
- </div>
- </div>
- <div class="map_oth">
- <div class="social_left">
- <em><%= image_tag "facebook_listing.png" %></em>
- <%= f.text_field :facebook, :class => 'form-control', placeholder: "www.facebook.com/stylecarte" %>
- </div>
- <div class="social_left social_right">
- <em><%= image_tag "twitter_icon_listing.png" %></em>
- <%= f.text_field :twitter, :class => 'form-control', placeholder: "www.twitter.com/stylecarte" %>
- </div>
- </div>
- <div class="map_oth">
- <div class="social_left">
- <em><%= image_tag "instagram.png" %></em>
- <%= f.text_field :instagram, :class => 'form-control', placeholder: "www.instagram.com/stylecarte" %>
- </div>
- <div class="social_left social_right">
- <em><%= image_tag "pinterest.png" %></em>
- <%= f.text_field :pinterest, :class => 'form-control', placeholder: "www.pinterest.com/stylecarte" %>
- </div>
- </div>
- <div class="map_oth">
- <div class="social_left">
- <em><%= image_tag "google_plus.png" %></em>
- <%= f.text_field :google, :class => 'form-control', placeholder: "www.plus.google.com/+stylecarte" %>
- </div>
- </div>
- <!-- Appointment Timing Section Start -->
- <div id="opening_times">
- <h4 class="heading_box">Opening Times *</h4>
- <div id="loadDiv">
- <%= f.fields_for :business_timings do |builder| %>
- <%= render 'timing_fields', :f=>builder %>
- <% end %>
- </div>
- </div>
- <div class="list_top">
- <h3>Listing Details *</h3>
- <table class="table table_listing table_category_listing">
- <thead>
- <tr>
- <th>Main<sup>1</sup></th>
- <th>For</th>
- <th>What</th>
- <th>Refine</th>
- <th>Filters
- <em class="color_change"><a href="javascript:void(0);" data-toggle="popover" title="What is filters?" data-content="What is filters?"><%= image_tag ("tool_tip.png")%></a></em></th>
- </tr>
- </thead>
- <tbody>
- <% if params[:action] == "edit"
- i = 1
- @business.business_categories.each do |b_cat|
- if(!b_cat.looking_for.nil?)
- %>
- <label class="error-new" id="cat_error"></label>
- <tr id="cat_<%= i %>" class="category">
- <td width="8%"><div class="custum-radio-new">
- <%= radio_button_tag("business[business_categories_attributes]["+i.to_s+"][is_featured]", 1, checked = false, :id =>'business_1', :class=>"customRadio cat_feature_img session")%><em></em></div></td>
- <td width="25%">
- <div class="selectpicker_table" id="parentCat_<%= i %>"><%= b_cat.get_category_name(b_cat.category) %></div>
- <a id="<%= b_cat.id %>" href="javascript:void(0);" class="delete_cat remove_field" data-bus='<%= @business.id %>'>Remove</a>
- </td>
- <td width="20%">
- <div class="selectpicker_table" id="secLvlCat_<%= i %>"><%= b_cat.get_category_name(b_cat.what) %></div>
- </td>
- <td width="25%">
- <div class="selectpicker_table" id="childCat_<%= i %>"><%= b_cat.get_category_name(b_cat.refine) %></div>
- </td>
- <td width="17%" id="filter_<%= i %>" class="multiselect_listing"></td>
- </tr>
- <% end
- i = i+1
- end
- else %>
- <label class="error-new" id="cat_error"></label>
- <tr id="cat_1" class="category">
- <td width="8%"><div class="custum-radio-new">
- <%= radio_button_tag("business[business_categories_attributes][1][is_featured]", 1, checked = true, :id =>'business_1', :class=>"customRadio cat_feature_img session")%><em></em></div></td>
- <td width="25%">
- <div class="selectpicker_table list-dtail mainCat" id="parentCat_1">
- </div>
- </td>
- <td width="20%">
- <div class="selectpicker_table secLvlCat" id="secLvlCat_1"></div>
- </td>
- <td width="25%">
- <div class="selectpicker_table childCat" id="childCat_1"><div>
- </td>
- <td width="17%" id="filter_1"></td>
- </tr>
- <% end %>
- </tbody>
- </table>
- <span class="div_add_more"><a href="javascript:void(0);" id="addMoreCat" class="addMoreTime"> + Add more category</a></span>
- <span class="required_text">1 = main category sold; the category’s icon will be displayed within listing * = required</span>
- <span class="required_text"> 3 **= Please hold the CRTL or Command button down when choosing several options for filters.</span>
- </div>
- <div class="clearfix"></div>
- </div> <!-- add list end here -->
- </div>
- </div>
- <div class="right_section_listing">
- <div class="list_top">
- <h3>Images</h3>
- <p class="contnt_listing">Please attach at least one image. To list a website please create a screenshot below. Read more <a href="javascript:void(0);">here</a> about how to choose and shoot the most powerful images.</p>
- <div class="add_list_oth">
- <div class="upload_section login_row_oth upload_section_label">
- <label class="uploadImg">Upload Image </label>
- </div>
- <div class="radio_btn_oth_row">
- <div class="radio_oth_account listing_btn_upload">
- <div class="radio_inner_row"><label><input type="radio" name="browser" value="business" id="my_image" class="my_image"checked="checked"><em>Browse my Images</em></label></div>
- </div>
- <div class="radio_oth_account listing_btn_upload">
- <div class="radio_inner_row"><label><input type="radio" name="browser" value="business" id="web_image" class="my_image"><em>Load from a Web Address</em></label></div>
- </div>
- <div class="radio_oth_account listing_btn_upload create_row">
- <div class="radio_inner_row"><label><input type="radio" name="browser" value="business" id="web_screensort" class="my_image"><em>Create a Website Screenshot</em></label></div>
- </div>
- <div class="clearfix"></div>
- </div>
- <div id="screensort_image">
- <div class="take_link_section">
- <div class="business_name_oth link_input">
- <input type="text" name="web_screenshot" placeholder="http://" class="form-control demo" id="web_screenshot">
- </div>
- <div class="update_profile_btn take_btn"><input type="button" id="take_screenshot" value="Take Screenshot"></div>
- <em>You can upload from any of the above sources, up to four photos in total.</em>
- </div>
- <div class="upload_image_section">
- </div>
- </div>
- <div class="upload_image_section">
- <div id="browse_images">
- <div class="upload_image_section">
- <h4>Uploaded Images</h4>
- <!--div class="add_list_input_left input_upload color_gry login_row_oth profile_int list-dtail"-->
- <div class="add_list_input_left input_upload login_row_oth">
- <label>Image</label>
- <%= file_field_tag "images[]", type: :file, multiple: true, :id=>"images" %>
- <div class="extension_error"></div>
- <span id="error1"></span>
- </div>
- <div class='add_list_input_left input_upload login_row_oth'>
- <label class='color_gry'>Photo Credit </label>
- <%= text_field_tag "img_credit[]", nil, :class => 'commonClass form-control' %>
- </div>
- <div id="fileExtension_error" class="error-new"></div>
- <div class="dvPreview" id="dvPreview"></div>
- </div>
- </div>
- <% if params[:action] == 'edit' %>
- <div id="devise_error_msg">
- <% flash.each do |key, value| %>
- <div class="alert alert-info alert-<%= key %>">
- <a href="#" data-dismiss="alert" class="close">×</a>
- <%= value %>
- </div>
- <% end %>
- </div>
- <div class="thumbnail">
- <% @pictures.each do |pic| %>
- <div class="div_images">
- <%= image_tag pic.photo.url(:medium) %>
- <span class="remove_icon_listing">
- <a id="<%= pic.id %>" href="javascript:void(0);" class="delete_photo" data-bus='<%= @business.id %>'><%= image_tag 'close_icon' %></a>
- </span>
- </div>
- <span><%= pic.photo_credit %></span>
- <% end %>
- </div>
- <% end %>
- </div>
- <div id="upload_image_section">
- <div class="take_link_section">
- <div class="business_name_oth link_input">
- <input type="text" class="form-control demo" placeholder="http://" name="images_from_web" id="web_img">
- </div>
- <div class="update_profile_btn take_btn"><input type="button" value="Find Images" id="images_from_web"></div>
- <em>You can upload from any of the above sources, up to four photos in total.</em>
- </div>
- <div class="upload_image_section" id="result_images_from_web">
- </div>
- </div>
- </div>
- <!-- Business Styles Section Start -->
- <div class="list_top">
- <h3>Style of the Business, Atmosphere and Products<sup>2</sup></h3>
- <label class="error-new" id="style_error"></label>
- <div class="check_box_outer login_check_box listing_check_box listing_check_box_upload">
- <% ary = Array.new
- @business.business_styles.each do |styles|
- ary << styles.style_id
- end
- %>
- <% if !@styles.nil? %>
- <% i = 0
- @styles.each do |style| %>
- <div class="check_box_upload">
- <%=check_box_tag "business[business_styles_attributes][#{i}][style_id]" , style.id, ary.include?(style.id) ? true : false %><label for="<%= "business_business_styles_attributes_#{i}_style_id" %>"> <%= style.name.capitalize %></label>
- </div>
- <% i += 1
- end %>
- <% end %>
- </div>
- <!-- Add Styles Section Start -->
- <div class="map_oth">
- <div class="textarea_bottom login_row_oth">
- <label class="lbl_carrot">Add other styles</label>
- <%= text_area_tag "name", nil, "data-role"=>"tagsinput", class: "form-control", :placeholder=>'Separate additional style with comma. Once approved they will be added permanently' %>
- <p class="add-style-info">Separate additional style with comma. Once approved they will be added permanently</p>
- </div>
- </div>
- <span class="required_text">2 = at least one style has to be chosen</span>
- </div>
- <div class="clearfix"></div>
- </div>
- <!-- Right Section Business End -->
- </div>
- <div class="clearfix"></div>
- </div>
- </div>
- <!-- Form Container End Here -->
- <div class="bottom_btn_oth">
- <div class="main_oth_section">
- <div class="btn_inner_row">
- <div class="save_btn"><%= f.submit 'Save' %></div>
- <div class="cancel_btn"><%= link_to 'Back', root_path %></div>
- </div>
- </div>
- </div>
- <%end%>
- </div>
- <!--- Main Form Ends Here -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement