added ingredient merging

This commit is contained in:
vabene1111
2020-02-18 22:25:21 +01:00
parent 04cbe6cb2c
commit 46dffe2f63
3 changed files with 57 additions and 14 deletions

View File

@ -97,6 +97,23 @@ class UnitMergeForm(forms.Form):
)
class IngredientMergeForm(forms.Form):
prefix = 'ingredient'
new_ingredient = forms.ModelChoiceField(
queryset=Ingredient.objects.all(),
widget=SelectWidget,
label=_('New Ingredient'),
help_text=_('New ingredient that other gets replaced by.'),
)
old_ingredient = forms.ModelChoiceField(
queryset=Ingredient.objects.all(),
widget=SelectWidget,
label=_('Old Ingredient'),
help_text=_('Ingredient that should be replaced.'),
)
class CommentForm(forms.ModelForm):
prefix = 'comment'