diff options
author | Sawyer Bergeron <sbergeron@iol.unh.edu> | 2019-07-10 13:39:27 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2019-07-10 13:39:27 +0000 |
commit | 5f9a48539b49ad7be0a8366fed8b2a24d83208ef (patch) | |
tree | 5093b8392ce55b12dd1969c8b9c2210dd5483f99 /src/templates/config_bundle/steps/define_software.html | |
parent | 3bc9170d34ee6cd10bb02fa7641cccd2037562bb (diff) | |
parent | 38b4412f8b6cf21371b67e8de917f5a24b2bf72d (diff) |
Merge "Fixes and adds Tests"
Diffstat (limited to 'src/templates/config_bundle/steps/define_software.html')
-rw-r--r-- | src/templates/config_bundle/steps/define_software.html | 25 |
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"; - } -} |