Esempio n. 1
0
 class Meta:
     model = Shift
     fields = '__all__'
     widgets ={
         'shift_start': TimeInput(attrs={'type': 'time'}),
         'shift_end': TimeInput(attrs={'type': 'time'}),
         'educator_shift': TextInput()
     }
Esempio n. 2
0
 class Meta:
     model = Appointment
     # fields = ['schedule_date','time_slot','color','notes']
     fields = '__all__'
     widgets = {
         'schedule_date': DateInput(attrs={'class': 'datepicker'}),
         'start': TimeInput(attrs={'class': 'timepicker'}),
         'end': TimeInput(attrs={'class': 'timepicker'}),
     }
Esempio n. 3
0
	class Meta:
		model = Teachers2
		fields = ['Time1', 'Time2', 'Time3', 'Time4', 'Time5']
		widgets = {
			'Time1' : TimeInput(),
			'Time2' : TimeInput(),
			'Time3' : TimeInput(),
			'Time4' : TimeInput(),
			'Time5' : TimeInput()
		}
Esempio n. 4
0
 class Meta:
     model = TxAttendance
     fields = [
         'client', 'session_date', 'attended', 'absence_reason', 'time_in',
         'time_out'
     ]
     widgets = {
         'session_date': DateInput(attrs={'type': 'date'}),
         'time_in': TimeInput(attrs={'type': 'time'}),
         'time_out': TimeInput(attrs={'type': 'time'})
     }
Esempio n. 5
0
 class Meta:
     model = Availability
     fields = '__all__'
     exclude = ['date_created']
     widgets = {
         'educator': forms.HiddenInput(),
         # 'date': DateInput(attrs={'class': 'form-control date-picker', 'placeholder' : 'Select Date'}),
         # 'start_time': TimeInput(attrs={'class': 'form-control time-picker', 'placeholder' : 'Select time'}),
         # 'end_time': TimeInput(attrs={'class': 'form-control time-picker', 'placeholder' : 'Select time'}),
         'date': DateInput(attrs={'type': 'date'}),
         'start_time': TimeInput(attrs={'type': 'time'}),
         'end_time': TimeInput(attrs={'type': 'time'}),
     }
Esempio n. 6
0
	class Meta:
		model = Job
		fields = '__all__'
		exclude = ['date_created']
		widgets = {
			'manager':forms.HiddenInput(), 
			# 'date': DateInput(attrs={'class': 'form-control date-picker', 'placeholder' : 'Select Date'}),
			# 'shift_start_time': TimeInput(attrs={'class': 'form-control time-picker', 'placeholder' : 'Select time'}),
			# 'shift_end_time': TimeInput(attrs={'class': 'form-control time-picker', 'placeholder' : 'Select time'}),
			'date': DateInput(attrs={'type': 'date'}),
			'shift_start_time': TimeInput(attrs={'type': 'time'}),
			'shift_end_time': TimeInput(attrs={'type': 'time'}),
            'qualification': Select(attrs={'class': 'custom-select col-12'}),
		}	
Esempio n. 7
0
 class Meta:
     model = Event
     fields = ('title', 'start_date', 'end_date', 'start_time', 'end_time',
               'credit', 'notes')
     labels = {
         'start_time': 'Start time (set to All Day if not specified)',
         'credit': 'Attendance credit'
     }
     widgets = {
         'start_date': DateInput(attrs={'type': 'date'}),
         'end_date': DateInput(attrs={'type': 'date'}),
         'start_time': TimeInput(attrs={'type': 'time'}, format='%H:%M'),
         'end_time': TimeInput(attrs={'type': 'time'}, format='%H:%M')
     }
Esempio n. 8
0
 class Meta:
     model = FranjaHoraria
     exclude = ('dia_asignacion', 'asignada', 'jugador')
     widgets = {
         'hora_inicio':
         TimeInput(attrs={
             'placeholder': 'HH:MM',
             'format': '%H:%M'
         }),
         'hora_fin':
         TimeInput(attrs={
             'placeholder': 'HH:MM',
             'format': '%H:%M'
         })
     }
