Пример #1
0
 class Meta:
     model = Lecture
     fields = ['name', 'start_time', 'end_time', 'device_id', 'device_id2', 'lecture_room', 'bar_tracking', 'uhf_tracking', 'access_control', 'device_entrance_position', 'device_entrance_position2', 'track']
     widgets = {
         'start_time': DateTimePicker(options={'locale': settings.LANGUAGE_CODE[:2]}, format='%d. %m. %Y %H:%M'),#,'format': 'MM/DD/YYYY HH:mm'}),
         'end_time': DateTimePicker(options={'locale': settings.LANGUAGE_CODE[:2]}, format='%d. %m. %Y %H:%M')#,'format': 'MM/DD/YYYY HH:mm'})
     }
Пример #2
0
class transparent_set(rich_form):
	task=forms.TypedChoiceField(
		label=u'事务',
		initial="officeuse",
		widget=forms.widgets.RadioSelect,
		choices=[
		["officeuse",u'行政领用'],
		],
		)
	datestart=forms.DateField(
		widget=DateTimePicker(options={"format": "YYYY-MM-DD","pickTime":False}),
		label=u'开始日期',
		required=False,
		)
	dateend=forms.DateField(
		widget=DateTimePicker(options={"format": "YYYY-MM-DD","pickTime":False}),
		label=u'结束日期',
		required=False,
		)
	prospect=forms.TypedChoiceField(
		label=u'查看方式',
		initial="sf",
		widget=forms.widgets.RadioSelect,
		choices=[
		["sf",u'只看自己'],# stands for self
		["dp",u'我的部门'],# stands for department
		],
		)
Пример #3
0
class cssadv_list(rich_form):
	datestart=forms.DateField(
		widget=DateTimePicker(options={"format": "YYYY-MM-DD","pickTime":False}),
		label=u'开始日期',
		required=False,
		)
	dateend=forms.DateField(
		widget=DateTimePicker(options={"format": "YYYY-MM-DD","pickTime":False}),
		label=u'结束日期',
		required=False,
		)
	csstask=forms.TypedChoiceField(
		label=u'上传任务',
		required=True,
		choices=[
		['contact',u'联系方式'],
		['user',u'用户设置'],
		['costcenter',u'成本中心'],
		['addr',u'新增地址'],
		],
		)
	status=forms.TypedChoiceField(
		label=u'处理状态',
		required=True,
		choices=[
		['0',u'未处理'],
		['1',u'已完成'],
		['-1',u'已删除'],
		],
		)
Пример #4
0
class ContributionForm(forms.models.ModelForm):
    class Meta:
        model = Contribution
        fields = ['type', 'start_date', 'end_date', 'member']

    type = forms.ModelChoiceField(queryset=ContributionType.objects.all())
    start_date = forms.DateField(label="Start date",
                                 widget=DateTimePicker(options={
                                     "format": "YYYY-MM-DD",
                                     "pickTime": False
                                 }))
    end_date = forms.DateField(label="End date",
                               widget=DateTimePicker(options={
                                   "format": "YYYY-MM-DD",
                                   "pickTime": False
                               }))

    helper = FormHelper()
    helper.form_class = 'form-horizontal'
    helper.layout = Layout(
        Field('type'), Field('start_date'), Field('end_date'),
        Field('member', type="hidden"),
        FormActions(
            AcceptButton('save_changes',
                         'Save changes',
                         css_class="btn-primary"),
            CancelButton('cancel', 'Cancel', css_class="btn-default"),
        ))
Пример #5
0
class FilterForm(forms.Form):
    start_date = forms.DateField(
        widget=DateTimePicker(
            format=date_format,
            options={
                'pickTime': False
            }),
        label=_('Start Date'))
    end_date = forms.DateField(
        widget=DateTimePicker(
            format=date_format,
            options={
                'pickTime': False
            }),
        label=_('End Date'))
    min_people_affected = forms.IntegerField(
        min_value=0,
        label=_('Minimum'))
    max_people_affected = forms.IntegerField(
        min_value=0,
        label=_('Maximum'))
    min_boundary_flooded = forms.IntegerField(
        min_value=0,
        label=_('Minimum'))
    max_boundary_flooded = forms.IntegerField(
        min_value=0,
        label=_('Maximum'))
Пример #6
0
class ChooseReportForm(forms.Form):
    date_from = forms.DateField(
        widget=DateTimePicker(options={
            "locale": "ru",
            "pickTime": False,
            "startDate": "1/1/1953"
        }),
        label='От даты:',
    )

    date = forms.DateField(
        widget=DateTimePicker(options={
            "locale": "ru",
            "pickTime": False,
            "startDate": "1/1/1953"
        }),
        label=', на дату:',
    )

    round_to_hour = forms.BooleanField(
        label='округлять часы',
        initial=True,
    )

    def __init__(self, choices=None, *args, **kwargs):
        super(ChooseReportForm, self).__init__(*args, **kwargs)
        if choices:
            self.fields.update({
                'report_id':
                forms.ChoiceField(widget=forms.Select,
                                  label='отчет:',
                                  choices=choices)
            })
Пример #7
0
class ReportForm(forms.Form):
    class Media:
        js = ()

    class Meta:
        model = Report

    name = forms.CharField(max_length=200, label='Имя отчёта')
    # Дампы, на которых основан отчёт
    dump = forms.ModelMultipleChoiceField(queryset=Dump.objects.all(), label='Дампы, по которым составлен отчёт')

    timeStart = forms.DateField(
        widget=DateTimePicker(options={"format": "YYYY-MM-DD HH:mm:ss",
                                       "pickSeconds": "true", "showTodayButton": "true"}), label='Начало атаки')
    timeEnd = forms.DateField(
        widget=DateTimePicker(options={"format": "YYYY-MM-DD HH:mm:ss",
                                       "pickSeconds": "true", "showTodayButton": "true"}), label='Конец атаки')
    # Продолжительность атаки
    duration = forms.DurationField(required=False, label='Продолжительность атаки')
    # Общее количество атак (пакетов)
    count = forms.IntegerField(required=False, label='Общее количество атак')
    # Количество уникальных IP
    uniqueIP = forms.IntegerField(required=False, label='Количество уникальных IP')
    # Основные страны-участники атаки
    countries = forms.CharField(max_length=200, label='Основные страны-источники')
    # Предполагаемая результативность
    result = forms.CharField(max_length=200, label='Предполагаемая результативность')
    # Предполагаемые управляющие центры
    controlCenters = forms.CharField(max_length=200, label='Предполагаемые управляющие центры')
Пример #8
0
 class Meta:
     model = CalendarEvent
     widgets = {
         'author': HiddenInput(),
         'start_date': DateTimePicker(options={"format": "YYYY-MM-DD HH:mm", "pickTime": True}),
         'end_date': DateTimePicker(options={"format": "YYYY-MM-DD HH:mm", "pickTime": True})
     }
Пример #9
0
class LeaveListViewForm(forms.ModelForm):
    # user = forms.ModelChoiceField(queryset=User.objects.filter(is_active=True),
    #                               widget=autocomplete_light.ChoiceWidget('UserAutocompleteUser'))
    #
    # user.widget.attrs = {'class': 'form-control filter_class', 'placeholder': 'Enter Employee Name'}

    # apply_to = forms.ModelChoiceField(queryset=Employee.objects.exclude(manager__user__first_name__isnull=True).
    #                                   values_list('manager__user__username',
    #                                               flat=True).distinct().order_by('manager__user__username'),
    #                                   empty_label="---------")

    # apply_to.widget.attrs = {'class': 'form-control filter_class'}

    leave_type = forms.ChoiceField(choices=LEAVE_TYPES_CHOICES)

    leave_type.widget.attrs = {'class': 'form-control filter_class'}

    from_date = forms.DateField(
        label="From",
        widget=DateTimePicker(options=dateTimeOption),
    )
    from_date.widget.attrs = {'class': 'form-control filter_class input-sm'}

    to_date = forms.DateField(
        label="To",
        widget=DateTimePicker(options=dateTimeOption),
    )
    to_date.widget.attrs = {'class': 'form-control filter_class input-sm'}

    class Meta:
        model = LeaveApplications
        # fields = ['leave_type', 'from_date', 'to_date', 'status']
        fields = ['leave_type', 'from_date', 'to_date', 'status']
