Merge tag '0.10.2'
[ganeti_webmgr.git] / muddle / templates / edit / generic_model_edit.html
blobf1ca66d387e524ddf506f3240d6b39da70960e37
1 {% extends "base.html" %}
4 {% block head %}
5 {{block.super}}
6 <link rel="stylesheet" type="text/css" href="../../static/css/generic_model_edit.css" />
7 <script type="text/javascript">
8 $(document).ready(function() {
9 $('input.selecter').each(function(){
10 $this = $(this);
12 $('#'+$this.val()).show();
13 $this.prevAll('ul.child_selecter').children('.'+$this.val()).addClass('selected');
14 $this.prevAll('ul.child_selecter').find('li').click(function(){
15 $this = $(this);
16 val = $this.html();
17 $this.addClass('selected')
18 $this.siblings().removeClass('selected')
19 $this.parent().next().val(val);
20 $this.parent().siblings('.child').hide();
21 $('#'+val).show();
22 });
23 });
24 });
25 </script>
26 {% endblock %}
28 {% block content %}
30 <form id="edit" method="post" >
32 <h1>{{wrapper.name}}</h1>
33 {% with form.form_instance as form %}
34 {% include "edit/form_fields.html" %}
35 {% endwith %}
37 {% for name, one_to_one in form.one_to_one_instances.items %}
38 {%with one_to_one.form_instance as form %}
39 {% include "edit/form_fields.html" %}
40 {% endwith %}
41 {% endfor %}
43 {% for name, form in form.one_to_many_instances.items %}
44 {% include "edit/form_fields_list.html" %}
45 {% endfor %}
47 <br/>
48 <input type="submit" value="submit"/>
49 </form>
50 {% endblock %}