1
0
mirror of https://github.com/moepman/bk-dss synced 2024-12-22 18:24:27 +01:00

bump and adjust to bootstrap v5

This commit is contained in:
Markus 2024-07-23 17:24:37 +02:00
parent 3e401c6946
commit a8ebf338d2
5 changed files with 16 additions and 16 deletions

2
dss.py
View File

@ -37,7 +37,7 @@ class CreateForm(FlaskForm):
class EditForm(FlaskForm):
user = StringField('Username', render_kw={'readonly': True})
user = StringField('Username', render_kw={'disabled': True})
pwd1 = PasswordField('New Password', validators=[DataRequired()])
pwd2 = PasswordField('New Password (repeat)', validators=[DataRequired(), EqualTo('pwd1', "Passwords must match")])
submit = SubmitField('Submit')

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2,7 +2,6 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="/static/css/bootstrap.min.css" type="text/css" rel="stylesheet">
<link href="/static/css/style.css" type="text/css" rel="stylesheet">

View File

@ -1,7 +1,8 @@
{% macro render_field(field) %}
<div class="form-group row mb-3">
<div class="row mb-3">
{{ field.label(class_="col-form-label col-sm-3 text-right") }}
{% if field.errors %}{% set class_extras = " is-invalid" %}{% else %}{% set class_extras = "" %}{% endif %}
{% if field.type == "SelectField" %}{% set class_extras = class_extras + " form-select" %}{% endif %}
<div class="col-sm-5">{{ field(class_="form-control" + class_extras) }}
{% if field.errors %}
<div class="invalid-feedback">
@ -10,9 +11,10 @@
{% endfor %}
</div>
{% endif %}
</div></div>
</div>
</div>
{%- endmacro %}
{% macro render_button(button) %}
<div class="form-group row"><div class="offset-sm-3 col-sm-5">{{ button(class_="btn btn-primary") }}</div></div>
<div class="row"><div class="offset-sm-3 col-sm-5">{{ button(class_="btn btn-primary") }}</div></div>
{%- endmacro %}