do not display the content types select box if a page is not templatized

This commit is contained in:
Didier Lafforgue 2012-04-14 11:55:24 +02:00
parent 06fa564f37
commit 21469ce367
2 changed files with 2 additions and 2 deletions

View File

@ -116,7 +116,7 @@ class Locomotive.Views.Pages.FormView extends Locomotive.Views.Shared.FormView
@$('li#page_slug_input').show()
@$('li#page_templatized_input, li#page_target_klass_name_input').hide()
else
@$('li#page_templatized_input, li#page_target_klass_name_input').show()
@$('li#page_templatized_input').show() unless @model.get('redirect')
enable_response_type_select: ->
@$('li#page_response_type_input').change (event) =>

View File

@ -36,7 +36,7 @@
= f.input :templatized, :as => :'Locomotive::Toggle', :style => "#{'display: none' if @page.redirect? || @page.templatized_from_parent?}"
= f.input :target_klass_name, :as => :select, :collection => options_for_target_klass_name, :include_blank => false, :wrapper_html => { :style => "#{'display: none' unless @page.templatized? && !@page.templatized_from_parent?}" }
= f.input :target_klass_name, :as => :select, :collection => options_for_target_klass_name, :include_blank => false, :wrapper_html => { :style => "#{'display: none' if !@page.templatized? || @page.templatized_from_parent?}" }
= f.input :published, :as => :'Locomotive::Toggle'