mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 05:05:42 +00:00 
			
		
		
		
	Include 'default' value in OPTIONS request for any fields with specified default values
This commit is contained in:
		| @@ -15,10 +15,13 @@ | ||||
|  | ||||
| {% if pagetype == 'manufacturers' and roles.purchase_order.add or pagetype == 'suppliers' and roles.purchase_order.add or pagetype == 'customers' and roles.sales_order.add %} | ||||
| <div id='button-toolbar'> | ||||
|     <button type='button' class="btn btn-success" id='new-company'> | ||||
|         <span class='fas fa-plus-circle'></span> {{ button_text }} (Server Side) | ||||
|     </button> | ||||
|     <button type='button' class="btn btn-success" id='new-company-2'> | ||||
|         <span class='fas fa-plus-circle'></span> {{ button_text }} (Client Side) | ||||
|     </button> | ||||
|     <div class='btn-group'> | ||||
|         <button type='button' class="btn btn-success" id='new-company'> | ||||
|             <span class='fas fa-plus-circle'></span> {{ button_text }} | ||||
|         </button> | ||||
|     </div> | ||||
| </div> | ||||
| {% endif %} | ||||
| @@ -35,6 +38,22 @@ | ||||
|         }); | ||||
|     }); | ||||
|  | ||||
|     $('#new-company-2').click(function() { | ||||
|         constructForm( | ||||
|             '{% url "api-company-list" %}', | ||||
|             { | ||||
|                 method: 'POST', | ||||
|                 fields: [ | ||||
|                     'name', | ||||
|                     'description', | ||||
|                     'is_supplier', | ||||
|                     'is_manufacturer', | ||||
|                     'is_customer', | ||||
|                 ] | ||||
|             } | ||||
|         ); | ||||
|     }); | ||||
|  | ||||
|     loadCompanyTable("#company-table", "{% url 'api-company-list' %}", | ||||
|         { | ||||
|             pagetype: '{{ pagetype }}', | ||||
|   | ||||
		Reference in New Issue
	
	Block a user