diff --git a/cps/admin.py b/cps/admin.py index 557d0255..068ac356 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -1348,7 +1348,9 @@ def _handle_new_user(to_save, content, languages, translations, kobo_support): raise Exception(_(u"E-mail is not from valid domain")) except Exception as ex: flash(str(ex), category="error") - return render_title_template("user_edit.html", new_user=1, content=content, translations=translations, + return render_title_template("user_edit.html", new_user=1, content=content, + config=config, + translations=translations, languages=languages, title=_(u"Add new user"), page="newuser", kobo_support=kobo_support, registered_oauth=oauth_check) try: @@ -1463,6 +1465,7 @@ def _handle_edit_user(to_save, content, languages, translations, kobo_support): kobo_support=kobo_support, new_user=0, content=content, + config=config, registered_oauth=oauth_check, title=_(u"Edit User %(nick)s", nick=content.name), page="edituser") @@ -1496,7 +1499,8 @@ def new_user(): content.sidebar_view = config.config_default_show content.locale = config.config_default_locale content.default_language = config.config_default_language - return render_title_template("user_edit.html", new_user=1, content=content, translations=translations, + return render_title_template("user_edit.html", new_user=1, content=content, + config=config, translations=translations, languages=languages, title=_(u"Add new user"), page="newuser", kobo_support=kobo_support, registered_oauth=oauth_check) @@ -1584,6 +1588,7 @@ def edit_user(user_id): languages=languages, new_user=0, content=content, + config=config, registered_oauth=oauth_check, mail_configured=config.get_mail_server_configured(), kobo_support=kobo_support, diff --git a/cps/templates/admin.html b/cps/templates/admin.html index f99c0938..9728cb6d 100644 --- a/cps/templates/admin.html +++ b/cps/templates/admin.html @@ -16,7 +16,7 @@ {{_('Downloads')}} {{_('Admin')}} {{_('Password')}} - {% if config.config_upload %} + {% if config.config_uploading %} {{_('Upload')}} {% endif %} {{_('Download')}} @@ -34,7 +34,7 @@ {{user.downloads.count()}} {{ display_bool_setting(user.role_admin()) }} {{ display_bool_setting(user.role_passwd()) }} - {% if config.config_upload %} + {% if config.config_uploading %} {{ display_bool_setting(user.role_upload()) }} {% endif %} {{ display_bool_setting(user.role_download()) }} diff --git a/cps/templates/config_view_edit.html b/cps/templates/config_view_edit.html index 32509e88..1dc02a5e 100644 --- a/cps/templates/config_view_edit.html +++ b/cps/templates/config_view_edit.html @@ -95,7 +95,7 @@ - {% if config.config_upload %} + {% if conf.config_uploading %}
diff --git a/cps/templates/user_edit.html b/cps/templates/user_edit.html index 2729a168..edecbaf2 100644 --- a/cps/templates/user_edit.html +++ b/cps/templates/user_edit.html @@ -101,7 +101,7 @@
- {% if config.config_upload %} + {% if config.config_uploading %}