Esempio n. 9
0
    class Meta:
        model = Event

        fields = ['organizer', 'name', 'events_or_task', 'events_type', 'date_event','time_event', 'city', \
                  'status',  'description',  'recommended_points', 'contact','location', 'latitude', 'longitude', \
                  'fb_page']
        labels = {
            'name': 'Назва',
            'date_event': 'Дата',
            'time_event': 'Час',
            # 'address': 'Адреса',
            'location': 'Адреса',
            'description': 'Опис',
            'status': 'Статус',
            'fb_page': 'Facebook-сторінка',
            # 'max_part': 'Мінімальна кількість учасників',
            # 'min_part': 'Максимальна кількість учасників',
            'recommended_points': 'Рекомендована кількість балів',
            'contact':'Ваш контактний e-mail',
            'events_type':'Категорія',

            'city': 'Область'



        }
        widgets = {
            'date_event': SelectDateWidget(),
            'time_event': TimeInput(),
            #'location': OSMWidget(lat_field='latitude', lon_field='longitude'),
        }
Esempio n. 10
0
 class Meta:
     model = Attendance
     fields = ('date_attended', 'time_attended', 'member', 'course')
     widgets = {
         'date_attended': DateInput(attrs={'type': 'date'}),
         'time_attended': TimeInput(format='%H:%M', attrs={'type': 'time'})
     }
Esempio n. 11
0
 def __init__(self, attrs=None, date_format=None, time_format=None):
     date_input = DateInput(attrs=attrs, format=date_format)
     date_input.input_type = 'date'
     time_input = TimeInput(attrs=attrs, format=time_format)
     time_input.input_type = 'time'
     widgets = (date_input, time_input)
     MultiWidget.__init__(self, widgets, attrs)
Esempio n. 12
0
 class Meta:
     model = Meeting
     fields = '__all__'
     widgets = {
         'date': DateInput(attrs={"type": "date"}),
         'start_time': TimeInput(attrs={"type": "time"}),
         'duration': TextInput(attrs={"type": "number", "min": "1", "max": "4"})
     }
Esempio n. 13
0
class EditarTurnoForm(ModelForm):
    fecha = forms.DateField(
        widget=DateInput(format='%Y-%m-%d', attrs={'type': 'date'}))
    hora = forms.TimeField(
        widget=TimeInput(format='%H:%M', attrs={'type': 'time'}))

    class Meta:
        model = Turno
        fields = (
            'fecha',
            'hora',
        )
Esempio n. 14
0
class TurnoForm(ModelForm):
    fecha = forms.DateField(widget=DateInput(format='%Y-%m-%d',
                                             attrs={'type': 'date'}),
                            required=False)
    hora = forms.TimeField(widget=TimeInput(format='%H:%M',
                                            attrs={'type': 'time'}),
                           required=False)
    cliente = forms.IntegerField(required=False)
    escribano = forms.IntegerField(required=False)

    class Meta:
        model = Turno
        fields = '__all__'
