base_edit.html
42 lines
| 1.2 KiB
| text/html
|
HtmlDjangoLexer
|
r89 | {% extends "base.html" %} | ||
r338 | {% load bootstrap4 %} | |||
|
r89 | {% load static %} | ||
{% load main_tags %} | ||||
{% block content-title %}{{title}}{% endblock %} | ||||
{% block content-suptitle %}{{suptitle}}{% endblock %} | ||||
{% block content %} | ||||
{% if form.is_multipart %} | ||||
<form class="form" enctype="multipart/form-data" method="post" action="{{action}}"> | ||||
{% else %} | ||||
<form class="form" method="post" action="{{action}}"> | ||||
{% endif %} | ||||
{% csrf_token %} | ||||
|
r340 | |||
{% if device_dds == 'dds_rest' %} | ||||
{% block dds_rest%} | ||||
{% endblock %} | ||||
{% else %} | ||||
{% bootstrap_form form layout='horizontal' size='medium' %} | ||||
{% endif %} | ||||
|
r89 | <div style="clear: both;"></div> | ||
<br> | ||||
{% if extra_button %} | ||||
<div class="pull-left"> | ||||
r338 | <button type="button" class="btn btn-primary" id="bt_{{extra_button}}">{{extra_button}}</button> | |||
|
r89 | </div> | ||
{% endif %} | ||||
{% if button %} | ||||
<div class="pull-right"> | ||||
|
r96 | <button type="button" class="btn btn-primary" onclick="{% if previous %}window.location.replace('{{ previous }}');{% else %}history.go(-1);{% endif %}">{% if cancel %}{{cancel}}{% else %}Cancel{% endif %}</button> | ||
|
r89 | <button type="submit" class="btn btn-primary">{{button}}</button> | ||
</div> | ||||
{% endif %} | ||||
|
r340 | </form> | ||
|
r89 | {% endblock %} | ||
{% block sidebar%} | ||||
{% include "sidebar_devices.html" %} | ||||
{% endblock %} | ||||