Skip to content

Commit

Permalink
Merge pull request #488 from oat-sa/fix/AUT-3711/hide-delivery-test-r…
Browse files Browse the repository at this point in the history
…unner-features

fix/AUT-3711/hide-delivery-test-runner-features
  • Loading branch information
shaveko authored Jun 27, 2024
2 parents 55354b4 + d0081c6 commit be4f1e2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions views/js/controller/DeliveryMgmt/editDelivery.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ define([
'use strict';

/**
* Finds property block and hides it adding .hidden class
* Finds property blocks starting with propName and hides it adding .hidden class
* @param {string} propName
*/
function hidePropertyBlockByName(propName) {
const inputCssQuery = `form[action="/taoDeliveryRdf/DeliveryMgmt/editDelivery"] input[name="${propName}"]`;
const inputCssQuery = `form[action="/taoDeliveryRdf/DeliveryMgmt/editDelivery"] input[name^="${propName}"]`;
$(inputCssQuery).closest('form > div').addClass('hidden');
}

Expand Down Expand Up @@ -69,6 +69,9 @@ define([
if(!features.isVisible(`${featuresPath}assessmentProjectId`)) {
hidePropertyBlockByName('http_2_www_0_tao_0_lu_1_Ontologies_1_TAODelivery_0_rdf_3_AssessmentProjectId');
}
if(!features.isVisible(`${featuresPath}testRunnerFeatures`)) {
hidePropertyBlockByName('http_2_www_0_tao_0_lu_1_Ontologies_1_TAODelivery_0_rdf_3_DeliveryTestRunnerFeatures_');
}

$('#exclude-btn').click(function() {
const delivery = $(this).data('delivery');
Expand Down
Loading

0 comments on commit be4f1e2

Please sign in to comment.