changed emoji widget
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
from django import forms
|
||||
from django.forms import widgets
|
||||
from django.utils.translation import gettext as _
|
||||
from emoji_picker.widgets import EmojiPickerTextInput
|
||||
|
||||
from .models import *
|
||||
|
||||
@ -10,11 +11,6 @@ class MultiSelectWidget(widgets.SelectMultiple):
|
||||
js = ('custom/js/form_multiselect.js',)
|
||||
|
||||
|
||||
class EmojiWidget(forms.TextInput):
|
||||
class Media:
|
||||
js = ('custom/js/form_emoji.js',)
|
||||
|
||||
|
||||
class ExternalRecipeForm(forms.ModelForm):
|
||||
file_path = forms.CharField(disabled=True, required=False)
|
||||
storage = forms.ModelChoiceField(queryset=Storage.objects.all(), disabled=True, required=False)
|
||||
@ -65,7 +61,7 @@ class KeywordForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Keyword
|
||||
fields = ('name', 'icon', 'description')
|
||||
widgets = {'icon': EmojiWidget}
|
||||
widgets = {'icon': EmojiPickerTextInput}
|
||||
|
||||
|
||||
class StorageForm(forms.ModelForm):
|
||||
|
Reference in New Issue
Block a user