1 <?php
2 3 4 5 6
7
8 class HtmlEditorQuotaExtension extends Extension {
9 function () {
10 }
11
12 function updateImageForm(& $form) {
13 $sizeInfo = LeftAndMainQuota::sizeStatus();
14 if ($sizeInfo->Blocked) {
15 $form->Fields()->removeByName('ShowUpload');
16 $form->Fields()->removeByName('Files[0]');
17 $form->Fields()->removeByName('Response');
18 $form->Fields()->removeByName('UploadMode');
19
20 $form->Fields()->insertAfter(new LiteralField('ShowUpload', '<p class="showUploadField"><a href="#" class="uploadDisable">'. _t('HtmlEditorField.UPLOADDISABLE', 'UPLOAD DISABLE') .'</a></p>'), 'FolderID');
21
22
23
24
25 }
26 }
27 }
[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the
Silverstripe Forums to ask development related questions.
-