Skip to content

Commit 17994b4

Browse files
committed
Merged in [15522] from rcross@amsl.com:
Make email address read-only in rolodex edit form. Fixes ietf-tools#2602. - Legacy-Id: 15529 Note: SVN reference [15522] has been migrated to Git commit dd2487e
2 parents c305498 + dd2487e commit 17994b4

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

ietf/secr/rolodex/forms.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class EmailForm(forms.ModelForm):
2727
class Meta:
2828
model = Email
2929
fields = '__all__'
30+
widgets = {'address': forms.TextInput(attrs={'readonly':True})}
3031

3132
class EditPersonForm(forms.ModelForm):
3233
class Meta:

ietf/secr/static/secr/js/dynamic_inlines.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ function add_inline_form(name) {
3131
var count = field_table.children().length
3232
var copy = $('tr:last', field_table).clone(true)
3333
copy.removeClass("row1 row2")
34+
copy.find("input[name$='address']").removeAttr("readonly")
3435
copy.addClass("row"+((count % 2) == 0 ? 1 : 2))
3536
field_table.append(copy)
3637
increment_form_ids($('tr:last', field_table), count, name)

0 commit comments

Comments
 (0)