Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
AStA
Raumbuchungstool
Commits
56adcbb2
Commit
56adcbb2
authored
Sep 24, 2020
by
Michael Koch
Browse files
Disable default automatic mails for studyspace - that feature isn't quite ready yet for production
parent
c8dda603
Changes
1
Hide whitespace changes
Inline
Side-by-side
js/reservations.js
View file @
56adcbb2
...
...
@@ -176,8 +176,8 @@ function getReservationCommentString(reservation) {
*/
function
confirmReservation
(
fieldorid
)
{
let
id
=
_isElement
(
fieldorid
)
?
parseInt
(
$
(
fieldorid
).
attr
(
"
reservation_id
"
))
:
fieldorid
;
let
search
=
$
.
grep
(
_reservations
,
(
r
,
i
)
=>
r
.
id
===
id
);
let
checked
=
(
search
.
length
>
0
&&
search
[
0
].
room
.
room_type
===
5
);
//
let search = $.grep(_reservations, (r, i) => r.id === id);
//
let checked = (search.length > 0 && search[0].room.room_type === 5);
showDialog
({
text
:
"
Wollen Sie diese Buchung bestätigen?<br /><br /><input type='checkbox' id='confirm_reservation_notification' name='confirm_reservation_notification'><label for='confirm_reservation_notification'> Automatische Benachrichtigung an Buchenden schicken</label>
"
,
...
...
@@ -202,7 +202,7 @@ function confirmReservation(fieldorid) {
}
});
$
(
"
#confirm_reservation_notification
"
).
prop
(
'
checked
'
,
checked
);
//
$("#confirm_reservation_notification").prop('checked', checked);
}
/**
...
...
@@ -212,8 +212,8 @@ function confirmReservation(fieldorid) {
*/
function
denyReservation
(
fieldorid
)
{
let
id
=
_isElement
(
fieldorid
)
?
parseInt
(
$
(
fieldorid
).
attr
(
"
reservation_id
"
))
:
fieldorid
;
let
search
=
$
.
grep
(
_reservations
,
(
r
,
i
)
=>
r
.
id
===
id
);
let
checked
=
(
search
.
length
>
0
&&
search
[
0
].
room
.
room_type
===
5
);
//
let search = $.grep(_reservations, (r, i) => r.id === id);
//
let checked = (search.length > 0 && search[0].room.room_type === 5);
showDialog
({
text
:
"
Wollen Sie diese Buchung ablehnen?<br /><br /><input type='checkbox' id='deny_reservation_notification' name='deny_reservation_notification'><label for='deny_reservation_notification'> Automatische Benachrichtigung an Buchenden schicken</label>
"
,
...
...
@@ -238,7 +238,7 @@ function denyReservation(fieldorid) {
}
});
$
(
"
#confirm_reservation_notification
"
).
prop
(
'
checked
'
,
checked
);
//
$("#confirm_reservation_notification").prop('checked', checked);
}
/**
...
...
@@ -248,8 +248,8 @@ function denyReservation(fieldorid) {
*/
function
undecideReservation
(
fieldorid
)
{
let
id
=
_isElement
(
fieldorid
)
?
parseInt
(
$
(
fieldorid
).
attr
(
"
reservation_id
"
))
:
fieldorid
;
let
search
=
$
.
grep
(
_reservations
,
(
r
,
i
)
=>
r
.
id
===
id
);
let
checked
=
(
search
.
length
>
0
&&
search
[
0
].
room
.
room_type
===
5
);
//
let search = $.grep(_reservations, (r, i) => r.id === id);
//
let checked = (search.length > 0 && search[0].room.room_type === 5);
showDialog
({
text
:
"
Wollen Sie die Entscheidung zurückziehen?<br /><br /><input type='checkbox' id='undecide_reservation_notification' name='undecide_reservation_notification'><label for='undecide_reservation_notification'> Automatische Benachrichtigung an Buchenden schicken</label>
"
,
...
...
@@ -274,7 +274,7 @@ function undecideReservation(fieldorid) {
}
});
$
(
"
#confirm_reservation_notification
"
).
prop
(
'
checked
'
,
checked
);
//
$("#confirm_reservation_notification").prop('checked', checked);
}
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment