class DomainNameForm(newModelForm): contract = newChoiceField( choices=(), label=_('Contract'), widget=forms.Select(attrs={'class': 'form-control'})) name = forms.CharField( max_length=255, label=_('Name'), widget=forms.TextInput(attrs={'class': 'form-control'})) application_date = forms.CharField(max_length=255, label=_('Application Date'), required=False, widget=newDateTimeInput( d_type='onlydate', attrs={'class': 'form-control'})) deadline = forms.CharField(max_length=255, label=_('Deadline'), required=False, widget=newDateTimeInput( d_type='onlydate', attrs={'class': 'form-control'})) resolution_supplier = newChoiceField( choices=(), label=_('Resolution Supplier'), widget=forms.Select(attrs={'class': 'form-control'})) supplier = newChoiceField( choices=(), label=_('Supplier'), widget=forms.Select(attrs={'class': 'form-control'})) dns_server = forms.CharField( max_length=255, label=_('Dns Server'), required=False, widget=forms.TextInput(attrs={'class': 'form-control'})) status = newChoiceField( choices=(), label=_('Status'), required=False, widget=forms.Select(attrs={'class': 'form-control'})) comment = forms.CharField( max_length=255, label=_('Comment'), required=False, widget=forms.TextInput(attrs={'class': 'form-control'})) is_dynamic = newChoiceField( choices=(), label=_('Is dynamic'), required=False, widget=forms.Select(attrs={'class': 'form-control'})) is_deleted = newChoiceField( choices=(), label=_('Is deleted'), required=False, widget=forms.Select(attrs={'class': 'form-control'}))
class UserForm(newModelForm): #username = forms.CharField(max_length=255, label= _('Name'), widget=forms.TextInput(attrs={'class':'form-control'})) first_name = forms.CharField( max_length=255, label=_('First Name'), required=False, widget=forms.TextInput(attrs={'class': 'form-control'})) last_name = forms.CharField( max_length=255, label=_('Last Name'), required=False, widget=forms.TextInput(attrs={'class': 'form-control'})) email = forms.EmailField( max_length=255, label=_('Email'), required=False, widget=forms.EmailInput(attrs={'class': 'form-control'})) password = forms.CharField(max_length=255, label=_('Password'), required=False, widget=forms.PasswordInput( render_value=False, attrs={'class': 'form-control'})) last_login = forms.CharField( max_length=255, label=_('Last Login'), required=False, widget=newDateTimeInput(attrs={'class': 'form-control'})) # is_superuser = forms.CharField(max_length=255, label=_('Is Superuser'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) # is_staff = forms.CharField(max_length=255, label=_('Is Staff'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) # is_active = forms.CharField(max_length=255, label=_('Is Active'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) date_joined = forms.CharField( max_length=255, label=_('Date Joined'), required=False, widget=newDateTimeInput(attrs={'class': 'form-control'}))
class ContractForm(newModelForm): contract_serial = forms.CharField(max_length=255, label=string_concat(_('Contract')," ", _('serial')), widget=forms.TextInput(attrs={'class':'form-control'})) contract_name = forms.CharField(max_length=255, label=string_concat(_('Contract')," ", _('name')), widget=forms.TextInput(attrs={'class':'form-control'})) contract_type = newChoiceField(choices=(), label=string_concat(_('Contract')," ", _('type')),widget=forms.Select(attrs={'class':'form-control'})) contract_outline = forms.CharField(max_length=1800, label=string_concat(_('Contract')," ", _('outline')),widget=forms.Textarea(attrs={'class':'form-control'})) company = newChoiceField(choices=(), label= _('Supplier'), widget=forms.Select(attrs={'class':'form-control'})) signing_time = forms.CharField(max_length=255, label=_('Signing time'), required=False, widget=newDateTimeInput(d_type='onlydate', attrs={'class':'form-control'})) deadline = forms.CharField(max_length=255, label=_('Deadline'), required=False, widget=newDateTimeInput(d_type='onlydate', attrs={'class':'form-control'})) signers_contacts = newChoiceField(choices=(), label=string_concat(_('Signers'),' ', _('contacts')), widget=forms.Select(attrs={'class':'form-control'})) supplier_contacts = newChoiceField(choices=(), label=string_concat(_('Supplier'),' ', _('contacts')), widget=forms.Select(attrs={'class':'form-control'})) status = newChoiceField(choices=(), label=_('Status'), widget=forms.Select(attrs={'class':'form-control'})) comment = forms.CharField(max_length=255, label=_('Comment'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) is_dynamic = newChoiceField(choices=(), label=_('Is dynamic'), required=False, widget=forms.Select(attrs={'class':'form-control'})) is_deleted = newChoiceField(choices=(), label=_('Is deleted'), required=False, widget=forms.Select(attrs={'class':'form-control'}))
class PhysicalServerForm(newModelForm): uuid = forms.CharField(max_length=255, label=_('UUID'), widget=AutoGetVal(g_url='cmdb:get_uuid', d_type='cmdb.uuid',attrs={'class':'form-control'})) #ip_record = forms.ModelMultipleChoiceField( queryset=IpRecord.objects.filter(status=1).order_by('id'),label=_('IP'), required=False, widget=forms.SelectMultiple(attrs={'class':'form-control'})) manufacturer = newChoiceField(choices=(), label=_('Manufacturer'), required=False, widget=forms.Select(attrs={'class':'form-control'})) brand = newChoiceField(choices=(), label=_('Brand'), required=False, widget=forms.Select(attrs={'class':'form-control'})) idc_device_num = forms.CharField(max_length=255, required=False, label=_('Idc Device num'), widget=forms.TextInput(attrs={'class':'form-control'})) volume = forms.IntegerField( label=_('Volume'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) model_num = forms.CharField(max_length=255, label=_('Model'), widget=forms.TextInput(attrs={'class':'form-control'})) serial = forms.CharField(max_length=255, label=_('Serial'), widget=forms.TextInput(attrs={'class':'form-control'})) asset_num = forms.CharField(max_length=255, label=_('Asset num'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) order_num = forms.CharField(max_length=255, label=_('Order num'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) price = forms.IntegerField(label=_('Price'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) order_date = forms.CharField(max_length=255, label=_('Order date'), required=False, widget=newDateTimeInput(d_type='onlydate', attrs={'class':'form-control'})) warranty_period = forms.CharField(max_length=255, label=_('Warranty period'), required=False, widget=newDateTimeInput(d_type='onlydate', attrs={'class':'form-control'})) processor = forms.CharField(max_length=255, label=_('Processor'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) memory = forms.CharField(max_length=255, label=_('Memory'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) harddisk = forms.CharField(max_length=255, label=_('Harddisk'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) contrl_card = forms.CharField(max_length=255, label=_('Contrl card'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) network_card = forms.CharField(max_length=255, label=_('Network card'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) operating_system = forms.CharField(max_length=255, label=_('Operating System'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) comment = forms.CharField(max_length=255, label=_('Comment'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) status = newChoiceField(choices=(), label=_('Status'), required=False, widget=forms.Select(attrs={'class':'form-control'})) is_run = newChoiceField(choices=(), label=_('Is run'), required=False, widget=forms.Select(attrs={'class':'form-control'})) is_control_card = newChoiceField(choices=(), label=_('Is control card'), required=False, widget=forms.Select(attrs={'class':'form-control'})) is_virtualization = newChoiceField(choices=(), label=_('Is virtualization'), required=False, widget=forms.Select(attrs={'class':'form-control'})) is_dynamic = newChoiceField(choices=(), label=_('Is dynamic'), required=False, widget=forms.Select(attrs={'class':'form-control'})) is_deleted = newChoiceField(choices=(), label=_('Is deleted'), required=False, widget=forms.Select(attrs={'class':'form-control'}))
class NetworkEquipmentForm(newModelForm): uuid = forms.CharField(max_length=255, label=_('UUID'), widget=AutoGetVal(g_url='cmdb:get_uuid', d_type='cmdb.uuid',attrs={'class':'form-control'})) ip_record = forms.ModelMultipleChoiceField( queryset=IpRecord.objects.exclude(status=0).order_by('id'),label=_('IP'), required=False, widget=forms.SelectMultiple(attrs={'class':'form-control'})) serial = forms.CharField(max_length=255, label=_('Serial'), widget=forms.TextInput(attrs={'class':'form-control'})) manufacturer = newChoiceField(choices=(), label=_('Manufacturer'), required=False, widget=forms.Select(attrs={'class':'form-control'})) brand = newChoiceField(choices=(), label=_('Brand'), required=False, widget=forms.Select(attrs={'class':'form-control'})) model_num = forms.CharField(max_length=255, label=_('Model'), widget=forms.TextInput(attrs={'class':'form-control'})) equipment_type = newChoiceField(choices=(), label=_('Equipment Type'), widget=forms.Select(attrs={'class':'form-control'})) total_ports = forms.IntegerField(label=_('Total ports'), widget=forms.TextInput(attrs={'class':'form-control'})) idc_device_num = forms.CharField(max_length=255, label=_('Idc Device num'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) volume = forms.IntegerField(label=_('Volume'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) asset_num = forms.CharField(max_length=255, label=_('Asset num'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) order_num = forms.CharField(max_length=255, label=_('Order num'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) price = forms.IntegerField(label=_('Price'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) order_date = forms.CharField(max_length=255, label=_('Order date'), required=False, widget=newDateTimeInput(d_type='onlydate', attrs={'class':'form-control'})) warranty_period = forms.CharField(max_length=255, label=_('Warranty period'), required=False, widget=newDateTimeInput(d_type='onlydate', attrs={'class':'form-control'})) processor = forms.CharField(max_length=255, label=_('Processor'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) comment = forms.CharField(max_length=255, label=_('Comment'), required=False, widget=forms.TextInput(attrs={'class':'form-control'})) status = newChoiceField(choices=(), label=_('Status'), required=False, widget=forms.Select(attrs={'class':'form-control'})) is_remote_control = newChoiceField(label=_('Is Remote Control'), required=False, widget=forms.Select(attrs={'class':'form-control'})) is_run = newChoiceField(label=_('Is Run'), required=False, widget=forms.Select(attrs={'class':'form-control'})) is_dynamic = newChoiceField(choices=(), label=_('Is dynamic'), required=False, widget=forms.Select(attrs={'class':'form-control'})) is_deleted = newChoiceField(choices=(), label=_('Is deleted'), required=False, widget=forms.Select(attrs={'class':'form-control'}))