dev/core#1696 - Update attachment message on mailing form.
authorJitendra Purohit <jitendra@fuzion.co.nz>
Wed, 8 Apr 2020 08:40:06 +0000 (14:10 +0530)
committerJitendra Purohit <jitendra@fuzion.co.nz>
Thu, 9 Apr 2020 11:39:35 +0000 (17:09 +0530)
ang/crmAttachment.js
ang/crmAttachment/attachments.html

index b89fe4ca22ef336563860325dccb2dee73f95db2..16bb212553c6e1bb6b038984b15f75fc7e479213 100644 (file)
         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
index dcd7f86663957e1fb821794c209c3c98a8b1b265..1646ad546caf6a11bb39eab932f16bcd7e2c5a1d 100644 (file)
@@ -42,5 +42,8 @@
   </div>
   <div>
     {{ts('Alternatively, you may add new files using drag/drop.')}}
+    <span ng-if="max_size">
+      {{ts('Each file must be less than %1M in size.', {1: max_size})}}
+    </span>
   </div>
 </div>