procedure: remove UI to edit the european flag
This is an option we want to deprecate, and remove entirely in the future. Admins can still add the EU flag manually to their uploaded logo.
This commit is contained in:
parent
112b44bdea
commit
02384b078c
3 changed files with 4 additions and 14 deletions
|
@ -1,4 +1,4 @@
|
|||
import { show, hide, delegate } from '@utils';
|
||||
import { delegate } from '@utils';
|
||||
|
||||
function syncInputToElement(fromSelector, toSelector) {
|
||||
const fromElement = document.querySelector(fromSelector);
|
||||
|
@ -11,14 +11,8 @@ function syncInputToElement(fromSelector, toSelector) {
|
|||
function syncFormToPreview() {
|
||||
syncInputToElement('#procedure_libelle', 'h2.procedure-title');
|
||||
syncInputToElement('#procedure_description', '.procedure-description-body');
|
||||
|
||||
const euroFlagCheckbox = document.querySelector('#procedure_euro_flag');
|
||||
const euroFlagLogo = document.querySelector('#euro_flag');
|
||||
if (euroFlagCheckbox && euroFlagLogo) {
|
||||
euroFlagCheckbox.checked ? show(euroFlagLogo) : hide(euroFlagLogo);
|
||||
}
|
||||
}
|
||||
|
||||
delegate('input', '#procedure-edit #procedure_libelle', syncFormToPreview);
|
||||
delegate('input', '#procedure-edit #procedure_description', syncFormToPreview);
|
||||
delegate('change', '#procedure-edit #procedure_euro_flag', syncFormToPreview);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue