mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:07 +01:00
Limit event edit dialog's recurrence end date to after the event start date
This commit is contained in:
parent
acbf2b46da
commit
76c537b63a
@ -211,6 +211,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
|
||||
{
|
||||
this.set_enddate_visibility();
|
||||
this.check_recur_type();
|
||||
this.edit_start_change();
|
||||
this.et2.getWidgetById('recur_exception').set_disabled(!content.data.recur_exception ||
|
||||
typeof content.data.recur_exception[0] == 'undefined');
|
||||
}
|
||||
@ -1035,6 +1036,32 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Actions for when the user changes the event start date in edit dialog
|
||||
*
|
||||
* @returns {undefined}
|
||||
*/
|
||||
edit_start_change: function(input, widget)
|
||||
{
|
||||
if(!widget)
|
||||
{
|
||||
widget = etemplate2.getById('calendar-edit').widgetContainer.getWidgetById('start');
|
||||
}
|
||||
|
||||
// Update settings for querying participants
|
||||
this.edit_update_participant(widget);
|
||||
|
||||
// Update recurring date limit, if not set it can't be before start
|
||||
if(widget)
|
||||
{
|
||||
var recur_end = widget.getRoot().getWidgetById('recur_enddate');
|
||||
if(recur_end && !recur_end.getValue())
|
||||
{
|
||||
recur_end.set_min(widget.getValue());
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Show/Hide end date, for both edit and freetimesearch popups,
|
||||
* based on if "use end date" selected or not.
|
||||
|
@ -208,7 +208,7 @@
|
||||
</row>
|
||||
<row class="dialogHeader2" height="28">
|
||||
<description for="start" value="Start" width="88"/>
|
||||
<date-time id="start" needed="1" class="required" onchange="app.calendar.edit_update_participant"/>
|
||||
<date-time id="start" needed="1" class="required" onchange="app.calendar.edit_start_change"/>
|
||||
<description for="duration" value="Duration" id="calendar_edit_duration" />
|
||||
<menulist>
|
||||
<menupopup statustext="Duration of the meeting" class="et2_fullWidth" id="duration" no_lang="1" onchange="app.calendar.set_enddate_visibility" options="Use end date,,,,,,,false"/>
|
||||
|
Loading…
Reference in New Issue
Block a user