Commit 7a6ff002 authored by Ana Rute Mendes's avatar Ana Rute Mendes 🌈

CCU: snipe-it: add asset tag field

every item has an asset tag that can now be mannually edited from phab
parent ab0e7264
......@@ -516,7 +516,7 @@ return array(
'rsrc/js/core/phtize.js' => '2f1db1ed',
'rsrc/js/extensions/choices/choices.css' => 'efe1d093',
'rsrc/js/extensions/choices/choices.js' => '3f23770b',
'rsrc/js/extensions/snipe-fields-validation.js' => '1da945b1',
'rsrc/js/extensions/snipe-fields-validation.js' => '057d79f6',
'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',
......@@ -911,7 +911,7 @@ return array(
'releeph-request-differential-create-dialog' => '0ac1ea31',
'releeph-request-typeahead-css' => 'bce37359',
'setup-issue-css' => '5eed85b2',
'snipe-fields-validation-js' => '1da945b1',
'snipe-fields-validation-js' => '057d79f6',
'sprite-login-css' => '18b368a6',
'sprite-tokens-css' => 'f1896dc5',
'syntax-default-css' => '055fc231',
......
......@@ -213,6 +213,13 @@ function fetch_and_hide_extra_assets_elements(index, unique_items) {
)[0].parentNode.parentNode;
asset["asset_name_parent"].classList.add("snipe_property");
if (document.getElementsByName("std:maniphest:purchasing:asset-tag" + index).length) {
asset["asset_tag_parent"] = document.getElementsByName(
"std:maniphest:purchasing:asset-tag" + index
)[0].parentNode.parentNode;
asset["asset_tag_parent"].classList.add("snipe_property");
}
asset["item_owner_parent"] = document.getElementsByName(
"std:maniphest:purchasing:item-owner" + index
)[0].parentNode.parentNode;
......@@ -326,7 +333,8 @@ function purchasing_validations() {
add_new_asset_btn.innerHTML = "Add another item to this ticket";
add_new_asset.appendChild(add_new_asset_btn);
add_new_asset_btn.onclick = function () {
add_new_asset_btn.onclick = function (e) {
e.preventDefault();
if (num_asset_forms.value < MAX_ALLOWED_ASSETS) {
for (let key in assets_list[num_asset_forms.value - 1]) {
if (
......
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