schedulerObj = {};
schedulerObj.everyMinute = {};
schedulerObj.everyMinute.html =
    '<tr><td class="uk-padding-remove-left">Every Minute<input type="hidden" name="frequencies[0][interval]" value="everyMinute"> <input type="hidden" name="frequencies[0][label]" value="Every Minute"></td> <td class="uk-padding-remove-left"><span>No Parameters</span></td> <td><a class="uk-button uk-button-link"><span uk-icon="  " class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#000" stroke-width="1.06" d="M16,16 L4,4"></path> <path fill="none" stroke="#000" stroke-width="1.06" d="M16,4 L4,16"></path></svg></span></a></td></tr>';
schedulerObj.everyMinute.func = function() {};

schedulerObj.everyFiveMinutes = {};
schedulerObj.everyFiveMinutes.html =
    '<tr><td class="uk-padding-remove-left">Every Five Minutes<input type="hidden" name="frequencies[0][interval]" value="everyFiveMinutes"> <input type="hidden" name="frequencies[0][label]" value="Every Five Minutes"></td> <td class="uk-padding-remove-left"><span>No Parameters</span></td> </tr>';
schedulerObj.everyFiveMinutes.func = function() {};

schedulerObj.everyTenMinutes = {};
schedulerObj.everyTenMinutes.html =
    '<tr><td class="uk-padding-remove-left">Every Ten Minutes<input type="hidden" name="frequencies[0][interval]" value="everyTenMinutes"> <input type="hidden" name="frequencies[0][label]" value="Every Ten Minutes"></td> <td class="uk-padding-remove-left"><span>No Parameters</span></td> </tr>';
schedulerObj.everyTenMinutes.func = function() {};
schedulerObj.everyThirtyMinutes = {};
schedulerObj.everyThirtyMinutes.html =
    '<tr><td class="uk-padding-remove-left">Every Thirty Minutes<input type="hidden" name="frequencies[0][interval]" value="everyThirtyMinutes"> <input type="hidden" name="frequencies[0][label]" value="Every Thirty Minutes"></td> <td class="uk-padding-remove-left"><span>No Parameters</span></td> </tr>';
schedulerObj.everyThirtyMinutes.func = function() {};
schedulerObj.hourly = {};
schedulerObj.hourly.html =
    '<tr><td class="uk-padding-remove-left">Hourly<input type="hidden" name="frequencies[0][interval]" value="hourly"> <input type="hidden" name="frequencies[0][label]" value="Hourly"></td> <td class="uk-padding-remove-left"><span>No Parameters</span></td> </tr>';
schedulerObj.hourly.func = function() {};
schedulerObj.hourlyAt = {};
schedulerObj.hourlyAt.html =
    '<tr><td class="uk-padding-remove-left">Hourly at<input type="hidden" name="frequencies[0][interval]" value="hourlyAt"> <input type="hidden" name="frequencies[0][label]" value="Hourly at"></td> <td class="uk-padding-remove-left"><span><span><span id="hourlyAt-sp1">7</span><input type="hidden" name="frequencies[0][parameters][0][name]" value="at"> <input type="hidden" name="frequencies[0][parameters][0][value]" value="7"></span></span></td> </tr>';
