|
|
|
@@ -1061,7 +1061,7 @@ export default function FileConnectorSettingsPanel({
|
|
|
|
|
)}
|
|
|
|
|
<div className="file-connector-settings-section file-connector-policy-locks">
|
|
|
|
|
<ToggleSwitch label="i18n:govoplan-files.lower_connection_limits.4f9838bc" checked={policyDraft.allowLowerConnectionLimits} disabled={saving || !canWrite} onChange={(allowLowerConnectionLimits) => patchPolicyDraft({ allowLowerConnectionLimits })} />
|
|
|
|
|
<ToggleSwitch label="i18n:govoplan-files.lower_credential_limits.ec2b72bc" checked={policyDraft.allowLowerCredentialLimits} disabled={saving || !canWrite} onChange={(allowLowerCredentialLimits) => patchPolicyDraft({ allowLowerCredentialLimits })} />
|
|
|
|
|
<ToggleSwitch label="i18n:govoplan-files.lower_credential_limits.ec2b72bc" helpContextId="files.connector.policy" helpModuleId="files" checked={policyDraft.allowLowerCredentialLimits} disabled={saving || !canWrite} onChange={(allowLowerCredentialLimits) => patchPolicyDraft({ allowLowerCredentialLimits })} />
|
|
|
|
|
<ToggleSwitch label="i18n:govoplan-files.lower_provider_limits.5816270a" checked={policyDraft.allowLowerProviderLimits} disabled={saving || !canWrite} onChange={(allowLowerProviderLimits) => patchPolicyDraft({ allowLowerProviderLimits })} />
|
|
|
|
|
<ToggleSwitch label="i18n:govoplan-files.lower_path_limits.1abcccb1" checked={policyDraft.allowLowerPathLimits} disabled={saving || !canWrite} onChange={(allowLowerPathLimits) => patchPolicyDraft({ allowLowerPathLimits })} />
|
|
|
|
|
<ToggleSwitch label="i18n:govoplan-files.lower_endpoint_limits.3fd781d5" checked={policyDraft.allowLowerUrlLimits} disabled={saving || !canWrite} onChange={(allowLowerUrlLimits) => patchPolicyDraft({ allowLowerUrlLimits })} />
|
|
|
|
@@ -1101,14 +1101,14 @@ export default function FileConnectorSettingsPanel({
|
|
|
|
|
<p>Choose where this credential can be used and how it signs in.</p>
|
|
|
|
|
</header>
|
|
|
|
|
<FormGrid columns={2} collapseAt="standard" className="">
|
|
|
|
|
<FormField label="i18n:govoplan-files.credential_id.9432a6e1">
|
|
|
|
|
<FormField label="i18n:govoplan-files.credential_id.9432a6e1" helpContextId="files.connector.credentials" helpModuleId="files">
|
|
|
|
|
<input className={!editingCredentialId && !credentialDraft.id.trim() ? "field-input-missing" : undefined} aria-invalid={!editingCredentialId && !credentialDraft.id.trim() || undefined} value={credentialDraft.id} disabled={Boolean(editingCredentialId) || saving} onChange={(event) => patchCredentialDraft({ id: event.target.value })} placeholder={`${scopeType}-webdav-credentials`} />
|
|
|
|
|
</FormField>
|
|
|
|
|
<FormField label="i18n:govoplan-files.label.74341e3c">
|
|
|
|
|
<input className={!credentialDraft.label.trim() ? "field-input-missing" : undefined} aria-invalid={!credentialDraft.label.trim() || undefined} value={credentialDraft.label} disabled={saving} onChange={(event) => patchCredentialDraft({ label: event.target.value })} placeholder="i18n:govoplan-files.govoplan_webdav_credentials.bc696d69" />
|
|
|
|
|
</FormField>
|
|
|
|
|
{credentialAttachProfileId &&
|
|
|
|
|
<FormField label="i18n:govoplan-files.connection_credential.178babe0">
|
|
|
|
|
<FormField label="i18n:govoplan-files.connection_credential.178babe0" helpContextId="files.connector.credentials" helpModuleId="files">
|
|
|
|
|
<input value={credentialAttachedProfile ? `${credentialAttachedProfile.label} (${credentialAttachedProfile.id})` : credentialAttachProfileId} disabled readOnly />
|
|
|
|
|
</FormField>
|
|
|
|
|
}
|
|
|
|
@@ -1130,8 +1130,8 @@ export default function FileConnectorSettingsPanel({
|
|
|
|
|
/>
|
|
|
|
|
</FormField>
|
|
|
|
|
</div>
|
|
|
|
|
<FormField label="i18n:govoplan-files.credential_mode.23fdd899" documentation={CONNECTOR_DOCUMENTATION}>
|
|
|
|
|
<select value={credentialDraft.credentialMode} disabled={saving} onChange={(event) => patchCredentialDraft({ credentialMode: event.target.value as CredentialMode })}>
|
|
|
|
|
<FormField label="i18n:govoplan-files.credential_mode.23fdd899" documentation={CONNECTOR_DOCUMENTATION} helpContextId="files.connector.credentials" helpModuleId="files">
|
|
|
|
|
<select data-help-context-id="files.connector.credentials" data-help-module-id="files" value={credentialDraft.credentialMode} disabled={saving} onChange={(event) => patchCredentialDraft({ credentialMode: event.target.value as CredentialMode })}>
|
|
|
|
|
<option value="none">i18n:govoplan-files.none.6eef6648</option>
|
|
|
|
|
<option value="anonymous">i18n:govoplan-files.anonymous.9bed5104</option>
|
|
|
|
|
<option value="basic">i18n:govoplan-files.username_password.e8ba8896</option>
|
|
|
|
@@ -1142,8 +1142,8 @@ export default function FileConnectorSettingsPanel({
|
|
|
|
|
</FormGrid>
|
|
|
|
|
<div className="file-connector-settings-section">
|
|
|
|
|
<ToggleSwitch label="i18n:govoplan-files.enabled.df174a3f" checked={credentialDraft.enabled} disabled={saving} onChange={(enabled) => patchCredentialDraft({ enabled })} />
|
|
|
|
|
{editingCredentialId && <ToggleSwitch label="i18n:govoplan-files.clear_saved_password.7442260d" checked={credentialDraft.clearPassword} disabled={saving} onChange={(clearPassword) => patchCredentialDraft({ clearPassword })} />}
|
|
|
|
|
{editingCredentialId && <ToggleSwitch label="i18n:govoplan-files.clear_saved_token.a9c670aa" checked={credentialDraft.clearToken} disabled={saving} onChange={(clearToken) => patchCredentialDraft({ clearToken })} />}
|
|
|
|
|
{editingCredentialId && <ToggleSwitch label="i18n:govoplan-files.clear_saved_password.7442260d" helpContextId="files.connector.credentials" helpModuleId="files" checked={credentialDraft.clearPassword} disabled={saving} onChange={(clearPassword) => patchCredentialDraft({ clearPassword })} />}
|
|
|
|
|
{editingCredentialId && <ToggleSwitch label="i18n:govoplan-files.clear_saved_token.a9c670aa" helpContextId="files.connector.credentials" helpModuleId="files" checked={credentialDraft.clearToken} disabled={saving} onChange={(clearToken) => patchCredentialDraft({ clearToken })} />}
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
@@ -1179,8 +1179,8 @@ export default function FileConnectorSettingsPanel({
|
|
|
|
|
disabled={saving}
|
|
|
|
|
showPassword={false} />
|
|
|
|
|
<FormGrid columns={2} collapseAt="standard" className="">
|
|
|
|
|
<FormField label="i18n:govoplan-files.secret_reference.04ed2221">
|
|
|
|
|
<input value={credentialDraft.secretRef} disabled={saving} onChange={(event) => patchCredentialDraft({ secretRef: event.target.value })} />
|
|
|
|
|
<FormField label="i18n:govoplan-files.secret_reference.04ed2221" helpContextId="files.connector.credentials" helpModuleId="files">
|
|
|
|
|
<input data-help-context-id="files.connector.credentials" data-help-module-id="files" value={credentialDraft.secretRef} disabled={saving} onChange={(event) => patchCredentialDraft({ secretRef: event.target.value })} />
|
|
|
|
|
</FormField>
|
|
|
|
|
</FormGrid>
|
|
|
|
|
</>
|
|
|
|
@@ -1304,8 +1304,8 @@ export default function FileConnectorSettingsPanel({
|
|
|
|
|
<FormField label="i18n:govoplan-files.base_path.6a4867ca">
|
|
|
|
|
<input value={draft.basePath} disabled={saving} onChange={(event) => patchDraft({ basePath: event.target.value })} placeholder="GovOPlaN" />
|
|
|
|
|
</FormField>
|
|
|
|
|
<FormField label="i18n:govoplan-files.credential_mode.23fdd899" documentation={CONNECTOR_DOCUMENTATION}>
|
|
|
|
|
<select value={draft.credentialMode} disabled={saving} onChange={(event) => patchDraft({ credentialMode: event.target.value as CredentialMode })}>
|
|
|
|
|
<FormField label="i18n:govoplan-files.credential_mode.23fdd899" documentation={CONNECTOR_DOCUMENTATION} helpContextId="files.connector.credentials" helpModuleId="files">
|
|
|
|
|
<select data-help-context-id="files.connector.credentials" data-help-module-id="files" value={draft.credentialMode} disabled={saving} onChange={(event) => patchDraft({ credentialMode: event.target.value as CredentialMode })}>
|
|
|
|
|
<option value="none">i18n:govoplan-files.none.6eef6648</option>
|
|
|
|
|
<option value="anonymous">i18n:govoplan-files.anonymous.9bed5104</option>
|
|
|
|
|
<option value="basic">i18n:govoplan-files.username_password.e8ba8896</option>
|
|
|
|
@@ -1313,8 +1313,8 @@ export default function FileConnectorSettingsPanel({
|
|
|
|
|
<option value="secret_ref">i18n:govoplan-files.secret_reference.04ed2221</option>
|
|
|
|
|
</select>
|
|
|
|
|
</FormField>
|
|
|
|
|
<FormField label="i18n:govoplan-files.credential.8bede3ea">
|
|
|
|
|
<select value={profileCredentialSelectValue} disabled={saving || profileCredentialOptions.length === 0} onChange={(event) => patchDraft({ credentialProfileId: event.target.value })}>
|
|
|
|
|
<FormField label="i18n:govoplan-files.credential.8bede3ea" helpContextId="files.connector.credentials" helpModuleId="files">
|
|
|
|
|
<select data-help-context-id="files.connector.credentials" data-help-module-id="files" value={profileCredentialSelectValue} disabled={saving || profileCredentialOptions.length === 0} onChange={(event) => patchDraft({ credentialProfileId: event.target.value })}>
|
|
|
|
|
{profileCredentialOptions.length === 0 && <option value="">i18n:govoplan-files.no_saved_credential.30a5a951</option>}
|
|
|
|
|
{profileCredentialOptions.map((credential) => <option key={credential.id} value={credential.id}>{credential.label}</option>)}
|
|
|
|
|
</select>
|
|
|
|
|