40 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
{% comment "" %}
 | 
						|
needs following context:
 | 
						|
- stock: Creates a modal with id = change_stock-modal-{{stock.id}}
 | 
						|
- form: EditStockForm
 | 
						|
{% endcomment %}
 | 
						|
{% load crispy_forms_tags %}
 | 
						|
{% load static %}
 | 
						|
<div class="modal fade" id="change-stock-modal-{{stock.id}}">
 | 
						|
    <div class="modal-dialog">
 | 
						|
        <div class="modal-content">
 | 
						|
            <div class="modal-header">
 | 
						|
                <div class="flex-shrink-0">
 | 
						|
                    {% if stock.component.get_resolved_image %}
 | 
						|
                        <img src="{{stock.component.get_resolved_image}}" style="max-width:64px;max-height:64px;" alt="{{ low.component.name }}" class="mr-3">
 | 
						|
                    {% else %}
 | 
						|
                        <img src="{% static 'css/icons/card-image.svg' %}" style="width:64px;max-height:64px;" alt="{{ low.component.name }}" class="mr-3">
 | 
						|
                    {% endif %}
 | 
						|
                </div>
 | 
						|
                <div class="flex-grow-1 ms-3">
 | 
						|
                    <h6 class="mt-0 text-primary">{{ stock.component.name }}</h6>
 | 
						|
                    {% if stock.component.package %}
 | 
						|
                        Package: {{stock.component.package}}<br>
 | 
						|
                    {% endif %}
 | 
						|
                    {% if stock.component.manufacturer %}
 | 
						|
                        Manufacturer: {{stock.component.manufacturer}}
 | 
						|
                    {% endif %}
 | 
						|
                </div>
 | 
						|
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
 | 
						|
            </div>
 | 
						|
            <form action="" method="post">
 | 
						|
                {% csrf_token %}
 | 
						|
                <div class="modal-body">
 | 
						|
                    
 | 
						|
                </div>
 | 
						|
                <div class="modal-footer">
 | 
						|
                </div>
 | 
						|
            </form>
 | 
						|
        </div>
 | 
						|
    </div>
 | 
						|
</div> |