Esempio n. 15
0
 class Meta:
     model = Trip
     fields = [
         'departure', 'arrival', 'purpose', 'date', 'departure_time',
         'arrival_time'
     ]
     widgets = {
         'departure':
         TextInput(attrs={
             'class': 'uk-input',
             'placeholder': 'Цветочный город',
         }),
         'arrival':
         TextInput(attrs={
             'class': 'uk-input',
             'placeholder': 'Солнечный город',
         }),
         'purpose':
         TextInput(attrs={
             'class': 'uk-input',
             'placeholder': 'Путешествие с Кнопочкой',
         }),
         'date':
         DateInput(attrs={
             'class': 'uk-input',
             'type': 'date',
         }),
         'departure_time':
         TimeInput(attrs={
             'class': 'uk-input',
             'type': 'time',
         }),
         'arrival_time':
         TimeInput(attrs={
             'class': 'uk-input',
             'type': 'time',
         }),
     }
 class Meta:
     model = Wound_Symptom
     exclude = ['symptom']
     widgets = {
         'emergency': CheckboxInput(attrs={'class': 'form-check-input'}),
         'insurance': CheckboxInput(attrs={'class': 'form-check-input'}),
         'is_safety': CheckboxInput(attrs={'class': 'form-check-input'}),
         'wound_area': TextInput(attrs={'class': 'form-control'}),
         'wound_date': DateInput(attrs={'class': 'form-control','type':'date'}),
         'wound_locale': TextInput(attrs={'class': 'form-control'}),
         'is_treat_before': CheckboxInput(attrs={'class': 'form-check-input'}),
         'treatment_before_detail': TextInput(attrs={'class': 'form-control'}),    
         'time': TimeInput(attrs={'class': 'form-control','type':'time'}),        
     }
Esempio n. 17
0
 class Meta:
     model = Course
     fields = ('course_name', 'course_days', 'start_time', 'end_time',
               'instructor')
     labels = {
         'course_name':
         'Class name',
         'start_time':
         'Start time (e.g. 10:00 AM)',
         'end_time':
         'End time (e.g. 12:00 PM)',
         'instructor':
         'Instructor (not selecting will be set to '
         '\'Not Specified\')'
     }
     widgets = {
         'course_name':
         TextInput(attrs={'class': 'form-control mb-2'}),
         'start_time':
         TimeInput(format='%H:%M',
                   attrs={
                       'class': 'form-control mb-2',
                       'type': 'time'
                   }),
         'end_time':
         TimeInput(format='%H:%M',
                   attrs={
                       'class': 'form-control mb-2',
                       'type': 'time'
                   }),
         'instructor':
         Select(attrs={'class': 'form-control mb-2'})
     }
     required = {
         'instructor': False,
     }
Esempio n. 18
0
 class Meta:
     model = Evento
     fields = '__all__'
     exclude = [
         'status', 'id_promotor', 'data_hora_criacao', 'id_endereco',
         'id_categoria'
     ]
     widgets = {
         'nome':
         TextInput(attrs={'id': 'evento#nome'}),
         'data_inicio_venda':
         DateInput(attrs={
             'class': 'datepicker',
             'id': 'evento#data_inicio_venda'
         }),
         'data_fim_venda':
         DateInput(attrs={
             'class': 'datepicker',
             'id': 'evento#data_fim_venda'
         }),
         'hora_inicio_venda':
         TimeInput(attrs={
             'class': 'timepicker',
             'id': 'evento#hora_inicio_venda'
         }),
         'hora_fim_venda':
         TimeInput(attrs={
             'class': 'timepicker',
             'id': 'evento#hora_fim_venda'
         }),
         'descricao':
         Textarea(attrs={
             'class': 'materialize-textarea',
             'id': 'evento#descricao'
         }),
     }
Esempio n. 19
0
class RFPAuthForm(AuthenticationForm):
    transferTime = forms.TimeField(widget=TimeInput(attrs={'type': 'time'}),
                                   label="Время пересмены:")

    def __init__(self, *args, **kwargs):
        super(RFPAuthForm, self).__init__(*args, **kwargs)
        t_now = datetime.now(TZL)
        t_tra = t_now.replace(hour=Setting.objects.first().transfer.hour,
                              minute=Setting.objects.first().transfer.minute)
        if t_now <= t_tra and (t_tra - t_now).seconds <= 600:
            self.fields['transferTime'].initial = t_tra.time().strftime(
                "%H:%M")
        elif t_now >= t_tra and (t_now - t_tra).seconds <= 600:
            self.fields['transferTime'].initial = t_tra.time().strftime(
                "%H:%M")
        else:
            self.fields['transferTime'].initial = t_now.time().strftime(
                "%H:%M")
