From 5e13c55f892c9c70afce333f1f97ee1c6dd157d0 Mon Sep 17 00:00:00 2001 From: dkoao Date: Sat, 28 Sep 2019 09:25:13 +0000 Subject: [PATCH] Delete the Contacts/Calender section from the admin page if the user didn't enable Nextcloud Also, restored the old text in sync-guide.html since the user would only see it if he enabled Nextcloud --- management/templates/index.html | 4 +--- management/templates/sync-guide.html | 2 +- setup/management.sh | 6 ++++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/management/templates/index.html b/management/templates/index.html index 2c0d5a9a..bf3ee915 100644 --- a/management/templates/index.html +++ b/management/templates/index.html @@ -147,9 +147,7 @@ {% include "aliases.html" %} -
- {% include "sync-guide.html" %} -
+
{% include "sync-guide.html" %}
{% include "web.html" %} diff --git a/management/templates/sync-guide.html b/management/templates/sync-guide.html index ac902653..70a5a44e 100644 --- a/management/templates/sync-guide.html +++ b/management/templates/sync-guide.html @@ -1,7 +1,7 @@

Contacts & Calendar Synchronization

-

If you chose to install Nextcloud, then this box can hold your contacts and calendar, just like it holds your email.

+

This box can hold your contacts and calendar, just like it holds your email.


diff --git a/setup/management.sh b/setup/management.sh index 3a6e187b..9a035d60 100755 --- a/setup/management.sh +++ b/setup/management.sh @@ -85,6 +85,12 @@ unzip -q /tmp/bootstrap.zip -d $assets_dir mv $assets_dir/bootstrap-$bootstrap_version-dist $assets_dir/bootstrap rm -f /tmp/bootstrap.zip +# Remove the Contacts/Calendar section from the admin page if the user didn't enable Nextcloud +if [ "${DISABLE_NEXTCLOUD}" == 0 ]; then + sed -i '/sync_guide/d' ../management/templates/index.html + rm ../management/templates/sync-guide.html +fi + # Create an init script to start the management daemon and keep it # running after a reboot. cat > $inst_dir/start <