Permalink
Browse files

Fixes for campaign edit screen

  • Loading branch information...
1 parent 02dda2b commit d42b9474cf7a16e505339e042abe553816a123d2 @kneath committed Jun 9, 2008
Showing with 7 additions and 6 deletions.
  1. +3 −1 app/views/campaigns/_form.html.erb
  2. +4 −4 app/views/shared/_ad.html.erb
  3. +0 −1 public/javascripts/application.js
View
4 app/views/campaigns/_form.html.erb
@@ -23,6 +23,8 @@
<dd>
<input type="text" class="datepicker" update_field="campaign_starts_on" update_text="starts_on_text" /> <input type="text" class="datepicker" update_field="campaign_ends_on" update_text="ends_on_text" />
<p class="dateresults"><strong>Start:</strong> <span id="starts_on_text" class="invalid">N/A</span> <strong>End:</strong> <span id="ends_on_text" class="invalid">N/A</span></p>
- <%= hidden_control :starts_on, :id => "campaign_starts_on" %> <%= hidden_control :ends_on, :id => "campaign_ends_on" %>
+ <input type="hidden" name="campaign[starts_on]" id="campaign_starts_on" value="<%= control_value(:starts_on).to_date.to_formatted_s(:general) %>" />
+ <input type="hidden" name="campaign[ends_on]" id="campaign_ends_on" value="<%= control_value(:ends_on).to_date.to_formatted_s(:general) %>" />
+
</dd>
</dl>
View
8 app/views/shared/_ad.html.erb
@@ -1,13 +1,13 @@
<div class="greed_advertisment">
<% unless campaign.filename.blank? %>
- <p><a href="<%= campaign.link %>" title="<%= campaign.name %>"><img src="<%= host_with_port + campaign.filename %>" /></a></p>
+ <a href="<%= campaign.link %>" title="<%= campaign.name %>" class="greed_img"><img src="<%= host_with_port + campaign.filename %>" /></a>
<% unless campaign.description.blank? %>
- <p><%= campaign.description %></p>
+ <p class="greed_description"><%= campaign.description %></p>
<% end %>
<% else %>
- <h4><a href="<%= campaign.link %>"><%=h campaign.name %></a></h4>
+ <h4 class="greed_title"><a href="<%= campaign.link %>"><%=h campaign.name %></a></h4>
<% unless campaign.description.blank? %>
- <p><%= campaign.description %></p>
+ <p class="greed_description"><%= campaign.description %></p>
<% end %>
<% end %>
</div>
View
1 public/javascripts/application.js
@@ -28,7 +28,6 @@ var rules = {
// update visual fields if hidden fields have info in them
if (element.value == null || element.value == ""){
var field = $(element.getAttribute('update_field'));
- console.log(field);
if (field.value != null && field.value != ""){
var date = Date.parse(field.value);
element.value = date.toString("MMMM dd, yyyy");

0 comments on commit d42b947

Please sign in to comment.