-
Notifications
You must be signed in to change notification settings - Fork 36
/
edit.html
76 lines (65 loc) · 2.45 KB
/
edit.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{% extends "seeddb/base.html" %}
{% load crispy_forms_tags %}
{% block content %}
<p><a href="{{ back_url }}">Back to list</a></p>
{% for message in messages %}
<div class="alert-box with-icon {{ message.tags }}">
{{ message }}
</div>
{% endfor %}
<div class="row">
<div class="small-12 column">
{% if object %}
<h4>Edit {{ object }}</h4>
{% else %}
<h4>Add new management profile</h4>
{% endif %}
</div>
</div>
<form id="seeddb-management-profile-form" method="post">
<div class="row">
<div class="columns large-4">
<fieldset>
<legend>Basic profile data</legend>
{{ form | crispy }}
</fieldset>
</div>
<div class="columns large-8">
{% for form in protocol_forms %}
<fieldset class="protocol-configuration" id="protocol-{{ form.PROTOCOL }}">
<legend>{{ form.PROTOCOL_NAME }} configuration</legend>
{% if form.NOTABENE %}
<div class="alert-box warning with-icon">{{ form.NOTABENE }}</div>
{% endif %}
{{ form | crispy }}
</fieldset>
{% endfor %}
</div>
</div>
{% if object %}{% if num_netboxes > 0 %}
<div class="alert-box warning">
<strong><a href="{% url "seeddb-netbox" %}?profile={{ object.pk }}">{{ num_netboxes }} IP device{{ num_netboxes|pluralize:"s" }}</a></strong>
will be affected by changes to this profile.
</div>
{% else %}
<div class="alert-box info">
No IP devices will currently be affected by changes to this profile.
</div>
{% endif %}{% endif %}
<input type="submit" name="submit" value="Save {{ verbose_name }}" class="submit button small left" id="submit-id-submit">
</form>
{% if object and object.pk %}
<ul class="button-group right">
{% if delete_url_name %}
<li>
<a href="{% url delete_url_name object_id=object.pk %}" class="button small secondary" title="Delete this {{ verbose_name }}">Delete</a>
</li>
{% endif %}
{% if copy_url %}
<li>
<a href="{{ copy_url }}" class="button small secondary" title="{{ copy_title }}">Copy</a>
</li>
{% endif %}
</ul>
{% endif %}
{% endblock %}