Prompt user if they try to send email preview w/ no address
This commit is contained in:
parent
149ae4b71c
commit
d146514c39
|
@ -92,7 +92,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<input name="recipient" type="email" class="input" value="${request.user.email_address or ''}" />
|
<b-input name="recipient" v-model="userEmailAddress"></b-input>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="control">
|
<div class="control">
|
||||||
|
@ -119,10 +119,16 @@
|
||||||
return {
|
return {
|
||||||
previewFormButtonText: "Send Preview Email",
|
previewFormButtonText: "Send Preview Email",
|
||||||
previewFormSubmitting: false,
|
previewFormSubmitting: false,
|
||||||
|
userEmailAddress: ${json.dumps(request.user.email_address)|n},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
submitPreviewForm() {
|
submitPreviewForm(event) {
|
||||||
|
if (!this.userEmailAddress) {
|
||||||
|
alert("Please provide an email address.")
|
||||||
|
event.preventDefault()
|
||||||
|
return
|
||||||
|
}
|
||||||
this.previewFormSubmitting = true
|
this.previewFormSubmitting = true
|
||||||
this.previewFormButtonText = "Working, please wait..."
|
this.previewFormButtonText = "Working, please wait..."
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue