From 17ffba17f1a014ce3e6de381e691d397eb9a4e59 Mon Sep 17 00:00:00 2001 From: Abhishek Gupta Date: Mon, 8 May 2023 15:09:51 +0530 Subject: [PATCH 1/2] changes in customer create ticket :https://github.com/uvdesk/core-framework/issues/629 --- Resources/views/Knowledgebase/ticket.html.twig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Resources/views/Knowledgebase/ticket.html.twig b/Resources/views/Knowledgebase/ticket.html.twig index fabe266..3b5f4a4 100644 --- a/Resources/views/Knowledgebase/ticket.html.twig +++ b/Resources/views/Knowledgebase/ticket.html.twig @@ -288,6 +288,12 @@ }, 'reply' : { fn: function(value) { + var content = tinyMCE.activeEditor.getContent(); + if (content ) { + return false; + } else { + return true; + } if(!tinyMCE.get("uv-edit-create-thread")) return false; var html = tinyMCE.get("uv-edit-create-thread").getContent(); From cfaf7262e38f891a017b964589e2ae1cb2a74c9a Mon Sep 17 00:00:00 2001 From: Abhishek Gupta Date: Mon, 8 May 2023 17:47:20 +0530 Subject: [PATCH 2/2] changes in create folder validation:https://github.com/uvdesk/support-center-bundle/issues/218 --- Controller/Folder.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Controller/Folder.php b/Controller/Folder.php index 782b8dd..201219c 100755 --- a/Controller/Folder.php +++ b/Controller/Folder.php @@ -78,15 +78,24 @@ public function createFolder(Request $request) return $this->redirect($this->generateUrl('helpdesk_member_knowledgebase_create_folder')); } } + + if (strpos($imageFile->getClientOriginalName(), '.php') !== false) { + $message = $this->translator->trans('Warning! Provide valid image file. (Recommened: PNG, JPG or GIF Format).'); + $this->addFlash('warning', $message); + + return $this->redirect($this->generateUrl('helpdesk_member_knowledgebase_create_folder')); + } $data = $request->request->all(); $folder->setName($data['name']); $folder->setDescription($data['description']); - $folder->setvisibility($data['visibility']); + $folder->setvisibility($data['visibility']); + if(isset($solutionImage)){ $assetDetails = $this->fileSystem->getUploadManager()->uploadFile($solutionImage, 'knowledgebase'); $folder->setSolutionImage($assetDetails['path']); - } + } + $folder->setDateAdded( new \DateTime()); $folder->setDateUpdated( new \DateTime()); $folder->setSortOrder(1);