mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	Updated modal forms
This commit is contained in:
		| @@ -719,6 +719,11 @@ function handleModalForm(url, options) { | ||||
|                     } | ||||
|                     // Form was returned, invalid! | ||||
|                     else { | ||||
|  | ||||
|                         var warningDiv = $(modal).find('#form-validation-warning'); | ||||
|  | ||||
|                         warningDiv.css('display', 'block'); | ||||
|  | ||||
|                         if (response.html_form) { | ||||
|                             injectModalForm(modal, response.html_form); | ||||
|  | ||||
|   | ||||
| @@ -1,3 +1,5 @@ | ||||
| {% load i18n %} | ||||
|  | ||||
| <div class='modal fade modal-fixed-footer modal-primary' tabindex='-1' role='dialog' id='modal-form'> | ||||
|     <div class='modal-dialog'> | ||||
|         <div class='modal-content'> | ||||
| @@ -5,13 +7,16 @@ | ||||
|               <button type="button" class="close" data-dismiss="modal" aria-label="Close"> | ||||
|                 <span aria-hidden="true">×</span> | ||||
|               </button> | ||||
|               <h3 id='modal-title'>Form Title Here</h3> | ||||
|               <h3 id='modal-title'><i>Form Title Here</i></h3> | ||||
|             </div> | ||||
|             <div class='alert alert-block alert-danger' id='form-validation-warning' style='display: none;'> | ||||
|               {% trans "Form errors exist" %} | ||||
|             </div> | ||||
|             <div class='modal-form-content'> | ||||
|             </div> | ||||
|             <div class='modal-footer'> | ||||
|                 <button type='button' class='btn btn-default' id='modal-form-close' data-dismiss='modal'>Close</button> | ||||
|                 <button type='button' class='btn btn-primary' id='modal-form-submit'>Submit</button> | ||||
|                 <button type='button' class='btn btn-default' id='modal-form-close' data-dismiss='modal'>{% trans "Close" %}</button> | ||||
|                 <button type='button' class='btn btn-primary' id='modal-form-submit'>{% trans "Submit" %}</button> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
| @@ -24,13 +29,16 @@ | ||||
|                   <button type="button" class="close" data-dismiss="modal" aria-label="Close"> | ||||
|                     <span aria-hidden="true">×</span> | ||||
|                   </button> | ||||
|                   <h3 id='modal-title'>Form Title Here</h3> | ||||
|                   <h3 id='modal-title'><i>Form Title Here</i></h3> | ||||
|                 </div> | ||||
|                 <div class='alert alert-block alert-danger' id='form-validation-warning' style="display: none;"> | ||||
|                   {% trans "Form errors exist" %} | ||||
|                 </div> | ||||
|                 <div class='modal-form-content'> | ||||
|                 </div> | ||||
|                 <div class='modal-footer'> | ||||
|                     <button type='button' class='btn btn-default' id='modal-form-close' data-dismiss='modal'>Close</button> | ||||
|                     <button type='button' class='btn btn-primary' id='modal-form-submit'>Submit</button> | ||||
|                     <button type='button' class='btn btn-default' id='modal-form-close' data-dismiss='modal'>{% trans "Close" %}</button> | ||||
|                     <button type='button' class='btn btn-primary' id='modal-form-submit'>{% trans "Submit" %}</button> | ||||
|                 </div> | ||||
|             </div> | ||||
|         </div> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user