Пример #10
0
 class Meta:
     model = Course
     exclude = ("participants", )
     widgets = {
         "start_date": DateTimePicker(options={"format": "YYYY-MM-DD"}),
         "end_date": DateTimePicker(options={"format": "YYYY-MM-DD"})
     }
Пример #11
0
class DocumentForm(TranslationModelForm):
    _date_widget_options = {
        "icon_attrs": {"class": "fa fa-calendar"},
        "attrs": {"class": "form-control input-sm"},
        "format": "%Y-%m-%d %H:%M",
        # Options for the datetimepickers are not set here on purpose.
        # They are set in the metadata_form_js.html template because
        # bootstrap-datetimepicker uses jquery for its initialization
        # and we need to ensure it is available before trying to
        # instantiate a new datetimepicker. This could probably be improved.
        "options": False,
    }
    date = forms.DateTimeField(
        localize=True,
        widget=DateTimePicker(**_date_widget_options)
    )
    temporal_extent_start = forms.DateTimeField(
        required=False,
        localize=True,
        widget=DateTimePicker(**_date_widget_options)
    )
    temporal_extent_end = forms.DateTimeField(
        required=False,
        localize=True,
        widget=DateTimePicker(**_date_widget_options)
    )
Пример #12
0
class GenDisciplinaryCouncilForm(forms.Form):
    """
        Form that generate disciplinary council pdf
    """

    datetime_from = forms.DateTimeField(
        label='À partir du : ',
        widget=DateTimePicker(),
        required=False,
    )

    datetime_to = forms.DateTimeField(
        label="Jusqu'au : ",
        widget=DateTimePicker(),
        required=False,
    )

    def __init__(self, *args, **kwargs):
        super(GenDisciplinaryCouncilForm, self).__init__(*args, **kwargs)
        self.helper = FormHelper()
        self.helper.include_media = False
        self.helper.form_class = 'col-sm-8'
        self.helper.html5_required = True
        self.helper.layout = Layout(
            Field('datetime_from', autocomplete='off'),
            Field('datetime_to', autocomplete='off'),
            Button('genpdf_council', 'Créer PDF'),
        )
Пример #13
0
class WorldForm(CdrSearchForm):
    """
    Form used to get world overview of calls in the Customer UI.
    """
    from_date = forms.DateTimeField(
        label=_('from').capitalize(),
        required=True,
        widget=DateTimePicker(options={
            "format": "YYYY-MM-DD HH:mm",
            "pickSeconds": False
        }))
    to_date = forms.DateTimeField(
        label=_('to').capitalize(),
        required=True,
        widget=DateTimePicker(options={
            "format": "YYYY-MM-DD HH:mm",
            "pickSeconds": False
        }))

    def __init__(self, *args, **kwargs):
        super(WorldForm, self).__init__(*args, **kwargs)
        self.helper = FormHelper()
        self.helper.form_class = 'well'
        css_class = 'col-md-4'
        self.helper.layout = Layout(
            Div(Div('from_date', css_class=css_class),
                Div('to_date', css_class=css_class),
                Div('switch_id', css_class=css_class),
                css_class='row'), )
        common_submit_buttons(self.helper.layout, 'search')
