Allow to attach multiple files
issue7735 review56391002
This commit is contained in:
1 parent
7348cb7551
commit
bdc029f5b4
2 files changed
+5
-4
No files matched your search
@@ -40,7 +40,6 @@ class Attachment(WinForm):
|
||||
self.attachment_callback()
|
||||
|
||||
def add_uri(self, uri):
|
||||
self.screen.switch_view('form')
|
||||
data_field = self.screen.group.fields['data']
|
||||
name_field = self.screen.group.fields[data_field.attrs['filename']]
|
||||
new_record = self.screen.new()
|
||||
|
||||
@@ -108,9 +108,11 @@ class Form(SignalEvent, TabContent):
|
||||
record, lambda: self.update_attachment_count(reload=True))
|
||||
|
||||
def add_file(widget):
|
||||
filename = common.file_selection(_("Select"))
|
||||
if filename:
|
||||
window(widget).add_file(filename)
|
||||
filenames = common.file_selection(_("Select"), multi=True)
|
||||
if filenames:
|
||||
attachment = window(widget)
|
||||
for filename in filenames:
|
||||
attachment.add_file(filename)
|
||||
|
||||
def activate(widget, callback):
|
||||
callback()
|
||||
|
||||
Reference in new issue
Block a user