fix: Remove validation for message signature (#8404)
This commit is contained in:
@@ -22,14 +22,12 @@
|
|||||||
:enabled-menu-options="customEditorMenuList"
|
:enabled-menu-options="customEditorMenuList"
|
||||||
:enable-suggestions="false"
|
:enable-suggestions="false"
|
||||||
:show-image-resize-toolbar="true"
|
:show-image-resize-toolbar="true"
|
||||||
@blur="$v.messageSignature.$touch"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<woot-button
|
<woot-button
|
||||||
:is-loading="isUpdating"
|
:is-loading="isUpdating"
|
||||||
type="button"
|
type="button"
|
||||||
:is-disabled="$v.messageSignature.$invalid"
|
@click.prevent="updateSignature"
|
||||||
@click.prevent="updateSignature()"
|
|
||||||
>
|
>
|
||||||
{{ $t('PROFILE_SETTINGS.FORM.MESSAGE_SIGNATURE_SECTION.BTN_TEXT') }}
|
{{ $t('PROFILE_SETTINGS.FORM.MESSAGE_SIGNATURE_SECTION.BTN_TEXT') }}
|
||||||
</woot-button>
|
</woot-button>
|
||||||
@@ -38,7 +36,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { required } from 'vuelidate/lib/validators';
|
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
|
||||||
import WootMessageEditor from 'dashboard/components/widgets/WootWriter/Editor.vue';
|
import WootMessageEditor from 'dashboard/components/widgets/WootWriter/Editor.vue';
|
||||||
@@ -59,11 +56,6 @@ export default {
|
|||||||
customEditorMenuList: MESSAGE_SIGNATURE_EDITOR_MENU_OPTIONS,
|
customEditorMenuList: MESSAGE_SIGNATURE_EDITOR_MENU_OPTIONS,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
validations: {
|
|
||||||
messageSignature: {
|
|
||||||
required,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters({
|
...mapGetters({
|
||||||
currentUser: 'getCurrentUser',
|
currentUser: 'getCurrentUser',
|
||||||
@@ -79,15 +71,9 @@ export default {
|
|||||||
this.messageSignature = messageSignature || '';
|
this.messageSignature = messageSignature || '';
|
||||||
},
|
},
|
||||||
async updateSignature() {
|
async updateSignature() {
|
||||||
this.$v.$touch();
|
|
||||||
if (this.$v.$invalid) {
|
|
||||||
this.showAlert(this.$t('PROFILE_SETTINGS.FORM.ERROR'));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.$store.dispatch('updateProfile', {
|
await this.$store.dispatch('updateProfile', {
|
||||||
message_signature: this.messageSignature,
|
message_signature: this.messageSignature || '',
|
||||||
});
|
});
|
||||||
this.errorMessage = this.$t(
|
this.errorMessage = this.$t(
|
||||||
'PROFILE_SETTINGS.FORM.MESSAGE_SIGNATURE_SECTION.API_SUCCESS'
|
'PROFILE_SETTINGS.FORM.MESSAGE_SIGNATURE_SECTION.API_SUCCESS'
|
||||||
|
|||||||
Reference in New Issue
Block a user