Пример #14
0
class MakeAppointmentForm(forms.ModelForm):

    firstchoicedate = forms.DateTimeField(
        label=("First Choice Date & Time"),
        widget=DateTimePicker(options={
            "format": "YYYY-MM-DD  HH:mm",
            "pickTime": True
        }))
    secondchoicedate = forms.DateTimeField(
        label=("Alternative Date & Time "),
        widget=DateTimePicker(options={
            "format": "YYYY-MM-DD  HH:mm",
            "pickTime": True
        }))
    purposeofvisit = forms.CharField(
        label=("Appointment Details"),
        widget=forms.Textarea(attrs={
            'cols': 10,
            'rows': 5,
            'class': 'form-control'
        }))

    class Meta:
        model = Appointment
        fields = ('purposeofvisit', 'firstchoicedate', 'secondchoicedate')
Пример #15
0
class ObservationLogForm(forms.Form):
    start_time = DateTimeField(widget=DateTimePicker(
            options={"format": "YYYY-MM-DD HH:mm:ss"}
        ))
    end_time = DateTimeField(widget=DateTimePicker(
            options={"format": "YYYY-MM-DD HH:mm:ss"}
        ))
Пример #16
0
class MemberForm(forms.models.ModelForm):
    """None

    """
    class Meta:
        model = Member
        fields = [
            'name', 'member_group', 'rank', 'join_date', 'mods_assessed',
            'bqf_assessed', 'discharged', 'discharge_date', 'email', 'bi_name'
        ]

    name = forms.CharField()
    member_group = forms.ModelChoiceField(queryset=MemberGroup.objects.all(),
                                          empty_label="<Select group>")
    rank = forms.ModelChoiceField(queryset=Rank.objects.all(),
                                  empty_label=None)
    join_date = forms.DateField(label="Join date",
                                widget=DateTimePicker(options={
                                    "format": "YYYY-MM-DD",
                                    "pickTime": False
                                }))

    email = forms.EmailField(required=False)
    bi_name = forms.CharField(required=False, label="BI nickname")

    mods_assessed = forms.BooleanField(required=False)
    discharged = forms.BooleanField(required=False)

    discharge_date = forms.DateField(label="Discharge date",
                                     widget=DateTimePicker(options={
                                         "format": "YYYY-MM-DD",
                                         "pickTime": False
                                     }),
                                     required=False)

    helper = FormHelper()
    helper.form_class = 'form-horizontal'
    helper.layout = Layout(
        Field('name'), Field('member_group'), Field('rank'),
        Field('join_date'), Field('email'), Field('bi_name'),
        Field('mods_assessed'), Field('bqf_assessed'), Field('discharged'),
        Field('discharge_date', type='hidden'),
        FormActions(
            AcceptButton('save_changes', 'Save changes'),
            CancelButton('cancel', 'Cancel'),
        ))

    def clean_discharged(self):
        discharged = self.cleaned_data['discharged']
        name = self.cleaned_data['name']

        undischarged_members_with_name = Member.objects.filter(
            name=name, discharged=False, deleted=False)
        if not discharged and len(undischarged_members_with_name) > 0 and \
                undischarged_members_with_name[0] != self.instance:
            raise forms.ValidationError(
                "Undischarged member with this name already exists.  Choose another name or discharge the other "
                "member.")

        return discharged
Пример #17
0
 def __init__(self, *args, **kwargs):
   super(OrderItemForm, self).__init__(*args, **kwargs)
   self.fields['in_stock'].widget.attrs['class'] = "order-item-in-stock"
   self.fields['description'].widget.attrs['class'] = "order-item-desc"
   self.fields['description'].required = True
   
   self.fields['status'].required = True
   self.fields['status'].widget.attrs['class'] = "order-item-status"
   #self.fields['status'].initial = 'S'  #'In Stock' is selected by default
   
   self.fields['po_num'].widget.attrs['class'] = "order-item-po"
   self.fields['po_num'].label = "PO #"
   self.fields['po_date'].widget = DateTimePicker(options=DATEPICKER_OPTIONS)
   self.fields['po_date'].label = "PO placed date"
   self.fields['po_date'].widget.attrs['class'] = "order-item-po-date"
   self.fields['ack_num'].widget.attrs['class'] = "order-item-ack-num"
   self.fields['ack_num'].label = "Acknowledgement #"
   self.fields['ack_date'].widget = DateTimePicker(options=DATEPICKER_OPTIONS)
   self.fields['ack_date'].label = "Acknowl. date"
   self.fields['ack_date'].widget.attrs['class'] = "order-item-ack-date"
   
   self.fields['eta'].widget = DateTimePicker(options=DATEPICKER_OPTIONS)
   self.fields['eta'].widget.attrs['class'] = "order-item-eta clear"
   self.fields['eta'].label = "ETA"
   self.fields['description'].widget.attrs['size']=80
