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

View File

@ -1296,7 +1296,7 @@ function addSecondaryModal(field, fields, options) {
var html = ` var html = `
<span style='float: right;'> <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} ${secondary.label || secondary.title}
</div> </div>
</span>`; </span>`;

View File

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