1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-25 15:22:24 +01:00

Fix destinatari modal invio mail

This commit is contained in:
MatteoPistorello 2021-11-05 16:13:29 +01:00
parent 6ce3509d58
commit ef58348f94

View File

@ -87,7 +87,7 @@ echo '
foreach ($emails as $email) {
echo '
<div class="col-md-12">
{[ "type": "email", "name": "destinatari['.$idx++.']", "value": "'.$email.'", "icon-before": "choice|email", "extra": "onkeyup=\'aggiungiDestinatario();\'", "class": "destinatari", "required": 1 ]}
{[ "type": "email", "name": "destinatari['.$idx++.']", "value": "'.$email.'", "icon-before": "choice|email", "extra": "onkeyup=\'aggiungiDestinatario();\'", "class": "destinatari", "required": 0 ]}
</div>';
}
echo '
@ -166,9 +166,12 @@ echo '
if (id_anagrafica) {
$(document).load(globals.rootdir + "/ajax_complete.php?module=Anagrafiche&op=get_email&id_anagrafica=" + id_anagrafica + (pec ? "&type=pec" : ""), function(response) {
emails = JSON.parse(response);
let num = 0;
$(".destinatari").each(function(){
addAutoComplete(this);
if (num++==0) {
$(this).prop("required", true);
}
});
aggiungiDestinatario();