1
0
Fork 0
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:
s3lph 2018-09-08 21:05:03 +02:00
parent 79e6f83c72
commit 436da33330
4 changed files with 4 additions and 2 deletions

View file

@ -48,7 +48,7 @@ def admin(method: str,
return TemplateResponse('admin.html', return TemplateResponse('admin.html',
authuser=user, authlevel=authlevel, users=users, products=products, authuser=user, authlevel=authlevel, users=users, products=products,
receipt_preference_class=ReceiptPreference, 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: def handle_change(args: RequestArguments, user: User, db: MatematDatabase, config: Dict[str, str]) -> None:

View file

@ -57,7 +57,7 @@ def moduser(method: str,
return TemplateResponse('moduser.html', return TemplateResponse('moduser.html',
authuser=authuser, user=user, authlevel=authlevel, authuser=authuser, user=user, authlevel=authlevel,
receipt_preference_class=ReceiptPreference, 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]) \ def handle_change(args: RequestArguments, user: User, authuser: User, db: MatematDatabase, config: Dict[str, str]) \

View file

@ -14,6 +14,7 @@
<option value="{{ pref.value }}" {% if authuser.receipt_pref == pref %} selected="selected" {% endif %}>{{ pref.human_readable }}</option> <option value="{{ pref.value }}" {% if authuser.receipt_pref == pref %} selected="selected" {% endif %}>{{ pref.human_readable }}</option>
{% endfor %} {% endfor %}
</select> </select>
{% if config_smtp_enabled != '1' %}Sending receipts is disabled by your administrator.{% endif %}
<br/> <br/>
<label for="admin-myaccount-ismember">Member: </label> <label for="admin-myaccount-ismember">Member: </label>

View file

@ -26,6 +26,7 @@
<option value="{{ pref.value }}" {% if user.receipt_pref == pref %} selected="selected" {% endif %}>{{ pref.human_readable }}</option> <option value="{{ pref.value }}" {% if user.receipt_pref == pref %} selected="selected" {% endif %}>{{ pref.human_readable }}</option>
{% endfor %} {% endfor %}
</select> </select>
{% if config_smtp_enabled != '1' %}Sending receipts is disabled by your administrator.{% endif %}
<br/> <br/>
<label for="moduser-account-ismember">Member: </label> <label for="moduser-account-ismember">Member: </label>