Skip to content

Commit

Permalink
add isProtected parameter to script
Browse files Browse the repository at this point in the history
  • Loading branch information
MBergCap committed Dec 20, 2023
1 parent 13c2ccf commit dfd4197
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions static/scripts/ctltools.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ $(document).ready(function () {

$(this).find('.custom-parameter-container').each(function (index) {
$(this).find('.parameters-is-optional').attr('name', `parameters[${index}][isOptional]`);
$(this).find('.parameters-is-protected').attr('name', `parameters[${index}][isProtected]`);
$(this).find('.parameters-name').attr('name', `parameters[${index}][name]`);
$(this).find('.parameters-displayName').attr('name', `parameters[${index}][displayName]`);
$(this).find('.parameters-description').attr('name', `parameters[${index}][description]`);
Expand All @@ -137,6 +138,7 @@ $(document).ready(function () {
const customParameter = addCustomParameter($modal);

customParameter.find('.parameters-is-optional').attr('checked', param.isOptional);
customParameter.find('.parameters-is-protected').attr('checked', param.isProtected);
customParameter.find('.parameters-name').attr('value', param.name);
customParameter.find('.parameters-displayName').attr('value', param.displayName);
customParameter.find('.parameters-description').attr('value', param.description);
Expand Down Expand Up @@ -178,6 +180,8 @@ $(document).ready(function () {
// Bind labels to input fields
newCustomParamContainer.find('.parameters-is-optional-label').attr('for', `parameters-is-optional-${customParameterId}`);
newCustomParamContainer.find('.parameters-is-optional').attr('for', `parameters-is-optional-${customParameterId}`);
newCustomParamContainer.find('.parameters-is-protected-label').attr('for', `parameters-is-protected-${customParameterId}`);
newCustomParamContainer.find('.parameters-is-protected').attr('for', `parameters-is-protected-${customParameterId}`);
newCustomParamContainer.find('.parameters-name-label').attr('for', `parameters-name-${customParameterId}`);
newCustomParamContainer.find('.parameters-name').attr('id', `parameters-name-${customParameterId}`);
newCustomParamContainer.find('.parameters-displayName-label').attr('for', `parameters-displayName-${customParameterId}`);
Expand Down

0 comments on commit dfd4197

Please sign in to comment.