+ Fix bug

This commit is contained in:
DJERY-TOM 2020-05-04 14:59:07 +01:00
parent 3bf4d43457
commit fa58820bef
3 changed files with 36 additions and 29 deletions

View File

@ -465,7 +465,7 @@ if ($transactions != false) {
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="password" class="col-form-label"><?php echo $this->lang->line('mot de passe') ?></label> <label for="password" class="col-form-label"><?php echo $this->lang->line('mot de passe') ?></label>
<input type="password" min="1" required class="form-control" name="password" id="password"> <input type="password" required class="form-control" name="password" id="password">
</div> </div>
<div class="clearfix"> <div class="clearfix">
<a href="#" id="resetPassword" class="pull-right forgot-password" data-wallet_password_id="<?php echo $walletPassword->id ?>" data-network="<?php echo $network ?>" data-country="<?php echo $country ?>" <a href="#" id="resetPassword" class="pull-right forgot-password" data-wallet_password_id="<?php echo $walletPassword->id ?>" data-network="<?php echo $network ?>" data-country="<?php echo $country ?>"
@ -529,7 +529,7 @@ if ($transactions != false) {
<script> <script>
$(function () { $(function () {
$('#example1').DataTable(); $('#example1').DataTable();
anElement = new AutoNumeric('#montant', '', {aSep: ' ', decimalPlaces:'0', vMax: '99999999999999999999999999'}); anElement = new AutoNumeric('#montant', '', {digitGroupSeparator: ' ', decimalPlaces:'0', maximumValue: '99999999999999999999999999'});
// $('#example1').DataTable({ // $('#example1').DataTable({
// "aLengthMenu": [[5, 10, 15, -1], [5, 10, 5, "All"]], // "aLengthMenu": [[5, 10, 15, -1], [5, 10, 5, "All"]],
// "iDisplayLength": 5 // "iDisplayLength": 5
@ -607,13 +607,13 @@ if ($transactions != false) {
var sommeDepot = taux_ag_d + taux_sup_d + taux_bq_d; var sommeDepot = taux_ag_d + taux_sup_d + taux_bq_d;
if((taux_ag_r + taux_sup_r) > 100){ if((taux_ag_r + taux_sup_r) > 100){
toastr.error('<?php echo $this->lang->line('first_rule')?>', '<?php echo $this->lang->line('management_rule')?>'); toastr.error("<?php echo $this->lang->line('first_rule')?>", "<?php echo $this->lang->line('management_rule')?>");
}else if((taux_ag_d + taux_sup_d) > 100){ }else if((taux_ag_d + taux_sup_d) > 100){
toastr.error('<?php echo $this->lang->line('second_rule')?>', '<?php echo $this->lang->line('management_rule')?>'); toastr.error("<?php echo $this->lang->line('second_rule')?>", "<?php echo $this->lang->line('management_rule')?>");
}else if(sommeRetrait >= taux_client_r){ }else if(sommeRetrait >= taux_client_r){
toastr.error('<?php echo $this->lang->line('third_rule')?>', '<?php echo $this->lang->line('management_rule')?>') toastr.error("<?php echo $this->lang->line('third_rule')?>", "<?php echo $this->lang->line('management_rule')?>")
}else if(sommeDepot >= 100){ }else if(sommeDepot >= 100){
toastr.error('<?php echo $this->lang->line('fourth_rule')?>', '<?php echo $this->lang->line('management_rule')?>'); toastr.error("<?php echo $this->lang->line('fourth_rule')?>", "<?php echo $this->lang->line('management_rule')?>");
}else{ }else{
$.ajax({ $.ajax({
url: '<?php echo base_url('index.php/Gestion/config_wallet/update')?>', url: '<?php echo base_url('index.php/Gestion/config_wallet/update')?>',
@ -635,20 +635,21 @@ if ($transactions != false) {
if(data=='200'){ if(data=='200'){
Swal.fire({ Swal.fire({
icon: 'success', icon: 'success',
title: '<?php echo $this->lang->line('wallet_update')?>', title: "<?php echo $this->lang->line('wallet_update')?>",
text:'<?php echo $this->lang->line('informations_updated')?>', text:"<?php echo $this->lang->line('informations_updated')?>",
timer: 3000 timer: 3000
}).then(()=>{ }).then(()=>{
location.reload(); location.reload();
}); });
// alert("Les informations ont été mises à jour.") ? "" : // alert("Les informations ont été mises à jour.") ? "" :
}else{ }else{
toastr.error("<?php echo $this->lang->line('error_message')?>" , '<?php echo $this->lang->line('request_error')?>'); toastr.error("<?php echo $this->lang->line('error_message')?>" , "<?php echo $this->lang->line('request_error')?>");
} }
}, },
error: function (resultat, statut, error) { error: function (resultat, statut, error) {
console.log(resultat + " " + error); console.log(resultat + " " + error);
toastr.error("<?php echo $this->lang->line('error_message')?>" , "<?php echo $this->lang->line('request_error')?>");
} }
}); });
} }
@ -678,20 +679,22 @@ if ($transactions != false) {
if(data=='200'){ if(data=='200'){
Swal.fire({ Swal.fire({
icon: 'success', icon: 'success',
title: '<?php echo $this->lang->line('password_has_been_reset')?>', title: "<?php echo $this->lang->line('password_has_been_reset')?>",
text:'<?php echo $this->lang->line('informations_updated')?>', text:"<?php echo $this->lang->line('informations_updated')?>",
timer: 3000 timer: 3000
}).then(()=>{ }).then(()=>{
location.reload(); location.reload();
}); });
// alert("Les informations ont été mises à jour.") ? "" : // alert("Les informations ont été mises à jour.") ? "" :
}else{ }else{
toastr.error("<?php echo $this->lang->line('error_message')?>" , '<?php echo $this->lang->line('request_error')?>'); toastr.error("<?php echo $this->lang->line('error_message')?>" , "<?php echo $this->lang->line('request_error')?>");
} }
}, },
error: function (resultat, statut, error) { error: function (resultat, statut, error) {
console.log(resultat + " " + error); console.log(resultat + " " + error);
toastr.error("<?php echo $this->lang->line('error_message')?>" , "<?php echo $this->lang->line('request_error')?>");
} }
}); });
}); });
@ -721,22 +724,23 @@ if ($transactions != false) {
if(data=='200'){ if(data=='200'){
Swal.fire({ Swal.fire({
icon: 'success', icon: 'success',
title: '<?php echo $this->lang->line('account_recharged')?>', title: "<?php echo $this->lang->line('account_recharged')?>",
text:'<?php echo $this->lang->line('informations_updated')?>', text: "<?php echo $this->lang->line('informations_updated')?>",
timer: 3000 timer: 3000
}).then(()=>{ }).then(()=>{
location.reload(); location.reload();
}); });
// alert("Les informations ont été mises à jour.") ? "" : // alert("Les informations ont été mises à jour.") ? "" :
}else if(data == '400'){ }else if(data == '400'){
toastr.error('<?php echo $this->lang->line('incorrect_password')?>' , '<?php echo $this->lang->line('request_error')?>'); toastr.error("<?php echo $this->lang->line('error_message')?>" , "<?php echo $this->lang->line('request_error')?>");
}else{ }else{
toastr.error("<?php echo $this->lang->line('error_message')?>" , '<?php echo $this->lang->line('request_error')?>'); toastr.error("<?php echo $this->lang->line('error_message')?>" , "<?php echo $this->lang->line('request_error')?>");
} }
}, },
error: function (resultat, statut, error) { error: function (resultat, statut, error) {
console.log(resultat + " " + error); console.log(resultat + " " + error);
toastr.error("<?php echo $this->lang->line('error_message')?>" , "<?php echo $this->lang->line('request_error')?>");
} }
}); });

