23 lines
692 B
Python
23 lines
692 B
Python
# -*- coding: utf-8 -*-
|
|
from django import forms
|
|
|
|
from apps.pla.models.model_notifier import Notifier
|
|
from apps.pla.models.model_plagroups import PlaGroups
|
|
|
|
|
|
class NotifierForm(forms.ModelForm):
|
|
name = forms.CharField(
|
|
widget=forms.TextInput(attrs={"class": "form-control", "autofocus": ""})
|
|
)
|
|
sip_number = forms.CharField(
|
|
widget=forms.TextInput(attrs={"class": "form-control", "autofocus": ""})
|
|
)
|
|
pla_groups = forms.ModelChoiceField(
|
|
queryset=PlaGroups.objects.all(),
|
|
widget=forms.Select(attrs={"class": "form-control select2"}),
|
|
)
|
|
|
|
class Meta:
|
|
model = Notifier
|
|
fields = ("id", "name", "pla_groups", "sip_number")
|