Esempio n. 20
0
    def __init__(self,
                 attrs=None,
                 options=None,
                 usel10n=None,
                 widgets=None,
                 bootstrap_version=None):

        if options is None:
            options = {}

        # Set the default options to show only the timepicker object
        options['startView'] = options.get('startView', '1')
        options['minView'] = options.get('minView', '0')
        options['maxView'] = options.get('maxView', '1')
        options['format'] = options.get('format', 'hh:ii')

        if widgets is None:
            self.widgets = (TimeInput(attrs=attrs), )

        super(TimeWidget, self).__init__(attrs, options, usel10n, self.widgets,
                                         bootstrap_version)
Esempio n. 21
0
class CompleteDelivery(Form):
    delivery_date = DateField(required=True,
                              initial=timezone.now(),
                              widget=DateInput(attrs={
                                  'class': 'form-control',
                                  'type': 'date'
                              }))
    delivery_time = TimeField(required=True,
                              initial=timezone.now(),
                              widget=TimeInput(attrs={
                                  'class': 'form-control',
                                  'type': 'time'
                              }))
    delivery_type = ChoiceField(required=True,
                                choices=DELIVERY_TYPES,
                                widget=Select(attrs={'class': 'form-control'}))
    newborn_weight_lbs = IntegerField(
        min_value=0,
        required=True,
        widget=TextInput(attrs={'class': 'form-control'}))
    newborn_weight_oz = IntegerField(
        min_value=0,
        max_value=16,
        required=True,
        widget=TextInput(attrs={'class': 'form-control'}))
    live_birth = BooleanField(required=False)

    def clean_delivery_date(self):
        data = self.cleaned_data['delivery_date']
        if data > timezone.now().date():
            raise forms.ValidationError(
                "Cannot set delivery date in the future")
        return data

    def clean_delivery_time(self):
        data = self.cleaned_data['delivery_time']
        if data > timezone.now().time():
            raise forms.ValidationError(
                "Cannot set delivery time in the future")
        return data
Esempio n. 22
0
 class Meta:
     model = myForm
     fields = [
         'Location', 'Incident_desc', 'DateOfAcci', 'TimeOfAcci',
         'incident_loc', 'initial_seve', 'suspected_cause', 'immediate_act',
         'incident_type'
     ]
     widgets = {
         'DateOfAcci':
         DateInput(attrs={'type': 'date'}),
         'TimeOfAcci':
         TimeInput(attrs={'type': 'time'}),
         'Incident_desc':
         forms.Textarea(
             attrs={
                 'rows': 2,
                 'cols': 15,
                 'placeholder': 'Description About Incident!...'
             }),
         'incident_loc':
         forms.Textarea(attrs={
             'rows': 2,
             'cols': 15,
             'placeholder': 'Incident Location!...'
         }),
         'suspected_cause':
         forms.Textarea(
             attrs={
                 'rows': 2,
                 'cols': 15,
                 'placeholder': 'Supected Cause Of Accident!...'
             }),
         'immediate_act':
         forms.Textarea(
             attrs={
                 'rows': 2,
                 'cols': 15,
                 'placeholder': 'Immediate Actions Taken By You!...'
             }),
     }
Esempio n. 23
0
class InterviewForm(forms.ModelForm):

    interview_date = forms.DateField(widget=SelectDateWidget(
        empty_label=("Choose Year", "Choose Month", "Choose Day"), ), )

    interview_time = forms.TimeField(
        widget=TimeInput(attrs={'placeholder': '14:00'}),
        help_text='90 mins duration: Partner 1 = 45 mins | Partner 2 = 45 mins'
    )

    class Meta:
        model = Interview
        fields = (
            'title',
            'interview_date',
            'interview_time',
            'industry',
            'role',
            'company',
            'difficulty',
            'notes',
        )
