mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
fix object journal styles
This commit is contained in:
@ -377,6 +377,12 @@ class ImageAttachmentForm(BootstrapMixin, forms.ModelForm):
|
||||
|
||||
class JournalEntryForm(BootstrapMixin, forms.ModelForm):
|
||||
|
||||
kind = forms.ChoiceField(
|
||||
choices=add_blank_choice(JournalEntryKindChoices),
|
||||
required=False,
|
||||
widget=StaticSelect2()
|
||||
)
|
||||
|
||||
class Meta:
|
||||
model = JournalEntry
|
||||
fields = ['assigned_object_type', 'assigned_object_id', 'kind', 'comments']
|
||||
|
@ -3,30 +3,30 @@
|
||||
|
||||
{% block title %}{{ block.super }} - Journal{% endblock %}
|
||||
|
||||
{% render_errors form %}
|
||||
|
||||
{% block content %}
|
||||
{% if perms.extras.add_journalentry %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<strong>New Journal Entry</strong>
|
||||
</div>
|
||||
<form action="{% url 'extras:journalentry_add' %}" method="post" enctype="multipart/form-data" class="form form-horizontal">
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<div class="field-group">
|
||||
<h4>New Journal Entry</h4>
|
||||
<form action="{% url 'extras:journalentry_add' %}" method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
{% for field in form.hidden_fields %}
|
||||
{{ field }}
|
||||
{% endfor %}
|
||||
<div class="row panel-body">
|
||||
<div class="col-md-10">
|
||||
{% render_field form.kind %}
|
||||
{% render_field form.comments %}
|
||||
</div>
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<button type="submit" class="btn btn-primary">Save</button>
|
||||
<a href="{{ object.get_absolute_url }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-12 col-md-offset-3 text-end my-3">
|
||||
<a href="{{ object.get_absolute_url }}" class="btn btn-outline-danger">Cancel</a>
|
||||
<button type="submit" class="btn btn-primary">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="col-md-9 col-md-offset-3 mb-3">
|
||||
{% include 'panel_table.html' %}
|
||||
</div>
|
||||
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user