diff --git a/src/public/modules/forms/admin/controllers/edit-fields-modal.client.controller.js b/src/public/modules/forms/admin/controllers/edit-fields-modal.client.controller.js index 00c139a1e3..c2b6ecab7f 100644 --- a/src/public/modules/forms/admin/controllers/edit-fields-modal.client.controller.js +++ b/src/public/modules/forms/admin/controllers/edit-fields-modal.client.controller.js @@ -14,8 +14,6 @@ const DATE_VALIDATION_OPTIONS = { custom: 'Custom date range', } -const EMAIL_MODE_ALLOWED_SIZES = ['1', '2', '3', '4', '5', '6', '7'] - angular .module('forms') .controller('EditFieldsModalController', [ @@ -306,13 +304,7 @@ function EditFieldsModalController( field.ValidationOptions.customMin = null } - // For email mode, show only up to 7MB for dropdown - vm.attachmentSizes = - vm.myform.responseMode === responseModeEnum.EMAIL - ? Attachment.dropdown.filter((option) => - EMAIL_MODE_ALLOWED_SIZES.includes(option.value), - ) - : Attachment.dropdown + vm.attachmentSizes = Attachment.dropdown let previousAttachmentSize = 0 diff --git a/src/public/modules/forms/services/attachment.client.service.js b/src/public/modules/forms/services/attachment.client.service.js index 08dda2a35d..afe83fa79b 100644 --- a/src/public/modules/forms/services/attachment.client.service.js +++ b/src/public/modules/forms/services/attachment.client.service.js @@ -3,50 +3,12 @@ const { zipWith } = require('lodash') angular.module('forms').service('Attachment', [Attachment]) function Attachment() { - this.sizes = [ - '1', - '2', - '3', - '4', - '5', - '6', - '7', - '8', - '9', - '10', - '11', - '12', - '13', - '14', - '15', - '16', - '17', - '18', - '19', - '20', - ] + this.sizes = ['1', '3', '7'] this.descriptions = [ '1 MB (e.g. Pictures)', - '2 MB (e.g. Pictures)', '3 MB (e.g. PDF files)', - '4 MB (e.g. PDF files)', - '5 MB (e.g. PDF files)', - '6 MB (e.g. PDF files)', '7 MB (e.g. Slides)', - '8 MB (e.g. Slides)', - '9 MB (e.g. Slides)', - '10 MB (e.g. Slides)', - '11 MB (e.g. Video files)', - '12 MB (e.g. Video files)', - '13 MB (e.g. Video files)', - '14 MB (e.g. Video files)', - '15 MB (e.g. Video files)', - '16 MB (e.g. Video files)', - '17 MB (e.g. Video files)', - '18 MB (e.g. Video files)', - '19 MB (e.g. Video files)', - '20 MB (e.g. Video files)', ] this.dropdown = zipWith(this.descriptions, this.sizes, (desc, size) => { diff --git a/src/types/field/attachmentField.ts b/src/types/field/attachmentField.ts index 25e5634f89..a8d0db60cf 100644 --- a/src/types/field/attachmentField.ts +++ b/src/types/field/attachmentField.ts @@ -2,25 +2,8 @@ import { IField, IFieldSchema } from './baseField' export enum AttachmentSize { OneMb = '1', - TwoMb = '2', ThreeMb = '3', - FourMb = '4', - FiveMb = '5', - SixMb = '6', SevenMb = '7', - EightMb = '8', - NineMb = '9', - TenMb = '10', - ElevenMb = '11', - TwelveMb = '12', - ThirteenMb = '13', - FourteenMb = '14', - FifteenMb = '15', - SixteenMb = '16', - SeventeenMb = '17', - EighteenMb = '18', - NineteenMb = '19', - TwentyMb = '20', } export interface IAttachmentField extends IField {