From 1027e308d1f975992738652284ebb671f141dc45 Mon Sep 17 00:00:00 2001 From: Tushar Shekokar Date: Wed, 16 Sep 2020 16:33:09 +0530 Subject: [PATCH 01/18] Bug #164674 fix: search box for cert-xxxx is showing error (#48) --- .../administrator/libraries/certificate.php | 6 +++++- .../site/views/certificate/tmpl/default.php | 2 +- .../com_tjcertificate/site/views/certificate/view.html.php | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/com_tjcertificate/administrator/libraries/certificate.php b/src/components/com_tjcertificate/administrator/libraries/certificate.php index 5a162233..8452a20c 100644 --- a/src/components/com_tjcertificate/administrator/libraries/certificate.php +++ b/src/components/com_tjcertificate/administrator/libraries/certificate.php @@ -552,7 +552,11 @@ public function getUrl($options, $showSearchBox = true) { $url = 'index.php?option=com_tjcertificate&view=certificate&certificate=' . $this->unique_certificate_id; - $url .= '&show_search=' . $showSearchBox; + // If search box is true then only show search box param in URL + if ($showSearchBox) + { + $url .= '&show_search=' . $showSearchBox; + } if (isset($options['popup'])) { diff --git a/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php b/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php index 93dc8dda..55da0dcf 100644 --- a/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php +++ b/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php @@ -72,7 +72,7 @@ // For twitter $document->addCustomTag(''); $document->addCustomTag(''); - $document->addCustomTag(''); + $document->addCustomTag(''); $document->addCustomTag(''); $document->addCustomTag(''); diff --git a/src/components/com_tjcertificate/site/views/certificate/view.html.php b/src/components/com_tjcertificate/site/views/certificate/view.html.php index 34d45bfc..6add01c3 100644 --- a/src/components/com_tjcertificate/site/views/certificate/view.html.php +++ b/src/components/com_tjcertificate/site/views/certificate/view.html.php @@ -72,6 +72,8 @@ public function display($tpl = null) if (!$this->certificate->id) { JError::raiseWarning(500, Text::_('COM_TJCERTIFICATE_ERROR_CERTIFICATE_EXPIRED')); + + return false; } } From 2ed2b035dfd79f59c1d189bf66a8a3aa46005a5b Mon Sep 17 00:00:00 2001 From: Tushar Shekokar Date: Wed, 16 Sep 2020 18:57:18 +0530 Subject: [PATCH 02/18] Bug #164625 fix: title is showing blank data, it should display course name (#49) --- .../site/views/certificate/tmpl/default.php | 12 +++++++++++- .../site/views/certificates/tmpl/my.php | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php b/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php index 55da0dcf..1e17084e 100644 --- a/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php +++ b/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php @@ -159,7 +159,17 @@
- This certificate (ID: certificate->unique_certificate_id;?>) verifies that certificate->getUserId())->name; ?> has successfully completed the item->title; ?> on certificate->issued_on, Text::_('COM_TJCERTIFICATE_CERTIFICATE_DETAIL_VIEW_DATE_FORMAT'));?>. + item->title) + { ?> + This certificate (ID: certificate->unique_certificate_id;?>) verifies that certificate->getUserId())->name; ?> has successfully completed the item->title; ?> on certificate->issued_on, Text::_('COM_TJCERTIFICATE_CERTIFICATE_DETAIL_VIEW_DATE_FORMAT'));?>. + + This certificate (ID: certificate->unique_certificate_id;?>) has been awarded to certificate->getUserId())->name; ?> on certificate->issued_on, Text::_('COM_TJCERTIFICATE_CERTIFICATE_DETAIL_VIEW_DATE_FORMAT'));?>. + certificate->getExpiry() != '0000-00-00 00:00:00') { diff --git a/src/components/com_tjcertificate/site/views/certificates/tmpl/my.php b/src/components/com_tjcertificate/site/views/certificates/tmpl/my.php index 99e969b9..550317c9 100644 --- a/src/components/com_tjcertificate/site/views/certificates/tmpl/my.php +++ b/src/components/com_tjcertificate/site/views/certificates/tmpl/my.php @@ -105,7 +105,7 @@ ?> - title; ?> + title ? $data[0]->title : "-"; ?> issued_on, Text::_('DATE_FORMAT_LC')); ?> Date: Tue, 22 Sep 2020 15:04:22 +0530 Subject: [PATCH 03/18] Bug #164705 fix: click on the social media post the back button on the certificate is of no use (#52) * Bug #164705 fix: click on the social media post :: the back button on the certificate is of no use * Bug #164705 fix: Resolve comment --- .../site/views/certificate/tmpl/default.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php b/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php index 1e17084e..d5ebc627 100644 --- a/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php +++ b/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php @@ -85,7 +85,7 @@

item->title; ?>

