Merge "Add Nav Button Disabling Behavior"
[pharos-tools.git] / dashboard / src / templates / dashboard / landing.html
1 {% extends "base.html" %}
2 {% load staticfiles %}
3
4 {% block content %}
5     <div class="">
6         <p style="text-align:center;">Welcome to the Pharos Dashboard! To get started, select one of the options below:</p>
7     </div>
8 {% csrf_token %}
9
10 <style>
11     .wf_create{
12         display: inline-block;
13         text-align: center;
14     }
15     .wf_create_div{
16         text-align: center;
17     }
18     .hidden_form{
19         display: none;
20     }
21
22     .panel {
23         border: none;
24     }
25
26     .panels {
27         display: grid;
28         grid-template-columns: 33% 34% 33%;
29     }
30 </style>
31 <div class='wf_create_div'>
32 <button class="wf_create btn" onclick="cwf(0)">Create a Booking</button>
33 <button class="wf_create btn" onclick="cwf(1)">Create a Pod</button>
34 <button class="wf_create btn" onclick="cwf(2)">Configure a Pod</button>
35 <button class="wf_create btn" onclick="cwf(3)">Create a Snapshot</button>
36 {% if manager == True %}
37 <button class="wf_continue btn" onclick="continue_wf()">Finish Unfinished Business</button>
38 {% endif %}
39 </div>
40
41 <script type="text/javascript">
42     function cwf(type)
43     {
44         $.ajax({
45             type: "POST",
46             url: "/",
47             data: {"create":type},
48             beforeSend: function(request) {
49                 request.setRequestHeader("X-CSRFToken",
50                 $('input[name="csrfmiddlewaretoken"]').val()
51                 );
52             }
53
54         }).done(function (data) {
55             window.location.replace("/wf/");
56         }).fail(function(jqxHR, textstatus) {
57             alert("Something went wrong...");});
58     }
59     function continue_wf()
60     {
61         window.location.replace("/wf/");
62     }
63
64     //success: window.location.replace("/wf/")
65
66 </script>
67
68 <div class="hidden_form" id="form_div">
69     <form method="post" action="" class="form" id="wf_selection_form">
70         {% csrf_token %}
71
72         <input type="hidden" id="landing_action">
73
74         <button type="submit" class="btn btn btn-success">
75             Confirm Edit
76         </button>
77     </form>
78 </div>
79
80 {% block vport_comm %}
81 {% endblock %}
82 {% endblock content %}