Created
August 26, 2013 06:06
-
-
Save kmelkon/6338463 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= form_tag ("deal_status"), :remote => true, :class => "deals_status" do %> | |
<%= hidden_field_tag 'deal_id', d.id.to_s %> | |
<%= radio_button_tag( :state, "won"+d.id.to_s, d.state == "won", :class => "toggle-btn-left toggle-btn", :value =>"won") %> | |
<%= label_tag 'state_won'+d.id.to_s, "won", :class=>"btn" %> | |
<%= radio_button_tag :state, "lost"+d.id.to_s, d.state == 'lost', :class => "toggle-btn-center toggle-btn",:value => "lost" %> | |
<%= label_tag 'state_lost'+d.id.to_s, "lost",:class=>"btn" %> | |
<%= radio_button_tag :state, "pending"+d.id.to_s, d.state == 'pending',:class => "toggle-btn-right toggle-btn", :value => "pending" %> | |
<%= label_tag 'state_pending'+d.id.to_s, "pending", :class=>"btn" %> | |
<%= debug d.id.to_s %> | |
<% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.deals-wrapper').append('<%= escape_javascript(render :partial => "deals/deal", :locals => {:d => @deal}) %>'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form accept-charset="UTF-8" action="deal_status" class="deals_status" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value=""><input name="authenticity_token" type="hidden" value=""></div> | |
<input id="deal_id" name="deal_id" type="hidden" value=""> | |
<input class="toggle-btn-left toggle-btn" id="state_won73" name="state" type="radio" value=""> | |
<label class="btn" for="state_won73">won</label> | |
<input class="toggle-btn-center toggle-btn" id="state_lost73" name="state" type="radio" value=""> | |
<label class="btn" for="state_lost73">lost</label> | |
<input class="toggle-btn-right toggle-btn" id="state_pending73" name="state" type="radio" value=""> | |
<label class="btn" for="state_pending73">pending</label> | |
<pre class="debug_dump">--- '73' | |
</pre> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment