Skip to content

Delete reason is not sent when a reservation is declined by an approver #694

@belcirelk

Description

@belcirelk

[x]: This is a bug and not a question.

[x]: I understand that the best way to resolve this issue is to solve it and propose a Pull Request.

Describe the bug**

When approval is set on a resource and that the approver decline the reservation, the Delete Reason is not sent (form data empty for DELETE_REASON). However deleting a reservation in other contexts will send the DELETE_REASON.

The reason is that the class "deleteReason" is not set for the textarea in approval.tpl. The addition of deleteReason like below fix the problem.

    <div id="deleteButtonPrompt" class="modal fade">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="updateButtonsLabel">{translate key=Reject}</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-hidden="true"></button>
                </div>
                <div class="modal-body">
                    <div>{translate key=DeleteReminderWarning}</div>
                    <div>
                        <label for="deleteReason" class="fw-bold">{translate key=Reason} ({translate key=Optional})</la\
bel>
                        <textarea id="deleteReason" class="deleteReason form-control"></textarea>
                    </div>
                </div>
                <div class="modal-footer">
                    {cancel_button class="cancelDelete cancel"}
                    {delete_button class="confirmDelete delete save" key=Reject}
                </div>
            </div>
        </div>
    </div>

Specifications

  • LibreBooking version 3.0.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions