diff --git a/README.md b/README.md index e526ea9..0e6d4eb 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,9 @@ Vidpush ======= [![Build Status](https://circleci.com/gh/propelmarketing/vidpush.png?circle-token=46474007c0807cf4b467fb96d7736422b2fa58a7)](https://circleci.com/gh/propelmarketing/vidpush) + [![Code Climate](https://codeclimate.com/repos/535a76efe30ba01da902dc6b/badges/f1bfeadbed33f25ef547/gpa.png)](https://codeclimate.com/repos/535a76efe30ba01da902dc6b/feed) + + +Vidpush is the middleman between Intake Forms and BetterVideo(vendor). + diff --git a/app/assets/javascripts/campaigns.js b/app/assets/javascripts/campaigns.js new file mode 100644 index 0000000..f056a1f --- /dev/null +++ b/app/assets/javascripts/campaigns.js @@ -0,0 +1,9 @@ +/** + * Created by tsouza on 4/25/14. + */ + +/* Prevent the user from removing the last videolisting. Requires one at all times.*/ +$("body").on('click',"a.remove_fields",function() { + return $(".videolisting_field").length > 1; + +}); \ No newline at end of file diff --git a/app/views/campaigns/_form.html.erb b/app/views/campaigns/_form.html.erb index 6644c55..e94e4dc 100644 --- a/app/views/campaigns/_form.html.erb +++ b/app/views/campaigns/_form.html.erb @@ -4,16 +4,15 @@ file: :vertical_file_input, boolean: :vertical_boolean }) do |frm| %> - + <% end %>-->
@@ -84,6 +83,7 @@
+ <%= frm.simple_fields_for(:videolistings, html: {class: 'form-horizontal'}) do |videolisting| %> <%= render 'videolisting_fields', :f => videolisting %> <% end %> diff --git a/app/views/campaigns/_videolisting_fields.html.erb b/app/views/campaigns/_videolisting_fields.html.erb index 0a4a14d..91cae72 100644 --- a/app/views/campaigns/_videolisting_fields.html.erb +++ b/app/views/campaigns/_videolisting_fields.html.erb @@ -1,4 +1,4 @@ -
+
<%= f.input :voiceoverselection, label: 'Voiceover Selection', collection: voiceoverselection_list,