|
12 | 12 | use OCP\IL10N; |
13 | 13 |
|
14 | 14 | enum DocMdpLevel: int { |
15 | | - case NONE = 0; |
16 | | - case NO_CHANGES = 1; |
17 | | - case FORM_FILL = 2; |
18 | | - case FORM_FILL_AND_ANNOTATIONS = 3; |
| 15 | + case NOT_CERTIFIED = 0; |
| 16 | + case CERTIFIED_NO_CHANGES_ALLOWED = 1; |
| 17 | + case CERTIFIED_FORM_FILLING = 2; |
| 18 | + case CERTIFIED_FORM_FILLING_AND_ANNOTATIONS = 3; |
19 | 19 |
|
20 | 20 | public function isCertifying(): bool { |
21 | | - return $this !== self::NONE; |
| 21 | + return $this !== self::NOT_CERTIFIED; |
22 | 22 | } |
23 | 23 |
|
24 | 24 | public function getLabel(IL10N $l10n): string { |
25 | 25 | return match($this) { |
26 | | - self::NONE => $l10n->t('No certification'), |
27 | | - self::NO_CHANGES => $l10n->t('No changes allowed'), |
28 | | - self::FORM_FILL => $l10n->t('Form filling and additional signatures'), |
29 | | - self::FORM_FILL_AND_ANNOTATIONS => $l10n->t('Form filling, annotations and additional signatures'), |
| 26 | + self::NOT_CERTIFIED => $l10n->t('No certification'), |
| 27 | + self::CERTIFIED_NO_CHANGES_ALLOWED => $l10n->t('No changes allowed'), |
| 28 | + self::CERTIFIED_FORM_FILLING => $l10n->t('Form filling and additional signatures'), |
| 29 | + self::CERTIFIED_FORM_FILLING_AND_ANNOTATIONS => $l10n->t('Form filling, annotations and additional signatures'), |
30 | 30 | }; |
31 | 31 | } |
32 | 32 |
|
33 | 33 | public function getDescription(IL10N $l10n): string { |
34 | 34 | return match($this) { |
35 | | - self::NONE => $l10n->t('Document is not certified. No restrictions on modifications.'), |
36 | | - self::NO_CHANGES => $l10n->t('No changes allowed. Additional approval signatures are prohibited.'), |
37 | | - self::FORM_FILL => $l10n->t('Form filling allowed. Additional approval signatures are allowed.'), |
38 | | - self::FORM_FILL_AND_ANNOTATIONS => $l10n->t('Form filling and annotations allowed. Additional approval signatures are allowed.'), |
| 35 | + self::NOT_CERTIFIED => $l10n->t('Document is not certified. No restrictions on modifications.'), |
| 36 | + self::CERTIFIED_NO_CHANGES_ALLOWED => $l10n->t('No changes allowed. Additional approval signatures are prohibited.'), |
| 37 | + self::CERTIFIED_FORM_FILLING => $l10n->t('Form filling allowed. Additional approval signatures are allowed.'), |
| 38 | + self::CERTIFIED_FORM_FILLING_AND_ANNOTATIONS => $l10n->t('Form filling and annotations allowed. Additional approval signatures are allowed.'), |
39 | 39 | }; |
40 | 40 | } |
41 | 41 | } |
0 commit comments