Пример #18
0
 class Meta:
     model = Task
     exclude = ['user']
     widgets = {
         'deadline': DateTimePicker(options=my_attrs),
         'entry_date': DateTimePicker(options=my_attrs)
     }
Пример #19
0
 class Meta:
     model = Course
     fields = (
         "identifier",
         "name",
         "number",
         "time_period",
         "start_date",
         "end_date",
         "hidden",
         "listed",
         "accepts_enrollment",
         "git_source",
         "ssh_private_key",
         "course_root_path",
         "course_file",
         "events_file",
         "enrollment_approval_required",
         "enrollment_required_email_suffix",
         "from_email",
         "notify_email",
     )
     widgets = {
         "start_date": DateTimePicker(options={"format": "YYYY-MM-DD"}),
         "end_date": DateTimePicker(options={"format": "YYYY-MM-DD"}),
     }
Пример #20
0
class MeetupForm(forms.ModelForm):
    meetup_start_date = forms.DateTimeField(
        widget=DateTimePicker(options={"format": "YYYY-MM-DD HH:mm",
                                       "pickSeconds": False}))
    meetup_end_date = forms.DateTimeField(
        required=False,
        widget=DateTimePicker(options={"format": "YYYY-MM-DD HH:mm",
                                       "pickSeconds": False}))
    description = forms.CharField(widget=CKEditorWidget())
    website = forms.URLField(
        initial='http://',
        help_text='Remember to start with http:// or https://'
    )
    expiration_date = forms.DateField(
        required=False,
        help_text="Enter the date until which the post should be published. "
                  "By default, it is set to 60 days from posting.",
        widget=DateTimePicker(options={"format": "YYYY-MM-DD",
                                       "pickTime": False}))

    class Meta:
        model = Meetup
        fields = ['title', 'organisation', 'meetup_type', 'contact_email',
            'website', 'city', 'state_province', 'country', 'description', 'is_recurring',
            'recurrence', 'meetup_start_date', 'meetup_end_date', 'expiration_date'
        ]
Пример #21
0
 class Meta:
     model = SMSCampaign
     #fields = ['campaign_code', 'name', 'callerid', 'sms_gateway',
     #          'phonebook', 'extra_data', 'text_message',
     #          'frequency', 'maxretry', 'intervalretry',
     #          'startingdate', 'expirationdate',
     #          'daily_start_time', 'daily_stop_time',
     #          'monday', 'tuesday', 'wednesday', 'thursday', 'friday',
     #          'saturday', 'sunday']
     exclude = ('user', 'status', 'imported_phonebook')
     widgets = {
         'extra_data':
         Textarea(attrs={
             'cols': 23,
             'rows': 3
         }),
         'text_message':
         Textarea(attrs={
             'cols': 23,
             'rows': 3
         }),
         'startingdate':
         DateTimePicker(options={"format": "YYYY-MM-DD HH:mm:ss"}),
         'expirationdate':
         DateTimePicker(options={"format": "YYYY-MM-DD HH:mm:ss"}),
     }
