From 080eefc318ae0d865cc13d5e56a26a6214b24b86 Mon Sep 17 00:00:00 2001 From: Jitendra Purohit Date: Wed, 8 Apr 2020 14:10:06 +0530 Subject: [PATCH] dev/core#1696 - Update attachment message on mailing form. --- ang/crmAttachment.js | 5 +++++ ang/crmAttachment/attachments.html | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ang/crmAttachment.js b/ang/crmAttachment.js index b89fe4ca22..16bb212553 100644 --- a/ang/crmAttachment.js +++ b/ang/crmAttachment.js @@ -156,6 +156,11 @@ var model = $parse(attr.crmAttachments); scope.att = model(scope.$parent); scope.ts = CRM.ts(null); + CRM.api4('Setting', 'get', { + select: ["maxFileSize"] + }).then(function(settings) { + scope.max_size = settings[0].value; + }); scope.inclUrl = '~/crmAttachment/attachments.html'; // delay rendering of child tree until after model has been populated diff --git a/ang/crmAttachment/attachments.html b/ang/crmAttachment/attachments.html index dcd7f86663..1646ad546c 100644 --- a/ang/crmAttachment/attachments.html +++ b/ang/crmAttachment/attachments.html @@ -42,5 +42,8 @@
{{ts('Alternatively, you may add new files using drag/drop.')}} + + {{ts('Each file must be less than %1M in size.', {1: max_size})}} +
-- 2.25.1