Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/aminalaee/sqladmin
Browse files Browse the repository at this point in the history
  • Loading branch information
cemrehancavdar committed Feb 10, 2024
2 parents 7f295be + 054ab10 commit cd8ef53
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions sqladmin/templates/create.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ <h3 class="card-title">New {{ model_view.name }}</h3>
<div class="card-body border-bottom py-3">
<form action="{{ url_for('admin:create', identity=model_view.identity) }}" method="POST"
enctype="multipart/form-data">
<div class="row">
{% if error %}
<div class="alert alert-danger" role="alert">{{ error }}</div>
{% endif %}
</div>
<fieldset class="form-fieldset">
{% for field in form %}
<div class="mb-3 form-group row">
Expand All @@ -26,9 +31,6 @@ <h3 class="card-title">New {{ model_view.name }}</h3>
{% endfor %}
</fieldset>
<div class="row">
{% if error %}
<div class="alert alert-danger" role="alert">{{ error }}</div>
{% endif %}
<div class="col-md-2">
<a href="{{ url_for('admin:list', identity=model_view.identity) }}" class="btn">
Cancel
Expand Down
8 changes: 5 additions & 3 deletions sqladmin/templates/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ <h3 class="card-title">Edit {{ model_view.name }}</h3>
<div class="card-body border-bottom py-3">
<form action="{{ model_view._build_url_for('admin:edit', request, obj) }}" method="POST"
enctype="multipart/form-data">
<div class="row">
{% if error %}
<div class="alert alert-danger" role="alert">{{ error }}</div>
{% endif %}
</div>
<fieldset class="form-fieldset">
{% for field in form %}
<div class="mb-3 form-group row">
Expand All @@ -26,9 +31,6 @@ <h3 class="card-title">Edit {{ model_view.name }}</h3>
{% endfor %}
</fieldset>
<div class="row">
{% if error %}
<div class="alert alert-danger" role="alert">{{ error }}</div>
{% endif %}
<div class="col-md-2">
<a href="{{ url_for('admin:list', identity=model_view.identity) }}" class="btn">
Cancel
Expand Down

0 comments on commit cd8ef53

Please sign in to comment.