Commit 9a09f9e7 by Yvon

hide fix balance fields by default and show them on click on a btn

parent 72f78dda
......@@ -10,6 +10,7 @@ require('../css/admin.css');
require('bootstrap');
require('../css/common.css');
require('../js/geoloc.js');
const $ = require("jquery");
$('#flash-messages').flashNotification('init');
......@@ -130,4 +131,11 @@ $(document).ready(function() {
}
actionOnRecevoirUnRappelChange();
}
if($(".fixBalanceAdherentFormPart").length > 0) {
$(".fixBalanceAdherentFormPart").parent().parent().hide();
$("div[id$='_idmlc']").append(
"<br/><input type='button' id='showFieldsToFixBalance' onclick='$(\".fixBalanceAdherentFormPart\").parent().parent().show();' value='Afficher les champs pour corriger le solde'> </input>"
);
}
});
......@@ -371,14 +371,16 @@ class AdherentAdmin extends AbstractAdmin
'mapped' => false,
'required' => false,
'attr' => [
'autocomplete' => 'off'
'autocomplete' => 'off',
'class' => 'fixBalanceAdherentFormPart'
]
])
->add('justification', TextType::class, [
'mapped' => false,
'required' => false,
'attr' => [
'autocomplete' => 'off'
'autocomplete' => 'off',
'class' => 'fixBalanceAdherentFormPart'
]
])
->add('password', PasswordType::class, [
......@@ -387,7 +389,8 @@ class AdherentAdmin extends AbstractAdmin
'required' => false,
'data' => "",
'attr' => [
'autocomplete' => 'off'
'autocomplete' => 'off',
'class' => 'fixBalanceAdherentFormPart'
]
])
->end()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment