From f9e602c44cc75c1b0129c1f1f70a7879efc7ff01 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Sat, 30 Mar 2019 22:54:20 +0100 Subject: [PATCH 1/3] Add remove cover button --- view/tpl/cover_photo.tpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/view/tpl/cover_photo.tpl b/view/tpl/cover_photo.tpl index 5a5bf2286..a1c4a922d 100755 --- a/view/tpl/cover_photo.tpl +++ b/view/tpl/cover_photo.tpl @@ -102,7 +102,8 @@

- + +
From 1ee91dd690f195f56afed7151d51730aa476e592 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Sat, 30 Mar 2019 22:55:36 +0100 Subject: [PATCH 2/3] Add remove cover photo processing --- Zotlabs/Module/Cover_photo.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Zotlabs/Module/Cover_photo.php b/Zotlabs/Module/Cover_photo.php index b911ac991..822cc8ef6 100644 --- a/Zotlabs/Module/Cover_photo.php +++ b/Zotlabs/Module/Cover_photo.php @@ -48,6 +48,16 @@ class Cover_photo extends \Zotlabs\Web\Controller { $channel = \App::get_channel(); check_form_security_token_redirectOnErr('/cover_photo', 'cover_photo'); + + // Remove cover photo + if(isset($_POST['remove'])) { + q("update photo set photo_usage = %d where photo_usage = %d and uid = %d", + intval(PHOTO_NORMAL), + intval(PHOTO_COVER), + intval(local_channel()) + ); + goaway(z_root() . '/cover_photo'); + } if((array_key_exists('cropfinal',$_POST)) && ($_POST['cropfinal'] == 1)) { From 595429fdde770644ae1d7d265de308818e2d29ef Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Sat, 30 Mar 2019 23:08:41 +0100 Subject: [PATCH 3/3] Add submit button styling --- view/tpl/profile_photo.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/tpl/profile_photo.tpl b/view/tpl/profile_photo.tpl index 819502df5..b2190dda3 100755 --- a/view/tpl/profile_photo.tpl +++ b/view/tpl/profile_photo.tpl @@ -124,7 +124,7 @@ {{/if}}
- +