Normalize certification type handling

Introduce `NormalizeCertificationType` method to ensure consistent handling of certification types across the application. Update `CreateEnvelopeCommandHandler`, `CreateEnvelopeWizardPopup.razor`, and `SenderEditorPage.razor` to use this method. Modify `CertificationType` enum to include `ElectronicSignature` and remove `QualifiedSignature`. Update UI components to reflect these changes by removing the `QualifiedSignature` option.
This commit is contained in:
2026-10-26 16:58:06 +01:00
parent 4dcfe67038
commit ae1ecbc15f
5 changed files with 33 additions and 13 deletions

View File

@@ -120,7 +120,6 @@
<select @bind="_certificationType" class="sender-create-wizard__select">
<option value="1">@L("AdvancedElectronicSignature", "Advanced Electronic Signature")</option>
<option value="2">@L("ElectronicSignature", "Electronic Signature")</option>
<option value="3">@L("QualifiedSignature", "Qualified Signature")</option>
</select>
</div>
@@ -1026,7 +1025,7 @@
_useAccessCode = true;
if (envelopeType.CertificationType.HasValue)
_certificationType = envelopeType.CertificationType.Value;
_certificationType = NormalizeCertificationType(envelopeType.CertificationType.Value);
if (envelopeType.FinalEmailToCreator.HasValue)
_finalEmailToCreator = envelopeType.FinalEmailToCreator.Value;
@@ -1055,6 +1054,7 @@
private void NormalizeSettings()
{
_language = string.IsNullOrWhiteSpace(_language) ? "de-DE" : _language.Trim();
_certificationType = NormalizeCertificationType(_certificationType);
if (_tfaEnabled)
_useAccessCode = true;
@@ -1068,6 +1068,13 @@
_expiresWarningWhenDays = _expiresWhenDays;
}
private static int NormalizeCertificationType(int value)
{
return value == 2
? 2
: (int)CertificationType.AdvancedElectronicSignature;
}
private bool ValidateSettings(out string? message)
{
NormalizeSettings();