forked from s3lph/matemat
Added a not to the settings UI when sending of receipts has been disabled in the configuration.
This commit is contained in:
parent
79e6f83c72
commit
436da33330
4 changed files with 4 additions and 2 deletions
|
@ -48,7 +48,7 @@ def admin(method: str,
|
|||
return TemplateResponse('admin.html',
|
||||
authuser=user, authlevel=authlevel, users=users, products=products,
|
||||
receipt_preference_class=ReceiptPreference,
|
||||
setupname=config['InstanceName'])
|
||||
setupname=config['InstanceName'], config_smtp_enabled=config['SmtpSendReceipts'])
|
||||
|
||||
|
||||
def handle_change(args: RequestArguments, user: User, db: MatematDatabase, config: Dict[str, str]) -> None:
|
||||
|
|
|
@ -57,7 +57,7 @@ def moduser(method: str,
|
|||
return TemplateResponse('moduser.html',
|
||||
authuser=authuser, user=user, authlevel=authlevel,
|
||||
receipt_preference_class=ReceiptPreference,
|
||||
setupname=config['InstanceName'])
|
||||
setupname=config['InstanceName'], config_smtp_enabled=config['SmtpSendReceipts'])
|
||||
|
||||
|
||||
def handle_change(args: RequestArguments, user: User, authuser: User, db: MatematDatabase, config: Dict[str, str]) \
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<option value="{{ pref.value }}" {% if authuser.receipt_pref == pref %} selected="selected" {% endif %}>{{ pref.human_readable }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% if config_smtp_enabled != '1' %}Sending receipts is disabled by your administrator.{% endif %}
|
||||
<br/>
|
||||
|
||||
<label for="admin-myaccount-ismember">Member: </label>
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
<option value="{{ pref.value }}" {% if user.receipt_pref == pref %} selected="selected" {% endif %}>{{ pref.human_readable }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% if config_smtp_enabled != '1' %}Sending receipts is disabled by your administrator.{% endif %}
|
||||
<br/>
|
||||
|
||||
<label for="moduser-account-ismember">Member: </label>
|
||||
|
|
Loading…
Reference in a new issue