mirror of
https://github.com/fergalmoran/robotopro.git
synced 2025-12-22 09:18:53 +00:00
29 lines
951 B
Python
Executable File
29 lines
951 B
Python
Executable File
from django.forms import ModelForm, DateInput, CheckboxInput
|
|
from django.forms.widgets import TextInput
|
|
from promotions.models import Promotion
|
|
|
|
|
|
class PromotionWizardDetailsPage(ModelForm):
|
|
error_css_class = 'error'
|
|
|
|
class Meta:
|
|
model = Promotion
|
|
fields = ['id', 'description', 'start_date', 'end_date', 'active']
|
|
widgets = {
|
|
'description': TextInput(attrs={'class': 'span8'}),
|
|
'start_date': DateInput(attrs={'class': 'date-picker'}),
|
|
'end_date': DateInput(attrs={'class': 'date-picker'}),
|
|
'active': CheckboxInput(attrs={'class': 'ace ace-switch ace-switch-5'}),
|
|
}
|
|
|
|
|
|
class PromotionWizardLayoutPage(ModelForm):
|
|
class Meta:
|
|
model = Promotion
|
|
fields = ['id', 'description', 'body_text']
|
|
widgets = {
|
|
'description': TextInput(attrs={'class': 'span8'}),
|
|
'body_text': TextInput(attrs={'class': 'span8'}),
|
|
}
|
|
|