[fix #2969] use JS replace semicolon by comma in the list email
This commit is contained in:
parent
826448d7cc
commit
c14f9900d6
3 changed files with 8 additions and 2 deletions
|
@ -3,3 +3,7 @@ import { toggle } from '@utils';
|
||||||
export function toggleCondidentielExplanation() {
|
export function toggleCondidentielExplanation() {
|
||||||
toggle(document.querySelector('.confidentiel-explanation'));
|
toggle(document.querySelector('.confidentiel-explanation'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function replaceSemicolonByComma(event) {
|
||||||
|
event.target.value = event.target.value.replace(/;/g, ',');
|
||||||
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@ import { toggleCondidentielExplanation } from '../new_design/avis';
|
||||||
import { scrollMessagerie } from '../new_design/messagerie';
|
import { scrollMessagerie } from '../new_design/messagerie';
|
||||||
import { showMotivation, motivationCancel } from '../new_design/state-button';
|
import { showMotivation, motivationCancel } from '../new_design/state-button';
|
||||||
import { toggleChart } from '../new_design/toggle-chart';
|
import { toggleChart } from '../new_design/toggle-chart';
|
||||||
|
import { replaceSemicolonByComma } from '../new_design/avis';
|
||||||
|
|
||||||
// This is the global application namespace where we expose helpers used from rails views
|
// This is the global application namespace where we expose helpers used from rails views
|
||||||
const DS = {
|
const DS = {
|
||||||
|
@ -32,7 +33,8 @@ const DS = {
|
||||||
scrollMessagerie,
|
scrollMessagerie,
|
||||||
showMotivation,
|
showMotivation,
|
||||||
motivationCancel,
|
motivationCancel,
|
||||||
toggleChart
|
toggleChart,
|
||||||
|
replaceSemicolonByComma
|
||||||
};
|
};
|
||||||
|
|
||||||
// Start Rails helpers
|
// Start Rails helpers
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
%p.avis-notice Les invités pourront consulter, donner un avis sur le dossier et contribuer au fil de messagerie, mais ils ne pourront pas le modifier.
|
%p.avis-notice Les invités pourront consulter, donner un avis sur le dossier et contribuer au fil de messagerie, mais ils ne pourront pas le modifier.
|
||||||
|
|
||||||
= form_for avis, url: url, html: { class: 'form' } do |f|
|
= form_for avis, url: url, html: { class: 'form' } do |f|
|
||||||
= f.email_field :emails, placeholder: 'Adresses email, séparées par des virgules', required: true, multiple: true
|
= f.email_field :emails, placeholder: 'Adresses email, séparées par des virgules', required: true, multiple: true, onchange: "javascript:DS.replaceSemicolonByComma(event);"
|
||||||
= f.text_area :introduction, rows: 3, value: avis.introduction || 'Bonjour, merci de me donner votre avis sur ce dossier.', required: true
|
= f.text_area :introduction, rows: 3, value: avis.introduction || 'Bonjour, merci de me donner votre avis sur ce dossier.', required: true
|
||||||
.flex.justify-between.align-baseline
|
.flex.justify-between.align-baseline
|
||||||
- if must_be_confidentiel
|
- if must_be_confidentiel
|
||||||
|
|
Loading…
Reference in a new issue