Project

General

Profile

Actions

Patch #2632

closed

News comment form has no box

Added by Brad Beattie about 15 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
UI
Target version:
Start date:
2009-01-31
Due date:
% Done:

50%

Estimated time:
0.10 h

Description

The following patch boxes the news comment, as every other instance of commenting (e.g. on an existing ticket or in a forum) was boxed. Visual consistency and all that jazz. :)

### Eclipse Workspace Patch 1.0
#P Redmine
Index: app/views/news/show.rhtml
===================================================================
--- app/views/news/show.rhtml    (revision 2338)
+++ app/views/news/show.rhtml    (working copy)
@@ -46,10 +46,12 @@
 </div>

 <% if authorize_for 'news', 'add_comment' %>
-<p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p>
-<% form_tag({:action => 'add_comment', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
-<%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %>
-<%= wikitoolbar_for 'comment_comments' %>
+<p><%= toggle_link l(:label_comment_add), "add_comment_box", :focus => "comment_comments" %></p>
+<div id="add_comment_box" class="box" style="display: none">
+    <% form_tag({:action => 'add_comment', :id => @news}, :id => "add_comment_form") do %>
+    <%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %>
+    <%= wikitoolbar_for 'comment_comments' %>
+</div>
 <p><%= submit_tag l(:button_add) %></p>
 <% end %>
 <% end %>

Actions #1

Updated by Jean-Philippe Lang about 15 years ago

Is there any reason why the <div class="box"> should not be inside the form?

Actions #2

Updated by Brad Beattie about 15 years ago

Jean-Philippe Lang wrote:

Is there any reason why the <div class="box"> should not be inside the form?

Nope. Inside works just as well and is, as I gather you're implying, is a simpler change. :)

I considered adding class:box to the form itself, but that'd require making it .box display:block as well. Worth thinking about for long-term cleanliness of the XHTML/CSS, but in the short term, this works.

### Eclipse Workspace Patch 1.0
#P Redmine
Index: app/views/news/show.rhtml
===================================================================
--- app/views/news/show.rhtml    (revision 2338)
+++ app/views/news/show.rhtml    (working copy)
@@ -48,8 +48,10 @@
 <% if authorize_for 'news', 'add_comment' %>
 <p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p>
 <% form_tag({:action => 'add_comment', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
-<%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %>
-<%= wikitoolbar_for 'comment_comments' %>
+<div class="box">
+    <%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %>
+    <%= wikitoolbar_for 'comment_comments' %>
+</div>
 <p><%= submit_tag l(:button_add) %></p>
 <% end %>
 <% end %>
Actions #3

Updated by Jean-Philippe Lang about 15 years ago

  • Status changed from New to Closed
  • Target version set to 0.9.0

Applied in r2353.

Actions

Also available in: Atom PDF