_comment_form.html.erb
上传用户:netsea168
上传日期:2022-07-22
资源大小:4652k
文件大小:1k
- <% form_remote_tag :url => @article.comment_url,
- :position => :bottom,
- :update => {:success => 'commentList'},
- :loading => "loading()",
- :complete => "complete(request)",
- :failure => "failure(request)",
- :html => {:id => 'commentform', :class => 'comments' }
- do %>
- <div id="preview" style="display:none"></div>
- <h2 id="respond">Leave a comment</h2>
- <p>
- <%= text_field "comment", "author", :class => 'styled', :size => 22 %>
- <label>Name</label>
- </p>
- <p>
- <%= text_field "comment", "email", :class => 'styled', :size => 22 %>
- <label>Email <%= content_tag('small', "(#{link_to('gravatar', 'http://gravatar.com')} enabled)") if this_blog.use_gravatar %></label>
- </p>
- <p>
- <%= text_field "comment", "url", :class => 'styled', :size => 22 %>
- <label>Url</label>
- </p>
- <p>
- <%= text_area 'comment', 'body', :class => 'styled', :rows => 10, :cols => 100 %>
- </p>
- <p>
- <%= submit_to_remote('preview', 'Preview!',
- :update => 'preview',
- :complete => "Element.show('preview')",
- :url => @article.preview_comment_url) %>
- <%= submit_tag 'Submit', :id => 'form-submit-button', :onclick => "$('commentform').onsubmit();this.disabled=true;Element.hide('preview');return false;" %>
- <%= image_tag 'theme/spinner.gif', :id => 'comment_loading', :style => 'display:none' %>
- </p>
- <% end %>