You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
238 lines
13 KiB
238 lines
13 KiB
<div class="container pa-0 mon-details-view mt-4">
|
|
<div class="row border pt-3 pb-3">
|
|
<div class="col-lg-6 col-md-6">
|
|
<button type="button" id="general_info_tab" class="btn btn-profile-tab active-tab btn-primary btn-lg">Mes informations</button>
|
|
<button type="button" id="payment_status_tab" class="btn btn-profile-tab btn-primary btn-lg">Mon abonnement</button>
|
|
</div>
|
|
</div>
|
|
<!-- Edit General Information Form -->
|
|
<form role="form" id="edit_registration_details" method="post" action="">
|
|
<div class="row no-border-bottom bg-form-grey">
|
|
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 text-right mt-3 mb-3 mr-3 mb-4">
|
|
<button type="button" class="btn" id="edit-mode" data-toggle="tooltip" data-placement="top" title="Enable edit mode">
|
|
<span class="mr-1 font-weight-bold mon-primary" id="edit_text">Modifier</span>
|
|
<i class="fas fa-user-edit mon-primary btn-edit-icon"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="row no-border-top bg-form-grey pb-4 pl-3" id="general_info_block">
|
|
<div class="col-lg-6 col-md-6 border-dash">
|
|
<h5 class="mon-title text-dark mon-text-inherit mb-1">Identifiant</h5>
|
|
<div class="form-group mt-3">
|
|
<label for="email_address" class="form-label w-100 mt-2">
|
|
<div class="mon-form-label"> Adresse de courriel <span class="text-danger">*</span></div>
|
|
<input type="email" class="form-control" disabled name="email_address" value="<?=$account_info->email_address?>" id="email_address" required/>
|
|
<span class="error" id="error_email_address"></span>
|
|
</label>
|
|
<label for="password" class="form-label w-100 mt-2">
|
|
<div class="mon-form-label"> Mot de passe <span class="text-danger">*</span></div>
|
|
<input type="password" class="form-control" disabled name="password" value="" id="password"/>
|
|
<span class="error" id="error_password"></span>
|
|
</label>
|
|
<label for="confirm_password" class="form-label w-100 mt-2">
|
|
<div class="mon-form-label"> Confirmation du mot de passe <span class="text-danger">*</span></div>
|
|
<input type="password" class="form-control" disabled name="confirm_password" value="" id="confirm_password"/>
|
|
<span class="error" id="error_confirm_password"></span>
|
|
</label>
|
|
</div>
|
|
|
|
<h5 class="mon-title text-dark mon-text-inherit mt-3">Informations générales</h5>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="civil_status" class="form-label w-100 mt-2">
|
|
<div class="mon-form-label">Civilité <span class="text-danger">*</span></div>
|
|
<select class="form-control" name="civil_status" id="civil_status" disabled required>
|
|
<option value="">Veuillez sélectionner</option>
|
|
<option value="Mme">Mme</option>
|
|
<option value="Mlle">Mlle</option>
|
|
<option value="M.">M.</option>
|
|
</select>
|
|
<span class="error" id="error_civil_status"></span>
|
|
<div class="mon-lh-16">
|
|
<small>Le contenu de ce champ sera maintenu privé et ne sera jamais affiché publiquement.</small>
|
|
</div>
|
|
</label>
|
|
|
|
<label for="profession" class="form-label w-100 mt-2">
|
|
<div class="mon-form-label"> Profession</div>
|
|
<input type="text" class="form-control" disabled name="profession" value="<?=$account_info->profession?>" id="profession"/>
|
|
<div class="mon-lh-16">
|
|
<small>Le contenu de ce champ sera maintenu privé et ne sera jamais affiché publiquement.</small>
|
|
</div>
|
|
</label>
|
|
|
|
<label for="company" class="form-label w-100 mt-2">
|
|
<div class="mon-form-label">Société</div>
|
|
<input type="text" class="form-control" disabled name="company" id="company" value="<?=$account_info->company?>"/>
|
|
</label>
|
|
|
|
<label for="birthday" class="form-label w-100 mt-2">
|
|
<div class="mon-form-label">Date de naissance</div>
|
|
<input type="date" class="form-control" disabled name="birthday" id="birthday" value="<?=$account_info->birthday?>"/>
|
|
</label>
|
|
|
|
<label for="news_subscription" class="form-label w-100 mt-2">
|
|
<div class="mon-form-label">Êtes-vous abonné(e) au quotidien Company For Madagascar ? <span class="text-danger">*</span></div>
|
|
<select name="news_subscription" id="news_subscription" class="form-control" disabled required>
|
|
<option value="">Veuillez sélectionner</option>
|
|
<option value="1">Oui</option>
|
|
<option value="0">Non</option>
|
|
</select>
|
|
<span class="error" id="error_news_subscription"></span>
|
|
<div class="mon-lh-16">
|
|
<small>Le contenu de ce champ sera maintenu privé et ne sera jamais affiché publiquement.</small>
|
|
</div>
|
|
</label>
|
|
|
|
<label for="sponsorship" class="form-label w-100 mt-2">
|
|
<div class="mon-form-label">Parrainage <span class="text-danger">*</span></div>
|
|
<select name="sponsorship" id="sponsorship" class="form-control" value="<?=$account_info->sponsorship?>" disabled required>
|
|
<option value="">Veuillez sélectionner</option>
|
|
<option value="Aucun">Aucun</option>
|
|
<option value="ACEF">ACEF</option>
|
|
</select>
|
|
<span class="error" id="error_sponsorship"></span>
|
|
</label>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-lg-6 col-md-6 pl-5">
|
|
<h5 class="mon-title text-dark mon-text-inherit mb-1">Informations personnelles</h5>
|
|
<div class="mon-sub-text mb-3">Saisissez votre adresse et vos informations de facturation ici.</div>
|
|
<label for="firstname" class="form-label w-100 mt-2">
|
|
<div class="mon-form-label">Prénom <span class="text-danger">*</span></div>
|
|
<input type="text" class="form-control" name="firstname" disabled id="firstname" required value="<?=$account_info->first_name?>"/>
|
|
<span class="error" id="error_firstname"></span>
|
|
</label>
|
|
|
|
<label for="lastname" class="form-label w-100 mt-2">
|
|
<div class="mon-form-label">Nom <span class="text-danger">*</span></div>
|
|
<input type="text" class="form-control" name="lastname" disabled id="lastname" required value="<?=$account_info->last_name?>"/>
|
|
<span class="error" id="error_lastname"></span>
|
|
</label>
|
|
|
|
<label for="address" class="form-label w-100 mt-2">
|
|
<div class="mon-form-label">Adresse <span class="text-danger">*</span></div>
|
|
<input type="text" class="form-control" name="address" disabled id="address" required value="<?=$account_info->address?>"/>
|
|
<span class="error" id="error_address"></span>
|
|
</label>
|
|
|
|
<label for="city" class="form-label w-100 mt-2">
|
|
<div class="mon-form-label">Ville <span class="text-danger">*</span></div>
|
|
<input type="text" class="form-control" name="city" disabled id="city" required value="<?=$account_info->city?>"/>
|
|
<span class="error" id="error_city"></span>
|
|
</label>
|
|
|
|
<label for="country" class="form-label w-100 mt-2">
|
|
<div class="mon-form-label">Pays <span class="text-danger">*</span></div>
|
|
<select name="country" class="form-control" id="country" disabled required>
|
|
<option value="">Veuillez sélectionner</option>
|
|
<?php foreach($countries as $country) {
|
|
if($country == 'France') {
|
|
echo '<option selected value="'.$country.'">'.$country.'</option>';
|
|
} else {
|
|
echo '<option value="'.$country.'">'.$country.'</option>';
|
|
}
|
|
}?>
|
|
</select>
|
|
<span class="error" id="error_country"></span>
|
|
</label>
|
|
|
|
<label for="postal_code" class="form-label w-100 mt-2">
|
|
<div class="mon-form-label">Code Postal <span class="text-danger">*</span></div>
|
|
<input type="text" class="form-control" name="postal_code" disabled id="postal_code" required value="<?=$account_info->postal_code?>"/>
|
|
<span class="error" id="error_postal_code"></span>
|
|
</label>
|
|
|
|
<label for="postal_number" class="form-label w-100 mt-2 mb-4">
|
|
<div class="mon-form-label">Numéro de téléphone<span class="text-danger">*</span></div>
|
|
<input type="text" class="form-control" disabled name="phone_number" id="phone_number" required value="<?=$account_info->phone?>"/>
|
|
<span class="error" id="error_phone_number"></span>
|
|
</label>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Edit Payment Status Form -->
|
|
<div class="row no-border-top bg-form-grey pb-4 pl-3 pr-3 d-none" id="payment_status_block">
|
|
<div class="col-lg-6 col-md-6">
|
|
<h5 class="mon-title text-dark mon-text-inherit mb-3">Abonnement en cours</h5>
|
|
<div class="form-group">
|
|
<div class="overlay-disabled"></div>
|
|
<label for="adhesion_type" class="form-label w-100 mt-2">
|
|
<div class="mon-form-label">Type d'adhésion</div>
|
|
<select name="adhesion_type" id="adhesion_type" class="form-control excluded" disabled required>
|
|
<?php foreach($user_roles as $role) {
|
|
// echo '<option value="'.$role['price_id'].'">'.$role['name'].'</option>';
|
|
if(lcfirst($role['name']) === 'regular') {
|
|
echo '<option value="'.$role['price_id'].'">'.'Adhésion de soutien ('.$role['price'].'MGA)'.'</option>';
|
|
} elseif (lcfirst($role['name']) === 'shareholder') {
|
|
echo '<option value="'.$role['price_id'].'">'.'Adhésion préférentielle actionnaire ('.$role['price'].'MGA)'.'</option>';
|
|
} elseif (lcfirst($role['name']) === 'sponsored') {
|
|
echo '<option value="'.$role['price_id'].'">'.'Adhésion parrainée ('.$role['price'].'MGA)'.'</option>';
|
|
} else {
|
|
echo '<option value="'.$role['price_id'].'">'.'Adhésion étudiant ('.$role['price'].'MGA)'.'</option>';
|
|
}
|
|
}?>
|
|
</select>
|
|
</label>
|
|
<label for="start_date" class="form-label w-100 mt-2">
|
|
<div class="mon-form-label">Date de début</div>
|
|
<input type="date" class="form-control excluded" disabled name="start_date" id="start_date" value="<?=isset($subscription)?$subscription->transactionDateTime:''?>"/>
|
|
</label>
|
|
<label for="end_date" class="form-label w-100 mt-2">
|
|
<div class="mon-form-label">Date de fin</div>
|
|
<input type="date" class="form-control excluded" disabled name="end_date" id="end_date" value="<?=isset($subscription)?$subscription->expirationDate:''?>"/>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-12 col-md-12 col-xs-12 border bg-white mt-4">
|
|
<div class="pl-3 pr-3">
|
|
<h5 class="mon-title text-dark mon-text-inherit mb-4 mt-5">Mode de paiement</h5>
|
|
<p class="mb-4"><?=isset($subscription) && $subscription->payment_mode=='card'? 'Carte Bancaire':'Chèque'?></p>
|
|
<div class="font-weight-medium text-dark mb-2">Montant annuel de l'inscription</div>
|
|
<table class="mb-4">
|
|
<tr class="font-weight-medium text-dark">
|
|
<td>Montant total</td>
|
|
<td class="pl-4">MGA <?=isset($subscription)?$subscription->amount:''?></td>
|
|
</tr>
|
|
</table>
|
|
<button type="button" class="btn btn-outline btn-sm rounded-0 mt-4 mb-5 pr-5 pl-5 pt-2 pb-2">Renouveler pour un an</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row mb-4 mt-4">
|
|
<input type="hidden" name="user_id" value="<?=$account_info->user_id?>">
|
|
<input type="hidden" name="subscriber_id" value="<?=$account_info->subscriber_id?>">
|
|
<input type="hidden" name="subscription_id" value="<?=isset($subscription)?$subscription->id:''?>">
|
|
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>" value="<?php echo $this->security->get_csrf_hash();?>">
|
|
<div class="mon-details-action">
|
|
<button type="reset" class="form-control btn-outline rounded-0" id="edit_reset_registration">ANNULER</button>
|
|
<button type="submit" class="form-control btn-outline rounded-0" disabled id="submit_edit_registration">METTRE À JOUR</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div aria-live="polite" aria-atomic="true" class="custom-toast">
|
|
<div class="toast" data-autohide="false">
|
|
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
|
Modifications enregistrées avec succès
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php
|
|
if(isset($account_info)){
|
|
echo "<script> var userDetails = ". json_encode($account_info). "</script>";
|
|
}
|
|
if(isset($subscription)){
|
|
echo "<script> var subscription = ". json_encode($subscription). "</script>";
|
|
}
|
|
?>
|