fix slider appearance on Firefox
[pharos-tools.git] / dashboard / src / templates / booking / steps / booking_meta.html
1 {% extends "workflow/viewport-element.html" %}
2 {% load staticfiles %}
3
4 {% load bootstrap3 %}
5
6 {% block content %}
7
8 <style>
9     .bkmeta_panel {
10         padding: 5%;
11     }
12
13     .panel{
14         padding: 5%;
15         /*border: solid 1px black;*/
16     }
17
18     .panel_wrap {
19         width: 100%;
20         display: grid;
21         grid-template-columns: 45% 10% 45%;
22         border: none;
23     }
24
25     #id_length {
26         -moz-appearance: none;
27         border: none;
28         box-shadow: none;
29     }
30     input[type=range]::-moz-range-track {
31         background: #cccccc;
32     }
33 </style>
34
35 {% bootstrap_form_errors form type='non_fields' %}
36 <form id="booking_meta_form" action="/wf/workflow/" method="POST" class="form">
37 {% csrf_token %}
38 <div id="form_div">
39     <div class="panel_wrap">
40     <div class="panel bkmeta_panel">
41         {% bootstrap_field form.purpose %}
42         {% bootstrap_field form.project %}
43         {% bootstrap_field form.length %}
44         <p style="display:inline;">Days: </p><output id="daysout" style="display:inline;">0</output>
45         <script>
46             document.getElementById("id_length").setAttribute("oninput", "daysout.value=this.value");
47             document.getElementById("daysout").value = document.getElementById("id_length").value;
48         </script>
49         {% bootstrap_field form.info_file %}
50         <p>You must provide a url to your project's INFO.yaml file if you are a PTL and you are trying to book a POD with multiple servers in it.</p>
51     </div>
52     <div class="panel panel_center">
53     </div>
54     <div class="panel">
55         <p>You may add collaborators on your booking to share resources with coworkers.</p>
56         {% bootstrap_field form.users label="Collaborators" %}
57     </div>
58
59     {% buttons %}
60     <button type="submit" style="display: none;" class="btn btn-success">Confirm</button>
61     {% endbuttons %}
62     </div>
63 </div>
64 </form>
65 {% endblock content %}
66
67 {% block onleave %}
68 var ajaxForm = $("#booking_meta_form");
69 var formData = ajaxForm.serialize();
70 req = new XMLHttpRequest();
71 req.open("POST", "/wf/workflow/", false);
72 req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
73 req.onerror = function() { alert("problem submitting form"); }
74 req.send(formData);
75 {% endblock %}