Skip to content

Commit

Permalink
Extract inline onClick handler (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
shlomomdahan authored Dec 20, 2024
1 parent 0920d8b commit d69d4cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
</f:entry>
</j:scope>

<st:adjunct includes="io.jenkins.plugins.DingTalkRobotConfig.validate-robot-config-onclick"/>
<div class="robot-config-validate-msg"><!-- this is where the error message goes --></div>
<div style="text-align: right;">
<input
Expand All @@ -51,7 +52,6 @@
data-validate-button-descriptor-url="${descriptor.descriptorFullUrl}"
data-validate-button-method="test"
data-validate-button-with="${with}"
onclick="validateRobotConfig(this)"
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Behaviour.specify('.robot-config-validate-btn', 'validate-robot-config', 0, function(element) {
element.addEventListener('click', function() {
validateRobotConfig(this);
});
});

0 comments on commit d69d4cf

Please sign in to comment.