simpleat/src/app/admin-component/add-restau/add-restau.component.html
2022-03-04 15:21:24 +01:00

143 lines
No EOL
8.6 KiB
HTML

<div class="signup-form text-center">
<main class="form-signup">
<form (ngSubmit)="onSubmit()" [formGroup]="signupForm">
<h2>Enregistrer un restaurant</h2>
<div class="form-floating">
<input type="text" class="form-control" id="floatingInputNom" placeholder="" name="nom"
formControlName="nomFc"
[ngClass]="{'is-valid' : signupForm.controls['nomFc'].touched && signupForm.controls['nomFc'].valid,
'is-invalid': signupForm.controls['nomFc'].touched && !signupForm.controls['nomFc'].valid}">
<label for="floatingInputNom">Nom **</label>
</div>
<!-- <div class="form-floating">
<select type="number" class="form-control" id="floatingInputCategories" placeholder="" name="categories"
formControlName="typerestausFc">
<option value=null></option>
<option *ngFor="let category of listCategories" value={{category.id}}>{{category.libelle}}</option>
</select>
<label for="floatingInputlastName">Categorie</label>
</div> -->
<ul>
<div class="form-floating">
<li *ngFor="let category of listCategories$ | async ">
<input type="checkbox" (change)="onCheckChange($event)" [value]="category.id"> {{
category.libelle }}
</li>
</div>
</ul>
<!-- <div class="form-group form-check" *ngFor="let category of listCategories$ | async">
<input type="checkbox" formControlName="typerestausFc" id="acceptTerms" class="form-check-input" />
<label for="acceptTerms" class="form-check-label">{{ category.libelle }}</label>
</div> -->
<div class="form-floating">
<input type="text" class="form-control" id="floatingInputAdresse" placeholder="" name="adresse"
formControlName="adresseFc"
[ngClass]="{'is-valid' : signupForm.controls['adresseFc'].touched && signupForm.controls['adresseFc'].valid,
'is-invalid': signupForm.controls['adresseFc'].touched && !signupForm.controls['adresseFc'].valid}">
<label for="floatingInputAdresse">Adresse **</label>
</div>
<div class="form-floating">
<select type="number" class="form-control" id="floatingInputPrice" placeholder="" name="prix"
formControlName="prixFc">
<option value=1>€ 1€ à 10€</option>
<option value=2>€€ 11€ à 20€</option>
<option value=3>€€€ 21€ à 30€</option>
<option value=4>€€€€ 31€ à 40€</option>
</select>
<label for="floatingInputlastName">Prix</label>
</div>
<div class="form-floating">
<input type="text" class="form-control" id="floatingInputLat" placeholder="" name="latitude"
formControlName="latitudeFc"
[ngClass]="{'is-valid' : signupForm.controls['latitudeFc'].touched && signupForm.controls['latitudeFc'].valid,
'is-invalid': signupForm.controls['latitudeFc'].touched && !signupForm.controls['latitudeFc'].valid}">
<label for="floatingInputLat">Latitude **</label>
</div>
<div class="form-floating">
<input type="text" class="form-control" id="floatingInputLong" placeholder="" name="longitude"
formControlName="longitudeFc"
[ngClass]="{'is-valid' : signupForm.controls['longitudeFc'].touched && signupForm.controls['longitudeFc'].valid,
'is-invalid': signupForm.controls['longitudeFc'].touched && !signupForm.controls['longitudeFc'].valid}">
<label for="floatingInputLong">Longitude **</label>
</div>
<div class="form-floating">
<input type="text" class="form-control" id="floatingInputTel" placeholder="" name="telephone"
formControlName="telephoneFc">
<label for="floatingInputTel">Téléphone</label>
</div>
<div class="form-floating">
<input type="text" class="form-control" id="floatingInputWebsite" placeholder="" name="website"
formControlName="websiteFc"
[ngClass]="{'is-valid' : signupForm.controls['websiteFc'].touched && signupForm.controls['websiteFc'].valid,
'is-invalid': signupForm.controls['websiteFc'].touched && !signupForm.controls['websiteFc'].valid}">
<label for="floatingInputWebsite">Site Web</label>
</div>
<div class="form-control">
<p class="text-left"> Sur Place :</p>
<div class="form-check form-check-inline">
<input type="radio" class="form-check-input" id="checkboxSurPlaceTrue" name="surPlaceFc" value=true
formControlName="surPlaceFc">
<label class="form-check-label" for="checkboxSurPlaceTrue">Oui</label>
</div>
<div class="form-check form-check-inline">
<input type="radio" class="form-check-input" id="checkboxSurPlaceFalse" name="surPlaceFc"
value=false formControlName="surPlaceFc">
<label class="form-check-label" for="checkboxSurPlaceFalse">Non</label>
</div>
<div class="form-check form-check-inline">
<input type="radio" class="form-check-input" id="checkboxSurPlaceNull" name="surPlaceFc" value=null
formControlName="surPlaceFc">
<label class="form-check-label" for="checkboxSurPlaceNull">Pas d'infos</label>
</div>
</div>
<div class="form-control">
<p class="text-left"> A Emporter :</p>
<div class="form-check form-check-inline">
<input type="radio" class="form-check-input" id="checkboxAEmporterTrue" name="aEmporterFc"
value=true formControlName="aEmporterFc">
<label class="form-check-label" for="checkboxAEmporterTrue">Oui</label>
</div>
<div class="form-check form-check-inline">
<input type="radio" class="form-check-input" id="checkboxAEmporterFalse" name="aEmporterFc"
value=false formControlName="aEmporterFc">
<label class="form-check-label" for="checkboxAEmporterFalse">Non</label>
</div>
<div class="form-check form-check-inline">
<input type="radio" class="form-check-input" id="checkboxAEmporterNull" name="aEmporterFc"
value=null formControlName="aEmporterFc">
<label class="form-check-label" for="checkboxAEmporterNull">Pas d'infos</label>
</div>
</div>
<div class="form-control">
<p class="text-left"> Accès PMR :</p>
<div class="form-check form-check-inline">
<input type="radio" class="form-check-input" id="checkboxAccesPMRTrue" name="accesPMRFc" value=true
formControlName="accesPMRFc">
<label class="form-check-label" for="checkboxAccesPMRTrue">Oui</label>
</div>
<div class="form-check form-check-inline">
<input type="radio" class="form-check-input" id="checkboxAccesPMRFalse" name="accesPMRFc"
value=false formControlName="accesPMRFc">
<label class="form-check-label" for="checkboxAccesPMRFalse">Non</label>
</div>
<div class="form-check form-check-inline">
<input type="radio" class="form-check-input" id="checkboxAccesPMRNull" name="accesPMRFc" value=null
formControlName="accesPMRFc">
<label class="form-check-label" for="checkboxAccesPMRNull">Pas d'infos</label>
</div>
</div>
<div *ngIf="errorMessage" class="alert alert-danger">
<p class="alert-link">{{errorMessage}}</p>
</div>
<button class="w-100 btn btn-lg btn-success" type="submit">Enregistrer</button>
</form>
</main>
</div>