[RMV] HORILLA VIEWS: Debug delete button
This commit is contained in:
@@ -3,9 +3,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button hx-get="{% url "generic-delete" %}?model=employee.Employee&pk=13" hx-target="#deleteConfirmationBody" data-toggle="oh-modal-toggle" data-target="#deleteConfirmation">
|
|
||||||
Delete
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="oh-modal"
|
class="oh-modal"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<div class="oh-modal__dialog-body oh-modal__dialog-relative" style="padding-bottom: 0px">
|
<div class="oh-modal__dialog-body oh-modal__dialog-relative" style="padding-bottom: 0px">
|
||||||
<div class="">
|
<div class="">
|
||||||
|
|
||||||
<div class="oh-card">
|
<div class="oh-card">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-sm-12 col-md-12 col-lg-12">
|
<div class="col-12 col-sm-12 col-md-12 col-lg-12">
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding-left: 1.2rem;
|
padding-left: 1.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.check-list li {
|
.check-list li {
|
||||||
position: relative;
|
position: relative;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
.oh-inner-sidebar__link{
|
.oh-inner-sidebar__link{
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Checkmark styling */
|
/* Checkmark styling */
|
||||||
.check-list li:not(li.x-marked):before {
|
.check-list li:not(li.x-marked):before {
|
||||||
content: '';
|
content: '';
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
transform-origin: bottom left;
|
transform-origin: bottom left;
|
||||||
transform: rotate(45deg);
|
transform: rotate(45deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* X-mark styling */
|
/* X-mark styling */
|
||||||
.check-list .x-marked:before {
|
.check-list .x-marked:before {
|
||||||
content: '';
|
content: '';
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h5 class="mt-3 mb-2">
|
<h5 class="mt-3 mb-2">
|
||||||
{% trans "Deleting the record" %} '{{delete_object}}' {% trans "would require managing the following related objects:" %}
|
{% trans "Deleting the record" %} '{{delete_object}}' {% trans "would require managing the following related objects:" %}
|
||||||
@@ -142,7 +142,7 @@
|
|||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<input type="checkbox" required id="confirm">
|
<input type="checkbox" required id="confirm">
|
||||||
<label for="confirm">
|
<label for="confirm">
|
||||||
{% trans "Confirming to delete the related and protected records" %}
|
{% trans "Confirming to delete the related and protected records" %}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -151,8 +151,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% for key in model_map.keys %}
|
{% for key in model_map.keys %}
|
||||||
<div class="oh-general__tab-target oh-profile__info-tab" id="{{key}}">
|
<div class="oh-general__tab-target oh-profile__info-tab" id="{{key}}">
|
||||||
@@ -172,13 +172,13 @@
|
|||||||
<button
|
<button
|
||||||
hidden
|
hidden
|
||||||
hx-get="/{{dynamic_list_path|get_item:item.0.verbose_name}}"
|
hx-get="/{{dynamic_list_path|get_item:item.0.verbose_name}}"
|
||||||
hx-target="#dynamicRelatedLists{{key}}"
|
hx-target="#dynamicRelatedLists{{key}}"
|
||||||
></button>
|
></button>
|
||||||
<div id="storedIds{{key}}{{item.0.verbose_name}}" data-ids="[]"></div>
|
<div id="storedIds{{key}}{{item.0.verbose_name}}" data-ids="[]"></div>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -205,7 +205,7 @@
|
|||||||
<div class="oh-modal__dialog-footer"></div>
|
<div class="oh-modal__dialog-footer"></div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(".oh-general__tab-link").click(function (e) {
|
$(".oh-general__tab-link").click(function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$("#deleteConfirmationBody .oh-general__tab-link--active").removeClass("oh-general__tab-link--active");
|
$("#deleteConfirmationBody .oh-general__tab-link--active").removeClass("oh-general__tab-link--active");
|
||||||
$(this).addClass("oh-general__tab-link--active");
|
$(this).addClass("oh-general__tab-link--active");
|
||||||
@@ -214,7 +214,7 @@
|
|||||||
$(`#deleteConfirmationBody ${target}`).removeClass("d-none");
|
$(`#deleteConfirmationBody ${target}`).removeClass("d-none");
|
||||||
localStorage.setItem("deleteConfirmation",target)
|
localStorage.setItem("deleteConfirmation",target)
|
||||||
});
|
});
|
||||||
$(".oh-inner-sidebar__link").click(function (e) {
|
$(".oh-inner-sidebar__link").click(function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$(this).closest("ul").find(".oh-inner-sidebar__link--active").removeClass("oh-inner-sidebar__link--active");
|
$(this).closest("ul").find(".oh-inner-sidebar__link--active").removeClass("oh-inner-sidebar__link--active");
|
||||||
$(this).addClass("oh-inner-sidebar__link--active");
|
$(this).addClass("oh-inner-sidebar__link--active");
|
||||||
@@ -234,4 +234,4 @@
|
|||||||
if(!$("#deleteConfirmationBody .oh-general__tab-link--active:first").length){
|
if(!$("#deleteConfirmationBody .oh-general__tab-link--active:first").length){
|
||||||
$(`#deleteConfirmationBody .oh-general__tab-link:first`).click();
|
$(`#deleteConfirmationBody .oh-general__tab-link:first`).click();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user