change defaults
This commit is contained in:
parent
65c10c4909
commit
339a262e06
@ -9,6 +9,13 @@ class Campaign < ActiveRecord::Base
|
||||
validates :description, presence: true
|
||||
validates :productsandservices, presence: true
|
||||
|
||||
|
||||
def init
|
||||
self.clientid = 720
|
||||
end
|
||||
|
||||
|
||||
|
||||
after_create :send_to_better_video
|
||||
def send_to_better_video
|
||||
#TODO Make API Calls
|
||||
|
@ -1,10 +1,13 @@
|
||||
class Videolisting < ActiveRecord::Base
|
||||
belongs_to :campaign
|
||||
validates :videocode, presence: true, uniqueness: true
|
||||
validates :producttypeid, presence: true
|
||||
validates :voiceoverselection, presence: true
|
||||
validates :musicselection, presence: true
|
||||
|
||||
def init
|
||||
self.producttypeid = 721
|
||||
end
|
||||
|
||||
|
||||
def asseturls_array
|
||||
self.asseturls.split(',').collect { |url| { asseturl: url.strip } }
|
||||
|
@ -26,9 +26,6 @@
|
||||
<%= frm.input :listingcode,
|
||||
label: 'Listing Code',
|
||||
hint: "This should be the same as Intake Form's Form Hash." %>
|
||||
<%= frm.input :clientid,
|
||||
label: 'Client ID',
|
||||
hint: 'An identifier provided by BetterVideo.' %>
|
||||
<%= frm.input :description,
|
||||
label: 'Description',
|
||||
as: 'text',
|
||||
|
@ -3,10 +3,6 @@
|
||||
<strong>Video Code</strong>
|
||||
<span><%= videolisting.videocode %></span>
|
||||
</span>
|
||||
<span class="videolisting-item">
|
||||
<strong>Video Type</strong>
|
||||
<span><%= producttypeid_list item:videolisting.producttypeid %></span>
|
||||
</span>
|
||||
<span class="videolisting-item">
|
||||
<strong>Voiceover Selection</strong>
|
||||
<span><%= voiceoverselection_list item:videolisting.voiceoverselection %></span>
|
||||
|
@ -1,7 +1,5 @@
|
||||
json.assets videolisting.asseturls_array if videolisting.asseturls_array
|
||||
json.clientprovidedscript videolisting.clientprovidedscript if videolisting.clientprovidedscript
|
||||
json.focus videolisting.focus if videolisting.focus
|
||||
json.keywords videolisting.keywords if videolisting.keywords
|
||||
json.musicselection videolisting.musicselection if videolisting.musicselection
|
||||
json.notes videolisting.notes if videolisting.notes
|
||||
json.producttypeid videolisting.producttypeid if videolisting.producttypeid
|
||||
|
@ -2,10 +2,6 @@
|
||||
<%= f.input :videocode,
|
||||
label: 'Video Code',
|
||||
hint: "Unique identifier for every video." %>
|
||||
<%= f.input :producttypeid,
|
||||
label: "Product Type",
|
||||
collection: producttypeid_list,
|
||||
hint: "What type of content to create for this video. The types available are dependant on the pre-defined list of products." %>
|
||||
<%= f.input :voiceoverselection,
|
||||
label: 'Voiceover Selection',
|
||||
collection: voiceoverselection_list,
|
||||
|
@ -4,7 +4,6 @@
|
||||
<tr>
|
||||
<th>Listing Code(Form Hash)</th>
|
||||
<th>Processed?</th>
|
||||
<th>Client ID</th>
|
||||
<th>Billing Code</th>
|
||||
<th>Address</th>
|
||||
<th>City</th>
|
||||
@ -20,7 +19,6 @@
|
||||
<tr>
|
||||
<td><%= link_to campaign.listingcode, campaign_path(campaign.listingcode) %></td>
|
||||
<td><i class="glyphicon glyphicon-<% if campaign.processed? %>ok<% else %>remove<% end %>"></i> </td>
|
||||
<td><%= campaign.clientid %></td>
|
||||
<td><%= campaign.billingcode %></td>
|
||||
<td><%= campaign.address %></td>
|
||||
<td><%= campaign.city %></td>
|
||||
|
@ -14,10 +14,6 @@
|
||||
<strong>Listing Code</strong>
|
||||
<span><%= @campaign.listingcode %></span>
|
||||
</span>
|
||||
<span class="campaign-item">
|
||||
<strong>Client Id</strong>
|
||||
<span><%= @campaign.clientid %></span>
|
||||
</span>
|
||||
<span class="campaign-item">
|
||||
<strong>Description</strong>
|
||||
<span><%= @campaign.description %></span>
|
||||
|
Loading…
Reference in New Issue
Block a user