mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
Allow setting active/inactive maintainer status when editing layer
If editing rather than submitting we want users to be able to make an existing maintainer inactive. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
ad5e8f0524
commit
e6d7b215a6
|
@ -14,7 +14,12 @@ import re
|
||||||
class LayerMaintainerForm(forms.ModelForm):
|
class LayerMaintainerForm(forms.ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = LayerMaintainer
|
model = LayerMaintainer
|
||||||
fields = ('name', 'email', 'responsibility')
|
fields = ('name', 'email', 'responsibility', 'status')
|
||||||
|
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super(LayerMaintainerForm, self).__init__(*args, **kwargs)
|
||||||
|
if not self.instance.pk:
|
||||||
|
del self.fields['status']
|
||||||
|
|
||||||
def clean_email(self):
|
def clean_email(self):
|
||||||
email = self.cleaned_data['email'].strip()
|
email = self.cleaned_data['email'].strip()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user