Update edit.blade.php (#8876)

Fix issue #8518
This commit is contained in:
ThoBur 2021-02-03 20:59:05 +01:00 committed by GitHub
parent 985193ffff
commit c40b8334fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -229,13 +229,13 @@
var auto_tag = $("#asset_tag").val().replace(/[^\d]/g, '');
var box_html = '';
const zeroPad = (num, places) => String(num).padStart(places, '0');
// Check that we haven't exceeded the max number of asset fields
if (x < max_fields) {
if (auto_tag!='') {
auto_tag = parseInt(auto_tag) + parseInt(x);
auto_tag = zeroPad(parseInt(auto_tag) + parseInt(x),auto_tag.length);
} else {
auto_tag = '';
}