diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d5cde8e..87a5dde 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -44,8 +44,8 @@ module ApplicationHelper - def us_states - [ + def us_states(options={}) + states = [ ['Alabama', 'AL'], ['Alaska', 'AK'], ['Arizona', 'AZ'], @@ -99,6 +99,11 @@ module ApplicationHelper ['Wisconsin', 'WI'], ['Wyoming', 'WY'] ] + if options.empty? + return states + else + convert_to_hash(states)[options[:item]] + end end diff --git a/app/views/campaigns/_form.html.erb b/app/views/campaigns/_form.html.erb index 38de123..81cb43f 100644 --- a/app/views/campaigns/_form.html.erb +++ b/app/views/campaigns/_form.html.erb @@ -40,17 +40,15 @@ hint: "Used for script research." %> <%= frm.input :productsandservices, label: 'Products & Services', - hint: "Used in script and video research." %> - - <%= frm.input :websiteurl, + hint: "Used in script and video research. List of items, Type product or service, then press enter to add another item.", + input_html: {data: {role: "tagsinput" }} %> + <%= frm.input :websiteurl, label: 'Website URL', hint: "Used for script research and may be used in the video if they are including websites in the video graphics." %> - <%= frm.input :vpa, label: 'Client Service Rep', hint: "This is the full name of the client services representative, as entered in the BetteVideo system associated with this order. This feature is designed for sales reps that are well known to the system. This feature is typically used for automated communication." %> - - <%= frm.input :billingcode, + <%= frm.input :billingcode, label: 'Billing Code', hint: "Market or billing code. Should match a billing code in the BetterVideo system so it can be associated." %> <%= frm.input :emailaddress, @@ -84,8 +82,9 @@ hint: "Used in script and video research." %> <%= frm.input :companycolors, label: 'Company Colors', - hint: "Comma Separated.", - placeholder: "ex: red, white, blue" %> + hint: "List of items, Type color, then press enter to add another item.", + placeholder: "ex: red, white, blue", + input_html: {data: {role: "tagsinput" }} %> <%= frm.input :facebookurl, label: 'Facebook URL', @@ -124,7 +123,8 @@ hint: "If the customer has provided a script for BetterVideo to use. Formatting is text only." %> <%= vidlist.input :keywords, label: 'Keywords', - hint: "Keywords for use in VSEO campaigns or indexing such as Google or YouTube." %> + hint: "Keywords for use in VSEO campaigns or indexing such as Google or YouTube.", + input_html: {data: {role: "tagsinput" }} %> <%= vidlist.input :focus, label: 'Focus', hint: "Information used to guide BetterVideo in creating the video." %> @@ -134,7 +134,7 @@ <%= vidlist.input :asseturls, label: 'Asset Urls', placeholder: "ex: http://www.company.com/logo.png, http://www.company.com/background.png", - hint: "A list of all file assets.", + hint: "A list of all file assets. List of items, Type asset url, then press enter to add another item.", input_html: {data: {role: "tagsinput" }}%> <% end %> diff --git a/app/views/campaigns/show.html.erb b/app/views/campaigns/show.html.erb index a1b2843..7fdc902 100644 --- a/app/views/campaigns/show.html.erb +++ b/app/views/campaigns/show.html.erb @@ -63,16 +63,8 @@ <%= @campaign.address %> - City - <%= @campaign.city %> - - - State - <%= @campaign.state %> - - - Zip - <%= @campaign.zip %> + City, State, Zip + <%= @campaign.city %>, <%= us_states item: @campaign.state %>, <%= @campaign.zip %> Awards diff --git a/vendor/assets/javascripts/bootstrap-tagsinput.js b/vendor/assets/javascripts/bootstrap-tagsinput.js index 06a071a..b688242 100755 --- a/vendor/assets/javascripts/bootstrap-tagsinput.js +++ b/vendor/assets/javascripts/bootstrap-tagsinput.js @@ -25,7 +25,7 @@ this.objectItems = options && options.itemValue; this.$container = $('
'); - this.$input = $('').appendTo(this.$container); + this.$input = $('').appendTo(this.$container); this.$element.after(this.$container); @@ -288,7 +288,7 @@ } - $input.attr('size', Math.max(40, $input.val().length)); + $input.attr('size', Math.max(100, $input.val().length)); }, self)); // Remove icon clicked