Skip to content

Commit 7c88cea

Browse files
Merge pull request #4264 from IgorA100/patch-264676
Fix: Call "getBodyTopHTML" instead of the <body> tag (video, stats, controlcap, export, error, login, optionhelp, files, privacy, control, monitorpreset, frames, timeline, postlogin, cycle, bandwidth, plugin)
2 parents 4b0aa18 + e74e713 commit 7c88cea

17 files changed

+57
-59
lines changed

web/skins/classic/views/bandwidth.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@
3333
$focusWindow = true;
3434

3535
xhtmlHeaders(__FILE__, translate('Bandwidth'));
36+
getBodyTopHTML();
37+
echo getNavBarHTML();
3638
?>
37-
<body>
3839
<div id="page">
3940
<div id="header">
4041
<h2><?php echo translate('Bandwidth') ?></h2>
@@ -52,5 +53,4 @@
5253
</form>
5354
</div>
5455
</div>
55-
</body>
56-
</html>
56+
<?php xhtmlFooter() ?>

web/skins/classic/views/control.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@
5151
$focusWindow = true;
5252

5353
xhtmlHeaders(__FILE__, translate('Control'));
54+
getBodyTopHTML();
55+
echo getNavBarHTML();
5456
?>
55-
<body>
5657
<div id="page">
5758
<div id="header">
5859
<div id="headerButtons">
@@ -72,5 +73,4 @@
7273
</div>
7374
</div>
7475
</div>
75-
</body>
76-
</html>
76+
<?php xhtmlFooter() ?>

web/skins/classic/views/controlcap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@
145145
}
146146

147147
xhtmlHeaders(__FILE__, translate('ControlCap').' - '.$Control['Name']);
148+
getBodyTopHTML();
149+
echo getNavBarHTML();
148150
?>
149-
<body>
150-
<?php echo getNavBarHTML() ?>
151151
<div id="page" class="container-fluid">
152152
<div class="row flex-nowrap">
153153
<nav> <!-- BEGIN PILL LIST -->

web/skins/classic/views/cycle.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@
126126

