|
|
|
@ -1,7 +1,18 @@
|
|
|
|
|
<% selected = @log.public_send(question.id) || "" %> |
|
|
|
|
<% answers = question.displayed_answer_options(@log, current_user).map { |key, value| OpenStruct.new(id: key, name: select_option_name(value), resource: value) } %> |
|
|
|
|
<%= render partial: "form/guidance/#{question.top_guidance_partial}" if question.top_guidance? %> |
|
|
|
|
|
|
|
|
|
<noscript> |
|
|
|
|
<%= govuk_notification_banner(title_text: "Important") do %> |
|
|
|
|
<p class="govuk-notification-banner__heading govuk-!-width-full" style="max-width: fit-content"> |
|
|
|
|
This feature requires JavaScript to be enabled |
|
|
|
|
<p> |
|
|
|
|
<p style="max-width: fit-content"> |
|
|
|
|
Searching for an address or UPRN requires JavaScript to be enabled in your browser. Please enter the address manually instead in the next question. |
|
|
|
|
</p> |
|
|
|
|
<% end %> |
|
|
|
|
</noscript> |
|
|
|
|
|
|
|
|
|
<div id="js-enabled-content" style="display: none;"> |
|
|
|
|
<%= f.govuk_select(question.id.to_sym, |
|
|
|
|
label: legend(question, page_header, conditional), |
|
|
|
|
"data-controller": "address-search", |
|
|
|
@ -22,7 +33,12 @@
|
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
<%= render partial: "form/guidance/#{question.bottom_guidance_partial}" if question.bottom_guidance? %> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="govuk-button-group"> |
|
|
|
|
<%= govuk_link_to "Enter the address manually instead", address_manual_input_path(@log.log_type, @log.id), class: "govuk-button govuk-button--secondary" %> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
document.getElementById('js-enabled-content').style.display = 'block'; |
|
|
|
|
</script> |
|
|
|
|