Added helpers for the selections, and put them in the _form

This commit is contained in:
Tyrel Souza 2014-04-21 13:42:57 -04:00
parent f5f89a8a24
commit e5c38401ae
2 changed files with 44 additions and 4 deletions

View File

@ -1,2 +1,28 @@
module ApplicationHelper module ApplicationHelper
def producttypeid_list
producttypeids = []
producttypeids << ["720 - Basic Montage", 720]
producttypeids << ["721 - Advanced Montage", 721]
producttypeids << ["722 - Basic Video Shoot", 722]
producttypeids << ["723 - Repurposed", 723]
producttypeids << ["724 - Repurposed Edit", 724]
end
def voiceoverselection_list
voiceoverselections = []
voiceoverselections << ["1 - Male", 1]
voiceoverselections << ["2 - Female", 2]
voiceoverselections << ["3 - No Preference", 3]
end
def musicselection_list
musicselections = []
musicselections << ["0 - No Preference", 0]
musicselections << ["1 - Easy", 1]
musicselections << ["2 - Jazzy", 2]
musicselections << ["3 - High Energy", 3]
musicselections << ["4 - New Age", 4]
musicselections << ["5 - Positive", 5]
musicselections << ["6 - Rock", 6]
end
end end

View File

@ -35,16 +35,30 @@
<%= frm.input :city, label: 'City' %> <%= frm.input :city, label: 'City' %>
<%= frm.input :state, label: 'State' %> <%= frm.input :state, label: 'State' %>
<%= frm.input :zip, label: 'ZIP' %> <%= frm.input :zip, label: 'ZIP' %>
</div>
<%= frm.input :awards, label: 'Awards' %>
<%= frm.input :background, label: 'Background' %>
<%= frm.input :categories, label: 'Categories' %>
<%= frm.input :companycolors, label: 'Company Colors' %>
<%= frm.input :description, label: 'Description' %>
<%= frm.input :facebookurl, label: 'Facebook URL' %>
<%= frm.input :productsandservices, label: 'Products & Services' %>
<%= frm.input :targetaudience, label: 'Target Audience' %>
<%= frm.input :tollfreephone, label: 'Tollfree Phone' %>
<%= frm.input :vpa, label: 'Client Service Rep' %>
</div>
<div class="col-md-5"> <div class="col-md-5">
<div class="videolisting"> <div class="videolisting">
<%= frm.simple_fields_for(:videolistings, html: {class: 'form-horizontal'}) do |vidlist| %> <%= frm.simple_fields_for(:videolistings, html: {class: 'form-horizontal'}) do |vidlist| %>
<div class="<%= cycle('odd','even') %>"> <div class="<%= cycle('odd','even') %>">
<%= vidlist.input :videocode, label: 'Video Code' %> <%= vidlist.input :videocode, label: 'Video Code' %>
<%= vidlist.input :producttypeid, label: 'Product Type ID' %> <%= vidlist.input :producttypeid, label: "Product Type", collection: producttypeid_list %>
<%= vidlist.input :voiceoverselection, label: 'Voiceover Selection' %> <%= vidlist.input :voiceoverselection, label: 'Voiceover Selection', collection: voiceoverselection_list %>
<%= vidlist.input :musicselection, label: 'Music Selection' %> <%= vidlist.input :musicselection, label: 'Music Selection', collection: musicselection_list %>
<%= vidlist.input :clientprovidedscript, label: 'Client Provided Script' %> <%= vidlist.input :clientprovidedscript, label: 'Client Provided Script' %>
<%= vidlist.input :keywords, label: 'Keywords' %> <%= vidlist.input :keywords, label: 'Keywords' %>
<%= vidlist.input :focus, label: 'Focus' %> <%= vidlist.input :focus, label: 'Focus' %>