diff options
Diffstat (limited to 'src/templates/booking/quick_deploy.html')
-rw-r--r-- | src/templates/booking/quick_deploy.html | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/src/templates/booking/quick_deploy.html b/src/templates/booking/quick_deploy.html index 3837315..38294b2 100644 --- a/src/templates/booking/quick_deploy.html +++ b/src/templates/booking/quick_deploy.html @@ -26,6 +26,14 @@ .grid_element_2third { grid-column-start: span 8; } + #id_length { + -moz-appearance: none; + border: none; + box-shadow: none; + } + input[type=range]::-moz-range-track { + background: #cccccc; + } </style> {% bootstrap_form_errors form type='non_fields' %} <form id="quick_booking_form" action="/booking/quick/" method="POST" class="form"> @@ -33,7 +41,7 @@ <div class="grid_container"> <div class="grid_element host_select_pane grid_element_wide"> <p>Please select a host type you wish to book. Only available types are shown.</p> -{% bootstrap_field form.filter_field %} +{% bootstrap_field form.filter_field show_label=False %} </div> <div class="grid_element booking_info_pane grid_element_1third"> {% bootstrap_field form.purpose %} @@ -49,11 +57,16 @@ <label>Collaborators</label> {{ form.users }} </div> -<div class="grid_element configuration_pane grid_element_1third"> - {% bootstrap_field form.hostname %} - {% bootstrap_field form.image %} - {% bootstrap_field form.installer %} - {% bootstrap_field form.scenario %} +<div class="grid_element_1third"> + <div class="configuration_pane grid_element"> + {% bootstrap_field form.hostname %} + {% bootstrap_field form.image %} + </div> + <div class="configuration_pane grid_element"> + <strong>OPNFV: (Optional)</strong> + {% bootstrap_field form.installer %} + {% bootstrap_field form.scenario %} + </div> </div> </div> <script type="text/javascript"> @@ -103,6 +116,12 @@ $('#id_image').children().hide(); + for( var i = 0; i < drop.childNodes.length; i++ ) + { + drop.childNodes[i].disabled = true; // closest we can get on safari to hiding it outright + } + + var empty_map = {} for ( var i=0; i < drop.childNodes.length; i++ ) @@ -125,12 +144,13 @@ if( image_object.host_profile == host_pk && image_object.lab == lab_pk ) { drop.childNodes[i].style.display = "inherit"; + drop.childNodes[i].disabled = false; } } } } - $('#id_image').children().hide(); + imageHider(); $('#id_installer').children().hide(); $('#id_scenario').children().hide(); @@ -160,7 +180,13 @@ } targ_id = "#" + target; + $(targ_id).children().hide(); + + for (var i = 0; i < document.getElementById(target).childNodes.length; i++) + { + document.getElementById(target).childNodes[i].disabled = true; + } var drop = document.getElementById(master); var opts = target_filter[drop.options[drop.selectedIndex].value]; if (!opts) { @@ -177,6 +203,7 @@ for (var i = 0; i < document.getElementById(target).childNodes.length; i++) { if (document.getElementById(target).childNodes[i].value in opts && !(document.getElementById(target).childNodes[i].value in emptyMap) ) { document.getElementById(target).childNodes[i].style.display = "inherit"; + document.getElementById(target).childNodes[i].disabled = false; } } } |