Bootstrap: How to avoid responsivity of the form inputs? - html

I have form like this:
And if i shrink display size to more than half of width i got this.
How can i disable this behavior in default please?
Thanks for any advice.
EDIT:
Code of the template with form:
<div class="container customContainer" id="workerDetail" data-ng-controller="LocationsCtrl"
ng-init="initEmptyLocation();"
xmlns="http://www.w3.org/1999/html">
<!-- DEBUG DIV -->
<div class="debugDiv" ng-show="$root.debugable == true">
{{locationDetail}}
</div>
<div class="page-header">
<ul class="pager">
<li class="previous">← </li>
<li class="previous"><a class="savecstbtn">
<button
type="button"
class="btn btn-xs savecstbtn btn-link"
ng-click="createLocation(locationDetail)"
ng-disabled="locationForm.$invalid"
>
{{ 'SAVE' | translate }}
</button>
</a>
</li>
</ul>
<h1 class="savecstbtnHeading">{{ 'NEW_LOCATION' | translate }} </h1>
</div>
<ul class="nav nav-tabs">
<li class="active"><a data-target="#home" data-toggle="tab">{{ 'INFO' | translate }}</a></li>
<!--<li><a data-target="#activities" data-toggle="tab">{{ 'PROJECTS' | translate }}</a></li>-->
</ul>
<!-- Tab panes -->
<div class="tab-content">
<!-- USER DETAIL -->
<div class="tab-pane active" id="home">
<div class="row detailPaddingTop">
<form role="form" name="locationForm" id="locationForm" class="detailForm">
<!-- USER EDIT FORM PART 0 -->
<div class="col-md-3 column">
<div class="form-group">
<label for="city">{{ 'ADDRESS_CITY' | translate }} </label>
<input type="text" ng-model="locationDetail.address.city" class="form-control" id="city"/>
</div>
<div class="form-group">
<label for="street">{{ 'ADDRESS_STREET' | translate }} </label>
<input type="text" ng-model="locationDetail.address.street" class="form-control" id="street"/>
</div>
<div class="form-group">
<label for="streetNumber">{{ 'ADDRESS_STREET_NO' | translate }}</label>
<input type="text" ng-model="locationDetail.address.streetNumber" class="form-control" id="streetNumber"/>
</div>
<div class="form-group">
<label for="district">{{ 'ADDRESS_DISTRICT' | translate }}</label>
<input type="text" ng-model="locationDetail.address.district" class="form-control" id="district"/>
</div>
<div class="form-group col-md-6">
<label for="latitude" class="">{{ 'ADDRESS_LAT' | translate }} {{ '*' | translate }}</label>
<input type="text" ng-model="locationDetail.address.latitude"
class="form-control gpsLat"
id="latitude" required/>
</div>
<div class="form-group col-md-6">
<label for="longitude">{{ 'ADDRESS_LON' | translate }} {{ '*' | translate }}</label>
<input type="text" ng-model="locationDetail.address.longitude"
class="form-control gpsLon"
id="longitude" required/>
</div>
</div>
<!-- USER EDIT FORM PART 2 -->
<div class="col-md-3 column">
<div class="form-group">
<label for="siteId">{{ 'SITEID' | translate }} {{ '*' | translate }}</label>
<input type="text" ng-model="locationDetail.siteId"
class="form-control" id="siteId" required/>
</div>
<div class="form-group">
<label for="shared">{{ 'SHARED' | translate }}</label>
<select id="shared" ng-model="locationDetail.shared" class="form-control">
<option value="true">{{ 'YES' | translate }}</option>
<option value="false">{{ 'NO' | translate }}</option>
</select>
</div>
<div class="form-group">
<label for="sapSacIrnCode">{{ 'SAPSACIRNCODE' | translate }}</label>
<input type="text" ng-model="locationDetail.sapSacIrnCode" class="form-control" id="sapSacIrnCode"/>
</div>
<div class="form-group">
<label for="stationType">{{ 'STATION_TYPE' | translate }} {{ '*' | translate }}</label>
<input kendo-auto-complete
required
ng-minlength=1
id="stationType"
class="form-control"
ng-model="locationDetail.stationType.name"
k-options="customOptionsStationType"/>
</div>
</div>
<!-- USER EDIT FORM PART 1 -->
<div class="col-md-3 column">
<div class="form-group">
<label for="abloyLocation">{{ 'ABBLOY_LOCATION' | translate }}</label>
<input type="text" ng-model="locationDetail.abloyLocation" class="form-control" id="abloyLocation"/>
</div>
<div class="form-group">
<label for="bsc">{{ 'BSC' | translate }} </label>
<input type="text" ng-model="locationDetail.bsc" class="form-control" id="bsc"/>
</div>
<div class="form-group">
<label for="indoorOutdoor">{{ 'INDOOR_OUTDOOR' | translate }} {{ '*' | translate }}</label>
<select id="indoorOutdoor" ng-model="locationDetail.indoorOutdoor" class="form-control" required>
<option value="Indoor">{{ 'INDOOR' | translate }}</option>
<option value="Outdoor">{{ 'OUTDOOR' | translate }}</option>
<option value="IndoorOutdoor">{{ 'INDOOR_OUTDOOR_TYPE' | translate }}</option>
</select>
</div>
<div class="form-group">
<label for="partner">{{ 'PARTNER' | translate }} {{ '*' | translate }}</label>
<input kendo-auto-complete
id="partner"
class="form-control"
ng-model="locationDetail.partner.name"
k-options="customOptionsPartner"
/>
</div>
</div>
<!-- USER EDIT FORM PART 3 -->
<div class="col-md-3 column">
<div class="form-group">
<label for="accessNote">{{ 'NOTE' | translate }}</label>
<textarea id="accessNote" ng-model="locationDetail.accessNote" rows="14" cols="34">
</textarea>
</div>
</div>
</form>
</div>
</div>
</div>
</div>

