mirror of
				https://github.com/janeczku/calibre-web
				synced 2025-10-26 04:47:40 +00:00 
			
		
		
		
	Fix visiblility upload right on enabled upload feature
This commit is contained in:
		| @@ -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, | ||||
|   | ||||
| @@ -16,7 +16,7 @@ | ||||
|             <th>{{_('Downloads')}}</th> | ||||
|             <th class="hidden-xs ">{{_('Admin')}}</th> | ||||
|             <th class="hidden-xs hidden-sm">{{_('Password')}}</th> | ||||
|           {% if config.config_upload %} | ||||
|           {% if config.config_uploading %} | ||||
|             <th class="hidden-xs hidden-sm">{{_('Upload')}}</th> | ||||
|           {%  endif %} | ||||
|             <th class="hidden-xs hidden-sm">{{_('Download')}}</th> | ||||
| @@ -34,7 +34,7 @@ | ||||
|             <td>{{user.downloads.count()}}</td> | ||||
|             <td class="hidden-xs">{{ display_bool_setting(user.role_admin()) }}</td> | ||||
|             <td class="hidden-xs hidden-sm">{{ display_bool_setting(user.role_passwd()) }}</td> | ||||
|             {% if config.config_upload %} | ||||
|             {% if config.config_uploading %} | ||||
|             <td class="hidden-xs hidden-sm">{{ display_bool_setting(user.role_upload()) }}</td> | ||||
|             {%  endif %} | ||||
|             <td class="hidden-xs hidden-sm">{{ display_bool_setting(user.role_download()) }}</td> | ||||
|   | ||||
| @@ -95,7 +95,7 @@ | ||||
|           <input type="checkbox" name="viewer_role" id="viewer_role" {% if conf.role_viewer() %}checked{% endif %}> | ||||
|           <label for="viewer_role">{{_('Allow eBook Viewer')}}</label> | ||||
|         </div> | ||||
|       {% if config.config_upload %} | ||||
|       {% if conf.config_uploading %} | ||||
|         <div class="form-group"> | ||||
|           <input type="checkbox" name="upload_role" id="upload_role" {% if conf.role_upload() %}checked{% endif %}> | ||||
|           <label for="upload_role">{{_('Allow Uploads')}}</label> | ||||
|   | ||||
| @@ -101,7 +101,7 @@ | ||||
|       <input type="checkbox" name="viewer_role" id="viewer_role" {% if content.role_viewer() %}checked{% endif %}> | ||||
|       <label for="viewer_role">{{_('Allow eBook Viewer')}}</label> | ||||
|     </div> | ||||
|     {% if config.config_upload %} | ||||
|     {% if config.config_uploading %} | ||||
|     <div class="form-group"> | ||||
|       <input type="checkbox" name="upload_role" id="upload_role" {% if content.role_upload() %}checked{% endif %}> | ||||
|       <label for="upload_role">{{_('Allow Uploads')}}</label> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Ozzie Isaacs
					Ozzie Isaacs