Skip to content

Commit

Permalink
Merge pull request #2539 from cjmayo/fix-lib-html1
Browse files Browse the repository at this point in the history
Fixes for bootstrap4/admin/lib.html
  • Loading branch information
samuelhwilliams authored Oct 14, 2024
2 parents 0a34141 + e76b4e6 commit 7aa279c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion flask_admin/templates/bootstrap4/admin/actions.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% macro dropdown(actions, btn_class='nav-link dropdown-toggle') -%}
<a class="{{ btn_class }}" data-toggle="dropdown" href="javascript:void(0)" role="button" aria-haspopup="true"
aria-expanded="false">{{ _gettext('With selected') }}<b class="caret"></b></a>
aria-expanded="false">{{ _gettext('With selected') }}</a>
<div class="dropdown-menu">
{% for p in actions %}
<a class="dropdown-item" href="javascript:void(0)"
Expand Down
4 changes: 2 additions & 2 deletions flask_admin/templates/bootstrap4/admin/lib.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@
{% set prepend = kwargs.pop('prepend', None) %}
{% set append = kwargs.pop('append', None) %}
<div class="form-group {{ kwargs.get('column_class', '') }}">
<label for="{{ field.id }}" class="control-label {% if field.widget.input_type == 'checkbox' %}d-block mb-0{% endif %}">{{ field.label.text }}
<label for="{{ field.id }}" class="col-form-label {% if field.widget.input_type == 'checkbox' %}d-block mb-0{% endif %}">{{ field.label.text }}
{% if h.is_required_form_field(field) %}
<strong class="text-danger"">&#42;</strong>
<strong class="text-danger">&#42;</strong>
{%- else -%}
&nbsp;
{%- endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{ field }}

{% if h.is_field_error(field.errors) %}
<ul class="help-block input-errors">
<ul class="form-text input-errors">
{% for e in field.errors if e is string %}
<li>{{ e }}</li>
{% endfor %}
Expand Down
6 changes: 3 additions & 3 deletions flask_admin/templates/bootstrap4/admin/model/layout.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% macro filter_options(btn_class='dropdown-toggle') %}
<a class="nav-link {{ btn_class }}" data-toggle="dropdown" href="javascript:void(0)">{{ _gettext('Add Filter') }}<b class="caret"></b></a>
<a class="nav-link {{ btn_class }}" data-toggle="dropdown" href="javascript:void(0)">{{ _gettext('Add Filter') }}</a>
<div class="dropdown-menu field-filters">
{% for k in filter_groups %}
<a href="javascript:void(0)" class="dropdown-item filter" onclick="return false;">{{ k }}</a>
Expand All @@ -11,7 +11,7 @@
{% if admin_view.export_types|length > 1 %}
<li class="dropdown">
<a class="nav-link {{ btn_class }}" data-toggle="dropdown" href="javascript:void(0)" role="button"
aria-haspopup="true" aria-expanded="false">{{ _gettext('Export') }}<b class="caret"></b></a>
aria-haspopup="true" aria-expanded="false">{{ _gettext('Export') }}</a>
<div class="dropdown-menu">
{% for export_type in admin_view.export_types %}
<a class="dropdown-item"
Expand Down Expand Up @@ -99,7 +99,7 @@

{% macro page_size_form(generator, page_size_options, btn_class='nav-link dropdown-toggle') %}
<a class="{{ btn_class }}" data-toggle="dropdown" href="javascript:void(0)">
{{ page_size }} {{ _gettext('items') }}<b class="caret"></b>
{{ page_size }} {{ _gettext('items') }}
</a>
<div class="dropdown-menu">
{% for option in page_size_options %}
Expand Down

0 comments on commit 7aa279c

Please sign in to comment.