Commit e3216d6e authored by Ana Rute Mendes's avatar Ana Rute Mendes 🌈

CCU: purchasing: auto fill currency fields of extra items

parent 53b83eb2
......@@ -514,7 +514,7 @@ return array(
'rsrc/js/core/darkconsole/DarkMessage.js' => '26cd4b73',
'rsrc/js/core/darkconsole/behavior-dark-console.js' => '457f4d16',
'rsrc/js/core/phtize.js' => '2f1db1ed',
'rsrc/js/extensions/snipe-fields-validation.js' => 'efef003f',
'rsrc/js/extensions/snipe-fields-validation.js' => '0557f2e3',
'rsrc/js/phui/behavior-phui-dropdown-menu.js' => '5cf0501a',
'rsrc/js/phui/behavior-phui-file-upload.js' => 'e150bd50',
'rsrc/js/phui/behavior-phui-selectable-list.js' => 'b26a41e4',
......@@ -907,7 +907,7 @@ return array(
'releeph-request-differential-create-dialog' => '0ac1ea31',
'releeph-request-typeahead-css' => 'bce37359',
'setup-issue-css' => '5eed85b2',
'snipe-fields-validation-js' => 'efef003f',
'snipe-fields-validation-js' => '0557f2e3',
'sprite-login-css' => '18b368a6',
'sprite-tokens-css' => 'f1896dc5',
'syntax-default-css' => '055fc231',
......
......@@ -334,7 +334,15 @@ function purchasing_validations() {
assets_list[num_asset_forms.value][key].style.display = "block";
}
}
num_asset_forms.value++;
// Auto fill currency and ship to fields based on the first item
document.getElementsByName(
"std:maniphest:purchasing:currency" + num_asset_forms.value
)[0].value = document.getElementsByName(
"std:maniphest:purchasing:currency1"
)[0].value;
} else {
add_new_asset_btn.innerText = "Items per ticket exceeded";
add_new_asset_btn.classList.add("disabled");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment