Fix: bad escape function. email missing
This commit is contained in:
parent
1c02dc4f9d
commit
080276a504
@ -385,12 +385,13 @@ else
|
||||
});
|
||||
|
||||
$("#copyaddressfromsoc").click(function() {
|
||||
$(\'textarea[name="address"]\').text("'.addslashes($objsoc->address).'");
|
||||
$(\'input[name="zipcode"]\').val("'.addslashes($objsoc->zip).'");
|
||||
$(\'input[name="town"]\').val("'.addslashes($objsoc->town).'");
|
||||
$(\'select[name="country_id"]\').val("'.addslashes($objsoc->country_id).'");
|
||||
$(\'select[name="state_id"]\').val("'.addslashes($objsoc->state_id).'");
|
||||
});
|
||||
$(\'textarea[name="address"]\').text("'.dol_escape_js($objsoc->address).'");
|
||||
$(\'input[name="zipcode"]\').val("'.dol_escape_js($objsoc->zip).'");
|
||||
$(\'input[name="town"]\').val("'.dol_escape_js($objsoc->town).'");
|
||||
$(\'select[name="country_id"]\').val("'.dol_escape_js($objsoc->country_id).'");
|
||||
$(\'select[name="state_id"]\').val("'.dol_escape_js($objsoc->state_id).'");
|
||||
$(\'input[name="email"]\').val("'.dol_escape_js($objsoc->email).'");
|
||||
});
|
||||
})'."\n";
|
||||
print '</script>'."\n";
|
||||
}
|
||||
@ -482,16 +483,16 @@ else
|
||||
|
||||
// Phone / Fax
|
||||
if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->phone_pro)) == 0) $object->phone_pro = $objsoc->tel; // Predefined with third party
|
||||
print '<tr><td>'.$langs->trans("PhonePro").'</td><td><input name="phone_pro" type="text" size="18" maxlength="80" value="'.(isset($_POST["phone_pro"])?$_POST["phone_pro"]:$object->phone_pro).'"></td>';
|
||||
print '<td>'.$langs->trans("PhonePerso").'</td><td><input name="phone_perso" type="text" size="18" maxlength="80" value="'.(isset($_POST["phone_perso"])?$_POST["phone_perso"]:$object->phone_perso).'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("PhonePro").'</td><td><input name="phone_pro" id="phone_pro" type="text" size="18" maxlength="80" value="'.(isset($_POST["phone_pro"])?$_POST["phone_pro"]:$object->phone_pro).'"></td>';
|
||||
print '<td>'.$langs->trans("PhonePerso").'</td><td><input name="phone_perso" id="phone_perso" type="text" size="18" maxlength="80" value="'.(isset($_POST["phone_perso"])?$_POST["phone_perso"]:$object->phone_perso).'"></td></tr>';
|
||||
|
||||
if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->fax)) == 0) $object->fax = $objsoc->fax; // Predefined with third party
|
||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input name="phone_mobile" type="text" size="18" maxlength="80" value="'.(isset($_POST["phone_mobile"])?$_POST["phone_mobile"]:$object->phone_mobile).'"></td>';
|
||||
print '<td>'.$langs->trans("Fax").'</td><td><input name="fax" type="text" size="18" maxlength="80" value="'.(isset($_POST["fax"])?$_POST["fax"]:$object->fax).'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input name="phone_mobile" id="phone_mobile" type="text" size="18" maxlength="80" value="'.(isset($_POST["phone_mobile"])?$_POST["phone_mobile"]:$object->phone_mobile).'"></td>';
|
||||
print '<td>'.$langs->trans("Fax").'</td><td><input name="fax" id="fax" type="text" size="18" maxlength="80" value="'.(isset($_POST["fax"])?$_POST["fax"]:$object->fax).'"></td></tr>';
|
||||
|
||||
// EMail
|
||||
if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->email)) == 0) $object->email = $objsoc->email; // Predefined with third party
|
||||
print '<tr><td>'.$langs->trans("Email").'</td><td><input name="email" type="text" size="50" maxlength="80" value="'.(isset($_POST["email"])?$_POST["email"]:$object->email).'"></td>';
|
||||
print '<tr><td>'.$langs->trans("Email").'</td><td><input name="email" id="email" type="text" size="50" maxlength="80" value="'.(isset($_POST["email"])?$_POST["email"]:$object->email).'"></td>';
|
||||
if (! empty($conf->mailing->enabled))
|
||||
{
|
||||
print '<td>'.$langs->trans("No_Email").'</td><td>'.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).'</td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user