Merge branch 'storageareas' of github.com:ConnorTechnology/ZoneMinder into storageareas

This commit is contained in:
Isaac Connor 2019-02-19 12:58:38 -05:00
commit 4fb43f5c5d
3 changed files with 18 additions and 29 deletions

View File

@ -19,18 +19,18 @@
//
if ( !canEdit('System') ) {
Warning("Need System permissions to update privacy");
Warning('Need System permissions to update privacy');
return;
}
if ( ($action == 'privacy') && isset($_REQUEST['option']) ) {
switch( $_REQUEST['option'] ) {
case 'decline' :
if ( ($action == 'privacy') && isset($_POST['option']) ) {
switch( $_POST['option'] ) {
case '0' :
dbQuery("UPDATE Config SET Value = '0' WHERE Name = 'ZM_SHOW_PRIVACY'");
dbQuery("UPDATE Config SET Value = '0' WHERE Name = 'ZM_TELEMETRY_DATA'");
$redirect = '?view=console';
break;
case 'accept' :
case '1' :
dbQuery("UPDATE Config SET Value = '0' WHERE Name = 'ZM_SHOW_PRIVACY'");
dbQuery("UPDATE Config SET Value = '1' WHERE Name = 'ZM_TELEMETRY_DATA'");
$redirect = '?view=console';

View File

@ -1,10 +0,0 @@
function submitForm( element ) {
var form = element.form;
if ( form.option.selectedIndex == 0 ) {
form.view.value = currentView;
} else {
form.view.value = 'none';
}
form.submit();
}

View File

@ -18,20 +18,19 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
if ( !canEdit( 'System' ) )
{
$view = "error";
return;
if ( !canEdit('System') ) {
$view = 'error';
return;
}
$options = array(
"accept" => translate('Accept'),
"decline" => translate('Decline'),
'1' => translate('Accept'),
'0' => translate('Decline'),
);
$focusWindow = true;
xhtmlHeaders(__FILE__, translate('Privacy') );
xhtmlHeaders(__FILE__, translate('Privacy'));
?>
<body>
<div id="page">
@ -41,31 +40,31 @@ xhtmlHeaders(__FILE__, translate('Privacy') );
</div>
<div id="content">
<form name="contentForm" id="contentForm" method="post" action="?">
<input type="hidden" name="view" value="none"/>
<input type="hidden" name="view" value="privacy"/>
<input type="hidden" name="action" value="privacy"/>
<h6><?php echo translate('PrivacyAbout') ?></h6>
<p><?php echo translate('PrivacyAboutText') ?></p>
<br>
<br/>
<h6><?php echo translate('PrivacyContact') ?></h6>
<p><?php echo translate('PrivacyContactText') ?></p>
<br>
<br/>
<h6><?php echo translate('PrivacyCookies') ?></h6>
<p><?php echo translate('PrivacyCookiesText') ?></p>
<br>
<br/>
<h6><?php echo translate('PrivacyTelemetry') ?></h6>
<p><?php echo translate('PrivacyTelemetryText') ?></p>
<br>
<br/>
<p><?php echo translate('PrivacyTelemetryList') ?></p>
<p><?php echo translate('PrivacyMonitorList') ?></p>
<p><?php echo translate('PrivacyConclusionText') ?></p>
<p><?php echo buildSelect( "option", $options ); ?></p>
<p><?php echo htmlSelect('option', $options, ZM_TELEMETRY_DATA); ?></p>
<div id="contentButtons">
<input type="submit" value="<?php echo translate('Apply') ?>" data-on-click-this="submitForm">
<button type="submit" value="Apply"><?php echo translate('Apply') ?></button>
</div>
</form>
</div>