@@ -5,6 +5,8 @@ import { Layout as DashboardLayout } from "/src/layouts/index.js";
55import CippFormPage from "/src/components/CippFormPages/CippFormPage" ;
66import CippFormComponent from "/src/components/CippComponents/CippFormComponent" ;
77import { useSettings } from "/src/hooks/use-settings" ;
8+ import { CippFormTenantSelector } from "../../../../components/CippComponents/CippFormTenantSelector" ;
9+ import { te } from "date-fns/locale" ;
810
911const CreateBackup = ( ) => {
1012 const userSettingsDefaults = useSettings ( ) ;
@@ -30,7 +32,7 @@ const CreateBackup = () => {
3032
3133 return (
3234 < CippFormPage
33- title = "Add Backup Schedule"
35+ title = "Backup Schedule"
3436 formControl = { formControl }
3537 queryKey = { `Backup Tasks` }
3638 postUrl = "/api/AddScheduledItem?hidden=true& DisallowDuplicateName = true "
@@ -41,7 +43,7 @@ const CreateBackup = () => {
4143 const tenantFilter = values . tenantFilter || tenantDomain ;
4244 const shippedValues = {
4345 TenantFilter : tenantFilter ,
44- Name : `CIPP Backup ${ tenantFilter } ` ,
46+ Name : `CIPP Backup - ${ tenantFilter } ` ,
4547 Command : { value : `New-CIPPBackup` } ,
4648 Parameters : { backupType : "Scheduled" , ScheduledBackupValues : { ...values } } ,
4749 ScheduledTime : unixTime ,
@@ -50,18 +52,21 @@ const CreateBackup = () => {
5052 return shippedValues ;
5153 } }
5254 backButtonTitle = "Backup Tasks"
55+ allowResubmit = { true }
5356 >
5457 < Typography variant = "body1" >
5558 Backups are stored in CIPP's storage and can be restored using the CIPP Restore Backup
5659 Wizard. Backups run daily or on demand by clicking the backup now button.
5760 </ Typography >
58- < Grid container spacing = { 2 } >
61+ < Grid container spacing = { 2 } sx = { { my : 2 } } >
5962 < Grid item xs = { 12 } >
60- < CippFormComponent
61- type = "tenantSelector"
62- label = "Tenant"
63- name = "tenantFilter"
63+ < CippFormTenantSelector
6464 formControl = { formControl }
65+ allTenants = { true }
66+ name = "tenantFilter"
67+ required = { true }
68+ disableClearable = { true }
69+ componentType = "select"
6570 />
6671 </ Grid >
6772
0 commit comments