mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-20 12:30:56 +01:00
95551a1a5a
Summary: Ref T8357, DRAFT, recurring events need optional end dates Test Plan: Edit recurring event, set end date, save, recurring ghosts should not generate after end date Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T8357 Differential Revision: https://secure.phabricator.com/D13088
21 lines
538 B
JavaScript
21 lines
538 B
JavaScript
/**
|
|
* @provides javelin-behavior-recurring-edit
|
|
*/
|
|
|
|
|
|
JX.behavior('recurring-edit', function(config) {
|
|
var checkbox = JX.$(config.isRecurring);
|
|
|
|
JX.DOM.listen(checkbox, 'change', null, function() {
|
|
var frequency = JX.$(config.frequency);
|
|
var end_date = JX.$(config.recurrenceEndDate);
|
|
|
|
frequency.disabled = checkbox.checked ? false : true;
|
|
end_date.disabled = checkbox.checked ? false : true;
|
|
|
|
if (end_date.disabled) {
|
|
JX.DOM.alterClass(end_date, 'datepicker-disabled', !checkbox.checked);
|
|
}
|
|
});
|
|
|
|
});
|