from django import forms from design_template.apps import colors class LogoForm(forms.Form): namesystem = forms.CharField(max_length=30, label="Название системы", required=False) logo = forms.FileField(label="Логотип", required=False) logo.widget.attrs.update({'accept':'.png, .svg, .ico'}) class ColorsForm(forms.Form): btnBg = forms.CharField(label='Цвет кнопок', initial=colors[0] , max_length=7, widget=forms.TextInput(attrs={'type': 'color'})) btnTxt = forms.CharField(label='Цвет текста кнопок', initial=colors[1], max_length=7, widget=forms.TextInput(attrs={'type': 'color'})) btnSuccessBg = forms.CharField(label='Цвет кнопок успеха', initial=colors[2], max_length=7, widget=forms.TextInput(attrs={'type': 'color'})) btnSuccessTxt = forms.CharField(label='Цвет текста кнопок успеха', initial=colors[3], max_length=7, widget=forms.TextInput(attrs={'type': 'color'})) btnDangerBg = forms.CharField(label='Цвет текста кнопок предупреждения', initial=colors[4], max_length=7, widget=forms.TextInput(attrs={'type': 'color'})) btnDangerTxt = forms.CharField(label='Цвет текста кнопок предупреждения', initial=colors[5], max_length=7, widget=forms.TextInput(attrs={'type': 'color'})) pillsBg = forms.CharField(label='Цвет плашек в меню', initial=colors[6], max_length=7, widget=forms.TextInput(attrs={'type': 'color'})) pillsTxt = forms.CharField(label='Цвет текста плашек в меню', initial=colors[7], max_length=7, widget=forms.TextInput(attrs={'type': 'color'})) linksTxt = forms.CharField(label='Цвет текста ссылок', initial=colors[8], max_length=7, widget=forms.TextInput(attrs={'type': 'color'}))