diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index 88377e0201..6d75186c95 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -834,6 +834,12 @@ class InvenTreeSetting(BaseInvenTreeSetting): 'default': True, 'validator': bool, }, + 'LOGIN_ENABLE_REG': { + 'name': _('Enable registration'), + 'description': _('Enable self-registration for users on the login-pages'), + 'default': False, + 'validator': bool, + }, } class Meta: diff --git a/InvenTree/templates/account/login.html b/InvenTree/templates/account/login.html index f5cc64717f..33bc15b526 100644 --- a/InvenTree/templates/account/login.html +++ b/InvenTree/templates/account/login.html @@ -6,10 +6,12 @@ {% block content %} +{% settings_value 'LOGIN_ENABLE_REG' as enable_reg %} {% settings_value 'LOGIN_ENABLE_PWD_FORGOT' as enable_pwd_forgot %}
{% blocktrans with site.name as site_name %}Please sign in with one @@ -19,6 +21,7 @@ for a account and sign in below:{% endblocktrans %}
{% blocktrans %}If you have not created an account yet, then please sign up first.{% endblocktrans %}
{% endif %} +{% endif %}