fix attachment file name

parent 4960c2f3
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
this.attachment.find('a').attr('href', '#'); this.attachment.find('a').attr('href', '#');
this.attachment.hide(); this.attachment.hide();
} else { } else {
this.attachment.find('.uploaded-label').html(this.uploadedLabel({filename: this.lab.get('attachment')})); this.attachment.find('.uploaded-label').html(this.uploadedLabel({filename: this.lab.get('attachment_file')}));
this.attachment.find('a').attr('href', this.attachment.data('href').replace('__lab_id__', this.lab.get('id'))); this.attachment.find('a').attr('href', this.attachment.data('href').replace('__lab_id__', this.lab.get('id')));
this.attachment.show(); this.attachment.show();
} }
......
...@@ -119,7 +119,7 @@ class LabService implements LabServiceInterface ...@@ -119,7 +119,7 @@ class LabService implements LabServiceInterface
} }
$lab = $bean->export(); $lab = $bean->export();
$lab['attachment'] = basename($lab['attachment']); $lab['attachment_file'] = basename($lab['attachment']);
return array_merge($lab, [ return array_merge($lab, [
'labtype' => $bean->labtype->name, 'labtype' => $bean->labtype->name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment