Skip to content

Commit

Permalink
Merge pull request #646 from bitzesty/letters-of-support-post-deadlin…
Browse files Browse the repository at this point in the history
…e-edit

hide buttons after submission deadline is passed if form is not editable
  • Loading branch information
dreamfall authored Feb 1, 2024
2 parents 5c7093a + 202dfda commit 4efa279
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/qae_form/_supporter_fields.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ li.js-add-example class="#{'read-only js-support-letter-received' if persisted}"
button.govuk-button.js-save-collection class=(persisted ? "visuallyhidden" : "") data-save-collection-url=users_form_answer_support_letters_url(@form_answer)
| Submit letter of support

- if !admin_in_read_only_mode?
- if current_form_is_editable?
- if persisted
- if supporter["support_letter_id"].present? && @form_answer.support_letters.find_by_id(supporter["support_letter_id"])
- url = users_form_answer_support_letter_path(form_answer_id: @form_answer.id, id: supporter["support_letter_id"])
Expand Down
5 changes: 3 additions & 2 deletions app/views/qae_form/_supporters_question.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ ul.list-add.supporters-list data-need-to-clear-example=true data-add-limit=quest
- (0...question.default.to_i).each do |index|
= render 'qae_form/supporter_fields', question: question, supporter: {}, index: index

a.govuk-button.govuk-button--secondary.button-add.js-button-add href="#" *possible_read_only_ops(question.step.opts[:id])
| Add another letter of support
- if current_form_is_editable?
a.govuk-button.govuk-button--secondary.button-add.js-button-add href="#" *possible_read_only_ops(question.step.opts[:id])
| Add another letter of support

0 comments on commit 4efa279

Please sign in to comment.