|
@@ -41,11 +41,18 @@ function change_presence(e)
|
41
|
41
|
req = $.ajax(`/groups/${group}/activities/${activity}/presence`,
|
42
|
42
|
{
|
43
|
43
|
method: 'PUT',
|
44
|
|
- data: {person_id: person, attending: state}
|
|
44
|
+ data: {person_id: person, attending: state},
|
|
45
|
+ statusCode: {
|
|
46
|
+ 423: function() {
|
|
47
|
+ alert( "De deadline is al verstreken! Vraag orgi of bestuur of het nog kan.");
|
|
48
|
+ },
|
|
49
|
+ 403: function() {
|
|
50
|
+ alert( "Je hebt geen rechten om iemand anders aan te passen!");
|
|
51
|
+ }
|
|
52
|
+ }
|
45
|
53
|
}
|
46
|
54
|
)
|
47
|
|
- .done( activity_changed )
|
48
|
|
- .fail( alert_failure );
|
|
55
|
+ .done( activity_changed );
|
49
|
56
|
|
50
|
57
|
// Pack data for success
|
51
|
58
|
req.aardbei_activity_data =
|