Only render 1 delete room modal (#819)

This commit is contained in:
Ahmad Farhat
2019-10-10 15:45:42 -04:00
committed by Jesus Federico
parent 58cfb0ec30
commit 3f5affd116
4 changed files with 17 additions and 9 deletions

View File

@ -54,6 +54,10 @@ $(document).on('turbolinks:load', function(){
$(".update-room").click(function(){
showUpdateRoom(this)
})
$(".delete-room").click(function() {
showDeleteRoom(this)
})
}
});
@ -113,6 +117,11 @@ function showUpdateRoom(target) {
}
}
function showDeleteRoom(target) {
$("#delete-header").text(getLocalizedString("modal.delete_room.confirm").replace("%{room}", $(target).data("name")))
$("#delete-confirm").parent().attr("action", $(target).data("path"))
}
//Update the createRoomModal to show the correct current settings
function updateCurrentSettings(settings){
//set checkbox