Skip to content

Commit

Permalink
add text-input class, data-form-id attribute to textarea publiclab#9004
Browse files Browse the repository at this point in the history
  • Loading branch information
noi5e committed Feb 5, 2021
1 parent 99da9a6 commit 3219419
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
9 changes: 5 additions & 4 deletions app/views/comments/_edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
<%= render :partial => "editor/toolbar", :locals => { :comment_id => comment.id.to_s, :location => :edit } %>
<div id="comment-form-body-edit-<%= comment.id%>" class="form-group dropzone dropzone-large" data-form-id="edit-<%= comment.id %>">
<textarea
aria-label="Edit Comment"
onFocus="editing=true"
name="body"
class="form-control"
id="text-input-edit-<%= comment.id%>"
class="form-control text-input"
name="body"
data-form-id="edit-<%= comment.id %>"
onFocus="editing=true"
aria-label="Edit Comment"
rows="6"
cols="40"
placeholder="<%= placeholder %>"
Expand Down
9 changes: 5 additions & 4 deletions app/views/comments/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@
</div>
<% end %>
<textarea
id="text-input-<%= comment_form_id %>"
class="form-control text-input"
name="body"
data-form-id="<%= comment_form_id %>"
onFocus="editing=true"
aria-label="Comment Text"
style="border: 1px solid #bbb;border-bottom-left-radius: 0;border-bottom-right-radius: 0;border-bottom: 0;padding: 10px;"
onFocus="editing=true"
name="body"
class="form-control text-input"
id="text-input-<%= comment_form_id %>"
rows="6"
cols="40"
placeholder="<%= placeholder %>"><%= body %>
Expand Down
11 changes: 10 additions & 1 deletion app/views/editor/_editor.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@
<%= render :partial => "editor/toolbar", :locals => { :location => :main } %>

<div class="form-group dropzone dropzone-large" data-form-id="main">
<textarea aria-label="Wiki Text" name="body" tabindex="2" class="form-control" id="text-input-main" rows="20" cols="60"><% if @node && @node.latest && @node.latest.body %><%= @node.latest.body %><% else %><%= params[:body] %><% end %></textarea>
<textarea
id="text-input-main"
class="form-control text-input"
name="body"
data-form-id="main"
aria-label="Wiki Text"
tabindex="2"
rows="20"
cols="60"
><% if @node && @node.latest && @node.latest.body %><%= @node.latest.body %><% else %><%= params[:body] %><% end %></textarea>
<div class="imagebar">
<div
id="image-upload-progress-container-main" style="display:none;"
Expand Down

0 comments on commit 3219419

Please sign in to comment.