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

@@ -28,6 +28,10 @@ Other Changes
- Reduce verbosity of some debug messages. - Reduce verbosity of some debug messages.
- New lineart transformation. Useful to increase the OCR accuracy on some kind - New lineart transformation. Useful to increase the OCR accuracy on some kind
of documents. of documents.
- Make sure lookup selection widgets also trigger the metadata update
checkbox on change.
Removals Removals
-------- --------

View File

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