Пример #22
0
class edit_form(forms.Form):
    eventName = forms.CharField(
        label='Event Name:',
        required=True,
        max_length=30,
        widget=forms.TextInput(attrs={
            'class': 'form-control',
            'placeholder': 'Event Name'
        }))
    startDate = forms.DateField(label='Start Date:',
                                required=True,
                                input_formats=['%Y-%m-%d'],
                                widget=DateTimePicker(
                                    attrs={'placeholder': 'YYYY-MM-DD'},
                                    options={
                                        "format": "YYYY-MM-DD",
                                        "pickTime": False
                                    }))
    endDate = forms.DateField(label='End Date:',
                              required=True,
                              input_formats=['%Y-%m-%d'],
                              widget=DateTimePicker(
                                  attrs={'placeholder': 'YYYY-MM-DD'},
                                  options={
                                      "format": "YYYY-MM-DD",
                                      "pickTime": False
                                  }))
    venue = VenueModelChoiceField(
        label='Venue:',
        required=True,
        queryset=cmod.Venue.objects.all(),
        to_field_name="id",
        widget=forms.Select(attrs={'class': 'form-control'}))
Пример #23
0
 class Meta:
     model = Course
     fields = (
         "identifier",
         "name",
         "number",
         "time_period",
         "start_date",
         "end_date",
         "hidden",
         "listed",
         "accepts_enrollment",
         "git_source",
         "ssh_private_key",
         "course_root_path",
         "course_file",
         "events_file",
         "enrollment_approval_required",
         "preapproval_require_verified_inst_id",
         "enrollment_required_email_suffix",
         "from_email",
         "notify_email",
         "force_lang",
     )
     widgets = {
         "start_date":
         DateTimePicker(options={"format": "YYYY-MM-DD"}),
         "end_date":
         DateTimePicker(options={"format": "YYYY-MM-DD"}),
         "force_lang":
         forms.Select(choices=get_course_specific_language_choices()),
     }
Пример #24
0
class eventEditForm(forms.Form):
    name = forms.CharField(required=True,
                           max_length=100,
                           widget=forms.TextInput(attrs={
                               'class': 'form-control',
                               'placeholder': 'Name'
                           }))
    description = forms.CharField(
        required=True,
        max_length=300,
        widget=forms.TextInput(attrs={
            'class': 'form-control',
            'placeholder': 'description'
        }))
    location = forms.CharField(
        required=True,
        max_length=300,
        widget=forms.TextInput(attrs={
            'class': 'form-control',
            'placeholder': 'description'
        }))
    start_date = forms.DateField(widget=DateTimePicker(options={
        "format": "YYYY-MM-DD",
        "pickTime": False
    }))
    end_date = forms.DateField(widget=DateTimePicker(options={
        "format": "YYYY-MM-DD",
        "pickTime": False
    }))
Пример #25
0
class StoryForm(forms.ModelForm):
    """Form to create/edit a new story."""

    def __init__(self, *args, **kwargs):
        org = kwargs.pop("organization")
        story = kwargs.pop("story", None)
        super(StoryForm, self).__init__(*args, **kwargs)

        self.fields['share_with'].queryset = org.get_org_networks()
        self.fields['collaborate_with'].queryset = org.get_org_collaborators_vocab()

        # limit project to those owned by org or part of content and org is collaborator for
        self.fields['project'].queryset = Project.objects.filter(
            Q(organization=org) | Q(collaborate_with=org))

        # set empty labels
        self.fields['project'].empty_label = 'Select a project'

    embargo_datetime = forms.DateTimeField(
        required=False,
        widget=DateTimePicker(
            options={'format': 'YYYY-MM-DD HH:mm'},
            attrs={'id': 'story-embargo-picker'})
    )

    share_with_date = forms.DateTimeField(
        required=False,
        widget=DateTimePicker(
            options={'format': 'YYYY-MM-DD HH:mm'},
            attrs={'id': 'story-share-picker'})
    )

    class Meta:
        model = Story
        fields = ['name',
                  'story_description',
                  'project',
                  'collaborate',
                  'collaborate_with',
                  'embargo',
                  'embargo_datetime',
                  'sensitive',
                  'share',
                  'ready_to_share',
                  'share_with',
                  'share_with_date',
                  'archived',
                  ]
        widgets = {
            'name': TextInput(attrs={'class': 'form-control', 'placeholder': 'Story Name'}),
            'story_description': Textarea(
                attrs={'class': 'form-control', 'placeholder': 'Description'}),
            'collaborate_with': ArrayFieldSelectMultiple(
                attrs={'class': 'chosen-select', 'id': 'collaborate-with',
                       'data-placeholder': 'Select Partners'}),
            'share_with': ArrayFieldSelectMultiple(
                attrs={'class': 'chosen-select', 'id': 'share-with',
                       'data-placeholder': 'Select Networks'}),
            'project': Select(attrs={'class': 'c-select', 'id': 'story-project'}),
        }
