mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
### Fixes: #11582 Not sure if this is the correct fix or not. The reason that the custom field errors were not shown is that messages.html only shows non_field_errors if the form passed to the context is named form. This is probably an issue in more places, but not sure how to make it generic. A change to messages.html would also need to support formsets. Any input appreciated @jeremystretch or @arthanson
25 lines
940 B
HTML
25 lines
940 B
HTML
{% extends 'base/layout.html' %}
|
|
{% load form_helpers %}
|
|
|
|
{% block title %}Add New Member to Virtual Chassis {{ virtual_chassis }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<form action="" method="post" enctype="multipart/form-data" class="form-object-edit">
|
|
{% render_errors membership_form %}
|
|
|
|
{% csrf_token %}
|
|
<div class="card">
|
|
<h5 class="card-header">Add New Member</h5>
|
|
<div class="card-body">
|
|
{% render_form member_select_form %}
|
|
{% render_form membership_form %}
|
|
</div>
|
|
</div>
|
|
<div class="text-end my-3">
|
|
<a href="{{ return_url }}" class="btn btn-outline-danger">Cancel</a>
|
|
<button type="submit" name="_addanother" class="btn btn-outline-primary">Add Another</button>
|
|
<button type="submit" name="_save" class="btn btn-primary">Save</button>
|
|
</div>
|
|
</form>
|
|
{% endblock %}
|