schedulerObj.hourlyAt.func = function() {
    //hourlyAt-sp1
    var pmter = $('.parameter');
    if (
        pmter
            .find('.inputFrequency')
            .eq(0)
            .get(0)
    ) {
        var param1 = pmter
            .find('.inputFrequency')
            .eq(0)
            .val();
        $('[name="frequencies[0][parameters][0][name]"]').val(param1);
        $('#hourlyAt-sp1').html(param1);
    }
};
// schedulerObj.daily = {};
// schedulerObj.daily.html =
//     '<tr><td class="uk-padding-remove-left">Daily<input type="hidden" name="frequencies[0][interval]" value="daily"> <input type="hidden" name="frequencies[0][label]" value="Daily"></td> <td class="uk-padding-remove-left"><span>No Parameters</span></td> </tr>';
// schedulerObj.daily.func = function() {};
// schedulerObj.dailyAt = {};
// schedulerObj.dailyAt.html =
//     '<tr><td class="uk-padding-remove-left">Daily at<input type="hidden" name="frequencies[0][interval]" value="dailyAt"> <input type="hidden" name="frequencies[0][label]" value="Daily at"></td> <td class="uk-padding-remove-left"><span><span><span id="dailyAt-sp">8</span><input type="hidden" name="frequencies[0][parameters][0][name]" value="at"> <input type="hidden" name="frequencies[0][parameters][0][value]" value="8"></span></span></td> </tr>';
// schedulerObj.dailyAt.func = function() {
//     //dailyAt-sp
//     var pmter = $('.parameter');
//     if (
//         pmter
//             .find('.inputFrequency')
//             .eq(0)
//             .get(0)
//     ) {
//         var param1 = pmter
//             .find('.inputFrequency')
//             .eq(0)
//             .val();
//         $('[name="frequencies[0][parameters][0][name]"]').val(param1);
//         $('#dailyAt-sp').html(param1);
//     }
// };

// schedulerObj.twiceDaily = {};
// schedulerObj.twiceDaily.html =
//     '<tr><td class="uk-padding-remove-left">Twice Daily<input type="hidden" name="frequencies[0][interval]" value="twiceDaily"> <input type="hidden" name="frequencies[0][label]" value="Twice Daily"></td> <td class="uk-padding-remove-left"><span><span><span id="twiceDaily-sp1">9</span><span>,</span> <input type="hidden" name="frequencies[0][parameters][0][name]" value="at"> <input type="hidden" name="frequencies[0][parameters][0][value]" value="9"></span><span><span id="twiceDaily-sp2">11</span><input type="hidden" name="frequencies[0][parameters][1][name]" value="second_at"> <input type="hidden" name="frequencies[0][parameters][1][value]" value="11"></span></span></td> </tr>';
// schedulerObj.twiceDaily.func = function() {
//     var pmter = $('.parameter');
//     if (
//         pmter
//             .find('.inputFrequency')
//             .eq(0)
//             .get(0)
//     ) {
//         var param1 = pmter
//             .find('.inputFrequency')
//             .eq(0)
//             .val();
//         $('[name="frequencies[0][parameters][0][value]"]').val(param1);
//         $('#twiceDaily-sp1').html(param1);
//     }

//     if (
//         pmter
//             .find('.inputFrequency')
//             .eq(1)
//             .get(0)
//     ) {
//         var param2 = pmter
//             .find('.inputFrequency')
//             .eq(1)
//             .val();
//         $('[name="frequencies[0][parameters][1][value]"]').val(param2);
//         $('#twiceDaily-sp2').html(param2);
//     }
// };
schedulerObj.weekly = {};
schedulerObj.weekly.html =
    '<tr><td class="uk-padding-remove-left">Weekly<input type="hidden" name="frequencies[0][interval]" value="weekly"> <input type="hidden" name="frequencies[0][label]" value="Weekly"></td> <td class="uk-padding-remove-left"><span>No Parameters</span></td> </tr>';
schedulerObj.weekly.func = function() {};
schedulerObj.weeklyOn = {};
schedulerObj.weeklyOn.html =
    '<tr><td class="uk-padding-remove-left">Weekly On<input type="hidden" name="frequencies[0][interval]" value="weeklyOn"> <input type="hidden" name="frequencies[0][label]" value="Weekly On"></td> <td class="uk-padding-remove-left"><span><span><span id="weeklyOn-sp1">12</span><span>,</span> <input type="hidden" name="frequencies[0][parameters][0][name]" value="on"> <input type="hidden" name="frequencies[0][parameters][0][value]" value="12"></span><span><span id="weeklyOn-sp2">13</span> <input type="hidden" name="frequencies[0][parameters][1][name]" value="at"> <input type="hidden" name="frequencies[0][parameters][1][value]" value="13"></span></span></td> </tr>';
