make donate view a modal

pull/3019/head
Andrew Bauer 2020-08-24 09:31:21 -05:00
parent b5cdc5c32d
commit c6e3107a50
3 changed files with 38 additions and 28 deletions

View File

@ -425,4 +425,8 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
</div>
</div>
</form>
<?php xhtmlFooter() ?>
<?php
xhtmlFooter();
// Include Donate Modal
include('donate.php');
?>

View File

@ -33,32 +33,38 @@ $options = array(
'already' => translate('DonateAlready'),
);
$focusWindow = true;
xhtmlHeaders(__FILE__, translate('Donate'));
?>
<body>
<div id="page">
<div id="header">
<h2><?php echo translate('Donate') ?></h2>
<h1>ZoneMinder - <?php echo translate('Donate') ?></h1>
</div>
<div id="content">
<form name="contentForm" id="contentForm" method="post" action="?">
<input type="hidden" name="view" value="donate"/>
<input type="hidden" name="action" value="donate"/>
<p>
<?php echo translate('DonateEnticement') ?>
</p>
<p>
<?php echo buildSelect('option', $options); ?>
</p>
<div id="contentButtons">
<button type="submit"><?php echo translate('Apply') ?></button>
<button type="button" data-on-click="closeWindow"><?php echo translate('Close') ?></button>
</div>
</form>
<!-- Donate Modal -->
<div class="modal fade" id="donate" data-backdrop="static" data-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="donateLabel">ZoneMinder - <?php echo translate('Donate') ?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form name="contentForm" id="contentForm" method="post" action="?">
<input type="hidden" name="view" value="donate"/>
<input type="hidden" name="action" value="donate"/>
<p>
<?php echo translate('DonateEnticement') ?>
</p>
<p>
<?php echo buildSelect('option', $options); ?>
</p>
<div id="contentButtons">
<button type="submit"><?php echo translate('Apply') ?></button>
<button type="button" data-on-click="closeWindow"><?php echo translate('Close') ?></button>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Understood</button>
</div>
</div>
</div>
</body>
</html>
</div>

View File

@ -140,7 +140,7 @@ function initPage() {
createPopup('?view=version', 'zmVersion', 'version');
}
if ( showDonatePopup ) {
createPopup('?view=donate', 'zmDonate', 'donate');
$j('#donate').modal('show');
}
// Makes table sortable