mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Merge branch 'develop' into feature
This commit is contained in:
@@ -56,17 +56,3 @@
|
||||
{% render_custom_fields form %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{# Override buttons block, 'Create & Add Another'/'_addanother' is not needed on a circuit. #}
|
||||
{% block buttons %}
|
||||
<a class="btn btn-outline-danger" href="{{ return_url }}">Cancel</a>
|
||||
{% if object.pk %}
|
||||
<button type="submit" name="_update" class="btn btn-primary">
|
||||
Save
|
||||
</button>
|
||||
{% else %}
|
||||
<button type="submit" name="_create" class="btn btn-primary">
|
||||
Create
|
||||
</button>
|
||||
{% endif %}
|
||||
{% endblock buttons %}
|
||||
|
@@ -99,14 +99,3 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block buttons %}
|
||||
<a href="{{ return_url }}" class="btn btn-outline-danger">Cancel</a>
|
||||
{% if object.pk %}
|
||||
<button type="button" return-url="?return_url={% url 'dcim:interface_edit' pk=object.pk %}" class="btn btn-outline-primary">Save & Continue Editing</button>
|
||||
<button type="submit" name="_update" class="btn btn-primary">Save</button>
|
||||
{% else %}
|
||||
<button type="submit" name="_addanother" class="btn btn-outline-primary">Create & Add Another</button>
|
||||
<button type="submit" name="_create" class="btn btn-primary">Create</button>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
@@ -36,8 +36,8 @@ Context:
|
||||
{{ field }}
|
||||
{% endfor %}
|
||||
<div class="text-end">
|
||||
<a href="{{ return_url }}" class="btn btn-outline-dark">Cancel</a>
|
||||
<button type="submit" name="_confirm" class="btn btn-danger">Delete {{ table.rows|length }} {{ model|meta:"verbose_name_plural" }}</button>
|
||||
<a href="{{ return_url }}" class="btn btn-outline-dark">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
@@ -118,8 +118,8 @@ Context:
|
||||
</div>
|
||||
|
||||
<div class="text-end">
|
||||
<a href="{{ return_url }}" class="btn btn-sm btn-outline-danger">Cancel</a>
|
||||
<button type="submit" name="_apply" class="btn btn-sm btn-primary">Apply</button>
|
||||
<a href="{{ return_url }}" class="btn btn-sm btn-outline-danger">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -44,12 +44,12 @@ Context:
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col col-md-12 text-end">
|
||||
{% if return_url %}
|
||||
<a href="{{ return_url }}" class="btn btn-outline-danger">Cancel</a>
|
||||
{% endif %}
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
<div class="col col-md-12 text-end">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
{% if return_url %}
|
||||
<a href="{{ return_url }}" class="btn btn-outline-danger">Cancel</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% if fields %}
|
||||
|
@@ -23,8 +23,8 @@
|
||||
{{ field }}
|
||||
{% endfor %}
|
||||
<div class="text-center">
|
||||
<a href="{{ return_url }}" class="btn btn-outline-dark">Cancel</a>
|
||||
<button type="submit" name="_confirm" class="btn btn-danger">Delete these {{ table.rows|length }} {{ obj_type_plural }}</button>
|
||||
<a href="{{ return_url }}" class="btn btn-outline-dark">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
@@ -34,11 +34,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col col-md-12 my-3 text-end">
|
||||
<a href="{{ return_url }}" class="btn btn-outline-danger">Cancel</a>
|
||||
<button type="submit" name="_preview" class="btn btn-primary">Preview</button>
|
||||
{% if '_preview' in request.POST and not form.errors %}
|
||||
<button type="submit" name="_apply" class="btn btn-primary">Apply</button>
|
||||
{% endif %}
|
||||
<a href="{{ return_url }}" class="btn btn-outline-danger">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
@@ -2,33 +2,24 @@
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row mt-5">
|
||||
|
||||
<div class="col col-md-6 offset-md-3">
|
||||
|
||||
<form action="" method="post" class="form">
|
||||
{% csrf_token %}
|
||||
{% for field in form.hidden_fields %}
|
||||
{{ field }}
|
||||
{% endfor %}
|
||||
|
||||
<div class="card border-danger">
|
||||
<h5 class="card-header">{% block confirmation_title %}{% endblock %}</h5>
|
||||
|
||||
<div class="card-body">
|
||||
{% block message %}<p>Are you sure?</p>{% endblock %}
|
||||
</div>
|
||||
|
||||
<div class="card-footer text-end">
|
||||
<a href="{{ return_url }}" class="btn btn-outline-dark">Cancel</a>
|
||||
<button type="submit" name="_confirm" class="btn btn-{{ button_class|default:"danger" }}">Confirm</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<div class="row mt-5">
|
||||
<div class="col col-md-6 offset-md-3">
|
||||
<form action="" method="post" class="form">
|
||||
{% csrf_token %}
|
||||
{% for field in form.hidden_fields %}
|
||||
{{ field }}
|
||||
{% endfor %}
|
||||
<div class="card border-danger">
|
||||
<h5 class="card-header">{% block confirmation_title %}{% endblock %}</h5>
|
||||
<div class="card-body">
|
||||
{% block message %}<p>Are you sure?</p>{% endblock %}
|
||||
</div>
|
||||
<div class="card-footer text-end">
|
||||
<button type="submit" name="_confirm" class="btn btn-{{ button_class|default:"danger" }}">Confirm</button>
|
||||
<a href="{{ return_url }}" class="btn btn-outline-dark">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -94,19 +94,19 @@ Context:
|
||||
|
||||
<div class="text-end my-3">
|
||||
{% block buttons %}
|
||||
<a class="btn btn-outline-danger" href="{{ return_url }}">Cancel</a>
|
||||
{% if object.pk %}
|
||||
<button type="submit" name="_update" class="btn btn-primary">
|
||||
Save
|
||||
</button>
|
||||
{% else %}
|
||||
<button type="submit" name="_addanother" class="btn btn-outline-primary">
|
||||
Create & Add Another
|
||||
</button>
|
||||
<button type="submit" name="_create" class="btn btn-primary">
|
||||
Create
|
||||
</button>
|
||||
<button type="submit" name="_addanother" class="btn btn-outline-primary">
|
||||
Create & Add Another
|
||||
</button>
|
||||
{% endif %}
|
||||
<a class="btn btn-outline-danger" href="{{ return_url }}">Cancel</a>
|
||||
{% endblock buttons %}
|
||||
</div>
|
||||
</form>
|
||||
|
@@ -5,19 +5,19 @@
|
||||
{% block title %}{{ obj_type|bettertitle }} Import{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row mb-3">
|
||||
<div class="col col-md-12 col-xl-8 offset-xl-2">
|
||||
<form action="" method="post" class="form form-horizontal">
|
||||
{% csrf_token %}
|
||||
{% render_form form %}
|
||||
<div class="col col-md-12 text-end">
|
||||
{% if return_url %}
|
||||
<a href="{{ return_url }}" class="btn btn-outline-danger">Cancel</a>
|
||||
{% endif %}
|
||||
<button type="submit" name="_addanother" class="btn btn-outline-primary">Submit & Import Another</button>
|
||||
<button type="submit" name="_create" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col col-md-12 col-xl-8 offset-xl-2">
|
||||
<form action="" method="post" class="form form-horizontal">
|
||||
{% csrf_token %}
|
||||
{% render_form form %}
|
||||
<div class="col col-md-12 text-end">
|
||||
<button type="submit" name="_create" class="btn btn-primary">Submit</button>
|
||||
<button type="submit" name="_addanother" class="btn btn-outline-primary">Submit & Import Another</button>
|
||||
{% if return_url %}
|
||||
<a href="{{ return_url }}" class="btn btn-outline-danger">Cancel</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
@@ -55,14 +55,3 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block buttons %}
|
||||
<a href="{{ return_url }}" class="btn btn-outline-danger">Cancel</a>
|
||||
{% if object.pk %}
|
||||
<button type="button" return-url="?return_url={% url 'virtualization:vminterface_edit' pk=object.pk %}" class="btn btn-outline-primary">Save & Continue Editing</button>
|
||||
<button type="submit" name="_update" class="btn btn-primary">Save</button>
|
||||
{% else %}
|
||||
<button type="submit" name="_addanother" class="btn btn-outline-primary">Create & Add Another</button>
|
||||
<button type="submit" name="_create" class="btn btn-primary">Create</button>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user