from django import forms
from django.forms import fields
from .models import Order, Room
from django.conf import settings



class OrderForm(forms.ModelForm):
    class Meta:
        model = Order
        fields = "__all__"
        # rooms = Room.objects.all()
        # choices = []
        # for room in rooms:
        #     choices.append((room.room_number, room.room_number))

        widgets = {
            "room": forms.TextInput(attrs={ "type": "text", "class": "form-control"}),
            "start_date": forms.DateInput(attrs={"type": "date", "class": "form-control"}),
            "finish_date": forms.DateInput(attrs={"type": "date", "class": "form-control"}),
            "first_name": forms.TextInput(attrs={"type": "text", "placeholder": "First Name", "class": "form-control"}),
            "last_name": forms.TextInput(attrs={"type": "text", "placeholder": "Last Name", "class": "form-control"}),
            "phone_number": forms.TextInput(attrs={"type": "text", "placeholder": "Phone number", "class": "form-control"}),
            "order_cost": forms.NumberInput(attrs={"type": "number", "readonly": "True", "class": "form-control"}),
        }
        


dd8b7c5648980849352850ccf574b40ae9447344
<mask token>

<mask token>


class OrderForm(forms.ModelForm):


    class Meta:
        model = Order
        fields = '__all__'
        widgets = {'room': forms.TextInput(attrs={'type': 'text', 'class':
            'form-control'}), 'start_date': forms.DateInput(attrs={'type':
            'date', 'class': 'form-control'}), 'finish_date': forms.
            DateInput(attrs={'type': 'date', 'class': 'form-control'}),
            'first_name': forms.TextInput(attrs={'type': 'text',
            'placeholder': 'First Name', 'class': 'form-control'}),
            'last_name': forms.TextInput(attrs={'type': 'text',
            'placeholder': 'Last Name', 'class': 'form-control'}),
            'phone_number': forms.TextInput(attrs={'type': 'text',
            'placeholder': 'Phone number', 'class': 'form-control'}),
            'order_cost': forms.NumberInput(attrs={'type': 'number',
            'readonly': 'True', 'class': 'form-control'})}

from django import forms
from django.forms import fields
from .models import Order, Room
from django.conf import settings


class OrderForm(forms.ModelForm):


    class Meta:
        model = Order
        fields = '__all__'
        widgets = {'room': forms.TextInput(attrs={'type': 'text', 'class':
            'form-control'}), 'start_date': forms.DateInput(attrs={'type':
            'date', 'class': 'form-control'}), 'finish_date': forms.
            DateInput(attrs={'type': 'date', 'class': 'form-control'}),
            'first_name': forms.TextInput(attrs={'type': 'text',
            'placeholder': 'First Name', 'class': 'form-control'}),
            'last_name': forms.TextInput(attrs={'type': 'text',
            'placeholder': 'Last Name', 'class': 'form-control'}),
            'phone_number': forms.TextInput(attrs={'type': 'text',
            'placeholder': 'Phone number', 'class': 'form-control'}),
            'order_cost': forms.NumberInput(attrs={'type': 'number',
            'readonly': 'True', 'class': 'form-control'})}

from django import forms
from django.forms import fields
from .models import Order, Room
from django.conf import settings



class OrderForm(forms.ModelForm):
    class Meta:
        model = Order
        fields = "__all__"
        # rooms = Room.objects.all()
        # choices = []
        # for room in rooms:
        #     choices.append((room.room_number, room.room_number))

        widgets = {
            "room": forms.TextInput(attrs={ "type": "text", "class": "form-control"}),
            "start_date": forms.DateInput(attrs={"type": "date", "class": "form-control"}),
            "finish_date": forms.DateInput(attrs={"type": "date", "class": "form-control"}),
            "first_name": forms.TextInput(attrs={"type": "text", "placeholder": "First Name", "class": "form-control"}),
            "last_name": forms.TextInput(attrs={"type": "text", "placeholder": "Last Name", "class": "form-control"}),
            "phone_number": forms.TextInput(attrs={"type": "text", "placeholder": "Phone number", "class": "form-control"}),
            "order_cost": forms.NumberInput(attrs={"type": "number", "readonly": "True", "class": "form-control"}),
        }
        

