Revert "Add ability to disable the metadata update column. Disable the metadata update column in the new document upload wizard."
This reverts commit 511e397850.
This commit is contained in:
@@ -16,17 +16,15 @@ class MetadataForm(forms.Form):
|
||||
widget=forms.TextInput(attrs={'readonly': 'readonly'})
|
||||
)
|
||||
value = forms.CharField(label=_('Value'), required=False)
|
||||
update = forms.BooleanField(
|
||||
initial=True, label=_('Update'), required=False
|
||||
)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.disable_update_column = kwargs.pop('disable_update_column', False)
|
||||
super(MetadataForm, self).__init__(*args, **kwargs)
|
||||
|
||||
# Set form fields initial values
|
||||
if 'initial' in kwargs:
|
||||
if not kwargs['initial'].get('disable_update_column', False):
|
||||
self.fields['update'] = forms.BooleanField(
|
||||
initial=True, label=_('Update'), required=False
|
||||
)
|
||||
self.metadata_type = kwargs['initial']['metadata_type']
|
||||
self.document_type = kwargs['initial']['document_type']
|
||||
required_string = ''
|
||||
|
||||
@@ -59,7 +59,6 @@ class DocumentCreateWizard(ViewPermissionCheckMixin, SessionWizardView):
|
||||
|
||||
for document_type_metadata_type in self.get_cleaned_data_for_step('0')['document_type'].metadata.all():
|
||||
initial.append({
|
||||
'disable_update_column': True,
|
||||
'document_type': self.get_cleaned_data_for_step('0')['document_type'],
|
||||
'metadata_type': document_type_metadata_type.metadata_type,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user