change form around. fix styles to fit bootstrap.
This commit is contained in:
parent
defa655392
commit
dedc9b782e
@ -4,7 +4,6 @@ $medgray: #666;
|
|||||||
.videolisting {
|
.videolisting {
|
||||||
label {
|
label {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
float: left;
|
|
||||||
}
|
}
|
||||||
input {border: 2px inset;}
|
input {border: 2px inset;}
|
||||||
|
|
||||||
|
@ -20,13 +20,14 @@ class CampaignsController < ApplicationController
|
|||||||
def edit
|
def edit
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def create
|
def create
|
||||||
@campaign = Campaign.new campaign_params
|
@campaign = Campaign.new campaign_params
|
||||||
|
|
||||||
if @campaign.save
|
if @campaign.save
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.json { render json: @campaign }
|
format.json { render json: @campaign }
|
||||||
format.html { redirect_to @campaign, notice: 'Campaign was successfully created.' }
|
format.html { redirect_to campaign_path(@campaign.clientid), notice: 'Campaign was successfully created.' }
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
render action: 'new'
|
render action: 'new'
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
<%= simple_form_for(@campaign, html: {class: 'form-horizontal'}) do |frm| %>
|
<%= simple_form_for(@campaign, html: {class: 'form-horizontal'}) do |frm| %>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-1"></div>
|
||||||
|
|
||||||
|
<div class="col-md-10">
|
||||||
<% if @campaign.errors.any? %>
|
<% if @campaign.errors.any? %>
|
||||||
<div id="error_explanation">
|
<div id="error_explanation">
|
||||||
<h2><%= pluralize(@campaign.errors.count, "error") %> prohibited this campaign from being saved:</h2>
|
<h2><%= pluralize(@campaign.errors.count, "error") %> prohibited this campaign from being saved:</h2>
|
||||||
@ -9,8 +13,14 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-1"></div>
|
||||||
|
<div class="col-md-5">
|
||||||
<%= frm.input :clientid, label: 'Client ID' %>
|
<%= frm.input :clientid, label: 'Client ID' %>
|
||||||
<%= frm.input :listingcode, label: 'Listing Code' %>
|
<%= frm.input :listingcode, label: 'Listing Code' %>
|
||||||
<%= frm.input :websiteurl, label: 'Website URL'%>
|
<%= frm.input :websiteurl, label: 'Website URL'%>
|
||||||
@ -29,8 +39,9 @@
|
|||||||
<%= 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>
|
||||||
|
|
||||||
|
<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') %>">
|
||||||
@ -47,7 +58,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<h1>Listing campaigns</h1>
|
<h1>Listing campaigns</h1>
|
||||||
<table>
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Clientid</th>
|
<th>Clientid</th>
|
||||||
|
Loading…
Reference in New Issue
Block a user