Commit d6594388 authored by Ana Rute Mendes's avatar Ana Rute Mendes 🌈
Browse files

CCU: snipe-it: remove fields from purchasing form validation

The fields item dimensions and weight won't be used anymore in the
purchasing ticket.
parent ee522c9f
......@@ -9,7 +9,7 @@ return array(
'names' => array(
'conpherence.pkg.css' => '3c8a0668',
'conpherence.pkg.js' => '020aebcf',
'core.pkg.css' => '5edb4679',
'core.pkg.css' => '66f8a09f',
'core.pkg.js' => '705aec2c',
'differential.pkg.css' => '607c84be',
'differential.pkg.js' => '1b97518d',
......@@ -118,7 +118,7 @@ return array(
'rsrc/css/diviner/diviner-shared.css' => '4bd263b0',
'rsrc/css/font/font-awesome.css' => '3883938a',
'rsrc/css/font/font-lato.css' => '23631304',
'rsrc/css/font/phui-font-icon-base.css' => 'd7994e06',
'rsrc/css/font/phui-font-icon-base.css' => '03fc826b',
'rsrc/css/layout/phabricator-filetree-view.css' => '56cdd875',
'rsrc/css/layout/phabricator-source-code-view.css' => '03d7ac28',
'rsrc/css/phui/button/phui-button-bar.css' => 'a4aa75c4',
......@@ -129,7 +129,7 @@ return array(
'rsrc/css/phui/calendar/phui-calendar-month.css' => 'cb758c42',
'rsrc/css/phui/calendar/phui-calendar.css' => 'f11073aa',
'rsrc/css/phui/object-item/phui-oi-big-ui.css' => 'fa74cc35',
'rsrc/css/phui/object-item/phui-oi-color.css' => 'b517bfa0',
'rsrc/css/phui/object-item/phui-oi-color.css' => '256e6f73',
'rsrc/css/phui/object-item/phui-oi-drag-ui.css' => 'da15d3dc',
'rsrc/css/phui/object-item/phui-oi-flush-ui.css' => '490e2e2e',
'rsrc/css/phui/object-item/phui-oi-list-view.css' => 'd7723ecc',
......@@ -513,7 +513,7 @@ return array(
'rsrc/js/core/darkconsole/DarkMessage.js' => '26cd4b73',
'rsrc/js/core/darkconsole/behavior-dark-console.js' => 'f39d968b',
'rsrc/js/core/phtize.js' => '2f1db1ed',
'rsrc/js/extensions/snipe-fields-validation.js' => '0557f2e3',
'rsrc/js/extensions/snipe-fields-validation.js' => '73e6e0ce',
'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',
......@@ -841,7 +841,7 @@ return array(
'phui-document-view-css' => '52b748a5',
'phui-document-view-pro-css' => 'b9613a10',
'phui-feed-story-css' => 'a0c05029',
'phui-font-icon-base-css' => 'd7994e06',
'phui-font-icon-base-css' => '03fc826b',
'phui-fontkit-css' => '1ec937e5',
'phui-form-css' => '1f177cb7',
'phui-form-view-css' => '01b796c0',
......@@ -860,7 +860,7 @@ return array(
'phui-list-view-css' => 'b05144dd',
'phui-object-box-css' => 'b8d7eea0',
'phui-oi-big-ui-css' => 'fa74cc35',
'phui-oi-color-css' => 'b517bfa0',
'phui-oi-color-css' => '256e6f73',
'phui-oi-drag-ui-css' => 'da15d3dc',
'phui-oi-flush-ui-css' => '490e2e2e',
'phui-oi-list-view-css' => 'd7723ecc',
......@@ -900,7 +900,7 @@ return array(
'releeph-request-differential-create-dialog' => '0ac1ea31',
'releeph-request-typeahead-css' => 'bce37359',
'setup-issue-css' => '5eed85b2',
'snipe-fields-validation-js' => '0557f2e3',
'snipe-fields-validation-js' => '73e6e0ce',
'sprite-login-css' => '18b368a6',
'sprite-tokens-css' => 'f1896dc5',
'syntax-default-css' => '055fc231',
......@@ -960,16 +960,7 @@ return array(
'javelin-behavior',
'javelin-stratcom',
'javelin-dom',
'phuix-form-control-view',
'phuix-icon-view',
'javelin-behavior-phabricator-gesture',
),
'03dde462' => array(
'phui-oi-list-view-css',
),
'040fce04' => array(
'javelin-behavior',
'javelin-request',
'javelin-workflow',
),
'05d290ef' => array(
'javelin-install',
......@@ -1141,6 +1132,9 @@ return array(
'javelin-json',
'phabricator-draggable-list',
),
'256e6f73' => array(
'phui-oi-list-view-css',
),
'2633bef7' => array(
'multirow-row-manager',
'javelin-install',
......@@ -1953,9 +1947,6 @@ return array(
'multirow-row-manager',
'trigger-rule',
),
'b517bfa0' => array(
'phui-oi-list-view-css',
),
'b52d0668' => array(
'aphront-typeahead-control-css',
'phui-tag-view-css',
......@@ -2015,7 +2006,12 @@ return array(
'phabricator-phtize',
'javelin-dom',
),
'd057e45a' => array(
'c3d24e63' => array(
'javelin-install',
'javelin-workboard-card',
'javelin-workboard-header',
),
'c687e867' => array(
'javelin-behavior',
'javelin-dom',
'javelin-stratcom',
......
......@@ -63,12 +63,6 @@ function shipping_validations() {
let el_description = document.getElementsByName(
"std:maniphest:shipping:item-description"
)[0];
let el_dimensions = document.getElementsByName(
"std:maniphest:shipping:item-dimensions"
)[0];
let el_weight = document.getElementsByName(
"std:maniphest:shipping:item-weight"
)[0];
if (!import_asset.checked) {
assets.parentNode.parentNode.style.display = "none";
......@@ -131,14 +125,6 @@ function shipping_validations() {
country_of_origin: {
value: option.attributes["data-country-of-origin"].value,
label: "Country of origin"
},
weight: {
value: option.attributes["data-weight"].value,
label: "Weight"
},
dimensions: {
value: option.attributes["data-dimensions"].value,
label: "Dimensions"
}
}
};
......@@ -166,16 +152,12 @@ function shipping_validations() {
if (items.length == 1) {
el_country_of_origin.value = item.props.country_of_origin.value;
el_dimensions.value = item.props.dimensions.value;
el_weight.value = item.props.weight.value;
el_currency.value = item.props.currency.value;
}
});
if (items.length > 1) {
el_country_of_origin.value = "";
el_dimensions.value = "";
el_weight.value = "";
el_currency.value = "";
}
......@@ -213,18 +195,9 @@ function fetch_and_hide_extra_assets_elements(index, unique_items) {
asset["quantity"] = document.getElementsByName(
"std:maniphest:purchasing:quantity" + index
)[0].parentNode.parentNode;
asset["weight_parent"] = document.getElementsByName(
"std:maniphest:purchasing:item-weight" + index
)[0].parentNode.parentNode;
asset["dimensions_parent"] = document.getElementsByName(
"std:maniphest:purchasing:item-dimensions" + index
)[0].parentNode.parentNode;
asset["country_of_origin_parent"] = document.getElementsByName(
"std:maniphest:purchasing:country-origin" + index
)[0].parentNode.parentNode;
asset["weight_parent"] = document.getElementsByName(
"std:maniphest:purchasing:item-weight" + index
)[0].parentNode.parentNode;
asset["asset_cost_parent"] = document.getElementsByName(
"std:maniphest:purchasing:expected-cost" + index
)[0].parentNode.parentNode;
......
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