schedulerObj.weeklyOn.func = function() {
    var pmter = $('.parameter');
    if (
        pmter
            .find('.inputFrequency')
            .eq(0)
            .get(0)
    ) {
        var param1 = pmter
            .find('.inputFrequency')
            .eq(0)
            .val();
        $('[name="frequencies[0][parameters][0][value]"]').val(param1);
        $('#weeklyOn-sp1').html(param1);
    }

    if (
        pmter
            .find('.inputFrequency')
            .eq(1)
            .get(0)
    ) {
        var param2 = pmter
            .find('.inputFrequency')
            .eq(1)
            .val();
        $('[name="frequencies[0][parameters][1][value]"]').val(param2);
        $('#weeklyOn-sp2').html(param2);
    }
};

schedulerObj.monthly = {};
schedulerObj.monthly.html =
    '<tr><td class="uk-padding-remove-left">Monthly<input type="hidden" name="frequencies[0][interval]" value="monthly"> <input type="hidden" name="frequencies[0][label]" value="Monthly"></td> <td class="uk-padding-remove-left"><span>No Parameters</span></td> </tr>';
schedulerObj.monthly.func = function() {};
schedulerObj.monthlyOn = {};
schedulerObj.monthlyOn.html =
    '<tr><td class="uk-padding-remove-left">Monthly On<input type="hidden" name="frequencies[2][interval]" value="monthlyOn"> <input type="hidden" name="frequencies[2][label]" value="Monthly On"></td> <td class="uk-padding-remove-left"><span><span><span id ="monthlyOn-sp1">5</span><span>,</span> <input type="hidden" name="frequencies[2][parameters][0][name]" value="on"> <input type="hidden" name="frequencies[2][parameters][0][value]" value="5"></span><span><span id ="monthlyOn-sp2">01</span> <input type="hidden" name="frequencies[2][parameters][1][name]" value="at"> <input type="hidden" name="frequencies[2][parameters][1][value]" value="01"></span></span></td> </tr>';
schedulerObj.monthlyOn.func = function() {
    var pmter = $('.parameter');
    if (
        pmter
            .find('.inputFrequency')
            .eq(0)
            .get(0)
    ) {
        var param1 = pmter
            .find('.inputFrequency')
            .eq(0)
            .val();
        $('[name="frequencies[2][parameters][0][value]"]').val(param1);
        $('#monthlyOn-sp1').html(param1);
    }

    if (
        pmter
            .find('.inputFrequency')
            .eq(1)
            .get(0)
    ) {
        var param2 = pmter
            .find('.inputFrequency')
            .eq(1)
            .val();
        $('[name="frequencies[2][parameters][1][value]"]').val(param2);
        $('#monthlyOn-sp2').html(param2);
    }
};

schedulerObj.twiceMonthly = {};
schedulerObj.twiceMonthly.html =
    '<tr><td class="uk-padding-remove-left">Twice Monthly<input type="hidden" name="frequencies[0][interval]" value="twiceMonthly"> <input type="hidden" name="frequencies[0][label]" value="Twice Monthly"></td> <td class="uk-padding-remove-left"><span><span><span id="twiceMonthly-sp1">21</span><span>,</span> <input type="hidden" name="frequencies[0][parameters][0][name]" value="on"> <input type="hidden" name="frequencies[0][parameters][0][value]" value="21"></span><span><span id="twiceMonthly-sp2">22</span><input type="hidden" name="frequencies[0][parameters][1][name]" value="second_at"> <input type="hidden" name="frequencies[0][parameters][1][value]" value="22"></span></span></td> </tr>';
