Avoid autofill button being considered as submit button by web browsers (#39330)

This commit is contained in:
David Beniamine 2026-07-30 18:23:58 +02:00 committed by GitHub
parent 9e6804de64
commit 2f073fb469
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -849,7 +849,7 @@ if ($result >= 0) {
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) {
if ($action != 'add_paiement') {
if (!empty($conf->use_javascript_ajax)) {
print '<button class="btn-low-emphasis --btn-icon AutoFillAmount" data-rowname="'.$namef.'" data-value="'.($sign * (float) $multicurrency_remaintopay).'">';
print '<button type="button" class="btn-low-emphasis --btn-icon AutoFillAmount" data-rowname="'.$namef.'" data-value="'.($sign * (float) $multicurrency_remaintopay).'">';
print img_picto("Auto fill", 'rightarrow.png');
print '</button>';
}
@ -922,7 +922,7 @@ if ($result >= 0) {
if ($action != 'add_paiement') {
if (!empty($conf->use_javascript_ajax)) {
print '<button class="btn-low-emphasis --btn-icon AutoFillAmount" data-rowname="'.$namef.'" data-value="'.($sign * (float) $remaintopay).'">';
print '<button type="button" class="btn-low-emphasis --btn-icon AutoFillAmount" data-rowname="'.$namef.'" data-value="'.($sign * (float) $remaintopay).'">';
print img_picto("Auto fill", 'rightarrow.png');
print '</button>';
}