Пример #26
0
class BillingReportForm(forms.Form):
    """Daily Billing Form"""
    from_date = forms.DateTimeField(
        label=_('from').capitalize(),
        required=True,
        widget=DateTimePicker(options={
            "format": "YYYY-MM-DD HH:mm",
            "pickSeconds": False
        }))
    to_date = forms.DateTimeField(
        label=_('to').capitalize(),
        required=True,
        widget=DateTimePicker(options={
            "format": "YYYY-MM-DD HH:mm",
            "pickSeconds": False
        }))
    switch_id = forms.ChoiceField(label=_('switch'), required=False)

    def __init__(self, *args, **kwargs):
        super(BillingReportForm, self).__init__(*args, **kwargs)
        self.fields['switch_id'].choices = sw_list_with_all()
        self.helper = FormHelper()
        self.helper.form_class = 'well'
        css_class = 'col-md-4'
        self.helper.layout = Layout(
            Div(
                Div('from_date', css_class=css_class),
                Div('to_date', css_class=css_class),
                Div('switch_id', css_class=css_class),
                css_class='row',
            ), )
        common_submit_buttons(self.helper.layout, 'search')
Пример #27
0
class SearchFreightForm(forms.Form):
    status = forms.ChoiceField(label='Status',
                               choices=[("4", "Todos"), ("1", "Origen"),
                                        ("2", "Transito"), ("3", "Destino")])
    binicial = forms.ModelChoiceField(label='Bodega Inicial',
                                      queryset=Warehouse.LogicWarehouse.all(),
                                      required=False)
    bfinal = forms.ModelChoiceField(label='Bodega Final',
                                    queryset=Warehouse.LogicWarehouse.all(),
                                    required=False)

    startDate = forms.DateTimeField(
        label='Creacion desde',
        required=False,
        widget=DateTimePicker(options={
            "format": "YYYY-MM-DD HH:mm",
            "pickSeconds": False
        }))
    finishDate = forms.DateTimeField(
        label='Hasta',
        required=False,
        widget=DateTimePicker(options={
            "format": "YYYY-MM-DD HH:mm",
            "pickSeconds": False
        }))
Пример #28
0
    class Meta:
        model = Remainder
        fields = ('name', 'startDate', 'endDate')

        widgets = {
            'startDate': DateTimePicker(options=dateTimeOption),
            'endDate': DateTimePicker(options=dateTimeOption),
        }
Пример #29
0
 def __init__(self, *args, **kwargs):
     super(ClassForm, self).__init__(*args, **kwargs)
     self.fields['start_time'].widget = DateTimePicker(
         options={"format": "HH:mm"},
         icon_attrs={'class': 'glyphicon glyphicon-time'})
     self.fields['end_time'].widget = DateTimePicker(
         options={"format": "HH:mm"},
         icon_attrs={'class': 'glyphicon glyphicon-time'})
Пример #30
0
class ToDoForm(forms.Form):
    Start_Date = forms.DateField(widget=DateTimePicker(options={
        "format": "YYYY-MM-DD",
        "pickTime": False
    }))
    End_Date = forms.DateTimeField(widget=DateTimePicker(options={
        "format": "YYYY-MM-DD",
        "pickTime": False
    }))