style(dsfr): convert jeton particulier form and card to dsfr
This commit is contained in:
parent
494aa2bf40
commit
72b0bb3fa4
2 changed files with 15 additions and 17 deletions
|
@ -8,27 +8,23 @@
|
|||
= link_to admin_procedure_api_particulier_jeton_path, class: 'card-admin', id: 'add-jeton' do
|
||||
- if @procedure.api_particulier_token.blank?
|
||||
%div
|
||||
%span.icon.clock
|
||||
%p.fr-text-default--info= t('.needs_configuration')
|
||||
%p.fr-badge.fr-badge--info= t('.needs_configuration')
|
||||
- else
|
||||
%div
|
||||
%span.icon.accept
|
||||
%p.fr-text-default--success= t('.already_configured')
|
||||
%p.fr-badge.fr-badge--success= t('.already_configured')
|
||||
%div
|
||||
%h3.fr-h6
|
||||
= Procedure.human_attribute_name(:jeton_api_particulier)
|
||||
%p.button= t('views.shared.actions.edit')
|
||||
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')
|
||||
|
||||
- if @procedure.api_particulier_scopes.present?
|
||||
= link_to admin_procedure_api_particulier_sources_path, class: 'card-admin' do
|
||||
- if @procedure.api_particulier_token.blank?
|
||||
%div
|
||||
%span.icon.clock
|
||||
%p.fr-text-default--info= t('.needs_configuration')
|
||||
%p.fr-badge.fr-badge--info= t('.needs_configuration')
|
||||
- else
|
||||
%div
|
||||
%span.icon.accept
|
||||
%p.fr-text-default--success= t('.already_configured')
|
||||
%p.fr-badge.fr-badge--success= t('.already_configured')
|
||||
%div
|
||||
%p.card-admin-title= t('administrateurs.sources_particulier.show.data_sources')
|
||||
%p.button= t('views.shared.actions.edit')
|
||||
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')
|
||||
|
|
|
@ -10,15 +10,17 @@
|
|||
|
||||
.container
|
||||
%h1
|
||||
= form_with model: @procedure, url: admin_procedure_api_particulier_jeton_path, local: true, html: { class: 'form' } do |f|
|
||||
= form_with model: @procedure, url: admin_procedure_api_particulier_jeton_path, local: true do |f|
|
||||
= render Dsfr::AlertComponent.new(state: :info, size: :sm, extra_class_names: 'fr-mb-2w') do |c|
|
||||
- c.body do
|
||||
%p
|
||||
= t('.api_particulier_description_html', app_name: APPLICATION_NAME)
|
||||
|
||||
= f.label :api_particulier_token
|
||||
.desc.mb-2
|
||||
%p= t('.token_description')
|
||||
= f.password_field :api_particulier_token, class: 'form-control', required: :required
|
||||
.text-right
|
||||
= f.button t('views.shared.actions.save'), class: 'fr-btn send'
|
||||
%fieldset.fr-fieldset
|
||||
.fr-fieldset__element
|
||||
= f.label :api_particulier_token, class: "fr-label"
|
||||
%span.fr-hint-text= t('.token_description')
|
||||
= f.password_field :api_particulier_token, class: 'fr-input', required: :required
|
||||
|
||||
.fr-fieldset__element
|
||||
= f.button t('views.shared.actions.save'), class: 'fr-btn'
|
||||
|
|
Loading…
Reference in a new issue