From 080b8c042c85d6207c12e7e1f673ff843f787878 Mon Sep 17 00:00:00 2001 From: Philippe PITTOLI Date: Sat, 13 Apr 2024 23:56:34 +0200 Subject: [PATCH] DMARC: better display of the modal's form. --- src/App/Page/Zone.purs | 4 +++- src/App/Text/Explanations.purs | 16 ++++++++++++++++ src/App/Type/DMARC.purs | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/App/Page/Zone.purs b/src/App/Page/Zone.purs index 6040f09..ed5c42b 100644 --- a/src/App/Page/Zone.purs +++ b/src/App/Page/Zone.purs @@ -560,7 +560,8 @@ render state , Bulma.selection_field "idDMARCaspf" "Consistency Policy for SPF" DMARC_aspf DMARC.consistency_policies_txt_spf (maybe "-" show state.dmarc.aspf) , Bulma.hr - , Bulma.box_input "idDMARCpct" "% of dropped emails" "100" DMARC_pct (maybe "100" show state.dmarc.pct) + , Bulma.div_content [Bulma.explanation Explanations.dmarc_pct] + , Bulma.box_input "idDMARCpct" "Sample rate [0..100]" "100" DMARC_pct (maybe "100" show state.dmarc.pct) , Bulma.hr , Bulma.selection_field "idDMARCfo" "When to send a report" DMARC_fo DMARC.report_occasions_txt (maybe "-" show state.dmarc.fo) @@ -580,6 +581,7 @@ render state ] [] , Bulma.hr + , Bulma.div_content [Bulma.explanation Explanations.dmarc_ri] , Bulma.box_input "idDMARCri" "Report interval (in seconds)" "86400" DMARC_ri (maybe "0" show state.dmarc_ri) ] diff --git a/src/App/Text/Explanations.purs b/src/App/Text/Explanations.purs index c63b088..8515951 100644 --- a/src/App/Text/Explanations.purs +++ b/src/App/Text/Explanations.purs @@ -234,6 +234,22 @@ dmarc_contact = """ ] +dmarc_ri :: forall w i. Array (HH.HTML w i) +dmarc_ri = + [ Bulma.p """ + Requested report interval. Default is 86400. + """ + ] + +dmarc_pct :: forall w i. Array (HH.HTML w i) +dmarc_pct = + [ Bulma.p """ + Sampling rate. + Percentage of messages subjected to the requested policy. + """ + ] + + dkim_default_algorithms :: forall w i. Array (HH.HTML w i) dkim_default_algorithms = [ Bulma.p """ diff --git a/src/App/Type/DMARC.purs b/src/App/Type/DMARC.purs index 8360ab5..0d1d88b 100644 --- a/src/App/Type/DMARC.purs +++ b/src/App/Type/DMARC.purs @@ -28,7 +28,7 @@ type DMARC -- | v= Required. Default is "DMARC1", so the implementation doesn't actually require it. , v :: Maybe Version - -- | pct= Optional. Percentage of messages to filter [0...100], 100 by default. + -- | pct= Optional. Percentage of messages subjected to the requested policy [0...100], 100 by default. , pct :: Maybe Int -- | p= Required. Requested Mail Receiver policy (None, Quarantine, Reject).