now using wtforms for fields, formatting is still not right with bootstrap4, but it will have to do
This commit is contained in:
@@ -6,37 +6,32 @@
|
|||||||
|
|
||||||
<!-- Bootstrap CSS -->
|
<!-- Bootstrap CSS -->
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
|
||||||
<script src="https://kit.fontawesome.com/9b4c7cf470.js" crossorigin="anonymous"></script>
|
|
||||||
|
{% import "bootstrap/wtf.html" as wtf %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h3><center>Author</center></h3>
|
<h3><center>Author</center></h3>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
<right>
|
||||||
{% if message|length %}
|
{% if message|length %}
|
||||||
<div class="row alert alert-success">
|
<div class="row alert alert-success">
|
||||||
{{message}}
|
{{message}}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="row with-margin">
|
<div class="row">
|
||||||
<form class="form col-lg-12" action="" method="POST">
|
<form class="form form-inline col-xl-12" action="" method="POST">
|
||||||
<input type="hidden" name="author.id" id="author.id" value="{{author.id}}">
|
{{ wtf.form_field( author_form.id, form_type='inline' ) }}
|
||||||
<div class="input-group input-group-lg">
|
<div class="col-xl-12">
|
||||||
<label for="{{author.firstnames}}" class="col-lg-2 col-form-label">Firstnames:</label>
|
{{ wtf.form_field( author_form.firstnames, form_type='horizontal', horizontal_columns=('xl', 2, 10), style="width:100%" ) }}
|
||||||
<div class="col-lg-10">
|
</div>
|
||||||
<input type="text" class="form-control input-lg" name="author.firstnames" id="author.firstnames" value="{{author.firstnames}}">
|
<div class="col-xl-12">
|
||||||
</div class="col-lg-10">
|
{{ wtf.form_field( author_form.surname, form_type='horizontal', horizontal_columns=('xl', 2, 10), style="width:100%" ) }}
|
||||||
</div class="input-group">
|
</div>
|
||||||
<div class="input-group input-group-lg">
|
<div class="col-xl-12">
|
||||||
<label for="{{author.surname}}" class="col-lg-2 col-form-label">Surname:</label>
|
<br></br>
|
||||||
<div class="col-lg-10">
|
</div>
|
||||||
<input type="text" class="form-control" name="author.surname" id="author.surname" value="{{author.surname}}">
|
{{ wtf.form_field( author_form.submit, button_map={'submit':'primary'}, horizontal_columns=('xl', 2, 10), class="btn btn-primary offset-xl-1 col-xl-2" )}}
|
||||||
</div class="col-lg-10">
|
|
||||||
</div class="input-group">
|
|
||||||
<div class="input-group input-group-lg">
|
|
||||||
<div class="col-lg-2">
|
|
||||||
<input class="btn btn-primary" type="submit" id="save" value="Save">
|
|
||||||
</div class="col-lg-2">
|
|
||||||
</div class="input-group input-group-lg">
|
|
||||||
</form>
|
</form>
|
||||||
</div class="row">
|
</div class="row">
|
||||||
</div class="container">
|
</div class="container">
|
||||||
|
|||||||
Reference in New Issue
Block a user