Skip to content

Commit 433a52a

Browse files
committed
feat: add disabled mode to IdentifySigner component
Add support for displaying signers with disabled identification methods in read-only mode. When disabled prop is true, the component shows: - Warning message explaining the method is disabled - Signer information in read-only mode - No editable fields or action buttons This allows users to view signer details even when the identification method has been disabled by the administrator. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 9a9ca2b commit 433a52a

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

src/Components/Request/IdentifySigner.vue

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616
<strong>{{ identifyMethodLabel }}:</strong> {{ signer.id }}
1717
</NcNoteCard>
1818

19-
<NcTextField v-if="signerSelected"
19+
<NcNoteCard v-if="disabled" type="warning" class="disabled-warning">
20+
{{ t('libresign', 'This signer cannot be used because the identification method "{method}" has been disabled by the administrator.', { method: identifyMethodLabel }) }}
21+
</NcNoteCard>
22+
23+
<NcTextField v-if="signerSelected && !disabled"
2024
v-model="displayName"
2125
aria-describedby="name-input"
2226
autocapitalize="none"
@@ -27,7 +31,7 @@
2731
:helper-text="nameHelperText"
2832
@update:value="onNameChange" />
2933

30-
<div v-if="signerSelected && showCustomMessage" class="description-wrapper">
34+
<div v-if="signerSelected && showCustomMessage && !disabled" class="description-wrapper">
3135
<NcCheckboxRadioSwitch v-model:checked="enableCustomMessage"
3236
type="switch"
3337
@update:checked="onToggleCustomMessage">
@@ -43,7 +47,7 @@
4347
resize="none" />
4448
</div>
4549

46-
<div class="identifySigner__footer">
50+
<div v-if="!disabled" class="identifySigner__footer">
4751
<div class="button-group">
4852
<NcButton @click="filesStore.disableIdentifySigner()">
4953
{{ t('libresign', 'Cancel') }}
@@ -119,6 +123,10 @@ export default {
119123
type: Array,
120124
default: () => [],
121125
},
126+
disabled: {
127+
type: Boolean,
128+
default: false,
129+
},
122130
},
123131
setup() {
124132
const filesStore = useFilesStore()
@@ -253,6 +261,11 @@ export default {
253261
width: 96%;
254262
margin: 0 auto;
255263
264+
.disabled-warning {
265+
margin-top: 12px;
266+
width: 100%;
267+
}
268+
256269
#account-or-email {
257270
width: 100%;
258271
}

0 commit comments

Comments
 (0)