Skip to content

Commit 8c7dd65

Browse files
committed
MOBILE-1966 attachment: Uploading files if undefined max submissions
1 parent 1c03904 commit 8c7dd65

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

www/core/directives/attachments.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ angular.module('mm.core')
7070

7171
if (typeof scope.maxSubmissions == 'undefined' || scope.maxSubmissions < 0) {
7272
scope.maxSubmissions = $translate.instant('mm.core.unknown');
73+
scope.unlimitedFiles = true;
7374
}
7475

7576
scope.add = function() {
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
<p class="item item-text-wrap">
1+
<div class="item item-text-wrap">
22
{{ 'mm.core.maxsizeandattachments' | translate:{$a: {size: maxSizeReadable, attachments: maxSubmissions} } }}
3-
</p>
3+
</div>
44
<div ng-repeat="file in files">
55
<!-- Files already attached to the submission, either in online or in offline. -->
66
<mm-file ng-if="!file.name || file.offline" file="file" component="{{component}}" component-id="{{componentId}}" can-delete="true" on-delete="delete($index, true)" can-download="{{!file.offline}}"></mm-file>
77
<!-- Files added to draft but not attached to submission yet. -->
88
<mm-local-file ng-if="file.name && !file.offline" file="file" manage="true" file-deleted="delete($index, false)" file-renamed="renamed($index, file)"></mm-local-file>
99
</div>
1010
<!-- Button to add more files. -->
11-
<div class="item item-text-wrap" ng-if="maxSubmissions >= 0 && files.length < maxSubmissions">
12-
<a class="button button-block" ng-click="add()">
13-
<i class="icon ion-plus"></i> {{ 'mm.fileuploader.addfiletext' | translate }}
11+
<div class="item item-text-wrap" ng-if="unlimitedFiles || (maxSubmissions >= 0 && files.length < maxSubmissions)">
12+
<a class="button button-block icon-left ion-plus" ng-click="add()">
13+
{{ 'mm.fileuploader.addfiletext' | translate }}
1414
</a>
1515
</div>

0 commit comments

Comments
 (0)