Esempio n. 24
0
 class Meta:
     model = TestDriveModel
     fields = ('name', 'surname', 'patronymic', 'brand', 'model', 'data',
               'time', 'phone_number', 'extra_info', 'photo')
     widgets = {
         'data':
         DateInput(
             attrs={
                 'type': 'date',
                 'min': pendulum.now().to_date_string(),
                 'max': pendulum.now().add(days=2).to_date_string()
             }),
         'time':
         TimeInput(format='H:m',
                   attrs={
                       'type': 'time',
                       'min': '09:00',
                       'max': '20:00'
                   }),
         'phone_number':
         TextInput(attrs={'placeholder': '+7(___)-___-__-__'})
     }
Esempio n. 25
0
class AddReading(Form):
    partograph = IntegerField(widget=HiddenInput(), required=False)
    dilation_cm = IntegerField(
        label='Dilation (cm)',
        required=True,
        widget=TextInput(attrs={'class': 'form-control'}),
        min_value=4,
        max_value=10)
    #descent = IntegerField(label='Descent', required=True, widget=TextInput(attrs={'class': 'form-control'}),
    #                       min_value=-3, max_value=3)
    localtime = timezone.localtime(timezone.now())
    date_taken = DateField(required=True,
                           initial=localtime,
                           widget=DateInput(attrs={
                               'class': 'form-control',
                               'type': 'date'
                           }))
    time_taken = TimeField(required=True,
                           initial=localtime,
                           widget=TimeInput(attrs={
                               'class': 'form-control',
                               'type': 'time'
                           }))
Esempio n. 26
0
    def __init__(self, attrs=None, date_format=None, time_format=None):
        date_class = attrs['date_class']
        time_class = attrs['time_class']
        date_default = attrs['date_default']
        time_default = attrs['time_default']
        del attrs['date_class']
        del attrs['time_class']
        del attrs['date_default']
        del attrs['time_default']

        time_attrs = attrs.copy()
        time_attrs['class'] = time_class
        time_attrs['value'] = time_default

        date_attrs = attrs.copy()
        date_attrs['class'] = date_class
        date_attrs['value'] = date_default

        import sys
        sys.stderr.write("time format is %s" % time_format)
        widgets = (DateInput(attrs=date_attrs, format=date_format),
                   TimeInput(attrs=time_attrs, format=time_format))

        super(BootstrapSplitDateTimeWidget, self).__init__(widgets, attrs)
Esempio n. 27
0
    class Meta:
        model = Event
        fields = ['name', 'date_event', 'time_event','location', 'city', 'status', 'contact', 'fb_page', 'description']
        localized_fields = ('name', 'date_event', 'time_event', 'location', 'city', 'status', 'contact', 'description')
        labels = {
            'name': 'Назва',
            'date_event': 'Дата',
            'time_event': 'Час',
            'location': 'Адреса',
            'status': 'Статус',
            'city': 'Область',
            'fb_page': 'Facebook-сторінка',

            # 'max_part' : 'Максимальна кількість учасників',
            # 'min_part': 'Мінімальна кількість учасників',
            'description': 'Опис',
        }
        widgets = {
            'date_event': SelectDateWidget(),
            'time_event': TimeInput(),



        }
Esempio n. 28
0
 class Meta:
     model = Attendance
     fields = ['start_time']
     widgets = {
         'start_time': TimeInput(attrs={'type': 'time'}),
     }
Esempio n. 29
0
class GrowSensorRelayScheduleForm(forms.Form):
    execution_time = forms.TimeField(widget=TimeInput(
        attrs={'placeholder': 'Enter the time when this action will run'}))
    action = forms.ChoiceField(choices=(('On', 'Turn On'), ('Off',
                                                            'Turn Off')))
    is_enabled = forms.BooleanField()
Esempio n. 30
0
 def __init__(self, attrs=None, date_format=None, time_format=None):
     widgets = (DateInput(attrs=attrs, format=date_format),
                TimeInput(attrs=attrs,
                          format=time_format), TimeZoneSelect(attrs=attrs))
     super(SplitDateTimeTimeZoneWidget, self).__init__(widgets, attrs)