Make sure lookup selection widgets also trigger the

metadata update checkbox on change.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-07-04 01:04:15 -04:00
parent 326644f355
commit 2cc9efc5b2
2 changed files with 7 additions and 0 deletions

View File

@@ -67,6 +67,9 @@ class DocumentMetadataForm(forms.Form):
choices.insert(0, ('', '------'))
self.fields['value'].choices = choices
self.fields['value'].required = required
self.fields['value'].widget.attrs.update(
{'class': 'metadata-value'}
)
except Exception as exception:
self.fields['value'].initial = _(
'Lookup value error: %s'