summaryrefslogtreecommitdiffstats
path: root/restaurant_orders/settings/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'restaurant_orders/settings/forms.py')
-rw-r--r--restaurant_orders/settings/forms.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/restaurant_orders/settings/forms.py b/restaurant_orders/settings/forms.py
new file mode 100644
index 0000000..1ea90e9
--- /dev/null
+++ b/restaurant_orders/settings/forms.py
@@ -0,0 +1,18 @@
1from django import forms
2from core.models import Restaurant
3
4FORM_TAILWIND_CLASSES = 'form-control block w-full px-3 py-1.5 text-base font-normal text-gray-700 bg-white bg-clip-padding border border-solid border-gray-300 rounded transition ease-in-out m-0 focus:text-gray-700 focus:bg-white focus:border-blue-600 focus:outline-none'
5
6class RestaurantForm(forms.ModelForm):
7 woocommerce_consumer_key = forms.CharField(required=False)
8 woocommerce_consumer_secret = forms.CharField(required=False)
9 woocommerce_webhook_secret = forms.CharField(required=False)
10
11 class Meta:
12 model = Restaurant
13 exclude = ('users', )
14
15 def __init__(self, *args, **kwargs):
16 super(RestaurantForm, self).__init__(*args, **kwargs)
17 for key in self.fields.keys():
18 self.fields[key].widget.attrs.update({'class': FORM_TAILWIND_CLASSES})