mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 05:05:42 +00:00 
			
		
		
		
	Fixed position header + footer for modals
- Fun with CSS! - Header title provided by AJAX data - Footer static - Submit button text can be customized via JSON dat
This commit is contained in:
		| @@ -1,6 +1,18 @@ | ||||
| <div class='modal fade modal-fixed-footer' tabindex='-1' role='dialog' id='modal-form'> | ||||
|     <div class='modal-dialog'> | ||||
|         <div class='modal-content'> | ||||
|             <div class="modal-header"> | ||||
|               <button type="button" class="close" data-dismiss="modal" aria-label="Close"> | ||||
|                 <span aria-hidden="true">×</span> | ||||
|               </button> | ||||
|               <h3 id='modal-title'></h3> | ||||
|             </div> | ||||
|             <div class='modal-form-content'> | ||||
|             </div> | ||||
|             <div class='modal-footer'> | ||||
|                 <button type='button' class='btn btn-default' data-dismiss='modal'>Close</button> | ||||
|                 <button type='button' class='btn btn-primary' id='modal-form-submit'>Submit</button> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
| </div> | ||||
| @@ -1,17 +1,5 @@ | ||||
| <form method="post" action='{{ form_action }}' class='js-modal-form'> | ||||
| <form method="post" action='' class='js-modal-form'> | ||||
|   {% csrf_token %} | ||||
|   <div class="modal-header"> | ||||
|     <button type="button" class="close" data-dismiss="modal" aria-label="Close"> | ||||
|       <span aria-hidden="true">×</span> | ||||
|     </button> | ||||
|     <h4 class="modal-title">{{ form_title }}</h4> | ||||
|   </div> | ||||
|   <div class="modal-body"> | ||||
|       {% load crispy_forms_tags %} | ||||
|       {% crispy form %} | ||||
|   </div> | ||||
|   <div class="modal-footer"> | ||||
|     <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | ||||
|     <button type="submit" class="btn btn-primary">{{ submit_text }}</button> | ||||
|   </div> | ||||
|   {% load crispy_forms_tags %} | ||||
|   {% crispy form %} | ||||
| </form> | ||||
		Reference in New Issue
	
	Block a user