Modal forms fixes

- Update bootstrap classes and terminology
- Visual tweaks to modal form title block
This commit is contained in:
Oliver 2021-10-27 16:26:28 +11:00
parent 1e31774ce7
commit 827ff0f58b
3 changed files with 11 additions and 10 deletions

View File

@ -676,7 +676,10 @@
}
.modal-header {
border-bottom: 1px solid #ddd;
border-bottom: 1px solid #ccc;
background-color: #dcdcdc;
color: #555;
padding: 10px;
}
.modal-footer {
@ -798,8 +801,8 @@ input[type="submit"] {
padding-bottom: 3px;
}
.modal .btn-secondary {
background-color: #5e7d87;
.modal .btn-form-secondary {
margin-bottom: 10px;
}
.inventree-navs {

View File

@ -1296,7 +1296,7 @@ function addSecondaryModal(field, fields, options) {
var html = `
<span style='float: right;'>
<div type='button' class='btn btn-primary btn-secondary' title='${secondary.title || secondary.label}' id='btn-new-${name}'>
<div type='button' class='btn btn-primary btn-secondary btn-form-secondary' title='${secondary.title || secondary.label}' id='btn-new-${name}'>
${secondary.label || secondary.title}
</div>
</span>`;

View File

@ -47,14 +47,12 @@ function createNewModal(options={}) {
<div class='modal-dialog'>
<div class='modal-content'>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label='{% trans "Close" %}'>
<span aria-hidden="true">&times;</span>
</button>
<h3 id='modal-title'>
<h3 id='modal-title' class='modal-title'>
<!-- Form title to be injected here -->
</h3>
<button type='button' class='btn-close' data-bs-dismiss='modal' aria-label='{% trans "Close" %}'></button>
</div>
<div class='modal-form-content-wrapper'>
<div class='modal-body modal-form-content-wrapper'>
<div id='non-field-errors'>
<!-- Form error messages go here -->
</div>
@ -73,7 +71,7 @@ function createNewModal(options={}) {
<div id='modal-footer-buttons'>
<!-- Extra buttons can be inserted here -->
</div>
<button type='button' class='btn btn-default' id='modal-form-close' data-dismiss='modal'>{% trans "Cancel" %}</button>
<button type='button' class='btn btn-secondary' id='modal-form-close' data-bs-dismiss='modal'>{% trans "Cancel" %}</button>
<button type='button' class='btn btn-primary' id='modal-form-submit'>{% trans "Submit" %}</button>
</div>
</div>