diff --git a/media/css/seahub.css b/media/css/seahub.css
index aafbb833f3..e17d6db9f1 100644
--- a/media/css/seahub.css
+++ b/media/css/seahub.css
@@ -3814,7 +3814,8 @@ img.thumbnail {
}
.web-setting-name,
.web-setting-input,
-.web-setting-ops {
+.web-setting-ops,
+.web-setting-ops-x1 {
display:inline-block;
}
.web-setting-name {
@@ -3836,10 +3837,21 @@ img.thumbnail {
height:95px;
margin:0;
}
+.web-setting-input .textarea-x1 {
+ width:inherit;
+ height:247px;
+}
.web-setting-ops {
width:100px;
vertical-align:top;
}
+.web-setting-ops-x1 {
+ vertical-align: bottom;
+ height: 50px;
+}
+.web-setting-ops-x1 .submit {
+ margin-left: 30px;
+}
.web-setting-form .submit,
.web-setting-input {
margin-top:0;
diff --git a/seahub/base/context_processors.py b/seahub/base/context_processors.py
index 842aa74b77..bc29732d74 100644
--- a/seahub/base/context_processors.py
+++ b/seahub/base/context_processors.py
@@ -16,7 +16,7 @@ from django.utils.functional import lazy
from constance import config
from seahub.settings import SEAFILE_VERSION, SITE_TITLE, SITE_NAME, \
- MAX_FILE_NAME, BRANDING_CSS, LOGO_PATH, LOGO_WIDTH, LOGO_HEIGHT,\
+ MAX_FILE_NAME, LOGO_PATH, LOGO_WIDTH, LOGO_HEIGHT,\
SHOW_REPO_DOWNLOAD_BUTTON, SITE_ROOT, ENABLE_GUEST_INVITATION, \
FAVICON_PATH, ENABLE_THUMBNAIL, THUMBNAIL_SIZE_FOR_ORIGINAL, \
MEDIA_ROOT, SHOW_LOGOUT_ICON, CUSTOM_LOGO_PATH, CUSTOM_FAVICON_PATH
@@ -84,7 +84,7 @@ def base(request):
result = {
'seafile_version': SEAFILE_VERSION,
'site_title': config.SITE_TITLE,
- 'branding_css': BRANDING_CSS,
+ 'branding_css': config.ENABLE_BRANDING_CSS,
'favicon_path': favicon_path,
'logo_path': logo_path,
'logo_width': LOGO_WIDTH,
diff --git a/seahub/settings.py b/seahub/settings.py
index dec7a86dbc..e836236162 100644
--- a/seahub/settings.py
+++ b/seahub/settings.py
@@ -464,8 +464,8 @@ LOGO_HEIGHT = 32
CUSTOM_LOGO_PATH = 'custom/mylogo.png'
CUSTOM_FAVICON_PATH = 'custom/favicon.ico'
-# css to modify the seafile css (e.g. css/my_site.css)
-BRANDING_CSS = ''
+# Enable custom css to modify the seafile css
+ENABLE_BRANDING_CSS = False
# Using Django to server static file. Set to `False` if deployed behide a web
# server.
@@ -763,4 +763,7 @@ CONSTANCE_CONFIG = {
'SITE_NAME': (SITE_NAME, ''),
'SITE_TITLE': (SITE_TITLE, ''),
+
+ 'ENABLE_BRANDING_CSS': (ENABLE_BRANDING_CSS, ''),
+ 'CUSTOM_CSS': ('', ''),
}
diff --git a/seahub/templates/base.html b/seahub/templates/base.html
index ccef7e08c0..b3d180edfa 100644
--- a/seahub/templates/base.html
+++ b/seahub/templates/base.html
@@ -16,7 +16,7 @@
{% block extra_style %}{% endblock %}
-{% if branding_css != '' %}{% endif %}
+{% if branding_css %}{% endif %}
diff --git a/seahub/templates/base_for_backbone.html b/seahub/templates/base_for_backbone.html
index 739c7eb8a4..e723b80733 100644
--- a/seahub/templates/base_for_backbone.html
+++ b/seahub/templates/base_for_backbone.html
@@ -19,7 +19,7 @@
{% endcompress %}
{% block extra_style %}{% endblock %}
-{% if branding_css != '' %}{% endif %}
+{% if branding_css %}{% endif %}
diff --git a/seahub/templates/snippets/web_settings_form.html b/seahub/templates/snippets/web_settings_form.html
index 84eb530122..549865f0d2 100644
--- a/seahub/templates/snippets/web_settings_form.html
+++ b/seahub/templates/snippets/web_settings_form.html
@@ -30,6 +30,21 @@
{% endif %}
+{% if type == 'css_textarea' %}
+
+{% endif %}
+
{% if type == 'checkbox' %}