diff --git a/core/__pycache__/forms.cpython-311.pyc b/core/__pycache__/forms.cpython-311.pyc index 7e66c47..affcaa7 100644 Binary files a/core/__pycache__/forms.cpython-311.pyc and b/core/__pycache__/forms.cpython-311.pyc differ diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index a225337..ca66217 100644 Binary files a/core/__pycache__/models.cpython-311.pyc and b/core/__pycache__/models.cpython-311.pyc differ diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index 0f074b3..c3f9b3a 100644 Binary files a/core/__pycache__/urls.cpython-311.pyc and b/core/__pycache__/urls.cpython-311.pyc differ diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index 219f92b..a0cf697 100644 Binary files a/core/__pycache__/views.cpython-311.pyc and b/core/__pycache__/views.cpython-311.pyc differ diff --git a/core/forms.py b/core/forms.py index 1740dda..9f99003 100644 --- a/core/forms.py +++ b/core/forms.py @@ -166,3 +166,25 @@ class RenewSubscriptionForm(forms.Form): widget=forms.Select(attrs={'class': 'form-select'}), label=_('Subscription Plan') ) + +class AppSettingForm(forms.ModelForm): + class Meta: + model = AppSetting + fields = '__all__' + widgets = { + 'app_name': forms.TextInput(attrs={'class': 'form-control'}), + 'logo': forms.FileInput(attrs={'class': 'form-control'}), + 'slogan': forms.TextInput(attrs={'class': 'form-control'}), + 'registration_number': forms.TextInput(attrs={'class': 'form-control'}), + 'tax_number': forms.TextInput(attrs={'class': 'form-control'}), + 'contact_phone': forms.TextInput(attrs={'class': 'form-control'}), + 'contact_email': forms.EmailInput(attrs={'class': 'form-control'}), + 'contact_address': forms.Textarea(attrs={'class': 'form-control', 'rows': 2}), + 'terms_of_service': forms.Textarea(attrs={'class': 'form-control', 'rows': 5}), + 'privacy_policy': forms.Textarea(attrs={'class': 'form-control', 'rows': 5}), + 'subscription_enabled': forms.CheckboxInput(attrs={'class': 'form-check-input'}), + 'shipper_monthly_fee': forms.NumberInput(attrs={'class': 'form-control', 'step': '0.01'}), + 'shipper_annual_fee': forms.NumberInput(attrs={'class': 'form-control', 'step': '0.01'}), + 'truck_owner_monthly_fee': forms.NumberInput(attrs={'class': 'form-control', 'step': '0.01'}), + 'truck_owner_annual_fee': forms.NumberInput(attrs={'class': 'form-control', 'step': '0.01'}), + } \ No newline at end of file diff --git a/core/templates/core/admin_dashboard.html b/core/templates/core/admin_dashboard.html index eecc8e1..03f7df7 100644 --- a/core/templates/core/admin_dashboard.html +++ b/core/templates/core/admin_dashboard.html @@ -355,6 +355,19 @@ +
diff --git a/core/templates/core/app_settings.html b/core/templates/core/app_settings.html new file mode 100644 index 0000000..8077554 --- /dev/null +++ b/core/templates/core/app_settings.html @@ -0,0 +1,145 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} +