feat: Add confirmation email for form respondents#3289
feat: Add confirmation email for form respondents#3289dtretyakov wants to merge 5 commits intonextcloud:mainfrom
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
@Chartman123 I also tried to streamline UX for the feature. Now the form looks like that:
|
|
@dtretyakov looks good :) I'll ping the design specialists to see what they think about it :) |
b111145 to
9452b76
Compare
|
For app code here, |
|
No problem, just ignore this. For the next release we will no longer support NC31 |
9452b76 to
363a0cb
Compare
Signed-off-by: Dmitry Tretyakov <dtretyakov@gmail.com>
363a0cb to
9cb9c09
Compare
|
@Chartman123 the branch is rebased on the fresh main and uses |
Chartman123
left a comment
There was a problem hiding this comment.
I did a quick review and found some parts that should be changed in my opinion.
Please also add the new fields to FormsMigrator.php.
Also not sure about the frontend part, especially in the sidebar as I'm no vue expert. I added @susnux and @pringelmann as reviewers :)
Btw no need to hurry, the next release is not yet directly around the corner. We'll get it merged once it's ready :)
| ]; | ||
|
|
||
| public const EXTRA_SETTINGS_SHORT = [ | ||
| 'confirmationEmailRecipient' => ['boolean'], |
There was a problem hiding this comment.
Not sure, if we should add the extraSetting to the whole short question type or if we'd better have it only for *_SHORT_EMAIL. Otherwise it could also be set for e.g. number fields.
@susnux @pringelmann what do you think?
| <NcNoteCard | ||
| v-if="hasConfirmationEmailRecipientConflict" | ||
| type="error" | ||
| :text=" | ||
| t( | ||
| 'forms', | ||
| 'Only one email field can be used for confirmation emails. Select the recipient field below to fix this.', | ||
| ) | ||
| " /> | ||
| <NcNoteCard | ||
| v-else-if="emailQuestionCount === 0" | ||
| type="error" | ||
| :text=" | ||
| t( | ||
| 'forms', | ||
| 'Add at least one email field before confirmation emails can be used.', | ||
| ) | ||
| " /> | ||
| <NcNoteCard | ||
| v-else-if="requiresConfirmationEmailRecipientSelection" | ||
| type="error" | ||
| :text=" | ||
| t( | ||
| 'forms', | ||
| 'Select which email field should receive confirmation emails before finishing this setup.', | ||
| ) | ||
| " /> |
There was a problem hiding this comment.
Perhaps you could only use one NcNoteCard for all errors and use a single computed prop that returns the error text based on the error?
| <select | ||
| :value="selectedConfirmationEmailQuestionId" | ||
| :disabled="locked || isSavingConfirmationEmailRecipient" | ||
| class="confirmation-email__select" | ||
| @change="onConfirmationEmailRecipientSelectionChange"> | ||
| <option value=""> | ||
| {{ t('forms', 'Select an email field') }} | ||
| </option> | ||
| <option | ||
| v-for="question in confirmationEmailQuestions" | ||
| :key="question.id" | ||
| :value="question.id"> | ||
| {{ confirmationEmailQuestionLabel(question) }} | ||
| </option> |
There was a problem hiding this comment.
Why not use NcSelect here? this would already bring the correct styling. Same for the other input fields
Co-authored-by: Christian Hartmann <chris-hartmann@gmx.de> Signed-off-by: Dmitry Tretyakov <dtretyakov@users.noreply.github.com>
Co-authored-by: Christian Hartmann <chris-hartmann@gmx.de> Signed-off-by: Dmitry Tretyakov <dtretyakov@users.noreply.github.com>
Co-authored-by: Christian Hartmann <chris-hartmann@gmx.de> Signed-off-by: Dmitry Tretyakov <dtretyakov@users.noreply.github.com>
Co-authored-by: Christian Hartmann <chris-hartmann@gmx.de> Signed-off-by: Dmitry Tretyakov <dtretyakov@users.noreply.github.com>
There was a problem hiding this comment.
Please also change the file name

Closes #525 - Send confirmation emails to form respondents after submission.
Features:
Technical changes: