<commit_before>{
    start : function(booking, iframeElement) {
        if (Browser.IE) {
            var popup = new EVOLaunchClientPopup(booking.url);
            popup.open();
        } else {
            iframeElement.location.href = booking.url;
        }
    },

    checkStart : function(booking) {
        booking.permissionToStart = true;
        return true;
    },

    checkParams: function() {
        return {
            'communityId': ['text', false, function(option, values){
                var errors = [];
                if (option == 'chooseOne') {
                    errors.push($T("Please choose a community."));
                }
                return errors;
            }],
            'meetingTitle' : ['text', false],
            'meetingDescription' : ['text', false],

            'startDate' : ['datetime', false, function(startDateString, values){
                var errors = [];
                var startDate = IndicoUtil.parseDateTime(startDateString);

                //check start date is not in the past
                var startDatePlusExtraTime = new Date();
                startDatePlusExtraTime.setTime(startDate.getTime() + <%= AllowedStartMinutes %> *60*1000);
                if (beforeNow(startDatePlusExtraTime)) {
                    errors.push($T("Start date cannot be before the past <%= AllowedStartMinutes %> minutes"));
                }

                // check start date is not before the minimum start date (event start date - <%= AllowedMarginMinutes %> min )
                if (startDate < IndicoUtil.parseDateTime("<%= MinStartDate %>")) {
                    errors.push($T("Start date cannot be <%= AllowedMarginMinutes %> minutes before the Indico event start date. Please choose it after <%= MinStartDate %>"));
                }

                // check start date is not after the maximum start date (event end date + <%= AllowedMarginMinutes %> min )
                if (startDate > IndicoUtil.parseDateTime("<%= MaxEndDate %>")) {
                    errors.push($T("Start date cannot be <%= AllowedMarginMinutes %> minutes after the Indico event end date. Please choose it before <%= MaxEndDate %>"));
                }

                // check start date is not after end date, if end date exists
                var endDate = IndicoUtil.parseDateTime(values["endDate"]);
                if (endDate) {
                    if (startDate > endDate) {
                        errors.push($T("End date cannot be before start date."));
                    }
                }

                return errors;
            }],

            'endDate' : ['datetime', false, function(endDateString, values){
                var errors = [];
                var endDate = IndicoUtil.parseDateTime(endDateString);
<commit_msg>[MIN] Less margin for EVO start date JS check<commit_after>{
    start : function(booking, iframeElement) {
        if (Browser.IE) {
            var popup = new EVOLaunchClientPopup(booking.url);
            popup.open();
        } else {
            iframeElement.location.href = booking.url;
        }
    },

    checkStart : function(booking) {
        booking.permissionToStart = true;
        return true;
    },

    checkParams: function() {
        return {
            'communityId': ['text', false, function(option, values){
                var errors = [];
                if (option == 'chooseOne') {
                    errors.push($T("Please choose a community."));
                }
                return errors;
            }],
            'meetingTitle' : ['text', false],
            'meetingDescription' : ['text', false],

            'startDate' : ['datetime', false, function(startDateString, values){
                var errors = [];
                var startDate = IndicoUtil.parseDateTime(startDateString);

                //check start date is not in the past
                var startDatePlusExtraTime = new Date();
                startDatePlusExtraTime.setTime(startDate.getTime() + (<%= AllowedStartMinutes %> - 1) *60*1000);
                if (beforeNow(startDatePlusExtraTime)) {
                    errors.push($T("Start date cannot be before the past <%= AllowedStartMinutes %> minutes"));
                }

                // check start date is not before the minimum start date (event start date - <%= AllowedMarginMinutes %> min )
                if (startDate < IndicoUtil.parseDateTime("<%= MinStartDate %>")) {
                    errors.push($T("Start date cannot be <%= AllowedMarginMinutes %> minutes before the Indico event start date. Please choose it after <%= MinStartDate %>"));
                }

                // check start date is not after the maximum start date (event end date + <%= AllowedMarginMinutes %> min )
                if (startDate > IndicoUtil.parseDateTime("<%= MaxEndDate %>")) {
                    errors.push($T("Start date cannot be <%= AllowedMarginMinutes %> minutes after the Indico event end date. Please choose it before <%= MaxEndDate %>"));
                }

                // check start date is not after end date, if end date exists
                var endDate = IndicoUtil.parseDateTime(values["endDate"]);
                if (endDate) {
                    if (startDate > endDate) {
                        errors.push($T("End date cannot be before start date."));
                    }
                }

                return errors;
            }],

            'endDate' : ['datetime', false, function(endDateString, values){
                var errors = [];
                var endDate = IndicoUtil.parseDateTime(endDateString);

{'fraction_non_alphanumeric': 0.1114468538926413, 'fraction_numerical': 0.002310700319943121, 'mean_word_length': 1.7368677042801557, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6981526', 'n_tokens_mistral': 1477, 'n_tokens_neox': 1330, 'n_words': 401}