Skip to content

Commit

Permalink
Replace HTML alert message by a javascript alert
Browse files Browse the repository at this point in the history
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
  • Loading branch information
rdwebdesign committed Dec 12, 2022
1 parent 187ff80 commit 8701392
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,27 @@
}
?>

<script>
<?php if (strlen($success) > 0) { ?>
<div id="alInfo" class="alert alert-info alert-dismissible fade in" role="alert">
<button type="button" class="close" data-hide="alert" aria-label="Close"><span aria-hidden="true">&times;</span>
</button>
<h4><i class="icon fa fa-info"></i> Info</h4>
<?php echo $success; ?>
</div>
$.notify({
icon: "fas fa-check-circle",
title: "<b>Success</b><br>",
message: "<?php echo $success; ?>"
}, {
type: "success"
});
<?php } ?>

<?php if (strlen($error) > 0) { ?>
<div id="alError" class="alert alert-danger alert-dismissible fade in" role="alert">
<button type="button" class="close" data-hide="alert" aria-label="Close"><span aria-hidden="true">&times;</span>
</button>
<h4><i class="icon fa fa-ban"></i> Error</h4>
<?php echo $error; ?>
</div>
$.notify({
icon: "fas fa-times-circle",
title: "<b>Error</b><br>",
message: "<?php echo $error; ?>"
}, {
type: "error"
});
<?php } ?>
</script>

<?php
if (isset($setupVars['PIHOLE_INTERFACE'])) {
Expand Down

0 comments on commit 8701392

Please sign in to comment.