aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/config_bundle/steps/define_software.html
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates/config_bundle/steps/define_software.html')
-rw-r--r--src/templates/config_bundle/steps/define_software.html25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/templates/config_bundle/steps/define_software.html b/src/templates/config_bundle/steps/define_software.html
index 7c47569..43f3f5d 100644
--- a/src/templates/config_bundle/steps/define_software.html
+++ b/src/templates/config_bundle/steps/define_software.html
@@ -27,20 +27,19 @@
{% block tablejs %}
<script>
-
document.getElementById("radio_{{headnode}}").checked = true;
+ function radio_pre_submit(){
+ var parents = document.getElementsByClassName("table_hidden_input_parent");
+ for(const node of parents){
+ const radio = node.getElementsByClassName("my_radio")[0];
+ const checkbox = radio.nextElementSibling;
+ if(radio.checked){
+ checkbox.value = "True";
+ }
+ }
+ }
+
+ form_submission_callbacks.push(radio_pre_submit);
</script>
{% endblock tablejs %}
-
-
-{% block onleave %}
-var parents = document.getElementsByClassName("table_hidden_input_parent");
-for(var i=0; i<parents.length; i++){
- var node = parents[i];
- var radio = node.getElementsByClassName("my_radio")[0];
- var checkbox = radio.nextElementSibling;
- if(radio.checked){
- checkbox.value = "True";
- }
-}