(js) Optimize display of event editor

This commit is contained in:
Francis Lachapelle
2019-10-02 09:20:35 -04:00
parent 6d2094bf83
commit 01bda0783c
2 changed files with 13 additions and 11 deletions
@@ -388,14 +388,16 @@
};
this.changeAlarmRelation = function (form) {
if (this.component.type == 'task' && this.component.$hasAlarm &&
(this.component.start || this.component.due) &&
((!this.component.start && this.component.alarm.relation == 'START') ||
(!this.component.due && this.component.alarm.relation == 'END'))) {
form.alarmRelation.$setValidity('alarm', false);
}
else {
form.alarmRelation.$setValidity('alarm', true);
if (form.alarmRelation) {
if (this.component.type == 'task' && this.component.$hasAlarm &&
(this.component.start || this.component.due) &&
((!this.component.start && this.component.alarm.relation == 'START') ||
(!this.component.due && this.component.alarm.relation == 'END'))) {
form.alarmRelation.$setValidity('alarm', false);
}
else {
form.alarmRelation.$setValidity('alarm', true);
}
}
};