aboutsummaryrefslogtreecommitdiffstats
path: root/layerindex/forms.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-02-27 23:53:37 +0000
committerPaul Eggleton <paul.eggleton@linux.intel.com>2013-02-28 14:36:41 +0000
commit0e14cf17d89b6315f62e73261caffbc04a0ccaf0 (patch)
treeb52fdf57afb76dacc85aefbb8f091460ba122728 /layerindex/forms.py
parent9a3bfac320b1739a9e11d7eb78d696d640058c77 (diff)
downloadopenembedded-core-contrib-0e14cf17d89b6315f62e73261caffbc04a0ccaf0.tar.gz
Hide extra maintainer forms and show each one on request
Hide all empty maintainer forms and have a button to "add" another maintainer which just uses jQuery to show the next hidden form. Up to 10 maintainers can be added which should be more than enough. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'layerindex/forms.py')
-rw-r--r--layerindex/forms.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/layerindex/forms.py b/layerindex/forms.py
index 38e84a85fb..d3518e4e89 100644
--- a/layerindex/forms.py
+++ b/layerindex/forms.py
@@ -41,7 +41,7 @@ class BaseLayerMaintainerFormSet(forms.models.BaseInlineFormSet):
f.required = True
return f
-LayerMaintainerFormSet = inlineformset_factory(LayerItem, LayerMaintainer, form=LayerMaintainerForm, formset=BaseLayerMaintainerFormSet, can_delete=False)
+LayerMaintainerFormSet = inlineformset_factory(LayerItem, LayerMaintainer, form=LayerMaintainerForm, formset=BaseLayerMaintainerFormSet, can_delete=False, extra=10, max_num=10)
class SubmitLayerForm(forms.ModelForm):
# Additional form fields