-
+
@@ -212,6 +212,12 @@ } certificateImage.enableDownloadShareBtns(); + + if (document.referrer == "") + { + jQuery("#backBtn").hide(); + } }); + From b4b495e063ed928fe1dd9b2c0ad697d22a57cc0f Mon Sep 17 00:00:00 2001 From: Tushar Shekokar Date: Tue, 22 Sep 2020 16:57:04 +0530 Subject: [PATCH 04/18] Bug #164707 fix: user able to download others certificate as well (#53) * Bug #164707 fix: user able to download others certificate as well * Bug #164707 fix: Resolve comments * Bug #164707 fix: Resolve comments * Bug #164707 fix: Resolve comment --- .../administrator/access.xml | 2 ++ .../administrator/controllers/certificate.php | 8 +++++ .../en-GB/en-GB.com_tjcertificate.ini | 6 ++++ .../administrator/libraries/certificate.php | 34 ++++++++++++++++++- .../site/views/certificate/tmpl/default.php | 25 ++++++++------ .../site/views/certificate/view.html.php | 5 ++- 6 files changed, 67 insertions(+), 13 deletions(-) diff --git a/src/components/com_tjcertificate/administrator/access.xml b/src/components/com_tjcertificate/administrator/access.xml index 30c7d82f..944f9715 100644 --- a/src/components/com_tjcertificate/administrator/access.xml +++ b/src/components/com_tjcertificate/administrator/access.xml @@ -10,5 +10,7 @@ + + diff --git a/src/components/com_tjcertificate/administrator/controllers/certificate.php b/src/components/com_tjcertificate/administrator/controllers/certificate.php index 90587aea..337faeb7 100644 --- a/src/components/com_tjcertificate/administrator/controllers/certificate.php +++ b/src/components/com_tjcertificate/administrator/controllers/certificate.php @@ -47,6 +47,14 @@ public function download() } $certificate = TJCERT::Certificate(); + + // Check user having permission to download + if (!$certificate::canDownload($uniqueCertificateId)) + { + $app->enqueueMessage(Text::_('JERROR_ALERTNOAUTHOR')); + $app->redirect('index.php'); + } + $certificateObj = $certificate::validateCertificate($uniqueCertificateId); if (!$certificateObj->id) diff --git a/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini b/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini index 65685b6a..1ca8679a 100644 --- a/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini +++ b/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini @@ -250,3 +250,9 @@ COM_TJCERTIFICATE_SOCIAL_SHARING_OPTIONS="Select social sharing options" ;Certificate Menu option COM_TJCERTIFICATE_CERTIFICATE_TEXT_FILTER="Show Free Text Filter" COM_TJCERTIFICATE_CERTIFICATE_TYPE_FILTER="Show Certificate Type Filter" + +;Certificate PDF download permissions +COM_TJCERTIFICATE_PERMISSION_CERTIFICATE_DOWNLOAD_OWN="Download own certificate" +COM_TJCERTIFICATE_PERMISSION_CERTIFICATE_DOWNLOAD_OWN_DESC="Allow users to download own certificate" +COM_TJCERTIFICATE_PERMISSION_CERTIFICATE_DOWNLOAD_ALL="Download all certificate" +COM_TJCERTIFICATE_PERMISSION_CERTIFICATE_DOWNLOAD_ALL_DESC="Allow users to download all certificate" diff --git a/src/components/com_tjcertificate/administrator/libraries/certificate.php b/src/components/com_tjcertificate/administrator/libraries/certificate.php index 8452a20c..d4c89b7d 100644 --- a/src/components/com_tjcertificate/administrator/libraries/certificate.php +++ b/src/components/com_tjcertificate/administrator/libraries/certificate.php @@ -598,7 +598,7 @@ public function getDownloadUrl($options = array()) return Route::_($url); } - + return false; } @@ -941,4 +941,36 @@ protected function generateUniqueCertId($options) return $certificateString; } + + /** + * This function checks the certificate download permission + * + * @param STRING $uniqueCertificateId certificate Id + * + * @return boolean + * + * @since __DEPLOY_VERSION__ + */ + public static function canDownload($uniqueCertificateId) + { + $user = Factory::getUser(); + + if ($user->authorise('certificate.download.all', 'com_tjcertificate')) + { + return true; + } + + if ($user->authorise('certificate.download.own', 'com_tjcertificate')) + { + $table = TJCERT::table("certificates"); + $table->load(array('unique_certificate_id' => $uniqueCertificateId)); + + if ($user->get('id') == $table->user_id) + { + return true; + } + } + + return false; + } } diff --git a/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php b/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php index d5ebc627..6b1a06ea 100644 --- a/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php +++ b/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php @@ -114,17 +114,20 @@ certificate->getDownloadUrl()) - { - ?> - - - - - downloadPermission) + { + if ($this->certificate->getDownloadUrl()) + { + ?> + + + + + diff --git a/src/components/com_tjcertificate/site/views/certificate/view.html.php b/src/components/com_tjcertificate/site/views/certificate/view.html.php index 6add01c3..a4a63504 100644 --- a/src/components/com_tjcertificate/site/views/certificate/view.html.php +++ b/src/components/com_tjcertificate/site/views/certificate/view.html.php @@ -46,6 +46,8 @@ class TjCertificateViewCertificate extends JViewLegacy public $fileName = null; + public $downloadPermission = null; + /** * Display the view * @@ -58,7 +60,7 @@ class TjCertificateViewCertificate extends JViewLegacy public function display($tpl = null) { $this->params = ComponentHelper::getParams('com_tjcertificate'); - $input = Factory::getApplication()->input; + $input = Factory::getApplication()->input; $this->uniqueCertificateId = $input->get('certificate', '', 'STRING'); $this->showSearchBox = $input->getInt('show_search', $this->params->get('show_search_box')); @@ -91,6 +93,7 @@ public function display($tpl = null) $certificateUrl = 'index.php?option=com_tjcertificate&view=certificate&certificate=' . $this->certificate->unique_certificate_id; $this->certificateUrl = Uri::root() . substr(Route::_($certificateUrl), strlen(Uri::base(true)) + 1); + $this->downloadPermission = $certificate::canDownload($this->certificate->unique_certificate_id); // Get HTML $clientId = $this->certificate->getClientId(); From 1909543b5c0f4d13b5192ba78896e27ea8b845c3 Mon Sep 17 00:00:00 2001 From: Tushar Shekokar Date: Tue, 22 Sep 2020 17:34:36 +0530 Subject: [PATCH 05/18] Task #164910 chore: Button to copy shareble certificate link (#51) * Task #164910 chore: Button to copy shareble certificate link * Task #164910 chore: Button to copy shareble certificate link * Task #164910 chore: Button to copy shareble certificate link * Task #164910 chore: Resolve comment * Task #164910 chore: Resolve comments * Task #164910 chore: Resolve comments * Task #164910 chore: Resolve comments * Task #164910 chore: Resolve comments --- .../media/js/certificateImage.js | 20 +++++++++++++++++-- .../media/js/certificateImage.min.js | 2 +- .../en-GB/en-GB.com_tjcertificate.ini | 1 + .../site/views/certificate/tmpl/default.php | 5 +++-- 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/components/com_tjcertificate/media/js/certificateImage.js b/src/components/com_tjcertificate/media/js/certificateImage.js index 22de5924..302ee0a9 100644 --- a/src/components/com_tjcertificate/media/js/certificateImage.js +++ b/src/components/com_tjcertificate/media/js/certificateImage.js @@ -12,7 +12,7 @@ var certificateImage = { enableDownloadShareBtns: function() { - jQuery("#download-popover").popover({ + jQuery("#download-popover").popover({ trigger: 'focus', html: true, content: jQuery('#download-popover-content').html() @@ -23,6 +23,8 @@ var certificateImage = { html: true, content: jQuery('#sharing-popover-content').html() }); + + jQuery("#copyurl").popover(); }, uploadImage: function(image) { @@ -66,5 +68,19 @@ var certificateImage = { certificateImage.enableDownloadShareBtns(); certificateImage.uploadImage(canvas.toDataURL('image/png')); }); - } + }, + + copyUrl: function(element) { + var inputDump = document.createElement('input'), + hrefText = window.location.href; + document.body.appendChild(inputDump); + inputDump.value = hrefText; + inputDump.select(); + document.execCommand('copy'); + document.body.removeChild(inputDump); + + setTimeout(function() { + jQuery("#copyurl").popover("hide"); + }, 1000); + } } diff --git a/src/components/com_tjcertificate/media/js/certificateImage.min.js b/src/components/com_tjcertificate/media/js/certificateImage.min.js index a0781531..80f973d7 100644 --- a/src/components/com_tjcertificate/media/js/certificateImage.min.js +++ b/src/components/com_tjcertificate/media/js/certificateImage.min.js @@ -1 +1 @@ -var certificateImage={printCertificate:function(e){var t=document.getElementById(e).innerHTML,o=document.body.innerHTML;document.body.innerHTML=t,window.print(),document.body.innerHTML=o,certificateImage.enableDownloadShareBtns()},enableDownloadShareBtns:function(){jQuery("#download-popover").popover({trigger:"focus",html:!0,content:jQuery("#download-popover-content").html()}),jQuery("#sharing-popover").popover({trigger:"focus",html:!0,content:jQuery("#sharing-popover-content").html()})},uploadImage:function(e){var t=!1,o=jQuery("#certificateId").val();return jQuery.ajax({url:certRootUrl+"index.php?option=com_tjcertificate&task=certificate.uploadCertificate",type:"POST",data:{image:e,certificateId:o},success:function(e){t=e;var o=jQuery("#certificateId").val(),n=certRootUrl+"media/com_tjcertificate/certificates/",a=document.createElement("img");jQuery("#certificateContent").hide(),a.src=n+o+".png",jQuery("#previewImage").append(a),setTimeout(function(){Joomla.loadingLayer("hide")},1e3)}}),t},generateImage:function(e){jQuery("#certificateContent").width(e.offsetWidth).height(e.offsetHeight),Joomla.loadingLayer("show"),html2canvas(e,{scale:2,scrollX:0,scrollY:-window.scrollY,allowTaint:!0}).then(function(e){certificateImage.enableDownloadShareBtns(),certificateImage.uploadImage(e.toDataURL("image/png"))})}}; +var certificateImage={printCertificate:function(e){var t=document.getElementById(e).innerHTML,o=document.body.innerHTML;document.body.innerHTML=t,window.print(),document.body.innerHTML=o,certificateImage.enableDownloadShareBtns()},enableDownloadShareBtns:function(){jQuery("#download-popover").popover({trigger:"focus",html:!0,content:jQuery("#download-popover-content").html()}),jQuery("#sharing-popover").popover({trigger:"focus",html:!0,content:jQuery("#sharing-popover-content").html()}),jQuery("#copyurl").popover()},uploadImage:function(e){var t=!1,o=jQuery("#certificateId").val();return jQuery.ajax({url:certRootUrl+"index.php?option=com_tjcertificate&task=certificate.uploadCertificate",type:"POST",data:{image:e,certificateId:o},success:function(e){t=e;var o=jQuery("#certificateId").val(),n=certRootUrl+"media/com_tjcertificate/certificates/",r=document.createElement("img");jQuery("#certificateContent").hide(),r.src=n+o+".png",jQuery("#previewImage").append(r),setTimeout(function(){Joomla.loadingLayer("hide")},1e3)}}),t},generateImage:function(e){jQuery("#certificateContent").width(e.offsetWidth).height(e.offsetHeight),Joomla.loadingLayer("show"),html2canvas(e,{scale:2,scrollX:0,scrollY:-window.scrollY,allowTaint:!0}).then(function(e){certificateImage.enableDownloadShareBtns(),certificateImage.uploadImage(e.toDataURL("image/png"))})},copyUrl:function(e){var t=document.createElement("input"),o=window.location.href;document.body.appendChild(t),t.value=o,t.select(),document.execCommand("copy"),document.body.removeChild(t),setTimeout(function(){jQuery("#copyurl").popover("hide")},1e3)}}; diff --git a/src/components/com_tjcertificate/site/languages/en-GB/en-GB.com_tjcertificate.ini b/src/components/com_tjcertificate/site/languages/en-GB/en-GB.com_tjcertificate.ini index 66a75185..2149c3a8 100644 --- a/src/components/com_tjcertificate/site/languages/en-GB/en-GB.com_tjcertificate.ini +++ b/src/components/com_tjcertificate/site/languages/en-GB/en-GB.com_tjcertificate.ini @@ -69,3 +69,4 @@ COM_TJCERTIFICATE_CERTIFICATE_COMPLETED_BY="Completed by " COM_TJCERTIFICATE_CERTIFICATE_DETAIL_VIEW_HEAD="Certificate" COM_TJCERTIFICATE_CERTIFICATE_DETAIL_VIEW_DATE_FORMAT="F j, Y" COM_TJCERTIFICATE_CERTIFICATE_BACK_BUTTON="Back" +COM_TJCERTIFICATE_CERTIFICATE_URL_COPY="Copy URL" diff --git a/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php b/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php index 6b1a06ea..fa3e4a72 100644 --- a/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php +++ b/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php @@ -90,7 +90,7 @@
-
+
contentHtml)) @@ -99,7 +99,7 @@ } ?>
-
+
certificate->getUserId() == Factory::getUser()->id) { @@ -152,6 +152,7 @@ +
Date: Wed, 23 Sep 2020 13:27:01 +0530 Subject: [PATCH 06/18] Task #163318 fix: Fixed image cut issue while image generation (#54) --- .../com_tjcertificate/media/js/certificateImage.js | 8 ++++---- .../media/js/certificateImage.min.js | 2 +- .../site/views/certificate/tmpl/default.php | 14 ++++++-------- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/components/com_tjcertificate/media/js/certificateImage.js b/src/components/com_tjcertificate/media/js/certificateImage.js index 302ee0a9..02ac5acd 100644 --- a/src/components/com_tjcertificate/media/js/certificateImage.js +++ b/src/components/com_tjcertificate/media/js/certificateImage.js @@ -46,9 +46,9 @@ var certificateImage = { jQuery('#certificateContent').hide(); img.src = imagePath + certificateId + ".png"; jQuery("#previewImage").append(img); - setTimeout(function(){ - Joomla.loadingLayer('hide'); }, - 1000); + setTimeout(function(){ + Joomla.loadingLayer('hide'); + }, 1000); } }); @@ -60,7 +60,7 @@ var certificateImage = { Joomla.loadingLayer('show'); html2canvas(element, { - scale: (2), + // scale: (2), scrollX: 0, scrollY: -window.scrollY, allowTaint: true diff --git a/src/components/com_tjcertificate/media/js/certificateImage.min.js b/src/components/com_tjcertificate/media/js/certificateImage.min.js index 80f973d7..02cd774a 100644 --- a/src/components/com_tjcertificate/media/js/certificateImage.min.js +++ b/src/components/com_tjcertificate/media/js/certificateImage.min.js @@ -1 +1 @@ -var certificateImage={printCertificate:function(e){var t=document.getElementById(e).innerHTML,o=document.body.innerHTML;document.body.innerHTML=t,window.print(),document.body.innerHTML=o,certificateImage.enableDownloadShareBtns()},enableDownloadShareBtns:function(){jQuery("#download-popover").popover({trigger:"focus",html:!0,content:jQuery("#download-popover-content").html()}),jQuery("#sharing-popover").popover({trigger:"focus",html:!0,content:jQuery("#sharing-popover-content").html()}),jQuery("#copyurl").popover()},uploadImage:function(e){var t=!1,o=jQuery("#certificateId").val();return jQuery.ajax({url:certRootUrl+"index.php?option=com_tjcertificate&task=certificate.uploadCertificate",type:"POST",data:{image:e,certificateId:o},success:function(e){t=e;var o=jQuery("#certificateId").val(),n=certRootUrl+"media/com_tjcertificate/certificates/",r=document.createElement("img");jQuery("#certificateContent").hide(),r.src=n+o+".png",jQuery("#previewImage").append(r),setTimeout(function(){Joomla.loadingLayer("hide")},1e3)}}),t},generateImage:function(e){jQuery("#certificateContent").width(e.offsetWidth).height(e.offsetHeight),Joomla.loadingLayer("show"),html2canvas(e,{scale:2,scrollX:0,scrollY:-window.scrollY,allowTaint:!0}).then(function(e){certificateImage.enableDownloadShareBtns(),certificateImage.uploadImage(e.toDataURL("image/png"))})},copyUrl:function(e){var t=document.createElement("input"),o=window.location.href;document.body.appendChild(t),t.value=o,t.select(),document.execCommand("copy"),document.body.removeChild(t),setTimeout(function(){jQuery("#copyurl").popover("hide")},1e3)}}; +var certificateImage={printCertificate:function(e){var t=document.getElementById(e).innerHTML,o=document.body.innerHTML;document.body.innerHTML=t,window.print(),document.body.innerHTML=o,certificateImage.enableDownloadShareBtns()},enableDownloadShareBtns:function(){jQuery("#download-popover").popover({trigger:"focus",html:!0,content:jQuery("#download-popover-content").html()}),jQuery("#sharing-popover").popover({trigger:"focus",html:!0,content:jQuery("#sharing-popover-content").html()}),jQuery("#copyurl").popover()},uploadImage:function(e){var t=!1,o=jQuery("#certificateId").val();return jQuery.ajax({url:certRootUrl+"index.php?option=com_tjcertificate&task=certificate.uploadCertificate",type:"POST",data:{image:e,certificateId:o},success:function(e){t=e;var o=jQuery("#certificateId").val(),n=certRootUrl+"media/com_tjcertificate/certificates/",r=document.createElement("img");jQuery("#certificateContent").hide(),r.src=n+o+".png",jQuery("#previewImage").append(r),setTimeout(function(){Joomla.loadingLayer("hide")},1e3)}}),t},generateImage:function(e){jQuery("#certificateContent").width(e.offsetWidth).height(e.offsetHeight),Joomla.loadingLayer("show"),html2canvas(e,{scrollX:0,scrollY:-window.scrollY,allowTaint:!0}).then(function(e){certificateImage.enableDownloadShareBtns(),certificateImage.uploadImage(e.toDataURL("image/png"))})},copyUrl:function(e){var t=document.createElement("input"),o=window.location.href;document.body.appendChild(t),t.value=o,t.select(),document.execCommand("copy"),document.body.removeChild(t),setTimeout(function(){jQuery("#copyurl").popover("hide")},1e3)}}; \ No newline at end of file diff --git a/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php b/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php index fa3e4a72..b7223420 100644 --- a/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php +++ b/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php @@ -19,6 +19,7 @@ $options['relative'] = true; HTMLHelper::_('jquery.framework'); +HTMLHelper::_('bootstrap.framework'); HTMLHelper::_('behavior.framework'); HTMLHelper::StyleSheet('media/com_tjcertificate/vendors/font-awesome-4.1.0/css/font-awesome.min.css'); HTMLHelper::StyleSheet('media/com_tjcertificate/css/tjCertificate.css'); @@ -210,18 +211,15 @@ { jQuery('#certificateContent').hide(); } - else - { - certificateImage.generateImage(document.querySelector("#certificateContent")); - } certificateImage.enableDownloadShareBtns(); +}); - if (document.referrer == "") +window.onload = function() { + if (!imageExists) { - jQuery("#backBtn").hide(); + certificateImage.generateImage(document.querySelector("#certificateContent")); } -}); - +} From a057d47570e497f8a48bcdf0d99bcab2f3be4349 Mon Sep 17 00:00:00 2001 From: Mangesh Mane Date: Fri, 25 Sep 2020 09:06:33 +0530 Subject: [PATCH 07/18] Issue #164867 style: desing changes update (#50) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: “Mangesh <“mangesh_m@tekditechonologies.com”> --- .../media/css/tjCertificate.css | 35 +++++++++++++++---- .../site/views/certificate/tmpl/default.php | 6 ++-- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/src/components/com_tjcertificate/media/css/tjCertificate.css b/src/components/com_tjcertificate/media/css/tjCertificate.css index 64608b41..fe11faaa 100644 --- a/src/components/com_tjcertificate/media/css/tjCertificate.css +++ b/src/components/com_tjcertificate/media/css/tjCertificate.css @@ -129,11 +129,20 @@ .bs-v1 { box-shadow: 0 4px 10px 0 rgba(0,0,0,0.1); } +.line-h-noraml{ + line-height: normal; +} +.w-100{ + width:100%; +} .tj-certificate-image { background-color: #fff; width: 100%; float: left; } +.tj-certificate-image img{ + width: 100%; +} #certificateContent{ margin: 0 auto; } @@ -148,14 +157,16 @@ border-radius: 5px; margin-left: 4px; border: 1px solid #ddd; - display: inline-block; + display: inline-block !important; } .tjlmspin__caption_desc{ line-height: 18px; font-size: 14px; margin-bottom: 10px; } -.tjlmspin__position { +.tjlmspin__position, +.eventlist__price +{ position: absolute; top: 9px; background: #FAF8F8; @@ -163,10 +174,14 @@ color: #333; font-weight: 600; } -.tjlmslist .tjlmslist__image .tjlmspin__price { +.tjlmslist .tjlmslist__image .tjlmspin__price, +.eventlist .eventlist__price +{ left: 25px; } -.tjlmspin.mobile-view{ +.tjlmspin.mobile-view, +.eventpin.mobile-view +{ width: 255px; margin: 0 auto; float: none; @@ -174,6 +189,15 @@ .view-certificate .popover-title{ display: none; } +.tj-certificate .thumbnail{ + min-height: auto !important; + width: 100% !important; +} +.eventlist__desc{ + height: 20px; + overflow: hidden; + display: inline-block; +} @media screen and (max-width: 600px) { .tj-certificate-share-download{ text-align: center; @@ -183,9 +207,8 @@ .tjlmslist .thumbnail{ border:0; } - #certificateContent{ min-height: 800px; width: 1150px; } -} +} \ No newline at end of file diff --git a/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php b/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php index b7223420..138f2ca0 100644 --- a/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php +++ b/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php @@ -83,10 +83,10 @@

-
-

item->title; ?>

+
+

item->title; ?>

-
+
From d04d06106f19202154240bf93323de1a55e2c62f Mon Sep 17 00:00:00 2001 From: praneettekdi Date: Mon, 28 Sep 2020 15:04:26 +0530 Subject: [PATCH 08/18] Task #163318 fix: Added fixed width height for certificate container (#58) --- src/components/com_tjcertificate/media/js/certificateImage.js | 2 +- .../com_tjcertificate/media/js/certificateImage.min.js | 2 +- .../com_tjcertificate/site/views/certificate/tmpl/default.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/com_tjcertificate/media/js/certificateImage.js b/src/components/com_tjcertificate/media/js/certificateImage.js index 02ac5acd..80a1f2ce 100644 --- a/src/components/com_tjcertificate/media/js/certificateImage.js +++ b/src/components/com_tjcertificate/media/js/certificateImage.js @@ -56,7 +56,7 @@ var certificateImage = { }, generateImage: function(element) { - jQuery('#certificateContent').width(element.offsetWidth).height(element.offsetHeight); + // jQuery('#certificateContent').width(element.offsetWidth).height(element.offsetHeight); Joomla.loadingLayer('show'); html2canvas(element, { diff --git a/src/components/com_tjcertificate/media/js/certificateImage.min.js b/src/components/com_tjcertificate/media/js/certificateImage.min.js index 02cd774a..389197d4 100644 --- a/src/components/com_tjcertificate/media/js/certificateImage.min.js +++ b/src/components/com_tjcertificate/media/js/certificateImage.min.js @@ -1 +1 @@ -var certificateImage={printCertificate:function(e){var t=document.getElementById(e).innerHTML,o=document.body.innerHTML;document.body.innerHTML=t,window.print(),document.body.innerHTML=o,certificateImage.enableDownloadShareBtns()},enableDownloadShareBtns:function(){jQuery("#download-popover").popover({trigger:"focus",html:!0,content:jQuery("#download-popover-content").html()}),jQuery("#sharing-popover").popover({trigger:"focus",html:!0,content:jQuery("#sharing-popover-content").html()}),jQuery("#copyurl").popover()},uploadImage:function(e){var t=!1,o=jQuery("#certificateId").val();return jQuery.ajax({url:certRootUrl+"index.php?option=com_tjcertificate&task=certificate.uploadCertificate",type:"POST",data:{image:e,certificateId:o},success:function(e){t=e;var o=jQuery("#certificateId").val(),n=certRootUrl+"media/com_tjcertificate/certificates/",r=document.createElement("img");jQuery("#certificateContent").hide(),r.src=n+o+".png",jQuery("#previewImage").append(r),setTimeout(function(){Joomla.loadingLayer("hide")},1e3)}}),t},generateImage:function(e){jQuery("#certificateContent").width(e.offsetWidth).height(e.offsetHeight),Joomla.loadingLayer("show"),html2canvas(e,{scrollX:0,scrollY:-window.scrollY,allowTaint:!0}).then(function(e){certificateImage.enableDownloadShareBtns(),certificateImage.uploadImage(e.toDataURL("image/png"))})},copyUrl:function(e){var t=document.createElement("input"),o=window.location.href;document.body.appendChild(t),t.value=o,t.select(),document.execCommand("copy"),document.body.removeChild(t),setTimeout(function(){jQuery("#copyurl").popover("hide")},1e3)}}; \ No newline at end of file +var certificateImage={printCertificate:function(e){var t=document.getElementById(e).innerHTML,o=document.body.innerHTML;document.body.innerHTML=t,window.print(),document.body.innerHTML=o,certificateImage.enableDownloadShareBtns()},enableDownloadShareBtns:function(){jQuery("#download-popover").popover({trigger:"focus",html:!0,content:jQuery("#download-popover-content").html()}),jQuery("#sharing-popover").popover({trigger:"focus",html:!0,content:jQuery("#sharing-popover-content").html()}),jQuery("#copyurl").popover()},uploadImage:function(e){var t=!1,o=jQuery("#certificateId").val();return jQuery.ajax({url:certRootUrl+"index.php?option=com_tjcertificate&task=certificate.uploadCertificate",type:"POST",data:{image:e,certificateId:o},success:function(e){t=e;var o=jQuery("#certificateId").val(),n=certRootUrl+"media/com_tjcertificate/certificates/",r=document.createElement("img");jQuery("#certificateContent").hide(),r.src=n+o+".png",jQuery("#previewImage").append(r),setTimeout(function(){Joomla.loadingLayer("hide")},1e3)}}),t},generateImage:function(e){Joomla.loadingLayer("show"),html2canvas(e,{scrollX:0,scrollY:-window.scrollY,allowTaint:!0}).then(function(e){certificateImage.enableDownloadShareBtns(),certificateImage.uploadImage(e.toDataURL("image/png"))})},copyUrl:function(e){var t=document.createElement("input"),o=window.location.href;document.body.appendChild(t),t.value=o,t.select(),document.execCommand("copy"),document.body.removeChild(t),setTimeout(function(){jQuery("#copyurl").popover("hide")},1e3)}}; \ No newline at end of file diff --git a/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php b/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php index 138f2ca0..eadc9ef0 100644 --- a/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php +++ b/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php @@ -186,7 +186,7 @@
-
+
certificate->generated_body; ?> From 89b3ca0116e3211cd5e4ece5e1518285cf2be262 Mon Sep 17 00:00:00 2001 From: snehal patil Date: Tue, 29 Sep 2020 11:34:39 +0530 Subject: [PATCH 09/18] Bug165031 : Backend > Attendees > Error '0 Call to a member function getDownloadUrl() on string' occurs on checkin the attendee (#62) Co-authored-by: Snehal Patil --- .../administrator/libraries/certificate.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/com_tjcertificate/administrator/libraries/certificate.php b/src/components/com_tjcertificate/administrator/libraries/certificate.php index d4c89b7d..c37bda85 100644 --- a/src/components/com_tjcertificate/administrator/libraries/certificate.php +++ b/src/components/com_tjcertificate/administrator/libraries/certificate.php @@ -598,7 +598,7 @@ public function getDownloadUrl($options = array()) return Route::_($url); } - + return false; } @@ -755,8 +755,8 @@ public function issueCertificate($replacements, $options) { try { - // Check user_id or certificate_template_id (this is needed to generate certificate body) is empty - if (empty($this->user_id) || empty($this->certificate_template_id)) + // Check user_id/issued Id or certificate_template_id (this is needed to generate certificate body) is empty + if ((empty($this->user_id) && empty($this->setClientIssuedTo)) || empty($this->certificate_template_id)) { throw new Exception(Text::_('COM_TJCERTIFICATE_CERTIFICATE_EMPTY_DATA')); } @@ -970,7 +970,7 @@ public static function canDownload($uniqueCertificateId) return true; } } - + return false; } } From 0ef544734b5c8df0a02eb19ffa0f2ef5b641e979 Mon Sep 17 00:00:00 2001 From: divyachaudhari <58217051+divyachaudhari@users.noreply.github.com> Date: Tue, 29 Sep 2020 14:05:32 +0530 Subject: [PATCH 10/18] Task #165230 Chore: Back end>>Issued Certificate >> Search should also be done by username. (#59) --- .../administrator/languages/en-GB/en-GB.com_tjcertificate.ini | 2 +- .../com_tjcertificate/administrator/models/certificates.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini b/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini index 1ca8679a..be850e6e 100644 --- a/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini +++ b/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini @@ -105,7 +105,7 @@ COM_TJCERTIFICATE_CERTIFICATE_LIST_VIEW_COMMENT="Comment" ;Certificate - Filters COM_TJCERTIFICATE_CERTIFICATE_FILTER_SEARCH_LABEL="Search" -COM_TJCERTIFICATE_CERTIFICATE_FILTER_SEARCH_LABEL_DESC="Search in template title. Prefix with ID:to search for a Certificate ID" +COM_TJCERTIFICATE_CERTIFICATE_FILTER_SEARCH_LABEL_DESC="Search in template title. Prefix with ID:to search for a Certificate ID. Search for User Name" COM_TJCERTIFICATE_CERTIFICATE_FILTER_CERTIFICATE_TEMPLATE_SELECT="- Select Template -" COM_TJCERTIFICATE_CERTIFICATE_FILTER_CERTIFICATE_TEMPLATE="Template" COM_TJCERTIFICATE_CERTIFICATE_FILTER_DESC_CERTIFICATE_TEMPLATE="Select Template" diff --git a/src/components/com_tjcertificate/administrator/models/certificates.php b/src/components/com_tjcertificate/administrator/models/certificates.php index 6039421a..78ce5435 100644 --- a/src/components/com_tjcertificate/administrator/models/certificates.php +++ b/src/components/com_tjcertificate/administrator/models/certificates.php @@ -157,7 +157,9 @@ protected function getListQuery() else { $search = $db->quote('%' . str_replace(' ', '%', $db->escape(trim($search), true) . '%')); - $query->where(' (ct.title LIKE ' . $search . ' OR ci.unique_certificate_id LIKE ' . $search . ' )'); + $query->where(' (ct.title LIKE ' . $search . ' OR ci.unique_certificate_id LIKE ' + . $search . ' OR ci.client_issued_to_name LIKE ' . $search . + ' OR users.name LIKE ' . $search . ' )'); } } From 9e4399c2888a31706dbc272652e8afd9b627df88 Mon Sep 17 00:00:00 2001 From: divyachaudhari <58217051+divyachaudhari@users.noreply.github.com> Date: Tue, 29 Sep 2020 16:20:05 +0530 Subject: [PATCH 11/18] =?UTF-8?q?Task=20#165122=20Chore:=20Backend=20certi?= =?UTF-8?q?ficate=20view=20changes-=20Adding=20Course=20co=E2=80=A6=20(#55?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Task #165122 Chore: Backend certificate view changes- Adding Curse column at Issued certificate View * Changing title of column * Resolving conflicts --- .../languages/en-GB/en-GB.com_tjcertificate.ini | 3 +++ .../views/certificates/tmpl/default.php | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini b/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini index be850e6e..51fb2e0b 100644 --- a/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini +++ b/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini @@ -256,3 +256,6 @@ COM_TJCERTIFICATE_PERMISSION_CERTIFICATE_DOWNLOAD_OWN="Download own certificate" COM_TJCERTIFICATE_PERMISSION_CERTIFICATE_DOWNLOAD_OWN_DESC="Allow users to download own certificate" COM_TJCERTIFICATE_PERMISSION_CERTIFICATE_DOWNLOAD_ALL="Download all certificate" COM_TJCERTIFICATE_PERMISSION_CERTIFICATE_DOWNLOAD_ALL_DESC="Allow users to download all certificate" + +;Issued Certificates View +COM_TJCERTIFICATE_CERTIFICATE_TYPE_NAME="Title" diff --git a/src/components/com_tjcertificate/administrator/views/certificates/tmpl/default.php b/src/components/com_tjcertificate/administrator/views/certificates/tmpl/default.php index 8cc85df8..836f0e91 100644 --- a/src/components/com_tjcertificate/administrator/views/certificates/tmpl/default.php +++ b/src/components/com_tjcertificate/administrator/views/certificates/tmpl/default.php @@ -15,6 +15,7 @@ use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\LayoutHelper; use Joomla\CMS\Router\Route; +use Joomla\CMS\Plugin\PluginHelper; HTMLHelper::addIncludePath(JPATH_COMPONENT . '/helpers/html'); HTMLHelper::_('bootstrap.tooltip'); @@ -25,6 +26,8 @@ $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); $saveOrder = $listOrder == 'ci.id'; +$dispatcher = JDispatcher::getInstance(); +PluginHelper::importPlugin('content'); if ( $saveOrder ) { @@ -98,6 +101,9 @@ + + + @@ -117,6 +123,7 @@ items as $i => $item) { + $data = $dispatcher->trigger('getCertificateClientData', array($item->client_id, $item->client)); $item->max_ordering = 0; $canEdit = $this->canDo->get('core.edit'); @@ -170,6 +177,11 @@ } ?> escape($item->comment); ?> + + title)) ? $data[0]->title : '-'; + ?> + id; ?> Date: Tue, 29 Sep 2020 16:24:30 +0530 Subject: [PATCH 12/18] =?UTF-8?q?Task=20#165122=20Chore:=20Backend=20Issue?= =?UTF-8?q?d=20certificate=20view=20changes-=20Adding=20attendee=E2=80=A6?= =?UTF-8?q?=20(#56)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Task #165122 Chore: Backend certificate view changes- Adding attendee name to the user column * Changing title of column User * Resolving phpcs issue * Resolving conflicts --- .../en-GB/en-GB.com_tjcertificate.ini | 1 + .../views/certificates/tmpl/default.php | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini b/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini index 51fb2e0b..5c3dbc12 100644 --- a/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini +++ b/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini @@ -259,3 +259,4 @@ COM_TJCERTIFICATE_PERMISSION_CERTIFICATE_DOWNLOAD_ALL_DESC="Allow users to downl ;Issued Certificates View COM_TJCERTIFICATE_CERTIFICATE_TYPE_NAME="Title" +COM_TJCERTIFICATE_CERTIFICATE_LIST_VIEW_USER_NAME="User Name" diff --git a/src/components/com_tjcertificate/administrator/views/certificates/tmpl/default.php b/src/components/com_tjcertificate/administrator/views/certificates/tmpl/default.php index 836f0e91..696bcf2b 100644 --- a/src/components/com_tjcertificate/administrator/views/certificates/tmpl/default.php +++ b/src/components/com_tjcertificate/administrator/views/certificates/tmpl/default.php @@ -93,7 +93,7 @@ - + @@ -164,7 +164,22 @@ escape($item->title); ?> escape($item->client); ?> - escape($item->uname); ?> + + client_issued_to_name)) + { + $userName = $this->escape($item->client_issued_to_name); + } + elseif (!empty($item->uname)) + { + $userName = $this->escape($item->uname); + } + + echo $userName; + ?> + issued_on, Text::_('DATE_FORMAT_LC')); ?> expired_on) && $item->expired_on != '0000-00-00 00:00:00') From 05e96c7d6b510c00ab2efa6f8c1c0767361326f8 Mon Sep 17 00:00:00 2001 From: divyachaudhari <58217051+divyachaudhari@users.noreply.github.com> Date: Tue, 29 Sep 2020 17:12:37 +0530 Subject: [PATCH 13/18] Task #165166 Chore: Add Certificate Url column under Issued Certificate View (#57) * Task #165166 Chore: Add Copy Url column under Issued Cetificate VIew * Resolving conflicts * Resolving comments * Resolving comments * Resolving comments --- .../en-GB/en-GB.com_tjcertificate.ini | 5 ++- .../views/certificates/tmpl/default.php | 36 ++++++++++++++++++- .../media/js/certificateImage.js | 26 +++++++------- .../media/js/certificateImage.min.js | 2 +- .../site/views/certificate/tmpl/default.php | 9 +++-- 5 files changed, 61 insertions(+), 17 deletions(-) diff --git a/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini b/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini index 5c3dbc12..543c8725 100644 --- a/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini +++ b/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini @@ -257,6 +257,9 @@ COM_TJCERTIFICATE_PERMISSION_CERTIFICATE_DOWNLOAD_OWN_DESC="Allow users to downl COM_TJCERTIFICATE_PERMISSION_CERTIFICATE_DOWNLOAD_ALL="Download all certificate" COM_TJCERTIFICATE_PERMISSION_CERTIFICATE_DOWNLOAD_ALL_DESC="Allow users to download all certificate" -;Issued Certificates View +;Issued Certificate View +COM_TJCERTIFICATE_CERTIFICATE_EXPIRED="Certificate expired" +COM_TJCERTIFICATE_CERTIFICATE_URL_COPY="Copy Url" +COM_TJCERTIFICATE_CERTIFICATE_URL="Certificate Url" COM_TJCERTIFICATE_CERTIFICATE_TYPE_NAME="Title" COM_TJCERTIFICATE_CERTIFICATE_LIST_VIEW_USER_NAME="User Name" diff --git a/src/components/com_tjcertificate/administrator/views/certificates/tmpl/default.php b/src/components/com_tjcertificate/administrator/views/certificates/tmpl/default.php index 696bcf2b..2be16daa 100644 --- a/src/components/com_tjcertificate/administrator/views/certificates/tmpl/default.php +++ b/src/components/com_tjcertificate/administrator/views/certificates/tmpl/default.php @@ -15,13 +15,18 @@ use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\LayoutHelper; use Joomla\CMS\Router\Route; +use Joomla\CMS\Factory; use Joomla\CMS\Plugin\PluginHelper; +$options = array(); +$options['relative'] = true; + HTMLHelper::addIncludePath(JPATH_COMPONENT . '/helpers/html'); HTMLHelper::_('bootstrap.tooltip'); HTMLHelper::_('behavior.multiselect'); HTMLHelper::_('formbehavior.chosen', 'select'); HTMLHelper::_('behavior.modal', 'a.modal'); +HTMLHelper::script('com_tjcertificate/certificateImage.min.js', $options); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); @@ -104,6 +109,9 @@ + + + @@ -191,12 +199,38 @@ echo '-'; } ?> - escape($item->comment); ?> title)) ? $data[0]->title : '-'; ?> + + toSql(); + + if ($item->expired_on > $utcNow || $item->expired_on == '0000-00-00 00:00:00') + { + // Get TJcertificate url for display certificate + $urlOpts = array ('absolute' => ''); + $link = TJCERT::Certificate($item->id)->getUrl($urlOpts, false); + ?> +
+ + + +
+ + + escape($item->comment); ?> id; ?> - + + +
Date: Tue, 29 Sep 2020 17:39:28 +0530 Subject: [PATCH 14/18] Task #165166 Feat: Adding (#63) --- .../com_tjcertificate/site/views/certificate/tmpl/default.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php b/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php index 9592665d..54cfade1 100644 --- a/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php +++ b/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php @@ -152,6 +152,7 @@
Date: Tue, 29 Sep 2020 18:26:07 +0530 Subject: [PATCH 15/18] =?UTF-8?q?Bug165031=20:=20Backend=20>=20Attendees?= =?UTF-8?q?=20>=20Error=20'0=20Call=20to=20a=20member=20function=20?= =?UTF-8?q?=E2=80=A6=20(#64)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bug165031 : Backend > Attendees > Error '0 Call to a member function … * Bug165031 : Backend > Attendees > Error '0 Call to a member function … Co-authored-by: Snehal Patil --- .../com_tjcertificate/administrator/libraries/certificate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/com_tjcertificate/administrator/libraries/certificate.php b/src/components/com_tjcertificate/administrator/libraries/certificate.php index c37bda85..503b063a 100644 --- a/src/components/com_tjcertificate/administrator/libraries/certificate.php +++ b/src/components/com_tjcertificate/administrator/libraries/certificate.php @@ -755,8 +755,8 @@ public function issueCertificate($replacements, $options) { try { - // Check user_id/issued Id or certificate_template_id (this is needed to generate certificate body) is empty - if ((empty($this->user_id) && empty($this->setClientIssuedTo)) || empty($this->certificate_template_id)) + // Check user_id or issued Id or certificate_template_id (this is needed to generate certificate body) is empty + if ((empty($this->user_id) && empty($this->client_issued_to)) || empty($this->certificate_template_id)) { throw new Exception(Text::_('COM_TJCERTIFICATE_CERTIFICATE_EMPTY_DATA')); } From 99029caead6f87891e777270af63dbb5cf8dbb1b Mon Sep 17 00:00:00 2001 From: Divya Chaudhari Date: Tue, 29 Sep 2020 23:02:44 +0530 Subject: [PATCH 16/18] Task #165259 Chore: Adding user filter under search tools in Issued Certificate view --- .../languages/en-GB/en-GB.com_tjcertificate.ini | 1 + .../administrator/models/forms/filter_certificates.xml | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini b/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini index 543c8725..dee69eca 100644 --- a/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini +++ b/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini @@ -263,3 +263,4 @@ COM_TJCERTIFICATE_CERTIFICATE_URL_COPY="Copy Url" COM_TJCERTIFICATE_CERTIFICATE_URL="Certificate Url" COM_TJCERTIFICATE_CERTIFICATE_TYPE_NAME="Title" COM_TJCERTIFICATE_CERTIFICATE_LIST_VIEW_USER_NAME="User Name" +COM_TJCERTIFICATE_CERTIFICATE_FILTER_USER_SELECT="- Select User -" diff --git a/src/components/com_tjcertificate/administrator/models/forms/filter_certificates.xml b/src/components/com_tjcertificate/administrator/models/forms/filter_certificates.xml index 463914a4..d0a684a4 100644 --- a/src/components/com_tjcertificate/administrator/models/forms/filter_certificates.xml +++ b/src/components/com_tjcertificate/administrator/models/forms/filter_certificates.xml @@ -31,7 +31,7 @@ - + + Date: Wed, 30 Sep 2020 11:11:03 +0530 Subject: [PATCH 17/18] =?UTF-8?q?Task=20#165259=20Chore:=20Adding=20proper?= =?UTF-8?q?=20names=20to=20the=20client=20filter=20and=20column=20in=20Iss?= =?UTF-8?q?ue=E2=80=A6=20(#66)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Task #165259 Chore: Adding proper names to the client filter in Issued Certificate view * Adding names to client column --- .../languages/en-GB/en-GB.com_tjcertificate.ini | 4 ++++ .../administrator/models/forms/filter_certificates.xml | 9 ++++----- .../administrator/views/certificates/tmpl/default.php | 10 ++++++++-- .../site/languages/en-GB/en-GB.com_tjcertificate.ini | 1 + .../site/models/fields/getclientlist.php | 2 +- 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini b/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini index 543c8725..6ff2611b 100644 --- a/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini +++ b/src/components/com_tjcertificate/administrator/languages/en-GB/en-GB.com_tjcertificate.ini @@ -263,3 +263,7 @@ COM_TJCERTIFICATE_CERTIFICATE_URL_COPY="Copy Url" COM_TJCERTIFICATE_CERTIFICATE_URL="Certificate Url" COM_TJCERTIFICATE_CERTIFICATE_TYPE_NAME="Title" COM_TJCERTIFICATE_CERTIFICATE_LIST_VIEW_USER_NAME="User Name" +COM_TJCERTIFICATE_CERTIFICATE_FILTER_CERTIFICATE_TYPE_SELECT="- Select Type -" +COM_TJCERTIFICATE_CLIENT_COM_TJLMS_COURSE="Course" +COM_TJCERTIFICATE_CLIENT_COM_JTICKETING_EVENT="Event" +COM_TJCERTIFICATE_CERTIFICATE_LIST_VIEW_TYPE="Type" diff --git a/src/components/com_tjcertificate/administrator/models/forms/filter_certificates.xml b/src/components/com_tjcertificate/administrator/models/forms/filter_certificates.xml index 463914a4..f5b6dcbd 100644 --- a/src/components/com_tjcertificate/administrator/models/forms/filter_certificates.xml +++ b/src/components/com_tjcertificate/administrator/models/forms/filter_certificates.xml @@ -22,14 +22,13 @@ - - + addfieldpath="/components/com_tjcertificate/models/fields" + clientByUser="0" + onchange="this.form.submit();" />