2023-03-02 01:14:34 +01:00
|
|
|
= turbo_frame_tag dom_id(prefill_description, :url) do
|
2022-12-19 12:32:09 +01:00
|
|
|
- theme = prefill_description.link_too_long? ? :warning : :success
|
|
|
|
- icon = prefill_description.link_too_long? ? "fr-icon-warning-fill" : "fr-icon-paint-fill"
|
|
|
|
- body = prefill_description.link_too_long? ? t("views.prefill_descriptions.edit.prefill_link_too_long") : t("views.prefill_descriptions.edit.prefill_link_info")
|
|
|
|
|
2023-03-02 01:14:34 +01:00
|
|
|
- if prefill_description.prefilled_champs.any? || prefill_description.identity_items_selected.any?
|
2022-12-19 12:32:09 +01:00
|
|
|
= render Dsfr::CalloutComponent.new(title: t("views.prefill_descriptions.edit.prefill_link_title"), theme: theme, icon: icon) do |c|
|
2023-02-22 09:09:07 +01:00
|
|
|
- c.with_html_body do
|
|
|
|
%p= body
|
2022-12-19 12:32:09 +01:00
|
|
|
%pre
|
|
|
|
%code.code-block
|
|
|
|
= prefill_description.prefill_link
|
|
|
|
- unless prefill_description.link_too_long?
|
|
|
|
- c.with_bottom do
|
|
|
|
= render Dsfr::CopyButtonComponent.new(title: t("views.prefill_descriptions.edit.prefill_link_copy"), text: prefill_description.prefill_link)
|