misc: fix HTML id used for file widgets in block of fields (#47925)
This commit is contained in:
parent
13daba0c45
commit
3a8d270098
|
@ -209,7 +209,8 @@ StringWidget.render_content = string_render_content
|
|||
|
||||
|
||||
def file_render_content(self):
|
||||
attrs = {'id': 'form_' + str(self.name).split('$')[0]}
|
||||
# remove trailing $file for identifier
|
||||
attrs = {'id': 'form_' + str(self.name).rsplit('$', 1)[0]}
|
||||
if self.required:
|
||||
attrs['aria-required'] = 'true'
|
||||
if self.attrs:
|
||||
|
|
Loading…
Reference in New Issue