diff --git a/netbox/templates/account/base.html b/netbox/templates/account/base.html index 6c1e9f028..124b70414 100644 --- a/netbox/templates/account/base.html +++ b/netbox/templates/account/base.html @@ -23,8 +23,3 @@ {% endblock %} -{% block content-wrapper %} -
- {% block content %}{% endblock %} -
-{% endblock %} diff --git a/netbox/templates/base/layout.html b/netbox/templates/base/layout.html index 409146f91..6eadb0b55 100644 --- a/netbox/templates/base/layout.html +++ b/netbox/templates/base/layout.html @@ -171,17 +171,13 @@ Blocks: {# /Page header #} - {# Page body #} {% block page %}
{# Page content #} - {# TODO: Remove content-wrapper block #} - {% block content-wrapper %} - {% block content %}{% endblock %} - {% endblock %} + {% block content %}{% endblock %} {# /Page content #} {# Bottom banner #} diff --git a/netbox/templates/dcim/connections_list.html b/netbox/templates/dcim/connections_list.html index c0122e7ee..83388982f 100644 --- a/netbox/templates/dcim/connections_list.html +++ b/netbox/templates/dcim/connections_list.html @@ -5,8 +5,7 @@ {% block title %}{{ title }}{% endblock %} -{% block content-wrapper %} -
+{% block content %} {# Connections list #}
@@ -25,5 +24,4 @@
{% endif %} -
-{% endblock content-wrapper %} +{% endblock content %} diff --git a/netbox/templates/dcim/rack_elevation_list.html b/netbox/templates/dcim/rack_elevation_list.html index 4cff6f68a..b9a7f160a 100644 --- a/netbox/templates/dcim/rack_elevation_list.html +++ b/netbox/templates/dcim/rack_elevation_list.html @@ -36,56 +36,54 @@
{% endblock %} -{% block content-wrapper %} -
+{% block content %} - {% if filter_form %} - {% applied_filters model filter_form request.GET %} + {% if filter_form %} + {% applied_filters model filter_form request.GET %} + {% endif %} + + {# Rack elevations #} +
+ {% if page %} +
+ {% for rack in page %} +
+
+
+ {{ rack.name }} + {% if rack.role %} +
{{ rack.role }} + {% endif %} + {% if rack.facility_id %} +
{{ rack.facility_id }} + {% endif %} +
+ {% include 'dcim/inc/rack_elevation.html' with object=rack face=rack_face %} +
+
+ {{ rack.name }} + {% if rack.facility_id %} + ({{ rack.facility_id }}) + {% endif %} +
+
+
+ {% endfor %} +
+
+ {% include 'inc/paginator.html' %} + {% else %} +

{% trans "No Racks Found" %}

{% endif %} - - {# Rack elevations #} -
- {% if page %} -
- {% for rack in page %} -
-
-
- {{ rack.name }} - {% if rack.role %} -
{{ rack.role }} - {% endif %} - {% if rack.facility_id %} -
{{ rack.facility_id }} - {% endif %} -
- {% include 'dcim/inc/rack_elevation.html' with object=rack face=rack_face %} -
-
- {{ rack.name }} - {% if rack.facility_id %} - ({{ rack.facility_id }}) - {% endif %} -
-
-
- {% endfor %} -
-
- {% include 'inc/paginator.html' %} - {% else %} -

{% trans "No Racks Found" %}

- {% endif %} -
- - {# Filter form #} - {% if filter_form %} -
- {% include 'inc/filter_list.html' %} -
- {% endif %} -
-{% endblock content-wrapper %} + + {# Filter form #} + {% if filter_form %} +
+ {% include 'inc/filter_list.html' %} +
+ {% endif %} + +{% endblock content %} {% block modals %}{% endblock %} diff --git a/netbox/templates/dcim/virtualchassis_edit.html b/netbox/templates/dcim/virtualchassis_edit.html index 5aff4a4cd..7271ce7d8 100644 --- a/netbox/templates/dcim/virtualchassis_edit.html +++ b/netbox/templates/dcim/virtualchassis_edit.html @@ -9,106 +9,104 @@ {% endblocktrans %} {% endblock %} -{% block content-wrapper %} -
-
-
- {% for form in formset %} - {% render_errors form %} - {% endfor %} +{% block content %} +
+ + {% for form in formset %} + {% render_errors form %} + {% endfor %} - {% csrf_token %} - {{ pk_form.pk }} - {{ formset.management_form }} -
-
-
{% trans "Virtual Chassis" %}
-
- {% render_field vc_form.name %} - {% render_field vc_form.domain %} - {% render_field vc_form.description %} - {% render_field vc_form.master %} - {% render_field vc_form.tags %} + {% csrf_token %} + {{ pk_form.pk }} + {{ formset.management_form }} +
+
+
{% trans "Virtual Chassis" %}
+ {% render_field vc_form.name %} + {% render_field vc_form.domain %} + {% render_field vc_form.description %} + {% render_field vc_form.master %} + {% render_field vc_form.tags %} +
-
- {% render_field vc_form.comments %} -
- - {% if vc_form.custom_fields %} -
-
-
{% trans "Custom Fields" %}
-
- {% render_custom_fields vc_form %} -
- {% endif %} +
+ {% render_field vc_form.comments %} +
+ {% if vc_form.custom_fields %}
-
{% trans "Members" %}
- - - - - - - - - - - - - - {% for form in formset %} - {% for field in form.hidden_fields %} - {{ field }} - {% endfor %} - {% with device=form.instance virtual_chassis=vc_form.instance %} - - - - - - - - - - {% endwith %} - {% endfor %} - -
{% trans "Device" %}{% trans "ID" %}{% trans "Rack/Unit" %}{% trans "Serial" %}{% trans "Position" %}{% trans "Priority" %}
{{ device|linkify }}{{ device.pk }} - {% if device.rack %} - {{ device.rack }} / {{ device.position|floatformat }} - {% else %} - {{ ''|placeholder }} - {% endif %} - {{ device.serial|placeholder }} - {{ form.vc_position }} - {% if form.vc_position.errors %} -
{{ form.vc_position.errors.0 }} - {% endif %} -
- {{ form.vc_priority }} - {% if form.vc_priority.errors %} -
{{ form.vc_priority.errors.0 }} - {% endif %} -
- {% if virtual_chassis.pk %} - - - - {% endif %} -
+
+
{% trans "Custom Fields" %}
+
+ {% render_custom_fields vc_form %}
-
- {% trans "Cancel" %} - {% if vc_form.instance.pk %} - - {% else %} - - {% endif %} -
- -
+ {% endif %} + +
+
{% trans "Members" %}
+ + + + + + + + + + + + + + {% for form in formset %} + {% for field in form.hidden_fields %} + {{ field }} + {% endfor %} + {% with device=form.instance virtual_chassis=vc_form.instance %} + + + + + + + + + + {% endwith %} + {% endfor %} + +
{% trans "Device" %}{% trans "ID" %}{% trans "Rack/Unit" %}{% trans "Serial" %}{% trans "Position" %}{% trans "Priority" %}
{{ device|linkify }}{{ device.pk }} + {% if device.rack %} + {{ device.rack }} / {{ device.position|floatformat }} + {% else %} + {{ ''|placeholder }} + {% endif %} + {{ device.serial|placeholder }} + {{ form.vc_position }} + {% if form.vc_position.errors %} +
{{ form.vc_position.errors.0 }} + {% endif %} +
+ {{ form.vc_priority }} + {% if form.vc_priority.errors %} +
{{ form.vc_priority.errors.0 }} + {% endif %} +
+ {% if virtual_chassis.pk %} + + + + {% endif %} +
+
+
+ {% trans "Cancel" %} + {% if vc_form.instance.pk %} + + {% else %} + + {% endif %} +
+
-{% endblock %} +{% endblock content %} diff --git a/netbox/templates/extras/objectchange_list.html b/netbox/templates/extras/objectchange_list.html index b1bbc27b4..ef11c0ef1 100644 --- a/netbox/templates/extras/objectchange_list.html +++ b/netbox/templates/extras/objectchange_list.html @@ -3,9 +3,9 @@ {% block title %}{% trans "Change Log" %}{% endblock %} -{% block content-wrapper %} +{% block content %} {{ block.super }}
{% trans "Change log retention" %}: {% if config.CHANGELOG_RETENTION %}{{ config.CHANGELOG_RETENTION }} {% trans "days" %}{% else %}{% trans "Indefinite" %}{% endif %}
-{% endblock %} +{% endblock content %} diff --git a/netbox/templates/extras/report_list.html b/netbox/templates/extras/report_list.html index d8a4b7d2d..062d044e1 100644 --- a/netbox/templates/extras/report_list.html +++ b/netbox/templates/extras/report_list.html @@ -23,113 +23,111 @@
{% endblock controls %} -{% block content-wrapper %} -
- {% for module in report_modules %} -
-
- {% if perms.extras.delete_reportmodule %} - - {% endif %} - {{ module }} -
-
- {% include 'inc/sync_warning.html' with object=module %} - {% if module.reports %} - - - - - - - - - - - - {% with jobs=module.get_latest_jobs %} - {% for report_name, report in module.reports.items %} - {% with last_job=jobs|get_key:report.class_name %} - +{% block content %} + {% for module in report_modules %} +
+
+ {% if perms.extras.delete_reportmodule %} + + {% endif %} + {{ module }} +
+
+ {% include 'inc/sync_warning.html' with object=module %} + {% if module.reports %} +
{% trans "Name" %}{% trans "Description" %}{% trans "Last Run" %}{% trans "Status" %}
+ + + + + + + + + + + {% with jobs=module.get_latest_jobs %} + {% for report_name, report in module.reports.items %} + {% with last_job=jobs|get_key:report.class_name %} + + + + {% if last_job %} - - {% if last_job %} - - - {% else %} - - - {% endif %} + {% else %} + + + {% endif %} + + + {% for method, stats in last_job.data.items %} + + + - {% for method, stats in last_job.data.items %} - - - - - {% endfor %} - {% endwith %} - {% endfor %} - {% endwith %} - -
{% trans "Name" %}{% trans "Description" %}{% trans "Last Run" %}{% trans "Status" %}
+ {{ report.name }} + {{ report.description|markdown|placeholder }} - {{ report.name }} + {{ last_job.created|annotated_date }} {{ report.description|markdown|placeholder }} - {{ last_job.created|annotated_date }} - - {% badge last_job.get_status_display last_job.get_status_color %} - {% trans "Never" %} - {% if report.is_valid %} - {{ ''|placeholder }} - {% else %} - - {% trans "Invalid" %} - - {% endif %} - - {% if perms.extras.run_report and report.is_valid %} -
-
- {% csrf_token %} - -
-
+ {% badge last_job.get_status_display last_job.get_status_color %} +
{% trans "Never" %} + {% if report.is_valid %} + {{ ''|placeholder }} + {% else %} + + {% trans "Invalid" %} + {% endif %} + {% if perms.extras.run_report and report.is_valid %} +
+
+ {% csrf_token %} + +
+
+ {% endif %} +
+ {{ method }} + + {{ stats.success }} + {{ stats.info }} + {{ stats.warning }} + {{ stats.failure }} +
- {{ method }} - - {{ stats.success }} - {{ stats.info }} - {{ stats.warning }} - {{ stats.failure }} -
- {% else %} - - {% endif %} -
-
- {% empty %} - - {% endfor %} -
-{% endblock content-wrapper %} +
+ {% empty %} + + {% endfor %} +{% endblock content %} diff --git a/netbox/templates/extras/report_result.html b/netbox/templates/extras/report_result.html index f6a9a6398..348f8a55b 100644 --- a/netbox/templates/extras/report_result.html +++ b/netbox/templates/extras/report_result.html @@ -2,13 +2,13 @@ {% load buttons %} {% load perms %} -{% block content-wrapper %} -
+{% block content %} +
{% include 'extras/htmx/report_result.html' %}
-{% endblock %} +{% endblock content %} {% block controls %}
diff --git a/netbox/templates/extras/script_list.html b/netbox/templates/extras/script_list.html index e90562f0f..ca113327d 100644 --- a/netbox/templates/extras/script_list.html +++ b/netbox/templates/extras/script_list.html @@ -22,80 +22,78 @@ {% endblock tabs %} -{% block content-wrapper %} -
- {% for module in script_modules %} -
-
- {% if perms.extras.delete_scriptmodule %} - - {% endif %} - {{ module }} -
-
- {% include 'inc/sync_warning.html' with object=module %} - {% if not module.scripts %} - - {% else %} - - - - - - - - - - - {% with jobs=module.get_latest_jobs %} - {% for script_name, script_class in module.scripts.items %} - - - - {% with last_result=jobs|get_key:script_class.class_name %} - {% if last_result %} - - - {% else %} - - - {% endif %} - {% endwith %} - - {% endfor %} - {% endwith %} - -
{% trans "Name" %}{% trans "Description" %}{% trans "Last Run" %}{% trans "Status" %}
- {{ script_class.name }} - - {{ script_class.Meta.description|markdown|placeholder }} - - {{ last_result.created|annotated_date }} - - {% badge last_result.get_status_display last_result.get_status_color %} - {% trans "Never" %}{{ ''|placeholder }}
- {% endif %} -
-
- {% empty %} -
-

{% trans "No Scripts Found" %}

- {% if perms.extras.add_scriptmodule %} - {% url 'extras:scriptmodule_add' as create_script_url %} - {% blocktrans trimmed %} - Get started by creating a script from an uploaded file or data source. - {% endblocktrans %} +{% block content %} + {% for module in script_modules %} +
+
+ {% if perms.extras.delete_scriptmodule %} + + {% endif %} + {{ module }} +
+
+ {% include 'inc/sync_warning.html' with object=module %} + {% if not module.scripts %} + + {% else %} + + + + + + + + + + + {% with jobs=module.get_latest_jobs %} + {% for script_name, script_class in module.scripts.items %} + + + + {% with last_result=jobs|get_key:script_class.class_name %} + {% if last_result %} + + + {% else %} + + + {% endif %} + {% endwith %} + + {% endfor %} + {% endwith %} + +
{% trans "Name" %}{% trans "Description" %}{% trans "Last Run" %}{% trans "Status" %}
+ {{ script_class.name }} + + {{ script_class.Meta.description|markdown|placeholder }} + + {{ last_result.created|annotated_date }} + + {% badge last_result.get_status_display last_result.get_status_color %} + {% trans "Never" %}{{ ''|placeholder }}
{% endif %}
- {% endfor %} -
-{% endblock content-wrapper %} +
+ {% empty %} +
+

{% trans "No Scripts Found" %}

+ {% if perms.extras.add_scriptmodule %} + {% url 'extras:scriptmodule_add' as create_script_url %} + {% blocktrans trimmed %} + Get started by creating a script from an uploaded file or data source. + {% endblocktrans %} + {% endif %} +
+ {% endfor %} +{% endblock content %} diff --git a/netbox/templates/extras/script_result.html b/netbox/templates/extras/script_result.html index eada3d364..5773b7b15 100644 --- a/netbox/templates/extras/script_result.html +++ b/netbox/templates/extras/script_result.html @@ -36,7 +36,7 @@
{% endblock controls %} -{% block content-wrapper %} +{% block tabs %} -
-
-
-
- {% include 'extras/htmx/script_result.html' %} -
+{% endblock %} + +{% block content %} +
+
+
+ {% include 'extras/htmx/script_result.html' %}
-
-

{{ script.filename }}

-
{{ script.source }}
-
-{% endblock content-wrapper %} +
+

{{ script.filename }}

+
{{ script.source }}
+
+{% endblock content %} {% block modals %} {% include 'inc/htmx_modal.html' %} diff --git a/netbox/templates/generic/bulk_add_component.html b/netbox/templates/generic/bulk_add_component.html index 5f0979f3b..6482496d7 100644 --- a/netbox/templates/generic/bulk_add_component.html +++ b/netbox/templates/generic/bulk_add_component.html @@ -24,53 +24,49 @@ {% endblock %} -{% block content-wrapper %} -
- {% block content %} +{% block content %} - {# Component creation form #} -
-
+ {# Component creation form #} +
+ - {% csrf_token %} - {% if request.POST.return_url %} - - {% endif %} - {% for field in form.hidden_fields %} - {{ field }} - {% endfor %} + {% csrf_token %} + {% if request.POST.return_url %} + + {% endif %} + {% for field in form.hidden_fields %} + {{ field }} + {% endfor %} -
-
-
-
{{ model_name|title }} {% trans "to Add" %}
-
- {% for field in form.visible_fields %} - {% render_field field %} - {% endfor %} -
-
-
-
- {% trans "Cancel" %} - -
-
+
+
+
+
{{ model_name|title }} {% trans "to Add" %}
+
+ {% for field in form.visible_fields %} + {% render_field field %} + {% endfor %}
- - -
- - {# Selected objects list #} -
-
-
- {% render_table table 'inc/table.html' %} +
+
+ {% trans "Cancel" %} + +
- {% endblock %} +
-{% endblock %} + + {# Selected objects list #} +
+
+
+ {% render_table table 'inc/table.html' %} +
+
+
+ +{% endblock content %} diff --git a/netbox/templates/generic/bulk_edit.html b/netbox/templates/generic/bulk_edit.html index 486bd0e4f..5505218ef 100644 --- a/netbox/templates/generic/bulk_edit.html +++ b/netbox/templates/generic/bulk_edit.html @@ -32,105 +32,101 @@ Context: {% endblock tabs %} -{% block content-wrapper %} -
- {% block content %} +{% block content %} - {# Edit form #} -
-
+ {# Edit form #} +
+ - {% csrf_token %} - {% if request.POST.return_url %} - - {% endif %} - {% for field in form.hidden_fields %} - {{ field }} - {% endfor %} + {% csrf_token %} + {% if request.POST.return_url %} + + {% endif %} + {% for field in form.hidden_fields %} + {{ field }} + {% endfor %} - {% if form.fieldsets %} + {% if form.fieldsets %} - {# Render grouped fields according to declared fieldsets #} - {% for group, fields in form.fieldsets %} -
-
-
- {% if group %}{{ group }}{% else %}{{ model|meta:"verbose_name"|bettertitle }}{% endif %} -
-
- {% for name in fields %} - {% with field=form|getfield:name %} - {% if field.name in form.nullable_fields %} - {% render_field field bulk_nullable=True %} - {% else %} - {% render_field field %} - {% endif %} - {% endwith %} - {% endfor %} -
+ {# Render grouped fields according to declared fieldsets #} + {% for group, fields in form.fieldsets %} +
+
+
+ {% if group %}{{ group }}{% else %}{{ model|meta:"verbose_name"|bettertitle }}{% endif %} +
+
+ {% for name in fields %} + {% with field=form|getfield:name %} + {% if field.name in form.nullable_fields %} + {% render_field field bulk_nullable=True %} + {% else %} + {% render_field field %} + {% endif %} + {% endwith %} {% endfor %} +
+ {% endfor %} - {# Render tag add/remove fields #} - {% if form.add_tags and form.remove_tags %} -
-
-
{% trans "Tags" %}
-
- {% render_field form.add_tags %} - {% render_field form.remove_tags %} -
- {% endif %} + {# Render tag add/remove fields #} + {% if form.add_tags and form.remove_tags %} +
+
+
{% trans "Tags" %}
+
+ {% render_field form.add_tags %} + {% render_field form.remove_tags %} +
+ {% endif %} - {# Render custom fields #} - {% if form.custom_fields %} -
-
-
{% trans "Custom Fields" %}
-
- {% render_custom_fields form %} -
- {% endif %} + {# Render custom fields #} + {% if form.custom_fields %} +
+
+
{% trans "Custom Fields" %}
+
+ {% render_custom_fields form %} +
+ {% endif %} - {# Render comments #} - {% if form.comments %} -
-
-
{% trans "Comments" %}
-
- {% render_field form.comments bulk_nullable=True %} -
- {% endif %} + {# Render comments #} + {% if form.comments %} +
+
+
{% trans "Comments" %}
+
+ {% render_field form.comments bulk_nullable=True %} +
+ {% endif %} + {% else %} + + {# Render all fields #} + {% for field in form.visible_fields %} + {% if field.name in form.nullable_fields %} + {% render_field field bulk_nullable=True %} {% else %} - - {# Render all fields #} - {% for field in form.visible_fields %} - {% if field.name in form.nullable_fields %} - {% render_field field bulk_nullable=True %} - {% else %} - {% render_field field %} - {% endif %} - {% endfor %} - + {% render_field field %} {% endif %} + {% endfor %} -
- - {% trans "Cancel" %} -
+ {% endif %} - +
+ + {% trans "Cancel" %}
- {# Selected objects list #} -
-
-
- {% render_table table 'inc/table.html' %} -
-
-
- - {% endblock content %} +
-{% endblock content-wrapper %} + + {# Selected objects list #} +
+
+
+ {% render_table table 'inc/table.html' %} +
+
+
+ +{% endblock content %} diff --git a/netbox/templates/generic/bulk_import.html b/netbox/templates/generic/bulk_import.html index 2fc5d0a14..a5825ca97 100644 --- a/netbox/templates/generic/bulk_import.html +++ b/netbox/templates/generic/bulk_import.html @@ -33,44 +33,21 @@ Context: {% endblock tabs %} -{% block content-wrapper %} -
+{% block content %} - {# Data Import Form #} -
-
-
-
- {% csrf_token %} - - {% render_field form.data %} - {% render_field form.format %} - {% render_field form.csv_delimiter %} -
-
- - {% if return_url %} - {% trans "Cancel" %} - {% endif %} -
-
-
-
-
-
- - {# File Upload Form #} -
+ {# Data Import Form #} +
+
{% csrf_token %} - - {% render_field form.upload_file %} + + {% render_field form.data %} {% render_field form.format %} {% render_field form.csv_delimiter %}
- + {% if return_url %} {% trans "Cancel" %} {% endif %} @@ -79,130 +56,151 @@ Context:
- - {# DataFile Form #} -
-
-
- {% csrf_token %} - - {% render_field form.data_source %} - {% render_field form.data_file %} - {% render_field form.format %} - {% render_field form.csv_delimiter %} -
-
- - {% if return_url %} - {% trans "Cancel" %} - {% endif %} -
-
-
-
-
- - {% if fields %} -
-
-
-
- {% trans "Field Options" %} -
-
- - - - - - - - {% for name, field in fields.items %} - - - - - - - {% endfor %} -
{% trans "Field" %}{% trans "Required" %}{% trans "Accessor" %}{% trans "Description" %}
- {% if field.required %}{% endif %}{{ name }}{% if field.required %}{% endif %} - - {% if field.required %} - {% checkmark True true="Required" %} - {% else %} - {{ ''|placeholder }} - {% endif %} - - {% if field.to_field_name %} - {{ field.to_field_name }} - {% else %} - {{ ''|placeholder }} - {% endif %} - - {% if field.STATIC_CHOICES %} - - - {% endif %} - {% if field.help_text %} - {{ field.help_text }}
- {% elif field.label %} - {{ field.label }}
- {% endif %} - {% if field|widget_type == 'dateinput' %} - {% trans "Format: YYYY-MM-DD" %} - {% elif field|widget_type == 'checkboxinput' %} - {% trans "Specify true or false" %} - {% endif %} -
-
-
-
-
-

- - {% blocktrans trimmed %} - Required fields must be specified for all objects. - {% endblocktrans %} -

-

- - {% blocktrans trimmed with example="vrf.rd" %} - Related objects may be referenced by any unique attribute. For example, {{ example }} would identify a VRF by its route distinguisher. - {% endblocktrans %} -

- {% endif %} -
-{% endblock content-wrapper %} + + {# File Upload Form #} +
+
+
+ {% csrf_token %} + + {% render_field form.upload_file %} + {% render_field form.format %} + {% render_field form.csv_delimiter %} +
+
+ + {% if return_url %} + {% trans "Cancel" %} + {% endif %} +
+
+
+
+
+ + {# DataFile Form #} +
+
+
+ {% csrf_token %} + + {% render_field form.data_source %} + {% render_field form.data_file %} + {% render_field form.format %} + {% render_field form.csv_delimiter %} +
+
+ + {% if return_url %} + {% trans "Cancel" %} + {% endif %} +
+
+
+
+
+ + {% if fields %} +
+
+
+
+ {% trans "Field Options" %} +
+
+ + + + + + + + {% for name, field in fields.items %} + + + + + + + {% endfor %} +
{% trans "Field" %}{% trans "Required" %}{% trans "Accessor" %}{% trans "Description" %}
+ {% if field.required %}{% endif %}{{ name }}{% if field.required %}{% endif %} + + {% if field.required %} + {% checkmark True true="Required" %} + {% else %} + {{ ''|placeholder }} + {% endif %} + + {% if field.to_field_name %} + {{ field.to_field_name }} + {% else %} + {{ ''|placeholder }} + {% endif %} + + {% if field.STATIC_CHOICES %} + + + {% endif %} + {% if field.help_text %} + {{ field.help_text }}
+ {% elif field.label %} + {{ field.label }}
+ {% endif %} + {% if field|widget_type == 'dateinput' %} + {% trans "Format: YYYY-MM-DD" %} + {% elif field|widget_type == 'checkboxinput' %} + {% trans "Specify true or false" %} + {% endif %} +
+
+
+
+
+

+ + {% blocktrans trimmed %} + Required fields must be specified for all objects. + {% endblocktrans %} +

+

+ + {% blocktrans trimmed with example="vrf.rd" %} + Related objects may be referenced by any unique attribute. For example, {{ example }} would identify a VRF by its route distinguisher. + {% endblocktrans %} +

+ {% endif %} + +{% endblock content %} diff --git a/netbox/templates/generic/object_edit.html b/netbox/templates/generic/object_edit.html index 360435dd0..ecc24121c 100644 --- a/netbox/templates/generic/object_edit.html +++ b/netbox/templates/generic/object_edit.html @@ -45,46 +45,43 @@ Context: {% endblock tabs %} -{% block content-wrapper %} -
-
+{% block content %} +
- {# Warn about missing prerequisite objects #} - {% if prerequisite_model %} - {% include 'inc/missing_prerequisites.html' %} - {% endif %} + {# Warn about missing prerequisite objects #} + {% if prerequisite_model %} + {% include 'inc/missing_prerequisites.html' %} + {% endif %} -
- {% csrf_token %} + + {% csrf_token %} -
- {% block form %} - {% include 'htmx/form.html' %} - {% endblock form %} -
+
+ {% block form %} + {% include 'htmx/form.html' %} + {% endblock form %} +
-
- {% block buttons %} - {% trans "Cancel" %} - {% if object.pk %} - - {% else %} - - - {% endif %} - {% endblock buttons %} -
-
-
+
+ {% block buttons %} + {% trans "Cancel" %} + {% if object.pk %} + + {% else %} + + + {% endif %} + {% endblock buttons %} +
+
- -{% endblock content-wrapper %} +{% endblock content %} {% block modals %} {% include 'inc/htmx_modal.html' with size='lg' %}