View File

@ -245,13 +245,13 @@
var sommeDepot = taux_ag_d + taux_sup_d + taux_bq_d ; var sommeDepot = taux_ag_d + taux_sup_d + taux_bq_d ;
if((taux_ag_r + taux_sup_r) > 100){ if((taux_ag_r + taux_sup_r) > 100){
toastr.error('<?php echo $this->lang->line('first_rule')?>', '<?php echo $this->lang->line('management_rule')?>'); toastr.error("<?php echo $this->lang->line('first_rule')?>", "<?php echo $this->lang->line('management_rule')?>");
}else if((taux_ag_d + taux_sup_d) > 100){ }else if((taux_ag_d + taux_sup_d) > 100){
toastr.error('<?php echo $this->lang->line('second_rule')?>', '<?php echo $this->lang->line('management_rule')?>'); toastr.error("<?php echo $this->lang->line('second_rule')?>", "<?php echo $this->lang->line('management_rule')?>");
}else if(sommeRetrait >= taux_client_r){ }else if(sommeRetrait >= taux_client_r){
toastr.error('<?php echo $this->lang->line('third_rule')?>', '<?php echo $this->lang->line('management_rule')?>') toastr.error("<?php echo $this->lang->line('third_rule')?>", "<?php echo $this->lang->line('management_rule')?>")
}else if(sommeDepot >= 100){ }else if(sommeDepot >= 100){
toastr.error('<?php echo $this->lang->line('fourth_rule')?>', '<?php echo $this->lang->line('management_rule')?>'); toastr.error("<?php echo $this->lang->line('fourth_rule')?>", "<?php echo $this->lang->line('management_rule')?>");
}else{ }else{
$.ajax({ $.ajax({
url : '<?php echo base_url('index.php/Gestion/config_wallet/create')?>', url : '<?php echo base_url('index.php/Gestion/config_wallet/create')?>',
@ -264,19 +264,20 @@
Swal.fire({ Swal.fire({
icon: 'success', icon: 'success',
title: '<?php echo $this->lang->line('wallet_created')?>', title: "<?php echo $this->lang->line('wallet_created')?>",
text:'<?php echo $this->lang->line('informations_updated')?>', text: "<?php echo $this->lang->line('informations_updated')?>",
timer: 3000 timer: 3000
}).then(()=>{ }).then(()=>{
location.reload(); location.reload();
}); });
// alert("Les informations ont été mises à jour.") ? "" : // alert("Les informations ont été mises à jour.") ? "" :
}else{ }else{
toastr.error("<?php echo $this->lang->line('error_message')?>" , '<?php echo $this->lang->line('request_error')?>'); toastr.error("<?php echo $this->lang->line('error_message')?>" , "<?php echo $this->lang->line('request_error')?>");
} }
}, },
error : function(resultat, statut, error){ error : function(resultat, statut, error){
console.log(resultat+" "+error ); console.log(resultat+" "+error );
toastr.error("<?php echo $this->lang->line('error_message')?>" , "<?php echo $this->lang->line('request_error')?>");
} }
}).done(function () { }).done(function () {
$.ajax({ $.ajax({
@ -311,20 +312,21 @@
Swal.fire({ Swal.fire({
icon: 'success', icon: 'success',
title: '<?php echo $this->lang->line('wallet_deleted')?>', title: "<?php echo $this->lang->line('wallet_deleted')?>",
text:'<?php echo $this->lang->line('informations_updated')?>', text: "<?php echo $this->lang->line('informations_updated')?>",
timer: 3000 timer: 3000
}).then(()=>{ }).then(()=>{
location.reload(); location.reload();
}); });
// alert("Les informations ont été mises à jour.") ? "" : location.reload(); // alert("Les informations ont été mises à jour.") ? "" : location.reload();
}else{ }else{
toastr.error("<?php echo $this->lang->line('error_message')?>" , '<?php echo $this->lang->line('request_error')?>'); toastr.error("<?php echo $this->lang->line('error_message')?>" , "<?php echo $this->lang->line('request_error')?>");
} }
}, },
error : function(resultat, statut, erreur){ error : function(resultat, statut, erreur){
console.log(resultat+" "+erreur); console.log(resultat+" "+erreur);
toastr.error("<?php echo $this->lang->line('error_message')?>" , "<?php echo $this->lang->line('request_error')?>");
} }
}); });

View File

@ -193,19 +193,20 @@
if(data=='200'){ if(data=='200'){
Swal.fire({ Swal.fire({
icon: 'success', icon: 'success',
title: '<?php echo $this->lang->line('password_generated')?>', title: "<?php echo $this->lang->line('password_generated')?>",
text:'<?php echo $this->lang->line('informations_updated')?>', text:"<?php echo $this->lang->line('informations_updated')?>",
timer: 3000 timer: 3000
}).then(()=>{ }).then(()=>{
location.reload(); location.reload();
}); });
}else{ }else{
toastr.error("<?php echo $this->lang->line('error_message')?>" , '<?php echo $this->lang->line('request_error')?>'); toastr.error("<?php echo $this->lang->line('error_message')?>" , "<?php echo $this->lang->line('request_error')?>");
} }
}, },
error : function(resultat, statut, error){ error : function(resultat, statut, error){
console.log(resultat+" "+error ); console.log(resultat+" "+error );
toastr.error("<?php echo $this->lang->line('error_message')?>" , "<?php echo $this->lang->line('request_error')?>");
} }
}); });