_comment_box.html.erb
上传用户:netsea168
上传日期:2022-07-22
资源大小:4652k
文件大小:2k
- <% form_remote_tag :url => @article.comment_url,
- :position=> :bottom,
- :update => {:success => 'commentList'},
- :loading => "loading()",
- :complete => "complete(request)",
- :failure => "failure(request)",
- :html => {:id=>"commentform",:class=>"commentform"}
- do %>
- <div class="comment-box">
- <div id="errors"></div>
- <div id="preview" style="display: none"></div>
- <a name="respond"></a>
- <table cellpadding="4" cellspacing="0" class="frm-tbl">
- <tr>
- <td><p><label for="comment_author"><%= _("Your name")%></label></p></td>
- <td> <%= text_field "comment", "author", :size => 20 %> <small><%= link_to_function(_("(leave url/email »)"), "Element.toggle('guest_url'); Element.toggle('guest_email')") %></small></td>
- </tr>
- <tr id="guest_url" style="display:none;">
- <td><p><label for="comment_url"><%= _("Your blog")%></label></p></td>
- <td> <%= text_field "comment", "url" %></td>
- </tr>
- <tr id="guest_email" style="display:none;">
- <td><p><label for="comment_email"><%= _("Your email")%></label></p></td>
- <td> <%= text_field "comment", "email" %></td>
- </tr>
- <tr>
- <td><p><label for="comment_body"><%= _("Your message")%></label></p></td>
- <td valign="top" colspan="2">
- <%= text_area "comment", "body" %>
- </td>
- </tr>
- <tr>
- <td colspan="2" id="frm-btns">
- <span id="comment_loading" style="display:none;"><%= image_tag "spinner.gif" %></span>
- <%= markup_help_popup TextFilter.find_by_name(this_blog.comment_text_filter), _("Comment Markup Help") %>
- <a href="#" onclick="new Ajax.Updater('preview', '<%= @article.preview_comment_url %>', {asynchronous:true, evalScripts:true, parameters:Form.serialize('commentform'), onComplete:function(request){Element.show('preview')}}); return false;"><%= _("Preview comment")%></a>
- <input type="submit" name="submit" id="form-submit-button" value="submit" class="button" />
- </td>
- </tr>
- </table>
- </div>
- <% end %>