diff --git a/public/resources/job/add.js b/public/resources/job/add.js index db2fe83..8c8fc87 100644 --- a/public/resources/job/add.js +++ b/public/resources/job/add.js @@ -2,6 +2,7 @@ $(function() { initDatePickers(); initCronType(); initSecretInputs(); + initDelayPattern(); }); function initDatePickers() @@ -26,4 +27,13 @@ function initSecretInputs() $('.secret-group:first-child').clone().appendTo('.secrets').removeClass('hidden'); $('.secrets-description').removeClass('hidden'); }) +} + + +function initDelayPattern() +{ + $('.delaypattern-item').on('click', function() { + let time = $(this).data('time'); + $('#delay').val(time); + }) } \ No newline at end of file diff --git a/templates/job/add.html.twig b/templates/job/add.html.twig index c8a5414..bce39d4 100644 --- a/templates/job/add.html.twig +++ b/templates/job/add.html.twig @@ -11,7 +11,21 @@
- +
+ + +