do not show sender format that has full sender address

This commit is contained in:
Son NK 2021-01-26 19:55:56 +01:00
parent 6547d9420f
commit e85cfebf92
1 changed files with 17 additions and 8 deletions

View File

@ -264,22 +264,31 @@
<input type="hidden" name="form-name" value="change-sender-format"> <input type="hidden" name="form-name" value="change-sender-format">
<select class="form-control mr-sm-2" name="sender-format"> <select class="form-control mr-sm-2" name="sender-format">
<option value="{{ SenderFormatEnum.VIA.value }}" {# Only show this for compatibility reason #}
{% if current_user.sender_format == SenderFormatEnum.VIA.value %} selected {% endif %}> {% if current_user.sender_format == SenderFormatEnum.VIA.value %}
john@wick.com via SimpleLogin <option value="{{ SenderFormatEnum.VIA.value }}"
</option> {% if current_user.sender_format == SenderFormatEnum.VIA.value %} selected {% endif %}>
john@wick.com via SimpleLogin (Not recommended)
</option>
{% endif %}
<option value="{{ SenderFormatEnum.AT.value }}" <option value="{{ SenderFormatEnum.AT.value }}"
{% if current_user.sender_format == SenderFormatEnum.AT.value %} selected {% endif %}> {% if current_user.sender_format == SenderFormatEnum.AT.value %} selected {% endif %}>
John Wick - john at wick.com John Wick - john at wick.com
</option> </option>
<option value="{{ SenderFormatEnum.A.value }}" <option value="{{ SenderFormatEnum.A.value }}"
{% if current_user.sender_format == SenderFormatEnum.A.value %} selected {% endif %}> {% if current_user.sender_format == SenderFormatEnum.A.value %} selected {% endif %}>
John Wick - john(a)wick.com John Wick - john(a)wick.com
</option> </option>
<option value="{{ SenderFormatEnum.FULL.value }}"
{% if current_user.sender_format == SenderFormatEnum.FULL.value %} selected {% endif %}> {# Only show this for compatibility reason #}
John Wick - john@wick.com {% if current_user.sender_format == SenderFormatEnum.FULL.value %}
</option> <option value="{{ SenderFormatEnum.FULL.value }}"
{% if current_user.sender_format == SenderFormatEnum.FULL.value %} selected {% endif %}>
John Wick - john@wick.com (Not recommended)
</option>
{% endif %}
</select> </select>
<button class="btn btn-outline-primary mt-3">Update</button> <button class="btn btn-outline-primary mt-3">Update</button>