2
0
forked from Wavyzz/dolibarr

Clean code for vat check popup

This commit is contained in:
Laurent Destailleur
2024-07-14 17:23:42 +02:00
parent 7b75e2c722
commit 16572677fa
3 changed files with 9 additions and 7 deletions

View File

@@ -976,7 +976,7 @@ function newpopup(url, title) {
var h = (argc > 3) ? argv[3] : 400;
var left = (screen.width - l)/2;
var top = (screen.height - h)/2;
var wfeatures = "directories=0,menubar=0,status=0,resizable=0,scrollbars=1,toolbar=0,width=" + l +",height=" + h + ",left=" + left + ",top=" + top;
var wfeatures = "directories=0,menubar=0,status=0,resizable=0,scrollbars=1,toolbar=0,location=0,width=" + l +",height=" + h + ",left=" + left + ",top=" + top;
fen = window.open(tmp, title, wfeatures);
return false;

View File

@@ -2932,7 +2932,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
print "}\n";
print '</script>';
print "\n";
$s .= '<a href="#" class="hideonsmartphone" onclick="CheckVAT( $(\'#tva_intra\').val() );">'.$langs->trans("VATIntraCheck").'</a>';
$s .= '<a href="#" class="hideonsmartphone" onclick="CheckVAT(jQuery(\'#tva_intra\').val());">'.$langs->trans("VATIntraCheck").'</a>';
$s = $form->textwithpicto($s, $langs->trans("VATIntraCheckDesc", $langs->transnoentitiesnoconv("VATIntraCheck")), 1);
} else {
$s .= '<a href="'.$langs->transcountry("VATIntraCheckURL", $object->country_id).'" class="hideonsmartphone" target="_blank" rel="noopener noreferrer">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"), 'help').'</a>';

View File

@@ -144,14 +144,16 @@ if (!$vatNumber) {
}
print '<br>';
print '<span class="opacitymedium">'.$langs->trans("VATIntraManualCheck", $langs->trans("VATIntraCheckURL"), $langs->transnoentitiesnoconv("VATIntraCheckURL")).'</span><br>';
print '<span class="opacitymedium small">'.$langs->trans("VATIntraManualCheck", $langs->trans("VATIntraCheckURL"), $langs->transnoentitiesnoconv("VATIntraCheckURL")).'</span><br>';
print '<br>';
print '<div class="center"><input type="button" class="button" value="'.$langs->trans("CloseWindow").'" onclick="window.close()"></div>';
print '<div class="center"><input type="button" class="button small" value="'.$langs->trans("CloseWindow").'" onclick="window.close()"></div>';
if ($messagetoshow) {
print '<br><br>';
print "\n".'Error returned:<br>';
print nl2br($messagetoshow);
print '<span class="opacitymedium small">Error returned:</small>'."\n";
print '<textarea class="small centpercent">';
print dol_htmlentitiesbr($messagetoshow, 1);
print '</textarea>';
}
print '</div>';