@@ -73,14 +73,14 @@ |
||
| 73 | 73 | $count = $options->getAttachmentsCount(); |
| 74 | 74 | |
| 75 | 75 | $form->setIsDisableCapable(false) |
| 76 | - ->setIsDisableElementsCapable(false) |
|
| 77 | - ->setIsDescriptionsEnabled(true) |
|
| 78 | - ->setDescription( |
|
| 76 | + ->setIsDisableElementsCapable(false) |
|
| 77 | + ->setIsDescriptionsEnabled(true) |
|
| 78 | + ->setDescription( |
|
| 79 | 79 | /*@translate*/ 'Attach images or PDF Documents to your application. Drag&drop them, or click into the attachement area. You can upload up to %sMB', |
| 80 | - [round($size/(1024*1024))>0? round($size/(1024*1024)):round($size/(1024*1024), 1)] |
|
| 81 | - ) |
|
| 82 | - ->setParam('return', 'file-uri') |
|
| 83 | - ->setLabel(/*@translate*/ 'Attachments'); |
|
| 80 | + [round($size/(1024*1024))>0? round($size/(1024*1024)):round($size/(1024*1024), 1)] |
|
| 81 | + ) |
|
| 82 | + ->setParam('return', 'file-uri') |
|
| 83 | + ->setLabel(/*@translate*/ 'Attachments'); |
|
| 84 | 84 | |
| 85 | 85 | /** @var $file FileUpload*/ |
| 86 | 86 | $file = $form->get($this->fileName); |
@@ -41,8 +41,8 @@ |
||
| 41 | 41 | $fileId = new \MongoId($file->id); |
| 42 | 42 | $dm = $eventArgs->getDocumentManager(); |
| 43 | 43 | $dm->createQueryBuilder('Cv\Entity\Cv') |
| 44 | - ->update()->multiple(true) |
|
| 45 | - ->field('attachments')->equals($fileId)->pull($fileId) |
|
| 46 | - ->getQuery()->execute(); |
|
| 44 | + ->update()->multiple(true) |
|
| 45 | + ->field('attachments')->equals($fileId)->pull($fileId) |
|
| 46 | + ->getQuery()->execute(); |
|
| 47 | 47 | } |
| 48 | 48 | } |