@@ -5,6 +5,8 @@ import { Layout as DashboardLayout } from "/src/layouts/index.js";
5
5
import CippFormPage from "/src/components/CippFormPages/CippFormPage" ;
6
6
import CippFormComponent from "/src/components/CippComponents/CippFormComponent" ;
7
7
import { useSettings } from "/src/hooks/use-settings" ;
8
+ import { CippFormTenantSelector } from "../../../../components/CippComponents/CippFormTenantSelector" ;
9
+ import { te } from "date-fns/locale" ;
8
10
9
11
const CreateBackup = ( ) => {
10
12
const userSettingsDefaults = useSettings ( ) ;
@@ -30,7 +32,7 @@ const CreateBackup = () => {
30
32
31
33
return (
32
34
< CippFormPage
33
- title = "Add Backup Schedule"
35
+ title = "Backup Schedule"
34
36
formControl = { formControl }
35
37
queryKey = { `Backup Tasks` }
36
38
postUrl = "/api/AddScheduledItem?hidden=true& DisallowDuplicateName = true "
@@ -41,7 +43,7 @@ const CreateBackup = () => {
41
43
const tenantFilter = values . tenantFilter || tenantDomain ;
42
44
const shippedValues = {
43
45
TenantFilter : tenantFilter ,
44
- Name : `CIPP Backup ${ tenantFilter } ` ,
46
+ Name : `CIPP Backup - ${ tenantFilter } ` ,
45
47
Command : { value : `New-CIPPBackup` } ,
46
48
Parameters : { backupType : "Scheduled" , ScheduledBackupValues : { ...values } } ,
47
49
ScheduledTime : unixTime ,
@@ -50,18 +52,21 @@ const CreateBackup = () => {
50
52
return shippedValues ;
51
53
} }
52
54
backButtonTitle = "Backup Tasks"
55
+ allowResubmit = { true }
53
56
>
54
57
< Typography variant = "body1" >
55
58
Backups are stored in CIPP's storage and can be restored using the CIPP Restore Backup
56
59
Wizard. Backups run daily or on demand by clicking the backup now button.
57
60
</ Typography >
58
- < Grid container spacing = { 2 } >
61
+ < Grid container spacing = { 2 } sx = { { my : 2 } } >
59
62
< Grid item xs = { 12 } >
60
- < CippFormComponent
61
- type = "tenantSelector"
62
- label = "Tenant"
63
- name = "tenantFilter"
63
+ < CippFormTenantSelector
64
64
formControl = { formControl }
65
+ allTenants = { true }
66
+ name = "tenantFilter"
67
+ required = { true }
68
+ disableClearable = { true }
69
+ componentType = "select"
65
70
/>
66
71
</ Grid >
67
72
0 commit comments