From 3b2f66a3b8babf21c25afbacb8419c2c80e4820b Mon Sep 17 00:00:00 2001 From: Alex <40072887+alexdcrane@users.noreply.github.com> Date: Tue, 18 Apr 2023 15:39:46 -0600 Subject: [PATCH] Update contact qr code (#6613) --- app/contacts/contact_edit.php | 12 +++++++++++- app/contacts/contact_view.php | 14 ++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/app/contacts/contact_edit.php b/app/contacts/contact_edit.php index 808f5d964b..9b96eb4b60 100644 --- a/app/contacts/contact_edit.php +++ b/app/contacts/contact_edit.php @@ -948,11 +948,21 @@ $qr_mode = '4'; $qr_size = '0.2'; } - else if ($_SESSION['theme']['qr_brand_type']['text'] == 'text' && $_SESSION['theme']['qr_brand_text']['text'] != '') { + elseif ($_SESSION['theme']['qr_brand_type']['text'] == 'image' && $_SESSION['theme']['qr_brand_image']['text'] == '') { + $qr_option = ''; + $qr_mode = '3'; + $qr_size = '0'; + } + elseif ($_SESSION['theme']['qr_brand_type']['text'] == 'text' && $_SESSION['theme']['qr_brand_text']['text'] != '') { $qr_option = 'label: "'.$_SESSION['theme']['qr_brand_text']['text'].'"'; $qr_mode = '2'; $qr_size = '0.05'; } + elseif ($_SESSION['theme']['qr_brand_type']['text'] == 'none') { + $qr_option = ''; + $qr_mode = '3'; + $qr_size = '0'; + } else { echo ""; $qr_option = "image: $('#img-buffer')[0],"; diff --git a/app/contacts/contact_view.php b/app/contacts/contact_view.php index c501800fda..80b9499401 100644 --- a/app/contacts/contact_view.php +++ b/app/contacts/contact_view.php @@ -166,11 +166,21 @@ $qr_mode = '4'; $qr_size = '0.2'; } - else if ($_SESSION['theme']['qr_brand_type']['text'] == 'text' && $_SESSION['theme']['qr_brand_text']['text'] != '') { + elseif ($_SESSION['theme']['qr_brand_type']['text'] == 'image' && $_SESSION['theme']['qr_brand_image']['text'] == '') { + $qr_option = ''; + $qr_mode = '3'; + $qr_size = '0'; + } + elseif ($_SESSION['theme']['qr_brand_type']['text'] == 'text' && $_SESSION['theme']['qr_brand_text']['text'] != '') { $qr_option = 'label: "'.$_SESSION['theme']['qr_brand_text']['text'].'"'; $qr_mode = '2'; $qr_size = '0.05'; } + elseif ($_SESSION['theme']['qr_brand_type']['text'] == 'none') { + $qr_option = ''; + $qr_mode = '3'; + $qr_size = '0'; + } else { echo ""; $qr_option = "image: $('#img-buffer')[0],"; @@ -533,4 +543,4 @@ //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?>