fix brakeman and erb lint violations

pull/544/head
Ryan Arakawa 4 months ago
parent c5963a422f
commit 626b3ca09d

@ -5,7 +5,7 @@ class SubmittersRequestChangesController < ApplicationController
skip_before_action :verify_authenticity_token, only: :request_changes skip_before_action :verify_authenticity_token, only: :request_changes
def request_changes def request_changes
if request.get? if request.get? || request.head?
render 'submitters_request_changes/request_changes', layout: false if request.xhr? render 'submitters_request_changes/request_changes', layout: false if request.xhr?
else else
return redirect_back(fallback_location: root_path, alert: 'Invalid request') unless can_request_changes? return redirect_back(fallback_location: root_path, alert: 'Invalid request') unless can_request_changes?

@ -238,8 +238,8 @@
<% if signed_in? && submitter && submitter.completed_at? && !submitter.declined_at? && !submitter.changes_requested_at? && current_user == @submission.created_by_user %> <% if signed_in? && submitter && submitter.completed_at? && !submitter.declined_at? && !submitter.changes_requested_at? && current_user == @submission.created_by_user %>
<div class="mt-2 mb-1"> <div class="mt-2 mb-1">
<%= link_to 'Request Changes', request_changes_submitter_path(submitter.slug), <%= link_to 'Request Changes', request_changes_submitter_path(submitter.slug),
class: 'btn btn-sm btn-warning w-full', class: 'btn btn-sm btn-warning w-full',
data: { turbo_frame: :modal } %> data: { turbo_frame: :modal } %>
</div> </div>
<% end %> <% end %>
</div> </div>

@ -15,11 +15,11 @@
<span class="label-text">Message (required)</span> <span class="label-text">Message (required)</span>
</label> </label>
<%= f.text_area :reason, <%= f.text_area :reason,
required: true, required: true,
class: 'textarea textarea-bordered w-full', class: 'textarea textarea-bordered w-full',
dir: 'auto', dir: 'auto',
placeholder: 'Please provide specific details about what needs to be changed...', placeholder: 'Please provide specific details about what needs to be changed...',
rows: '6' %> rows: '6' %>
</div> </div>
<div class="modal-action"> <div class="modal-action">

Loading…
Cancel
Save