user can set note when creating custom alias
This commit is contained in:
parent
d8229102a6
commit
145bed893f
|
@ -48,9 +48,21 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row col">
|
||||
<div class="row mb-2">
|
||||
<div class="col">
|
||||
<textarea name="note"
|
||||
class="form-control"
|
||||
rows="3"
|
||||
placeholder="Note, can be anything to help you remember WHY you create this alias. This field is optional."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<button class="btn btn-primary mt-1">Create</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ def custom_alias():
|
|||
if request.method == "POST":
|
||||
alias_prefix = request.form.get("prefix")
|
||||
alias_suffix = request.form.get("suffix")
|
||||
alias_note = request.form.get("note")
|
||||
|
||||
if verify_prefix_suffix(
|
||||
current_user, alias_prefix, alias_suffix, user_custom_domains
|
||||
|
@ -61,7 +62,9 @@ def custom_alias():
|
|||
"warning",
|
||||
)
|
||||
else:
|
||||
gen_email = GenEmail.create(user_id=current_user.id, email=full_alias)
|
||||
gen_email = GenEmail.create(
|
||||
user_id=current_user.id, email=full_alias, note=alias_note
|
||||
)
|
||||
|
||||
# get the custom_domain_id if alias is created with a custom domain
|
||||
alias_domain = get_email_domain_part(full_alias)
|
||||
|
|
Loading…
Reference in a new issue