From d041edf1b3a6c6882c4c8af94ef54d86734d71e1 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sun, 4 Jun 2017 19:40:26 +0000 Subject: [PATCH] Merged in [13501] from rjsparks@nostrum.com: 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 #2299. - Legacy-Id: 13519 Note: SVN reference [13501] has been migrated to Git commit ca76f5c8f0fbf0832440680381380995b0092ea7 --- ietf/nomcom/forms.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ietf/nomcom/forms.py b/ietf/nomcom/forms.py index 7d9d1f9c8..d07887ceb 100644 --- a/ietf/nomcom/forms.py +++ b/ietf/nomcom/forms.py @@ -6,6 +6,7 @@ from django.utils.decorators import method_decorator from django.shortcuts import render from django.urls import reverse from django.utils.html import mark_safe +from django.forms.widgets import FileInput from ietf.dbtemplate.forms import DBTemplateForm from ietf.group.models import Group, Role @@ -205,13 +206,14 @@ class EditNomcomForm(forms.ModelForm): if self.instance.public_key: help_text = "The nomcom already has a public key. Previous data will remain encrypted with the old key" else: - help_text = "The nomcom has not a public key yet" + help_text = "The nomcom does not have a public key yet" self.fields['public_key'].help_text = help_text class Meta: model = NomCom fields = ('public_key', 'initial_text', 'show_nominee_pictures', 'send_questionnaire', 'reminder_interval') + widgets = {'public_key':FileInput, } def clean_public_key(self): public_key = self.cleaned_data.get('public_key', None)