Its not the fields you should look at, its the grid, you have columns set to col-md or col-sm, change them to col-xs, if you want to disable responsiveness on the entire website then read this: http://getbootstrap.com/examples/non-responsive
like paul mentioned

Related

How to edit an object using a view function and its template in Django

I am having template that I got from one of mu front-end developers who is not familiar with python and Django. In order to keep the design as it is right now, I would liketo use only template and its view for objects modification, instead there is a way to use the same design by using forms.py.
For your information, I was able to use the same desing in the adding function but in the editing function it is not working.
How can I do it without having to change the front-design?
Temlapte.html
{% extends 'base.html' %}
{% load static %}
{% block title %}
<title>Liste des employés</title>
{% endblock title %}
{% block content %}
<!-- Main Wrapper -->
<div class="main-wrapper">
<div class="page-wrapper">
<!-- Page Content -->
<div class="content container-fluid">
<!-- Page Header -->
<div class="page-header">
<div class="row align-items-center">
<div class="col">
<h3 class="page-title">Employé</h3>
<ul class="breadcrumb">
<li class="breadcrumb-item">Tableau de bord</li>
<li class="breadcrumb-item active">Employé</li>
</ul>
</div>
<div class="col-auto float-end ms-auto">
<i class="fa fa-plus"></i> Ajouter un employé
<div class="view-icons">
<i class="fa fa-th"></i>
<i class="fa fa-bars"></i>
</div>
</div>
</div>
</div>
<!-- /Page Header -->
<!-- Search Filter -->
<div class="row filter-row">
<div class="col-sm-6 col-md-3">
<div class="form-group form-focus">
<input type="text" class="form-control floating">
<label class="focus-label">ID employé</label>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="form-group form-focus">
<input type="text" class="form-control floating">
<label class="focus-label">Nom employé</label>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="form-group form-focus select-focus">
<select class="select" name="service">
<option value="">Selectionner une grade</option>
{% for grade in listeGrade %}
<option value="{{ grade.id }}">{{ grade.niveau_grade }}</option>
{% endfor %}
</select>
<label class="focus-label">Grade</label>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="d-grid">
Rechercher
</div>
</div>
</div>
<!-- Search Filter -->
<div class="row staff-grid-row">
{% for emp in listEmp %}
<div class="col-md-4 col-sm-6 col-12 col-lg-4 col-xl-3">
<div class="profile-widget">
{% if emp.photo %}
<div class="profile-img">
<img src="{{ emp.photo.url }}" alt="">
</div>
{% endif %}
<div class="dropdown profile-action">
<i class="material-icons">more_vert</i>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item" href="{% url 'hr:edit-employee' emp.id %}" data-bs-toggle="modal" data-bs-target="#edit_employee"><i class="fa fa-pencil m-r-5"></i> Modifier</a>
<a class="dropdown-item" href="{% url 'hr:remove-employee' emp.id %}" data-bs-toggle="modal" data-bs-target="#delete_employee"><i class="fa fa-trash-o m-r-5"></i> Supprimer</a>
</div>
</div>
<h4 class="user-name m-t-10 mb-0 text-ellipsis">{{ emp.nom}} {{ emp.prenom}}</h4>
<div class="small text-muted">{{ emp.qualification }}</div>
</div>
</div>
{% endfor %}
</div>
<!-- /Page Content -->
<!-- Add Employee Modal -->
<div id="add_employee" class="modal custom-modal fade" role="dialog">
<div class="modal-dialog modal-dialog-centered modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Ajouter une employé</h5>
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form action="" method="post" enctype="multipart/form-data"> {% csrf_token %}
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">ID employé <span class="text-danger">*</span></label>
<input class="form-control" type="text" name="id_Personnel">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">Prénom <span class="text-danger">*</span></label>
<input class="form-control" type="text", name="prenom">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">Nom</label>
<input class="form-control" type="text" name="nom">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">Date de naissance<span class="text-danger">*</span></label>
<div class="cal-icon"><input class="form-control" type="text" name="date_de_naissance" placeholder="YYYY-MM-DD"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Sexe <span class="text-danger">*</span></label>
<select class="select" name="sexe">
<option>Selectionner le sexe</option>
<option value="M">Masculin</option>
<option value="F">Féminin</option>
</select>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">CIN <span class="text-danger">*</span></label>
<input class="form-control" type="text" name="CIN">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">Photo</label>
<input class="form-control" type="file" name="photo">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">Téléphone <span class="text-danger">*</span></label>
<input class="form-control" type="text" name="telephone">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">Email</label>
<input class="form-control" type="email" name="email">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">Adresse actuelle<span class="text-danger">*</span></label>
<input class="form-control" type="text" name="adresse_actuelle">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">Adresse permanente<span class="text-danger">*</span></label>
<input type="text" class="form-control" name="adresse_permanente">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">Date d'embauche<span class="text-danger">*</span></label>
<div class="cal-icon"><input class="form-control" type="text" name="date_de_recrutement" placeholder="YYYY-MM-DD"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Service <span class="text-danger">*</span></label>
<select class="select" name="service">
<option value="">Selectionner un service</option>
{% for service in listeService %}
<option value="{{ service.id }}">{{ service.Service }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Diplôme obtenu <span class="text-danger">*</span></label>
<select class="select" name="diplome_obtenu">
<option>Selectionner un diplôme</option>
<option value="DEUG">DEUG</option>
<option value="LICENCE">LICENCE</option>
<option value="MAITRISE">MAITRISE</option>
<option value="MASTER">MASTER</option>
<option value="DOCTORAT">DOCTORAT</option>
<option value="AUTRE">AUTRE</option>
</select>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">Qualification </label>
<input class="form-control" type="text" name="qualification">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Grade</label>
<select class="select" name="grade">
<option value="">Selectionner une grade</option>
{% for grade in listeGrade %}
<option value="{{ grade.id }}">{{ grade.niveau_grade }}</option>
{% endfor %}
</select>
</div>
</div>
</div>
<div class="submit-section">
<button class="btn btn-primary submit-btn">Enrégistrer</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- /Add Employee Modal -->
<!-- Edit Employee Modal -->
<div id="edit_employee" class="modal custom-modal fade" role="dialog">
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Modifier un employé</h5>
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form action="" method="post" enctype="multipart/form-data">
{% csrf_token %}
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">ID employé <span class="text-danger">*</span></label>
<input class="form-control" type="text" name="id_Personnel" value="{{ emp_name.id_Personnel }}">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">Prénom <span class="text-danger">*</span></label>
<input class="form-control" type="text", name="prenom" value="{{ emp_name.prenom }}">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">Nom</label>
<input class="form-control" type="text" name="nom" value="{{ emp_name.nom }}">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">Date de naissance<span class="text-danger">*</span></label>
<div class="cal-icon"><input class="form-control datetimepicker" type="text" name="date_de_naissance" value="{{ emp_name.date_de_naissance }}"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Sexe <span class="text-danger">*</span></label>
<select class="select" name="sexe">
<option>Selectionner le sexe</option>
<option value="M" {% ifequal emp_name.sexe M %} selected="selected"{% endifequal %} >Masculin</option>
<option value="F" value="M" {% ifequal emp_name.sexe F %} selected="selected"{% endifequal %}>Féminin</option>
</select>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">CIN <span class="text-danger">*</span></label>
<input class="form-control" type="text" name="CIN" value="{{ emp_name.CIN }}">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">Photo</label>
<input class="form-control" type="file" name="photo" value="{{ emp_name.photo }}">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">Téléphone <span class="text-danger">*</span></label>
<input class="form-control" type="text" name="telephone">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">Email</label>
<input class="form-control" type="email" name="email" value="{{emp_name.email}}">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">Adresse actuelle<span class="text-danger">*</span></label>
<input class="form-control" type="text" name="adresse_actuelle" value="{{emp_name.adresse_actuelle}}">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">Adresse permanente<span class="text-danger">*</span></label>
<input type="text" class="form-control" name="adresse_permanente" value="{{emp_name.adresse_permanente}}">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">Date d'embauche<span class="text-danger">*</span></label>
<div class="cal-icon"><input class="form-control datetimepicker" type="text" name="date_de_recrutement" value="date_de_recrutement"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Service <span class="text-danger">*</span></label>
<select class="select" name="service">
<option value="">Selectionner un service</option>
{% for service in listeService %}
<option value="{{ service.id }}" value="emp_name.service">{{ service.Service }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Diplôme obtenu <span class="text-danger">*</span></label>
<select class="select" name="diplome_obtenu">
<option>Selectionner un diplôme</option>
<option value="DEUG">DEUG</option>
<option value="LICENCE">LICENCE</option>
<option value="MAITRISE">MAITRISE</option>
<option value="MASTER">MASTER</option>
<option value="DOCTORAT">DOCTORAT</option>
<option value="AUTRE">AUTRE</option>
</select>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-form-label">Qualification </label>
<input class="form-control" type="text" name="qualification">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Grade</label>
<select class="select" name="grade">
<option value="">Selectionner une grade</option>
{% for grade in listeGrade %}
<option value="{{ grade.id }}">{{ grade.niveau_grade }}</option>
{% endfor %}
</select>
</div>
</div>
</div>
<div class="submit-section">
<button class="btn btn-primary submit-btn">Enregistrer les modifications</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- /Edit Employee Modal -->
</div>
<!-- /Page Wrapper -->
</div>
<!-- /Main Wrapper -->
{% endblock content %}
Adding views:
def ListEmployeeGrid(request):
template ='employees/employees.html'
listEmp=Personnel.objects.all()
listeGrade=Grades.objects.all()
listeService=Services.objects.all()
form = EmployeeAddForm(request.POST or None,request.FILES)
if request.method=='POST':
# if forms.is_valid():
Personnel.objects.create(
id_Personnel=request.POST["id_Personnel"],
photo = request.FILES["photo"],
prenom = request.POST["prenom"],
nom = request.POST["nom"],
sexe= request.POST["sexe"],
date_de_naissance= request.POST["date_de_naissance"],
CIN = request.POST['CIN'],
telephone =request.POST["telephone"],
email = request.POST["email"],
adresse_actuelle = request.POST["adresse_actuelle"],
adresse_permanente = request.POST["adresse_permanente"],
diplome_obtenu = request.POST["diplome_obtenu"],
qualification = request.POST["qualification"],
grade = Grades.objects.get(id=request.POST["grade"]),
date_de_recrutement = request.POST["date_de_recrutement"],
service = Services.objects.get(id=request.POST["service"]),
create_date = date.today(),
updateDate = date.today(),
)
# return redirect('hr:list_employee')
context={
'listEmp':listEmp,
'listeGrade':listeGrade,
'listeService':listeService
}
return render(request, template, context)
Employ edition view
def Edit_Employee(request, id):
emp_name=get_object_or_404(Personnel,id=id)
listEmp=Personnel.objects.all()
listeGrade=Grades.objects.all()
listeService=Services.objects.all()
Personnel.objects.update_or_create(
id_Personnel=request.POST["id_Personnel"],
photo = request.FILES["photo"],
prenom = request.POST["prenom"],
nom = request.POST["nom"],
sexe= request.POST["sexe"],
date_de_naissance= request.POST["date_de_naissance"],
CIN = request.POST['CIN'],
telephone =request.POST["telephone"],
email = request.POST["email"],
adresse_actuelle = request.POST["adresse_actuelle"],
adresse_permanente = request.POST["adresse_permanente"],
diplome_obtenu = request.POST["diplome_obtenu"],
qualification = request.POST["qualification"],
grade = Grades.objects.get(id=request.POST["grade"]),
date_de_recrutement = request.POST["date_de_recrutement"],
service = Services.objects.get(id=request.POST["service"]),
create_date = date.today(),
updateDate = date.today(),)
return render(request,'employees/employees.html',
{
"emp_name": emp_name,
"listEmp":listEmp,
"listeService":listeService,
"listeGrade":listeGrade,
}
)

How to allow same day booking in t-datepicker

Hi everyone!
I'm trying to allow same day booking for my calendar using the
t-datepicker. I'm trying to use different methods from the
documentation to allow same day booking. For example to allow users to
book from 6th of june till 6th of June. However it's not allowing that
and always adds an extra day when booking. The code is below.
<div class="modal fade" id="myModal">
<div class=row>
<div class="col-sm-10 offset-sm-1">
<div class="modal-dialog modal-lg">
<form action="" method="POST">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">
<h4 class="modal-title">Quick Booking</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<!-- Modal body -->
<div class="modal-body">
{{ csrf_field() }}
#isset($error_msg)
#foreach ($error_msg as $error)
<li class="text-danger">{{ $error }}</li>
#endforeach
#endisset
<div class="form-group row">
<label for="placeid" class="col-md-4 col-form-label text-md-right">{{ __('Place ID') }}: </label>
<div class="col-md-6">
<input type="text" class="form-control" name="place_id" required>
</div>
</div>
<div class="form-group row">
<label for="placeid" class="col-md-4 col-form-label text-md-right">{{ __('Arrival day') }}: </label>
<div class="col-md-6">
<div class="container11">
<div class="t-datepicker">
<span id="tdatepik" class="t-check-in"></span>
<span id="searchdate_numberofdays" class="t-check-out"></span>
#isset($maparray['err_msg'])
<span id="errormsg_txt" style="color:red;"> {{ __('You can book maximum') }} {{ $maparray["set_admin"]->max_no_days }} {{ __('days') }}.</span><br>
#endisset
<span id="errormsg_txt" style="color:red;display:none;"> {{ __('Arrival day is not selected') }}. </span><br>
</div>
</div>
</div>
</div>
<div class="form-group row">
<label for="fullname" class="col-md-4 col-form-label text-md-right">{{ __('Full Name') }}: </label>
<div class="col-md-6">
<input type="text" class="form-control" name="user_fullname" required>
</div>
</div>
<div class="form-group row">
<label for="email" class="col-md-4 col-form-label text-md-right">{{ __('Email address') }}: </label>
<div class="col-md-6">
<input type="email" class="form-control" name="user_email" required>
</div>
</div>
<div class="form-group row">
<label for="phone" class="col-md-4 col-form-label text-md-right">{{ __('Phone') }}: </label>
<div class="col-md-6">
<input type="tel" class="form-control" name="user_phone" required>
</div>
</div>
<div class="form-group row">
<label for="geust" class="col-md-4 col-form-label text-md-right">{{ __('Number of adults') }}[1-4]: </label>
<div class="col-md-6">
<select class="form-control booking_inp_textbox_style" id="numberofguest" name="numberofguest" onchange="addFieldsadmin(this.value);">
<option value="0" active>1</option>
<option value="1">2</option>
<option value="2">3</option>
<option value="3">4</option>
</select>
</div>
</div>
<div class="form-group row">
<label for="babies" class="col-md-4 col-form-label text-md-right">{{ __('Number of babies') }}[1-4]: </label>
<div class="col-md-6">
<select class="form-control booking_inp_textbox_style" id="numberofbabies" name="numberofbabies" onchange="addFieldsadmin2(this.value);">
<option value="0" active>0</option>
<option id="hidden_op_style1" value="1">1</option>
<option id="hidden_op_style2" value="2">2</option>
<option id="hidden_op_style3" value="3">3</option>
<option id="hidden_op_style4" value="4">4</option>
</select>
</div>
</div>
<div class="containerinput">
{{-- dynamic input surname using javascript --}}
</div>
<div class="containerinput2">
{{-- dynamic input surname using javascript --}}
</div>
<div class="form-group row">
<label for="promo" class="col-md-4 col-form-label text-md-right">{{ __('Promo Code') }}: </label>
<div class="col-md-6">
<input type="text" class="form-control" name="user_promo">
</div>
</div>
<div class="form-group row">
<label for="book" class="col-md-4 col-form-label text-md-right">{{ __('Booked By') }}: </label>
<div class="col-md-6">
<label>{{ Auth::user()->name }}</label>
</div>
</div>
#if (Auth::user()->role == 'admin')
<div class="form-group row">
<label for="Ammount" class="col-md-4 col-form-label text-md-right">{{ __('Payment Type') }}: </label>
<div class="col-md-6">
<input type="radio" name="user_payment_type" value="Entrance">
<label for="Entrance" class="booking_payment_type_style">{{ __('Entrance (Cash)') }}</label>
<input type="radio" name="user_payment_type" value="Admin" checked>
<label for="Entrance" class="booking_payment_type_style">{{ __('Admin (Free)') }}</label><br>
</div>
</div>
#else
<div class="form-group row">
<label for="promo" class="col-md-4 col-form-label text-md-right">{{ __('Payment Type') }}: </label>
<div class="col-md-6">
<input type="radio" name="user_payment_type" value="Entrance" checked>
<label for="Entrance" class="booking_payment_type_style">{{ __('Entrance (Cash)') }}</label>
</div>
</div>
#endif
</div>
<!-- Modal footer -->
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-success">{{ __('Save') }}</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<script>
var today = new Date();
tomorrow = new Date(today);
tomorrow.setDate(tomorrow.getDate() + 60);
var date = tomorrow.getFullYear()+'-'+(tomorrow.getMonth()+1)+'-'+tomorrow.getDate();
$(document).ready(function(){
// Call global the function
$('.t-datepicker').tDatePicker({
// options here
titleDateRange :'{{ __('day') }}',
titleDateRanges:'{{ __('days') }}',
titleToday :'{{ __('Today') }}',
limitDateRanges :'{{ $set_admin->max_no_days+300 }}',
titleCheckIn :'{{ __('Check In') }}',
titleCheckOut :'{{ __('Check Out') }}',
numCalendar : 1,
//endDate: date,
nextDayHighlighted :false,
toDayHighlighted :true,
toDayShowTitle :true,
autoClose: true,
dateRangesHover: false,
});
});
// $('.t-datepicker').tDatePicker('setEndDate','2020-07-28');
</script>
<script type="text/javascript">
#isset($error_msg)
#if (count($error_msg) > 0)
$('#myModal').modal('show');
#endif
#endisset
</script>

Html elements shrinking after add FORM tag

I don't really understand the elements changes after add FORM.
Any suggestion?
BEFORE
AFTER add
{!! Form::model($user, ['method' => 'POST','route' => ['profile.update', $user->id], 'enctype' => 'multipart/form-data']) !!}
Full codes here:(
#include('Navigation.navbarhome')
<div class="container">
{!! Form::model($user, ['method' => 'POST','route' => ['profile.update', $user->id], 'enctype' => 'multipart/form-data']) !!}
#if ($message = Session::get('success'))
<div class="alert alert-success">
{{ session()->get('success') }}
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</div>
#endif
#if ($errors->any())
<div class="alert alert-danger">
<strong>Whoops!</strong> There were some problems with your input.<br><br>
<ul>
#foreach ($errors->all() as $error)
<li>{{ $error }}</li>
#endforeach
</ul>
</div>
#endif
<h1>Edit Profile</h1>
<hr>
<div class="row">
<!-- left column -->
<div class="col-md-3">
<div class="text-center">
<img src="/uploads/avatars/{{ Auth::user()->profImage }}" class="avatar img-circle" alt="avatar">
<h6>Upload your photo...</h6>
<input type="file" name="profImage">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
</div>
</div>
<!-- edit form column -->
<div class="col-md-7 personal-info">
<h3>Personal info</h3>
<form class="form-horizontal" role="form">
<div class="form-group">
<label class="col-lg-3 control-label">First name:</label>
<div class="col-lg-8">
<input class="form-control" name="fname" type="text" value="{{$user->fname}}">
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Last name:</label>
<div class="col-lg-8">
<input class="form-control" name="lname" type="text" value="{{$user->lname}}">
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Staff ID:</label>
<div class="col-lg-8">
<input class="form-control" name="StaffID" type="text" value="{{$user->StaffID}}" readonly>
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Email:</label>
<div class="col-lg-8">
<input class="form-control" name="email" type="text" value="{{$user->email}}">
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Department:</label>
<div class="col-lg-8">
<input class="form-control" name="dept" type="text" value="{{$user->department1->name}}" readonly>
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Position:</label>
<div class="col-lg-8">
<input class="form-control" name="role" type="text" value="{{$user->position->name}}" readonly>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"></label>
<div class="col-md-8">
<input type="submit" class="btn btn-primary" value="Save Changes">
<span></span>
<a href="/home2"> <input type="button" href="/home2" class="btn btn-default" value="Cancel">
</div>
</div>
</form>
{!! Form::close() !!}
</div>
</div>
</div>
<hr>
This is occurring because there's already an existing <form> element within your code, and nesting these elements is causing issues within the styling.
You should be able to address it by simply changing your inner <form> element into a <div> since it isn't doing much except for handling styling (via the form-horizontal class).
Just change the following line from:
<form class="form-horizontal" role="form">
to:
<div class="form-horizontal" role="form">
Example (with changes applied)
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
<div class="container">
<!-- This element is added by Laravel -->
<form>
<h1>Edit Profile</h1>
<hr>
<div class="row">
<!-- left column -->
<div class="col-md-3">
<div class="text-center">
<img src="" class="avatar img-circle" alt="avatar">
<h6>Upload your photo...</h6>
<input type="file" name="profImage">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
</div>
</div>
<!-- edit form column -->
<div class="col-md-7 personal-info">
<h3>Personal info</h3>
<!-- Change this to a <form> to reproduce your original issue -->
<div class="form-horizontal" role="form">
<div class="form-group">
<label class="col-lg-3 control-label">First name:</label>
<div class="col-lg-8">
<input class="form-control" name="fname" type="text" value="{{$user->fname}}">
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Last name:</label>
<div class="col-lg-8">
<input class="form-control" name="lname" type="text" value="{{$user->lname}}">
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Staff ID:</label>
<div class="col-lg-8">
<input class="form-control" name="StaffID" type="text" value="{{$user->StaffID}}" readonly>
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Email:</label>
<div class="col-lg-8">
<input class="form-control" name="email" type="text" value="{{$user->email}}">
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Department:</label>
<div class="col-lg-8">
<input class="form-control" name="dept" type="text" value="{{$user->department1->name}}" readonly>
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Position:</label>
<div class="col-lg-8">
<input class="form-control" name="role" type="text" value="{{$user->position->name}}" readonly>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"></label>
<div class="col-md-8">
<input type="submit" class="btn btn-primary" value="Save Changes">
<span></span>
<input type="button" href="/home2" class="btn btn-default" value="Cancel">
</div>
</div>
</div>
</div>
</div>
<hr>
</form>
</div>

Can't submit form with "attributes" input field

I have a form with the following setup:
<div class="row">
<div class="col-3">
#include('acp.sidebar')
</div>
<div class="col-9">
#if (count($errors) > 0)
<div class="alert alert-danger">
<ul>
#foreach ($errors->all() as $error)
<li>{{ $error }}</li>
#endforeach
</ul>
</div>
#endif
<form class="form-horizontal" role="form" method="POST" action="{{ url('acp/provider/add') }}" enctype="multipart/form-data">
{{ csrf_field() }}
<input type="hidden" name="id">
<fieldset>
<legend>Grunddaten</legend>
<div class="form-group">
<label for="name">Name</label>
<input type="text" class="form-control" id="name" name="name" required>
</div>
<div class="form-group">
<label for="description">Beschreibung</label>
<textarea class="form-control" id="description" name="description" required></textarea>
</div>
<div class="form-group">
<label for="url">Domain</label>
<input type="text" class="form-control" id="url" name="url" required>
</div>
<div class="form-group">
<label for="ref">Ref-Code</label>
<input type="text" class="form-control" id="ref" name="ref" required>
</div>
<div class="form-group">
<label for="image">Logo</label>
<input type="file" name="image" id="image" class="form-control" accept="image/*">
</div>
<div class="form-group">
<label for="checkboxes">Payment-Anbieter</label>
<div>
#foreach($paymentProviders as $key => $provider)
<label class="checkbox-inline" for="checkboxes-{{$key}}">
<input name="paymentProviders[]" id="checkboxes-{{$key}}" value="{{$provider->id}}" type="checkbox">
<img src="{{url('/images/paymentProvider/small/'.$provider->image)}}">
{{$provider->name}}
</label>
#endforeach
</div>
</div>
</fieldset>
<fieldset>
<legend>Crawler</legend>
<div class="form-group">
<label for="attributes">Suchattribute</label>
<input type="text" class="form-control" id="attributes" name="attributes" required>
</div>
<div class="form-group">
<label for="crawlerType">Typ</label>
<select id="crawlerType" name="crawlerType" class="form-control">
#foreach($crawlerTypes as $crawlerType)
<option value="{{$crawlerType}}">{{$crawlerType}}</option>
#endforeach
</select>
</div>
</fieldset>
<div class="form-group">
<div class="pull-right">
<button type="submit" class="btn btn-primary">
Absenden
</button>
</div>
</div>
</form>
</div>
</div>
As you can see there is a input named "attributes" down below. When I add this, I can't submit my form. It's like clicking on a button with no "submit" attribute.
After removing or renaming this input, it works. It's not a big thing to rename my input - I'm just interested if this is a bug, or a for me unkown feature.
I'm using Bootstrap v4.0.0-alpha.6 and Laravel 5.4.22.

HTML, Bootstrap3 - Inline form, how to set the field length?

I have the following form but I am having some trouble to make all the fields of the same length. As a matter of fact, is the code too long? I am a begginer so I don't know if I am repeating a lot of code.
Here is the html piece:
<div class="panel panel-default">
<div class = "panel-heading">
Informações do Imóvei
</div>
<div class="panel-body">
<div class="form-inline">
<label class="control-label">{{anuncioForm.tipo_imovel.label}}</label>
<p>Selecione o tipo do seu imóvel</p>
<select class="form-control control-label"
id="id_{{ anuncioForm.tipo_imovel.name }}"
name="anuncioForm.tipo_imovel.name">
<option value="" selected="selected">---------</option>
<option value="Casa">Casa</option>
<option value="Apartamento">Apartamento</option>
<option value="Comercial">Comercial</option>
</select>
</div>
<br>
<div class="form-group">
<label for="exampleTextarea">Descrição do imóvel</label>
<p>Descreva com o máximo de detalhes o seu imóvel</p>
<textarea class="form-control" id="exampleTextarea" rows="3"></textarea>
</div>
<br>
<p><b>Características do imóvel</b></p>
<div class="form-inline">
<div class="input-group">
<span class="input-group-addon"><label>{{ anuncioForm.quartos.label }}</label></span>
<input class="form-control"
id="id_{{ anuncioForm.quartos.name }}"
name="id_{{ anuncioForm.quartos.name }}"
type="text"/>
</div>
<div class="input-group">
<span class="input-group-addon"><label>{{ anuncioForm.suites.label }}</label></span>
<input class="form-control"
id="id_{{ anuncioForm.suites.name }}"
name="id_{{ anuncioForm.suites.name }}"
type="text"/>
</div>
<div class="input-group">
<span class="input-group-addon"><label>{{ anuncioForm.banheiros.label }}</label></span>
<input class="form-control"
id="id_{{ anuncioForm.banheiros.name }}"
name="id_{{ anuncioForm.banheiros.name }}"
type="text"/>
</div>
</div>
<br>
<div class="form-inline">
<div class="input-group">
<span class="input-group-addon"><label>{{ anuncioForm.area_construida.label }}</label></span>
<input class="form-control"
id="id_{{ anuncioForm.area_construida.name }}"
name="id_{{ anuncioForm.area_construida.name }}"
type="text"/>
</div>
</div>
<br>
<div class="form-inline">
<div class="input-group">
<span class="input-group-addon"><label>{{ anuncioForm.area_total.label }}</label></span>
<input class="form-control"
id="id_{{ anuncioForm.area_total.name }}"
name="id_{{ anuncioForm.area_total.name }}"
type="text"/>
</div>
</div>
<br>
<div class="form-inline">
<div class="input-group">
<span class="input-group-addon"><label>Data de Construção</label></span>
<input class="form-control"
id="id_{{ anuncioForm.data_construcao.name }}"
name="id_{{ anuncioForm.data_construcao.name }}"
type="text"/>
</div>
<p>Insira o ano em que o imóvel foi construído</p>
</div>
<br>
<p><b>Preço de Venda</b></p>
<div class="form-inline">
<div class="input-group">
<span class="input-group-addon"><label>R$</label></span>
<input class="form-control"
id="id_{{ anuncioForm.preco_venda.name }}"
name="id_{{ anuncioForm.preco_venda.name }}"
type="text"/>
</div>
</div>
<br>
<p><b>Preço do Aluguel</b></p>
<div class="form-inline">
<div class="input-group">
<span class="input-group-addon"><label>R$</label></span>
<input class="form-control"
id="id_{{ anuncioForm.preco_aluguel.name }}"
name="id_{{ anuncioForm.preco_aluguel.name }}"
type="text"/>
</div>
</div>
<br>
</div>
So, what do you suggest me?
You can take advantage of bootstrap grids col-xx-xx or adjust your input width externally.
Better read this: https://v4-alpha.getbootstrap.com/components/input-group/ and https://stackoverflow.com/a/25017998/6107715
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
/*.input-group{min-width: 200px; max-height: 500px;}*/
</style>
</head>
<div class="panel panel-default">
<div class="panel-body">
<br>
<p><b>Características do imóvel</b></p>
<div class="form-inline">
<div class="col-xs-3 col-sm-3 input-group">
<span class="input-group-addon"><label>{{ anuncioForm.quartos.label }}</label></span>
<input class="form-control"
id="id_{{ anuncioForm.quartos.name }}"
name="id_{{ anuncioForm.quartos.name }}"
type="text"/>
</div>
<div class="col-xs-3 col-sm-3 input-group">
<span class="input-group-addon"><label>{{ anuncioForm.suites.label }}</label></span>
<input class="form-control"
id="id_{{ anuncioForm.suites.name }}"
name="id_{{ anuncioForm.suites.name }}"
type="text"/>
</div>
<div class="col-xs-3 col-sm-3 input-group ">
<span class="input-group-addon"><label>{{ anuncioForm.banheiros.label }}</label></span>
<input class="form-control"
id="id_{{ anuncioForm.banheiros.name }}"
name="id_{{ anuncioForm.banheiros.name }}"
type="text"/>
</div>
</div>
<br>
<div class="form-inline">
<div class="col-xs-3 col-sm-3 input-group">
<span class="input-group-addon"><label>{{ anuncioForm.area_construida.label }}</label></span>
<input class="form-control"
id="id_{{ anuncioForm.area_construida.name }}"
name="id_{{ anuncioForm.area_construida.name }}"
type="text"/>
</div>
</div>
<br>
<div class="form-inline">
<div class="col-xs-3 col-sm-3 input-group">
<span class="input-group-addon"><label>{{ anuncioForm.area_total.label }}</label></span>
<input class="form-control"
id="id_{{ anuncioForm.area_total.name }}"
name="id_{{ anuncioForm.area_total.name }}"
type="text"/>
</div>
</div>
<br>
<div class="form-inline">
<div class="col-xs-3 col-sm-3 input-group">
<span class="input-group-addon"><label>Data de Construção</label></span>
<input class="form-control"
id="id_{{ anuncioForm.data_construcao.name }}"
name="id_{{ anuncioForm.data_construcao.name }}"
type="text"/>
</div>
<p>Insira o ano em que o imóvel foi construído</p>
</div>
<form class="form-inline">
<div class="col-xs-3 col-sm-3 input-group">
<label class="input-group-addon" for="exampleInput">Name</label>
<input type="text" class="form-control" id="exampleInput" placeholder="Jane Doe">
</div>
</form>
<br>
<p><b>Preço de Venda</b></p>
<div class="form-inline">
<div class="col-xs-3 col-sm-3 input-group">
<span class="input-group-addon"><label>R$</label></span>
<input class="form-control"
id="id_{{ anuncioForm.preco_venda.name }}"
name="id_{{ anuncioForm.preco_venda.name }}"
type="text"/>
</div>
</div>
<br>
<p><b>Preço do Aluguel</b></p>
<div class="form-inline">
<div class="col-xs-3 col-sm-3 input-group">
<span class="input-group-addon"><label>R$</label></span>
<input class="form-control"
id="id_{{ anuncioForm.preco_aluguel.name }}"
name="id_{{ anuncioForm.preco_aluguel.name }}"
type="text"/>
</div>
</div>
<br>
</div>
I think your issue is that you are putting on every input. it should be :
<form class="form-inline">
<div class="form-group">
<label for="exampleInput">Name</label>
<input type="text" class="form-control" id="exampleInput" placeholder="Jane Doe">
</div>
</form>
Then, apply your width settings to the class
.form-group
this will adjust the width of the label and input to match as they will auto adjust.
Hope this helps.