mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Create form for setting table preferences
This commit is contained in:
23
netbox/templates/inc/table_config_form.html
Normal file
23
netbox/templates/inc/table_config_form.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{% load form_helpers %}
|
||||
|
||||
<button type="button" class="btn btn-primary btn-xs" data-toggle="modal" data-target="#tableconfig" title="Configure table"><i class="fa fa-cog"></i></button>
|
||||
<div class="modal fade" tabindex="-1" id="tableconfig">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">Table Configuration</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form action="?return_url={{ request.path }}" method="post" class="form-horizontal">
|
||||
{% csrf_token %}
|
||||
{% render_form table_config_form %}
|
||||
<div class="text-right">
|
||||
<input type="submit" class="btn btn-primary" name="set" value="Save" />
|
||||
<input type="submit" class="btn btn-danger" name="clear" value="Clear" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -18,6 +18,9 @@
|
||||
<h1>{% block title %}{{ content_type.model_class|meta:"verbose_name_plural"|bettertitle }}{% endblock %}</h1>
|
||||
<div class="row">
|
||||
<div class="col-md-{% if filter_form %}9{% else %}12{% endif %}">
|
||||
{% if table_config_form %}
|
||||
{% include 'inc/table_config_form.html' %}
|
||||
{% endif %}
|
||||
{% with bulk_edit_url=content_type.model_class|url_name:"bulk_edit" bulk_delete_url=content_type.model_class|url_name:"bulk_delete" %}
|
||||
{% if permissions.change or permissions.delete %}
|
||||
<form method="post" class="form form-horizontal">
|
||||
|
Reference in New Issue
Block a user