127127
noCacheHeaders();
128128
xhtmlHeaders(__FILE__, translate('CycleWatch'));
129+
getBodyTopHTML();
130+
echo $navbar = getNavBarHTML();
129131
?>
130-
<body>
131132
<div id="page">
132-
<?php echo $navbar = getNavBarHTML(); ?>
133133
<div id="header">
134134
<div id="headerButtons">
135135
<?php if ( $options['mode'] == 'stream' ) { ?>

web/skins/classic/views/error.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
$focusWindow = true;
2222

2323
xhtmlHeaders(__FILE__, translate('Error') );
24+
getBodyTopHTML();
25+
echo getNavBarHTML();
2426
?>
25-
<body>
26-
<?php echo getNavBarHTML() ?>
2727
<div id="page">
2828
<div id="header">
2929
<h1>ZoneMinder <?php echo translate('Error') ?></h1>
@@ -37,5 +37,4 @@
3737
</p>
3838
</div>
3939
</div>
40-
</body>
41-
</html>
40+
<?php xhtmlFooter() ?>

web/skins/classic/views/export.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@
5959
$connkey = isset($_REQUEST['connkey']) ? validInt($_REQUEST['connkey']) : generateConnKey();
6060

6161
xhtmlHeaders(__FILE__, translate('Export'));
62+
getBodyTopHTML();
63+
echo getNavBarHTML();
6264
?>
63-
<body>
6465
<div id="page">
65-
<?php echo getNavBarHTML() ?>
6666
<div class="w-100 py-1">
6767
<div class="float-left pl-3">
6868
<button type="button" id="backBtn" class="btn btn-normal" data-toggle="tooltip" data-placement="top" title="<?php echo translate('Back') ?>" disabled><i class="fa fa-arrow-left"></i></button>

web/skins/classic/views/files.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ function guess_material_icon($file) {
6767
}
6868

6969
xhtmlHeaders(__FILE__, translate('Files'));
70+
getBodyTopHTML();
71+
echo getNavBarHTML();
7072
?>
71-
<body>
7273
<div id="page">
73-
<?php echo $navbar = getNavBarHTML(); ?>
7474
<div id="content">
7575
<form id="filesForm" name="filesForm" method="post" action="?view=files&path=<?php echo urlencode($path); ?>">
7676
<?php

web/skins/classic/views/frames.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
$Event = new ZM\Event($eid);
3131

3232
xhtmlHeaders(__FILE__, translate('Frames').' - '.$Event->Id());
33+
getBodyTopHTML();
34+
echo getNavBarHTML();
3335
?>
34-
<body>
35-
<?php echo getNavBarHTML() ?>
3636
<div id="page" class="container-fluid p-3">
3737
<!-- Toolbar button placement and styling handled by bootstrap-tables -->
3838
<div id="toolbar">

web/skins/classic/views/login.php

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
11
<?php
22
xhtmlHeaders(__FILE__, translate('Login'));
3+
getBodyTopHTML();
4+
echo getNavBarHTML();
35
?>
4-
<body>
5-
<?php echo getNavBarHTML(); ?>
6-
<div class="container">
6+
<div class="container">
77
<?php
88
if ( defined('ZM_OPT_USE_AUTH') and ZM_OPT_USE_AUTH ) {
99
?>
10-
<form class="center-block" name="loginForm" id="loginForm" method="post" action="?view=login">
11-
<input type="hidden" name="action" value="login"/>
10+
<form class="center-block" name="loginForm" id="loginForm" method="post" action="?view=login">
11+
<input type="hidden" name="action" value="login"/>
1212
<input type="hidden" name="postLoginQuery" value="<?php echo isset($_SESSION['postLoginQuery']) ? validHtmlStr($_SESSION['postLoginQuery']) : ''; ?>" />
1313

14-
<div id="loginError" class="hidden alarm" role="alert">
15-
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
16-
Invalid username or password.
17-
</div>
14+
<div id="loginError" class="hidden alarm" role="alert">
15+
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
16+
Invalid username or password.
17+
</div>
1818

19-
<div id="loginform">
19+
<div id="loginform">
2020

2121
<h1><i class="material-icons md-36">account_circle</i> <?php echo validHtmlStr(ZM_WEB_TITLE) . ' ' . translate('Login') ?></h1>
22-
23-
<label for="inputUsername" class="sr-only"><?php echo translate('Username') ?></label>
24-
<input type="text" id="inputUsername" name="username" class="form-control" autocapitalize="none" placeholder="Username" required autofocus autocomplete="username"/>
25-
26-
<label for="inputPassword" class="sr-only"><?php echo translate('Password') ?></label>
27-
<input type="password" id="inputPassword" name="password" class="form-control" placeholder="Password" required autocomplete="current-password"/>
22+
<label for="inputUsername" class="sr-only"><?php echo translate('Username') ?></label>
23+
<input type="text" id="inputUsername" name="username" class="form-control" autocapitalize="none" placeholder="Username" required autofocus autocomplete="username"/>
24+
25+
<label for="inputPassword" class="sr-only"><?php echo translate('Password') ?></label>
26+
<input type="password" id="inputPassword" name="password" class="form-control" placeholder="Password" required autocomplete="current-password"/>
2827
<?php
2928
if (
3029
defined('ZM_OPT_USE_GOOG_RECAPTCHA')
@@ -35,9 +34,9 @@
3534
echo '<div class="g-recaptcha" data-sitekey="'.ZM_OPT_GOOG_RECAPTCHA_SITEKEY.'"></div>
3635
<script src="https://www.google.com/recaptcha/api.js" async defer></script>';
3736
} ?>
38-
<button class="btn btn-lg btn-primary btn-block" type="submit"><?php echo translate('Login') ?></button>
39-
</div>
40-
</form>
37+
<button class="btn btn-lg btn-primary btn-block" type="submit"><?php echo translate('Login') ?></button>
38+
</div>
39+
</form>
4140
<?php
4241
} else {
4342
?>
@@ -52,5 +51,5 @@
5251
<?php
5352
} # end if ZM_OPT_AUTH
5453
?>
55-
</div>
54+
</div>
5655
<?php xhtmlFooter() ?>

web/skins/classic/views/monitorpreset.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
$focusWindow = true;
2828

2929
xhtmlHeaders(__FILE__, translate('MonitorPreset') );
30+
getBodyTopHTML();
31+
echo getNavBarHTML();
3032
?>
31-
<body>
32-
<?php echo getNavBarHTML() ?>
3333
<div id="page">
3434
<h2><?php echo translate('MonitorPreset') ?></h2>
3535
<div id="content">

0 commit comments

Comments
 (0)