Skip to content

Commit ca76f5c

Browse files
committed
Use a simpler widget for the public key file when editing a nomcom to remove confusion between clearing keys and clearing the form control. Fixes ietf-tools#2299. Commit ready for merge.
- Legacy-Id: 13501
1 parent e422717 commit ca76f5c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ietf/nomcom/forms.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from django.shortcuts import render
77
from django.urls import reverse
88
from django.utils.html import mark_safe
9+
from django.forms.widgets import FileInput
910

1011
from ietf.dbtemplate.forms import DBTemplateForm
1112
from ietf.group.models import Group, Role
@@ -205,13 +206,14 @@ def __init__(self, *args, **kwargs):
205206
if self.instance.public_key:
206207
help_text = "The nomcom already has a public key. Previous data will remain encrypted with the old key"
207208
else:
208-
help_text = "The nomcom has not a public key yet"
209+
help_text = "The nomcom does not have a public key yet"
209210
self.fields['public_key'].help_text = help_text
210211

211212
class Meta:
212213
model = NomCom
213214
fields = ('public_key', 'initial_text', 'show_nominee_pictures',
214215
'send_questionnaire', 'reminder_interval')
216+
widgets = {'public_key':FileInput, }
215217

216218
def clean_public_key(self):
217219
public_key = self.cleaned_data.get('public_key', None)

0 commit comments

Comments
 (0)