_suggestion_form.html.erb
1.48 KB
<%= remote_form_for(pairwise_content, :url => pairwise_suggestion_url(pairwise_content, embeded, source),
:html => {:id => "pairwise_suggestion_form_#{pairwise_content.id}"}, :loading => "jQuery('#pairwise_suggestion_form_#{pairwise_content.id} .suggestion_box_fields').hide();jQuery('#pairwise_suggestion_form_#{pairwise_content.id} .suggestion_box_loading').show();", :loaded => "jQuery('#pairwise_suggestion_form_#{pairwise_content.id} .suggestion_box_fields').show();jQuery('#pairwise_suggestion_form_#{pairwise_content.id} .suggestion_box_loading').hide();") do |f| %>
<div class="suggestion_box_fields">
<div class="error">
<%= flash[:error] %>
</div>
<div class="notice">
<%= flash[:notice] %>
</div>
<div class="div_text_input_container">
<div id="text_idea_content_<%= pairwise_content.id %>" class="div_text_input">
<%= text_area :idea, :text, :maxlenght => 160, :rows => 4, :placeholder => _('Type your idea here') %>
</div>
<div class="suggest_idea_btn">
<%= submit_button('', _("Send"), :id => 'new_idea_button', :class => user ? '':'require-login-popup') %>
</div>
</div>
</div>
<div class="suggestion_box_loading" style="display: none;">
<span>Processando...</span>
</div>
<script type='text/javascript'>
jQuery(document).ready(function($){
var pairwise_id = '<%=pairwise_content.id %>';
$('#text_idea_content_' + pairwise_id).find('textarea').jqEasyCounter();
});
</script>
<% end %>