= simple_form_for resource, url: (resource.persisted? ? channel_path(resource) : channels_path) do |form| - resource.build_user unless resource.user.present? - unless resource.persisted? .row .large-6.columns.existing-user .row .large-12.columns h5 = t('.associate_existing_user') = form.input :user_id, as: :integer, required: false .large-6.columns.new-user = form.fields_for :user do |uf| .row .large-12.columns h5 = t('.create_new_channel_user') = uf.input :email, as: :string, required: false .large-12.columns = uf.input :password, as: :password .row .large-10.columns = form.input :permalink, as: :string .large-2.columns br/ = form.input :accepts_projects = form.input :name, as: :string .row .large-9.columns = form.input :description, as: :text .large-3.columns = form.input :image, as: :file - if resource.image.present? p= image_tag(resource.image.thumb.url) .row - if resource.persisted? .large-6.small-6.columns = form.fields_for :user do |uf| = uf.input :email, as: :string .large-6.small-6.columns = form.input :video_url, as: :string .row .large-4.columns .row.collapse .small-3.large-2.columns span class="prefix" i.icon-et-facebook .small-9.large-10.columns = form.fields_for :user do |uf| = uf.input :facebook_url, input_html: { class: "with-prefix" }, label: false, as: :string .large-4.columns .row.collapse .small-3.large-2.columns span class="prefix" i.icon-et-twitter .small-9.large-10.columns = form.fields_for :user do |uf| = uf.input :twitter_url, input_html: { class: "with-prefix" }, label: false, as: :string .large-4.columns .row.collapse .small-3.large-2.columns span class="prefix" i.icon-et-globe .small-9.large-10.columns = form.fields_for :user do |uf| = uf.input :other_url, input_html: { class: "with-prefix" }, label: false, as: :string = form.input :submit_your_project_text, as: :text, input_html: {rows: 20, class: 'small markdown-editor'} = form.input :how_it_works, as: :text, input_html: {rows: 20, class: 'markdown-editor'} fieldset h3 = t('.start_content') = form.simple_fields_for :start_content, OpenStruct.new(resource.start_content) do |fs| = form.input :start_hero_image, as: :file = fs.input :title = fs.input :subtitle - for step in [:first, :second, :third] .row .large-4.columns = fs.input "#{step}_step_icon" .large-4.columns = fs.input "#{step}_step_title" .large-4.columns = fs.input "#{step}_step_description" = fs.input :start_primary_content, as: :text, input_html: {rows: 20, class: 'markdown-editor'} = fs.input :start_secondary_content, as: :text, input_html: {rows: 20, class: 'markdown-editor'} fieldset h3 = t('.success_content') = form.simple_fields_for :success_content, OpenStruct.new(resource.success_content) do |fs| = fs.input :main_text, as: :text, input_html: {rows: 20, class: 'markdown-editor'} = fs.input :button_text = fs.input :button_link = form.button :submit, class: 'button', data: { disable_with: t('words.sending') }