From 5225251f0463662c5ccae4332dbd17f90036a760 Mon Sep 17 00:00:00 2001 From: Martin Markech Date: Sun, 30 Sep 2012 19:56:31 +0200 Subject: temp fix for jquery tristate - render only on new action, because on edit it has problems to correctly render some checkboxes --- app/views/refinery/banners/admin/banners/_form.html.erb | 4 ---- app/views/refinery/banners/admin/banners/new.html.erb | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/views/refinery/banners/admin/banners/_form.html.erb b/app/views/refinery/banners/admin/banners/_form.html.erb index b249f09..3ea7421 100644 --- a/app/views/refinery/banners/admin/banners/_form.html.erb +++ b/app/views/refinery/banners/admin/banners/_form.html.erb @@ -1,7 +1,3 @@ -<%- content_for(:javascripts) do -%> - <%= javascript_include_tag "banners/jquery.tristate.js", "banners/banners.js" -%> -<%- end -%> - <%= form_for [refinery, :banners_admin, @banner] do |f| -%> <%= render '/refinery/admin/error_messages', :object => @banner, diff --git a/app/views/refinery/banners/admin/banners/new.html.erb b/app/views/refinery/banners/admin/banners/new.html.erb index 2d34363..967b41e 100644 --- a/app/views/refinery/banners/admin/banners/new.html.erb +++ b/app/views/refinery/banners/admin/banners/new.html.erb @@ -1 +1,7 @@ +<%# TODO temp fix - activate tristate only on new. There is bug and inproperly render some checkboxes in edit action %> +<%- content_for(:javascripts) do -%> + <%= javascript_include_tag "banners/jquery.tristate.js", "banners/banners.js" -%> +<%- end -%> + <%= render 'form' %> + -- cgit v1.2.3