added option to change storages
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
{% load static %}
|
||||
{% load crispy_forms_tags %}
|
||||
<div class="modal fade" id="change-modal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Change Storage</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
<div class="modal-body">
|
||||
{{form|crispy}}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
<input type="submit" class="btn btn-primary" value="Change Storage" name="submit-change-storage">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -27,6 +27,7 @@
|
||||
{% endif %}
|
||||
<button type="button" class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#delete-storage-modal">Delete</button>
|
||||
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#add-sub-modal"><i class="bi bi-plus-circle"></i></button>
|
||||
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#change-modal"><i class="bi bi-pen-fill"></i></button>
|
||||
</h1>
|
||||
<div class="list-group">
|
||||
{% for storage in storages %}
|
||||
@@ -109,11 +110,11 @@
|
||||
{% endfor %}
|
||||
<!-- Modal for adding a substorage-->
|
||||
{% with add_storage_form as form %}
|
||||
{% include 'parts/modals/substorage-modal.html' %}
|
||||
{% include 'parts/modals/add-substorage-modal.html' %}
|
||||
{% endwith %}
|
||||
<!-- Modal to change current storag-->
|
||||
{% with change_storage_form as form %}
|
||||
{% include 'parts/modals/substorage-modal.html' %}
|
||||
{% include 'parts/modals/change-storage-modal.html' %}
|
||||
{% endwith %}
|
||||
<!-- Modal for deleting this storage -->
|
||||
{% with delete_storage_errors as err_msgs %}
|
||||
|
@@ -53,8 +53,8 @@
|
||||
</div>
|
||||
|
||||
<!-- Add storage modal form -->
|
||||
{% with add_storage_form as form %}
|
||||
{% include 'parts/modals/substorage-modal.html' %}
|
||||
{% with add_storage_form as form id as "add-sub-modal"%}
|
||||
{% include 'parts/modals/add-substorage-modal.html' %}
|
||||
{% endwith %}
|
||||
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user