Skip to content
Snippets Groups Projects

Issue #3472357: Error when Encrypt module is enabled

Merged davisben requested to merge issue/aws-3472357:3472357-encryption-profile into 2.0.x
3 files
+ 32
12
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -147,23 +147,24 @@ class ProfileForm extends EntityForm {
'#default_value' => $this->entity->getRegion(),
];
if ($this->encryptionProfileManager) {
$options = ['_none' => $this->t('- None -')];
$encryption_options = ['_none' => $this->t('- None -')];
if ($this->encryptionProfileManager) {
$encryption_profiles = $this->encryptionProfileManager->getAllEncryptionProfiles();
foreach ($encryption_profiles as $id => $profile) {
$options[$id] = $profile->label();
$encryption_options[$id] = $profile->label();
}
$form['encryption_profile'] = [
'#type' => 'select',
'#title' => $this->t('Encryption Profile'),
'#description' => $this->t('The encryption profile to use to encrypt the secret key.'),
'#options' => $options,
'#default_value' => $this->entity->getEncryptionProfile(),
];
}
$form['encryption_profile'] = [
'#type' => 'select',
'#title' => $this->t('Encryption Profile'),
'#description' => $this->t('The encryption profile to use to encrypt the secret key.'),
'#options' => $encryption_options,
'#default_value' => $this->entity->getEncryptionProfile(),
'#access' => $this->encryptionProfileManager,
];
return $form;
}
Loading