<div class="box">
    <%= render partial: "progress_updates/progress_update_content", locals: {progress_update: @update} %>
    <hr><br>
    <ul class="list-unstyled"><%= render @update.comments %></ul>
    
    <% if can? :create, Comment %>
        <h3>Add New Comment</h3>
        <%= form_for [@update.project, @update, @comment] do |f| %>
            <%= f.text_area :content, class: "form-control" %><br>
            <%= f.submit "Add Comment", class: "btn btn-primary" %>
        <% end %>
        <br><br>  
    <% end %>
    
    <%= edit_update_link(@update) %>
    <%= delete_update_link(@update) %>
</div>
<div class="box">
    <%= render partial: "progress_updates/progress_update_content", locals: {progress_update: @update} %>
    <hr><br>
    <ul class="list-unstyled"><%= render @update.comments %></ul>
    
    <% if can? :create, Comment %>
        <h3>Add New Comment</h3>
        <%= form_for [@update.project, @update, @comment] do |f| %>
            <%= f.text_area :content, class: "form-control" %><br>
            <button class="btn btn-primary" id="add-comment-button">Add Comment</button>
        <% end %>
        <br><br>  
    <% end %>
    
    <%= edit_update_link(@update) %>
    <%= delete_update_link(@update) %>
</div>
Fix new comment button to work multiple times without page reload
Fix new comment button to work multiple times without page reload