schedulerObj.twiceMonthly.func = function() {
    var pmter = $('.parameter');
    if (
        pmter
            .find('.inputFrequency')
            .eq(0)
            .get(0)
    ) {
        var param1 = pmter
            .find('.inputFrequency')
            .eq(0)
            .val();
        $('[name="frequencies[0][parameters][0][value]"]').val(param1);
        $('#twiceMonthly-sp1').html(param1);
    }

    if (
        pmter
            .find('.inputFrequency')
            .eq(1)
            .get(0)
    ) {
        var param2 = pmter
            .find('.inputFrequency')
            .eq(1)
            .val();
        $('[name="frequencies[0][parameters][1][value]"]').val(param2);
        $('#twiceMonthly-sp2').html(param2);
    }
};

schedulerObj.quarterly = {};
schedulerObj.quarterly.html =
    '<tr><td class="uk-padding-remove-left">Quarterly<input type="hidden" name="frequencies[0][interval]" value="quarterly"> <input type="hidden" name="frequencies[0][label]" value="Quarterly"></td> <td class="uk-padding-remove-left"><span>No Parameters</span></td> </tr>';
schedulerObj.quarterly.func = function() {};

schedulerObj.yearly = {};
schedulerObj.yearly.html =
    '<tr><td class="uk-padding-remove-left">Yearly<input type="hidden" name="frequencies[0][interval]" value="yearly"> <input type="hidden" name="frequencies[0][label]" value="Yearly"></td> <td class="uk-padding-remove-left"><span>No Parameters</span></td> </tr>';
schedulerObj.yearly.func = function() {};
schedulerObj.weekdays = {};
schedulerObj.weekdays.html =
    '<tr><td class="uk-padding-remove-left">Weekdays<input type="hidden" name="frequencies[0][interval]" value="weekdays"> <input type="hidden" name="frequencies[0][label]" value="Weekdays"></td> <td class="uk-padding-remove-left"><span>No Parameters</span></td> </tr>';
schedulerObj.weekdays.func = function() {};

schedulerObj.sundays = {};
schedulerObj.sundays.html =
    '<tr><td class="uk-padding-remove-left">Every Sunday<input type="hidden" name="frequencies[0][interval]" value="sundays"> <input type="hidden" name="frequencies[0][label]" value="Every Sunday"></td> <td class="uk-padding-remove-left"><span>No Parameters</span></td> </tr>';
schedulerObj.sundays.func = function() {};

schedulerObj.mondays = {};
schedulerObj.mondays.html =
    '<tr><td class="uk-padding-remove-left">Every Monday<input type="hidden" name="frequencies[0][interval]" value="mondays"> <input type="hidden" name="frequencies[0][label]" value="Every Monday"></td> <td class="uk-padding-remove-left"><span>No Parameters</span></td> </tr>';
schedulerObj.mondays.func = function() {};

schedulerObj.tuesdays = {};
schedulerObj.tuesdays.html =
    '<tr><td class="uk-padding-remove-left">Every Tuesday<input type="hidden" name="frequencies[0][interval]" value="tuesdays"> <input type="hidden" name="frequencies[0][label]" value="Every Tuesday"></td> <td class="uk-padding-remove-left"><span>No Parameters</span></td> </tr>';
schedulerObj.tuesdays.func = function() {};

schedulerObj.wednesdays = {};
schedulerObj.wednesdays.html =
    '<tr><td class="uk-padding-remove-left">Every Wednesday<input type="hidden" name="frequencies[0][interval]" value="wednesdays"> <input type="hidden" name="frequencies[0][label]" value="Every Wednesday"></td> <td class="uk-padding-remove-left"><span>No Parameters</span></td> </tr>';
schedulerObj.wednesdays.func = function() {};

schedulerObj.thursdays = {};
schedulerObj.thursdays.html =
    '<tr><td class="uk-padding-remove-left">Every Thursday<input type="hidden" name="frequencies[0][interval]" value="thursdays"> <input type="hidden" name="frequencies[0][label]" value="Every Thursday"></td> <td class="uk-padding-remove-left"><span>No Parameters</span></td> </tr>';
