Make email address read-only in rolodex edit form. Fixes #2602. Commit ready for merge
- Legacy-Id: 15522
This commit is contained in:
parent
c6bc55207c
commit
dd2487e946
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue