mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
805892f623
* Clean up & comment base templates * Clean up login template & form * Use SVG file for NetBox logo * Simplify breadcrumbs * Merge changelog.html into home.html * Rename title_container block to header * Move breadcrumbs block to object.html * Attach names to endblock template tags * Reorganize root-level templates into base/ and inc/ * Remove obsolete reference to Bootstrap 3.4.1
41 lines
1.4 KiB
HTML
41 lines
1.4 KiB
HTML
{% extends 'base/layout.html' %}
|
|
{% load form_helpers %}
|
|
|
|
{% block title %}Add {{ model_name|title }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<p>{{ table.rows|length }} {{ parent_model_name }} selected</p>
|
|
<form action="." method="post" class="form form-horizontal">
|
|
{% csrf_token %}
|
|
{% if request.POST.return_url %}
|
|
<input type="hidden" name="return_url" value="{{ request.POST.return_url }}" />
|
|
{% endif %}
|
|
{% for field in form.hidden_fields %}
|
|
{{ field }}
|
|
{% endfor %}
|
|
<div class="row">
|
|
<div class="col col-md-7">
|
|
<div class="card">
|
|
{% include 'inc/table.html' %}
|
|
</div>
|
|
</div>
|
|
<div class="col col-md-5">
|
|
<div class="card">
|
|
<h5 class="card-header">{{ model_name|title }} to Add</h5>
|
|
<div class="card-body">
|
|
{% for field in form.visible_fields %}
|
|
{% render_field field %}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
<div class="form-group text-end">
|
|
<div class="col col-md-12">
|
|
<a href="{{ return_url }}" class="btn btn-outline-danger">Cancel</a>
|
|
<button type="submit" name="_create" class="btn btn-primary">Create</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
{% endblock content %}
|