1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 10:19:24 +02:00
Oinktube/plugin/YPTWallet/getWalletConfigurationHTML.php

37 lines
No EOL
1.5 KiB
PHP

<?php
$myWallet = YPTWallet::getWallet(User::getId());
?>
<div class="panel panel-default">
<div class="panel-heading"><?php echo __("Configurations"); ?></div>
<div class="panel-body">
<form id="form">
<div class="form-group">
<label for="CryptoWallet"><?php echo $walletDataObject->CryptoWalletName; ?>:</label>
<input type="text" class="form-control" name="CryptoWallet" value="<?php echo $myWallet->getCrypto_wallet_address(); ?>">
</div>
<button type="submit" class="btn btn-success"><i class="fas fa-save"></i> <?php echo __("Save"); ?></button>
</form>
</div>
</div>
<script>
$(document).ready(function () {
$("#form").submit(function (event) {
event.preventDefault();
modal.showPleaseWait();
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>plugin/YPTWallet/view/saveConfiguration.php',
data: $("#form").serialize(),
type: 'post',
success: function (response) {
if (!response.error) {
avideoAlert("<?php echo __("Congratulations!"); ?>", "<?php echo __("Configuration Saved"); ?>", "success");
} else {
avideoAlert("<?php echo __("Sorry!"); ?>", response.msg, "error");
}
modal.hidePleaseWait();
console.log(response);
}
});
});
});
</script>