fix: handle remote_instructions field correctly on interim request form

This commit is contained in:
Jennifer Richards 2022-03-08 12:15:22 -04:00
parent baa3b292b0
commit 93d3daa324
2 changed files with 6 additions and 2 deletions

View file

@ -285,6 +285,10 @@ class InterimSessionModelForm(forms.ModelForm):
choices.append(('meetecho', 'Automatically create Meetecho conference'))
choices.append(('manual', 'Manually specify remote instructions...'))
self.fields['remote_participation'].choices = choices
# put remote_participation ahead of remote_instructions
field_order = [field for field in self.fields if field != 'remote_participation']
field_order.insert(field_order.index('remote_instructions'), 'remote_participation')
self.order_fields(field_order)
def clean_date(self):
'''Date field validator. We can't use required on the input because

View file

@ -254,11 +254,11 @@ const interimRequest = (function() {
switch (elt.value) {
case 'meetecho':
remoteInstructions.closest('.form-group').hide();
remoteInstructions.closest('.row').hide();
break;
default:
remoteInstructions.closest('.form-group').show();
remoteInstructions.closest('.row').show();
break;
}
}