Skip to content

Commit

Permalink
added margin around form submission buttons
Browse files Browse the repository at this point in the history
added 1rem of margin-right to the form buttons
  • Loading branch information
mccarthysean committed Jun 3, 2022
1 parent 7055ebd commit b4d40b8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions flask_admin/templates/bootstrap4/admin/lib.html
Original file line number Diff line number Diff line change
Expand Up @@ -211,23 +211,23 @@ <h3>{{ text }}</h3>

{% macro render_form_buttons(cancel_url, extra=None, is_modal=False) %}
{% if is_modal %}
<input type="submit" class="btn btn-primary" value="{{ _gettext('Save') }}" />
<input type="submit" class="btn btn-primary mr-1 mb-1" value="{{ _gettext('Save') }}" />
{% if extra %}
{{ extra }}
{% endif %}
{% if cancel_url %}
<a href="{{ cancel_url }}" class="btn btn-danger" role="button" {% if is_modal %}data-dismiss="modal"{% endif %}>{{ _gettext('Cancel') }}</a>
<a href="{{ cancel_url }}" class="btn btn-danger mr-1 mb-1" role="button" {% if is_modal %}data-dismiss="modal"{% endif %}>{{ _gettext('Cancel') }}</a>
{% endif %}
{% else %}
<hr>
<div class="form-group">
<div class="col-md-offset-2 col-md-10 submit-row">
<input type="submit" class="btn btn-primary" value="{{ _gettext('Save') }}" />
<input type="submit" class="btn btn-primary mr-1 mb-1" value="{{ _gettext('Save') }}" />
{% if extra %}
{{ extra }}
{% endif %}
{% if cancel_url %}
<a href="{{ cancel_url }}" class="btn btn-danger" role="button" {% if is_modal %}data-dismiss="modal"{% endif %}>{{ _gettext('Cancel') }}</a>
<a href="{{ cancel_url }}" class="btn btn-danger mr-1 mb-1" role="button" {% if is_modal %}data-dismiss="modal"{% endif %}>{{ _gettext('Cancel') }}</a>
{% endif %}
</div>
</div>
Expand Down Expand Up @@ -284,9 +284,9 @@ <h3>{{ text }}</h3>

{% macro extra() %}
{% if admin_view.can_create %}
<input name="_add_another" type="submit" class="btn btn-secondary" value="{{ _gettext('Save and Add Another') }}" />
<input name="_add_another" type="submit" class="btn btn-secondary mr-1 mb-1" value="{{ _gettext('Save and Add Another') }}" />
{% endif %}
{% if admin_view.can_edit %}
<input name="_continue_editing" type="submit" class="btn btn-secondary" value="{{ _gettext('Save and Continue Editing') }}" />
<input name="_continue_editing" type="submit" class="btn btn-secondary mr-1 mb-1" value="{{ _gettext('Save and Continue Editing') }}" />
{% endif %}
{% endmacro %}

0 comments on commit b4d40b8

Please sign in to comment.