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'); ...@@ -10,6 +10,7 @@ require('../css/admin.css');
require('bootstrap'); require('bootstrap');
require('../css/common.css'); require('../css/common.css');
require('../js/geoloc.js'); require('../js/geoloc.js');
const $ = require("jquery");
$('#flash-messages').flashNotification('init'); $('#flash-messages').flashNotification('init');
...@@ -130,4 +131,11 @@ $(document).ready(function() { ...@@ -130,4 +131,11 @@ $(document).ready(function() {
} }
actionOnRecevoirUnRappelChange(); 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 ...@@ -371,14 +371,16 @@ class AdherentAdmin extends AbstractAdmin
'mapped' => false, 'mapped' => false,
'required' => false, 'required' => false,
'attr' => [ 'attr' => [
'autocomplete' => 'off' 'autocomplete' => 'off',
'class' => 'fixBalanceAdherentFormPart'
] ]
]) ])
->add('justification', TextType::class, [ ->add('justification', TextType::class, [
'mapped' => false, 'mapped' => false,
'required' => false, 'required' => false,
'attr' => [ 'attr' => [
'autocomplete' => 'off' 'autocomplete' => 'off',
'class' => 'fixBalanceAdherentFormPart'
] ]
]) ])
->add('password', PasswordType::class, [ ->add('password', PasswordType::class, [
...@@ -387,7 +389,8 @@ class AdherentAdmin extends AbstractAdmin ...@@ -387,7 +389,8 @@ class AdherentAdmin extends AbstractAdmin
'required' => false, 'required' => false,
'data' => "", 'data' => "",
'attr' => [ 'attr' => [
'autocomplete' => 'off' 'autocomplete' => 'off',
'class' => 'fixBalanceAdherentFormPart'
] ]
]) ])
->end() ->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