schedulerObj.thursdays.func = function() {};

schedulerObj.fridays = {};
schedulerObj.fridays.html =
    '<tr><td class="uk-padding-remove-left">Every Friday<input type="hidden" name="frequencies[0][interval]" value="fridays"> <input type="hidden" name="frequencies[0][label]" value="Every Friday"></td> <td class="uk-padding-remove-left"><span>No Parameters</span></td> </tr>';
schedulerObj.fridays.func = function() {};

schedulerObj.saturdays = {};
schedulerObj.saturdays.html =
    '<tr><td class="uk-padding-remove-left">Every Saturday<input type="hidden" name="frequencies[0][interval]" value="saturdays"> <input type="hidden" name="frequencies[0][label]" value="Every Saturday"></td> <td class="uk-padding-remove-left"><span>No Parameters</span></td> </tr>';
schedulerObj.saturdays.func = function() {};

schedulerObj.between = {};
schedulerObj.between.html =
    '<tr><td class="uk-padding-remove-left">Between<input type="hidden" name="frequencies[0][interval]" value="between"> <input type="hidden" name="frequencies[0][label]" value="Between"></td> <td class="uk-padding-remove-left"><span id="betw1">01</span><span>,</span> <input type="hidden" name="frequencies[0][parameters][0][name]" value="start"> <input type="hidden" name="frequencies[0][parameters][0][value]" value="01"></span><span><span id="betw2">02</span><input type="hidden" name="frequencies[0][parameters][1][name]" value="end"> <input type="hidden" name="frequencies[0][parameters][1][value]" value="02"></span></span></td> </tr>';
schedulerObj.between.func = function() {
    var pmter = $('.parameter');
    if (
        pmter
            .find('.inputFrequency')
            .eq(0)
            .get(0)
    ) {
        var param1 = pmter
            .find('.inputFrequency')
            .eq(0)
            .val();
        $('[name="frequencies[0][parameters][0][value]"]').val(param1);
        $('#betw1').html(param1);
    }

    if (
        pmter
            .find('.inputFrequency')
            .eq(1)
            .get(0)
    ) {
        var param2 = pmter
            .find('.inputFrequency')
            .eq(1)
            .val();
        $('[name="frequencies[0][parameters][1][value]"]').val(param2);
        $('#betw2').html(param2);
    }
};

schedulerObj.unlessBetween = {};
schedulerObj.unlessBetween.html =
    '<tr><td class="uk-padding-remove-left">Unless Between<input type="hidden" name="frequencies[0][interval]" value="unlessBetween"> <input type="hidden" name="frequencies[0][label]" value="Unless Between"></td> <td class="uk-padding-remove-left"><span><span><span id="unlessBetween-sp1">14</span><span>,</span> <input type="hidden" name="frequencies[0][parameters][0][name]" value="start"> <input type="hidden" name="frequencies[0][parameters][0][value]" value="14"></span><span><span id="unlessBetween-sp2">15</span><input type="hidden" name="frequencies[0][parameters][1][name]" value="end"> <input type="hidden" name="frequencies[0][parameters][1][value]" value="15"></span></span></td> </tr>';
schedulerObj.unlessBetween.func = function() {
    var pmter = $('.parameter');
    if (
        pmter
            .find('.inputFrequency')
            .eq(0)
            .get(0)
    ) {
        var param1 = pmter
            .find('.inputFrequency')
            .eq(0)
            .val();
        $('[name="frequencies[0][parameters][0][value]"]').val(param1);
        $('#unlessBetween-sp1').html(param1);
    }

    if (
        pmter
            .find('.inputFrequency')
            .eq(1)
            .get(0)
    ) {
        var param2 = pmter
            .find('.inputFrequency')
            .eq(1)
            .val();
        $('[name="frequencies[0][parameters][1][value]"]').val(param2);
        $('#unlessBetween-sp2').html(param2);
    }
};
