@@ -350,62 +350,6 @@ export const TemplateScheduleForm: FC<TemplateScheduleForm> = ({
350
350
</ Stack >
351
351
</ FormSection >
352
352
353
- < FormSection
354
- title = "Autostop Requirement"
355
- description = "Define when workspaces created from this template are stopped periodically to enforce template updates and ensure idle workspaces are stopped."
356
- >
357
- < Stack direction = "row" css = { styles . ttlFields } >
358
- < TextField
359
- { ...getFieldHelpers ( "autostop_requirement_days_of_week" , {
360
- helperText : (
361
- < AutostopRequirementDaysHelperText
362
- days = { form . values . autostop_requirement_days_of_week }
363
- />
364
- ) ,
365
- } ) }
366
- disabled = { isSubmitting }
367
- fullWidth
368
- select
369
- value = { form . values . autostop_requirement_days_of_week }
370
- label = "Days with required stop"
371
- >
372
- < MenuItem key = "off" value = "off" >
373
- Off
374
- </ MenuItem >
375
- < MenuItem key = "daily" value = "daily" >
376
- Daily
377
- </ MenuItem >
378
- < MenuItem key = "saturday" value = "saturday" >
379
- Saturday
380
- </ MenuItem >
381
- < MenuItem key = "sunday" value = "sunday" >
382
- Sunday
383
- </ MenuItem >
384
- </ TextField >
385
-
386
- < TextField
387
- { ...getFieldHelpers ( "autostop_requirement_weeks" , {
388
- helperText : (
389
- < AutostopRequirementWeeksHelperText
390
- days = { form . values . autostop_requirement_days_of_week }
391
- weeks = { form . values . autostop_requirement_weeks }
392
- />
393
- ) ,
394
- } ) }
395
- disabled = {
396
- isSubmitting ||
397
- ! [ "saturday" , "sunday" ] . includes (
398
- form . values . autostop_requirement_days_of_week || "" ,
399
- )
400
- }
401
- fullWidth
402
- inputProps = { { min : 1 , max : 16 , step : 1 } }
403
- label = "Weeks between required stops"
404
- type = "number"
405
- />
406
- </ Stack >
407
- </ FormSection >
408
-
409
353
< FormSection
410
354
title = "Allow users scheduling"
411
355
description = "Allow users to set custom autostart and autostop scheduling options for workspaces created from this template."
@@ -479,6 +423,63 @@ export const TemplateScheduleForm: FC<TemplateScheduleForm> = ({
479
423
</ Stack >
480
424
</ Stack >
481
425
</ FormSection >
426
+
427
+ < FormSection
428
+ title = "Autostop Requirement"
429
+ description = "Define when workspaces created from this template are stopped periodically to enforce template updates and ensure idle workspaces are stopped."
430
+ >
431
+ < Stack direction = "row" css = { styles . ttlFields } >
432
+ < TextField
433
+ { ...getFieldHelpers ( "autostop_requirement_days_of_week" , {
434
+ helperText : (
435
+ < AutostopRequirementDaysHelperText
436
+ days = { form . values . autostop_requirement_days_of_week }
437
+ />
438
+ ) ,
439
+ } ) }
440
+ disabled = { isSubmitting }
441
+ fullWidth
442
+ select
443
+ value = { form . values . autostop_requirement_days_of_week }
444
+ label = "Days with required stop"
445
+ >
446
+ < MenuItem key = "off" value = "off" >
447
+ Off
448
+ </ MenuItem >
449
+ < MenuItem key = "daily" value = "daily" >
450
+ Daily
451
+ </ MenuItem >
452
+ < MenuItem key = "saturday" value = "saturday" >
453
+ Saturday
454
+ </ MenuItem >
455
+ < MenuItem key = "sunday" value = "sunday" >
456
+ Sunday
457
+ </ MenuItem >
458
+ </ TextField >
459
+
460
+ < TextField
461
+ { ...getFieldHelpers ( "autostop_requirement_weeks" , {
462
+ helperText : (
463
+ < AutostopRequirementWeeksHelperText
464
+ days = { form . values . autostop_requirement_days_of_week }
465
+ weeks = { form . values . autostop_requirement_weeks }
466
+ />
467
+ ) ,
468
+ } ) }
469
+ disabled = {
470
+ isSubmitting ||
471
+ ! [ "saturday" , "sunday" ] . includes (
472
+ form . values . autostop_requirement_days_of_week || "" ,
473
+ )
474
+ }
475
+ fullWidth
476
+ inputProps = { { min : 1 , max : 16 , step : 1 } }
477
+ label = "Weeks between required stops"
478
+ type = "number"
479
+ />
480
+ </ Stack >
481
+ </ FormSection >
482
+
482
483
{ allowAdvancedScheduling && (
483
484
< >
484
485
< FormSection
0 commit comments