mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-09 06:50:35 +01:00
Limit event edit dialog's recurrence end date to after the event start date
This commit is contained in:
parent
306722e521
commit
616046c097
@ -211,6 +211,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
|
|||||||
{
|
{
|
||||||
this.set_enddate_visibility();
|
this.set_enddate_visibility();
|
||||||
this.check_recur_type();
|
this.check_recur_type();
|
||||||
|
this.edit_start_change();
|
||||||
this.et2.getWidgetById('recur_exception').set_disabled(!content.data.recur_exception ||
|
this.et2.getWidgetById('recur_exception').set_disabled(!content.data.recur_exception ||
|
||||||
typeof content.data.recur_exception[0] == 'undefined');
|
typeof content.data.recur_exception[0] == 'undefined');
|
||||||
}
|
}
|
||||||
@ -1033,6 +1034,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,
|
* Show/Hide end date, for both edit and freetimesearch popups,
|
||||||
* based on if "use end date" selected or not.
|
* based on if "use end date" selected or not.
|
||||||
|
@ -208,7 +208,7 @@
|
|||||||
</row>
|
</row>
|
||||||
<row class="dialogHeader2" height="28">
|
<row class="dialogHeader2" height="28">
|
||||||
<description for="start" value="Start" width="88"/>
|
<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" />
|
<description for="duration" value="Duration" id="calendar_edit_duration" />
|
||||||
<menulist>
|
<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"/>
|
<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