Skip to content

Commit

Permalink
Added not checkbox for with condition.
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Youch committed May 24, 2010
1 parent fdfb00a commit 315a5b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 7 additions & 0 deletions app/views/members/_operation_form_child.html.erb
@@ -1,5 +1,12 @@
<% cms_unstyled_fields_for form_id, builder do |f| -%>
<% if condition == 'with' -%>
<li>
<%= f.check_boxes :operator, [['not', 'not']], :single => true, :separator => '' %>
</li>
<% end -%>

<li>
<%= f.select :field, builder.field_options, {}, :onchange => 'OperationBuilder.updateOperations();', :style => 'width:200px;' %>
</li>
Expand Down
4 changes: 1 addition & 3 deletions app/views/members/_operation_form_operation.html.erb
Expand Up @@ -19,9 +19,7 @@
</li>

<% unless builder.condition.blank? -%>
<div id="children">
<%= render :partial => 'operation_form_child', :locals => {:builder => builder.child_field, :form_id => "#{form_id}[child]"} %>
</div>
<%= render :partial => 'operation_form_child', :locals => {:builder => builder.child_field, :form_id => "#{form_id}[child]", :condition => builder.condition} %>
<% end -%>
<% end %>

0 comments on commit 315a5b0

Please sign in to comment.