credit-direct/templates/front/newSteps/credit-steps2-c.php
2025-12-18 09:44:42 +01:00

182 lines
12 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<fieldset>
<div class="form-row">
<div class="col-md-12">
<div class="form-check form-check-inline">
<input name="hascurrentloan" type="checkbox" class="form-check-input" id="IDhascurrentloan" value="1">
<label class="form-check-label" for="IDhascurrentloan">Avez-vous des crédits en cours ?</label>
</div>
</div>
</div>
<div class="wpcf-currentloan d-none">
<?php if (is_object($coBorrower)) : ?>
<p class="warning-message">Si un crédit est en commun avec le co-emprunter, merci de ne l'encoder qu'une seule fois.</p>
<?php endif ?>
<div class="py-5 wpcf-currentloan--block wpcf-prototype">
<button type="button" class="close wpcf-currentloan--block--remove" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<div class="form-row">
<div class="form-group col-md-3">
<label for="ID__number__loantype">Type de créance</label>
<?php $typesCreance = $wpdb->get_results( "SELECT * FROM cdf_Type_creance"); ?>
<select name="currentloans[__number__][loantype]" id="ID__number__loantype" class="form-control" required>
<option value="">Veuillez faire un choix</option>
<?php foreach ($typesCreance as $typeCreance) : ?>
<option value="<?php echo $typeCreance->idtype_creance ?>"><?php echo $typeCreance->nom_creance ?></option>
<?php endforeach ?>
</select>
</div>
<div class="form-group col-md-3">
<label for="ID__number__bankname">Nom de l'organisme / Banque</label>
<input name="currentloans[__number__][bankname]" type="text" class="form-control"
id="ID__number__bankname" required>
</div>
<div class="form-group col-md-3">
<label for="ID__number__borrowedcapital">Capital emprunté</label>
<input name="currentloans[__number__][borrowedcapital]" type="number" class="form-control"
id="ID__number__borrowedcapital" min="0" step="0.01" required>
</div>
<div class="form-group col-md-3">
<label for="ID__number__durationmonth">Durée du crédit (en mois)</label>
<input name="currentloans[__number__][durationmonth]" type="number" class="form-control"
id="ID__number__durationmonth" min="0" step="1" required>
</div>
<div class="form-group col-md-3"><label for="ID__number__monthlypayment">Mensualité</label>
<input name="currentloans[__number__][monthlypayment]" type="number" class="form-control"
id="ID__number__monthlypayment" min="0" step="0.01" required>
</div>
<div class="form-group col-md-3">
<label for="ID__number__firstduedate">Date 1ère échéance</label>
<input name="currentloans[__number__][firstduedate]" type="date" class="form-control"
id="ID__number__firstduedate" required>
</div>
<div class="form-group col-md-3">
<label for="ID__number__remainingbalance">Solde restant dû (approximatif)</label>
<input name="currentloans[__number__][remainingbalance]" type="number" class="form-control"
id="ID__number__remainingbalance" min="0" step="0.01" required>
</div>
<div class="col-md-3 form-group">
<div class="col-form-label pr-3">À clôturer / Solder ?</div>
<div class="form-check form-check-inline">
<input name="currentloans[__number__][hasclosed]" type="radio" class="form-check-input"
id="ID__number__1hasclosed" value="0" checked="">
<label class="form-check-label" for="ID__number__1hasclosed">Non</label>
</div>
<div class="form-check form-check-inline">
<input name="currentloans[__number__][hasclosed]" type="radio" class="form-check-input"
id="ID__number__2hasclosed" value="1">
<label class="form-check-label" for="ID__number__2hasclosed">Oui</label>
</div>
</div>
<input type="hidden" class="wpcf-currentloan--block--kuid" name="currentloans[__number__][kuid]" value="">
</div>
</div>
<button class="btn btn-primary wpcf-currentload--add">Ajouter un autre crédit</button>
<input type="hidden" name="delcurrentloan">
</div>
</fieldset>
<?php if (is_object($coBorrower)) : ?>
<fieldset class="py-5">
<div class="form-row">
<legend>Co-Emprunteur</legend>
<legend>Crédits(s) en cours</legend>
<div class="w-100 d-none d-md-block"></div>
<div class="form-check form-check-inline">
<input name="cohascurrentloan" type="checkbox" class="form-check-input" id="IDcohascurrentloan" value="1">
<label class="form-check-label" for="IDcohascurrentloan">Avez-vous des crédits en cours ?</label>
</div>
</div>
<div class="wpcf-cocurrentloan d-none">
<div class="py-5 wpcf-cocurrentloan--block">
<button type="button" class="close wpcf-cocurrentloan--block--remove" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<div class="form-row">
<div class="form-group col-md-3">
<label for="ID__number__cosplashbacktype">Type de créance</label>
<label for="ID__number__loantype">Type de créance</label>
<?php $typesCreance = $wpdb->get_results( "SELECT * FROM cdf_Type_creance"); ?>
<select name="cocurrentloans[__number__][loantype]" id="ID__number__loantype" class="form-control" required>
<option value="">Veuillez faire un choix</option>
<?php foreach ($typesCreance as $typeCreance) : ?>
<option value="<?php echo $typeCreance->idtype_creance ?>"><?php echo $typeCreance->nom_creance ?></option>
<?php endforeach ?>
</select>
</div>
<div class="form-group col-md-3">
<label for="ID__number__cobankname">Nom de l'organisme / Banque</label>
<input name="cocurrentloans[__number__][bankname]" type="text" class="form-control"
id="ID__number__cobankname" required>
</div>
<div class="form-group col-md-3">
<label for="ID__number__coborrowedcapital">Capital emprunté</label>
<input name="cocurrentloans[__number__][borrowedcapital]" type="number" class="form-control"
id="ID__number__coborrowedcapital" min="0" step="0.01" required>
</div>
<div class="form-group col-md-3">
<label for="ID__number__codurationmonth">Durée du crédit (en mois)</label>
<input name="cocurrentloans[__number__][durationmonth]" type="number" class="form-control"
id="ID__number__codurationmonth" min="0" step="1" required>
</div>
<div class="form-group col-md-3"><label for="ID__number__comonthlypayment">Mensualité</label>
<input name="cocurrentloans[__number__][monthlypayment]" type="number" class="form-control"
id="ID__number__comonthlypayment" min="0" step="0.01" required>
</div>
<div class="form-group col-md-3">
<label for="ID__number__cofirstduedate">Date 1ère échéance</label>
<input name="cocurrentloans[__number__][firstduedate]" type="date" class="form-control"
id="ID__number__cofirstduedate" required>
</div>
<div class="form-group col-md-3">
<label for="ID__number__coremainingbalance">Solde restant dû (approximatif)</label>
<input name="cocurrentloans[__number__][remainingbalance]" type="number" class="form-control"
id="ID__number__coremainingbalance" min="0" step="0.01" required>
</div>
<div class="col-md-3 form-group">
<div class="col-form-label pr-3">À clôturer / Solder ?</div>
<div class="form-check form-check-inline">
<input name="cocurrentloans[__number__][hasclosed]" type="radio" class="form-check-input"
id="ID__number__1cohasclosed" value="0" checked="">
<label class="form-check-label" for="ID__number__1cohasclosed">Non</label>
</div>
<div class="form-check form-check-inline">
<input name="cocurrentloans[__number__][hasclosed]" type="radio" class="form-check-input"
id="ID__number__2cohasclosed" value="1">
<label class="form-check-label" for="ID__number__2cohasclosed">Oui</label>
</div>
</div>
<input type="hidden" class="wpcf-cocurrentloan--block--kuid" name="cocurrentloans[__number__][kuid]" value="">
</div>
</div>
<button class="btn btn-primary wpcf-cocurrentload--add">Ajouter un autre crédit</button>
<input type="hidden" name="delcocurrentloan">
</div>
</fieldset>
<?php endif; ?>
<button class="btn btn-primary mt-5" type="submit">Étape suivante</button>
</form>
</div>
</div>