Merged in [15522] from rcross@amsl.com:

Make email address read-only in rolodex edit form.  Fixes .
 - Legacy-Id: 15529
Note: SVN reference [15522] has been migrated to Git commit dd2487e946
This commit is contained in:
Henrik Levkowetz 2018-10-07 20:34:37 +00:00
commit 17994b4cf2
2 changed files with 2 additions and 0 deletions
ietf/secr
rolodex
static/secr/js

View file

@ -27,6 +27,7 @@ class EmailForm(forms.ModelForm):
class Meta:
model = Email
fields = '__all__'
widgets = {'address': forms.TextInput(attrs={'readonly':True})}
class EditPersonForm(forms.ModelForm):
class Meta:

View file

@ -31,6 +31,7 @@ function add_inline_form(name) {
var count = field_table.children().length
var copy = $('tr:last', field_table).clone(true)
copy.removeClass("row1 row2")
copy.find("input[name$='address']").removeAttr("readonly")
copy.addClass("row"+((count % 2) == 0 ? 1 : 2))
field_table.append(copy)
increment_form_ids($('tr:last', field_table), count, name)