Fix error when sorting Job list by object.
[ganeti_webmgr.git] / ganeti_web / templates / ganeti / virtual_machine / rename.html
blob4e5c50e605086eca139c6b40021334fff3a8a771
1 {% extends "menu_base.html" %}
2 {% load webmgr_tags %}
3 {% load i18n %}
4 {% block title %}{% trans "Rename" %} Virtual Machine{% endblock %}
6 {% block head %}
7 <link rel="stylesheet" type="text/css"
8 href="{{STATIC_URL}}/css/virtual_machine_create.css"/>
9 <link rel="stylesheet" type="text/css"
10 href="{{STATIC_URL}}/css/help_tips.css"/>
11 <script src="{{STATIC_URL}}/js/helpTips.js"></script>
12 <script type="text/javascript">initHelpTips('#virtualmachineform');</script>
13 <script type="text/javascript">
14 // Make sure that if IP Check is selected, so is DNS Name Check
15 $(document).ready(function() {
16 var name_check = $("#id_name_check");
17 var ip_check = $("#id_ip_check");
18 var old_ip_check = ip_check.is(":checked");
19 name_check.live("click", function() {
20 if( !name_check.is(":checked") ) {
21 // Save current value as old value
22 old_ip_check = ip_check.is(":checked");
23 // uncheck ip check
24 ip_check.removeAttr('checked');
25 // disable ip check
26 //ip_check.attr('disabled', 'disabled');
27 } else {
28 // enable ip check
29 //ip_check.removeAttr('disabled');
30 // Set old value
31 if( old_ip_check ) {
32 ip_check.attr('checked', 'checked');
35 });
36 });
37 </script>
38 {% endblock %}
40 {% block content %}
41 <h1 class="breadcrumb">
42 {% if cluster_admin %}
43 <a href="{% url cluster-detail cluster.slug %}#virtual_machines">{{cluster.hostname|abbreviate_fqdn}}</a>
44 {% else %}
45 <span>{{cluster.hostname|abbreviate_fqdn}}</span>
46 {% endif %}
47 : <a href="{% url instance-detail cluster.slug vm.hostname %}">{{ vm.hostname }}</a>
48 : {% trans "Rename" %}
49 </h1>
51 <div id="virtualmachineform">
52 <form method="post">{% csrf_token %}
53 {% vmfield form.hostname %}
54 {% vmfield form.ip_check %}
55 {% vmfield form.name_check %}
56 <input class="submit" type="submit" value="Rename">
57 </form>
58 </div>
60 <div id="help">
61 <h3></h3>
62 <div></div>
63 </div>
65 <div id="help-contents">
66 {% include "ganeti/helptips/vm_rename.html" %}
67 </div>
68 {% endblock %}