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

+3-3
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

+3-3
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

+2-2
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

+2-2
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

+3-4
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

+2-2
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

+2-2
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

+2-2
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

+19-20
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

+2-2
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">

web/skins/classic/views/optionhelp.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@
3131
$focusWindow = true;
3232

3333
xhtmlHeaders(__FILE__, translate('OptionHelp'));
34+
getBodyTopHTML();
35+
echo getNavBarHTML();
3436
?>
35-
<body>
3637
<div id="page">
3738
<div id="header">
3839
<div id="headerButtons">
@@ -45,5 +46,4 @@
4546
<p class="textblock"><?php echo $optionHelpText ?></p>
4647
</div>
4748
</div>
48-
</body>
49-
</html>
49+
<?php xhtmlFooter() ?>

web/skins/classic/views/plugin.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,10 @@ function pLang($name)
9797
return $name;
9898
}
9999

100-
100+
xhtmlHeaders(__FILE__, translate('Plugin'));
101+
getBodyTopHTML();
102+
echo getNavBarHTML();
101103
?>
102-
<body>
103104
<div id="page">
104105
<div id="header">
105106
<h2><?php echo translate('Monitor') ?> <?php echo $monitor->Name() ?> - <?php echo translate('Zone') ?> <?php echo $newZone['Name'] ?> - <?php echo translate('Plugin') ?> <?php echo validHtmlStr($plugin) ?></h2>
@@ -161,5 +162,4 @@ function pLang($name)
161162
</form>
162163
</div>
163164
</div>
164-
</body>
165-
</html>
165+
<?php xhtmlFooter() ?>

web/skins/classic/views/postlogin.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
//
2020

2121
xhtmlHeaders(__FILE__, translate('LoggingIn'));
22+
getBodyTopHTML();
23+
echo getNavBarHTML();
2224
?>
23-
<body>
2425
<div id="page">
2526
<div id="header">
2627
<h1><?php echo validHtmlStr(ZM_WEB_TITLE) . ' ' . translate('Login') ?></h1>

web/skins/classic/views/privacy.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@
3131
$focusWindow = true;
3232

3333
xhtmlHeaders(__FILE__, translate('Privacy'));
34+
getBodyTopHTML();
35+
echo getNavBarHTML();
3436
?>
35-
<body>
3637
<div id="page">
3738
<div id="header">
3839
<h2><?php echo translate('Privacy') ?></h2>

web/skins/classic/views/stats.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
$focusWindow = true;
3030

3131
xhtmlHeaders(__FILE__, translate('Stats').' - '.$eid.' - '.$fid);
32+
getBodyTopHTML();
33+
echo getNavBarHTML();
3234
?>
33-
<body>
34-
<?php echo getNavBarHTML() ?>
3535
<div id="page">
3636
<!-- Toolbar button placement and styling handled by bootstrap-tables -->
3737
<div id="toolbar">
@@ -48,6 +48,4 @@
4848
</form>
4949
</div>
5050
</div>
51-
</body>
52-
</html>
5351
<?php xhtmlFooter() ?>

web/skins/classic/views/timeline.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -673,9 +673,9 @@ function drawYGrid( $chart, $scale, $labelClass, $tickClass, $gridClass ) {
673673
$focusWindow = true;
674674

675675
xhtmlHeaders(__FILE__, translate('Timeline'));
676+
getBodyTopHTML();
677+
echo getNavBarHTML();
676678
?>
677-
<body>
678-
<?php echo getNavBarHTML() ?>
679679
<div id="page p-0">
680680
<div class="d-flex p-1">
681681
<div class="mr-auto" id="toolbar" >

web/skins/classic/views/video.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@
107107
$focusWindow = true;
108108

109109
xhtmlHeaders(__FILE__, translate('Video'));
110+
getBodyTopHTML();
111+
echo getNavBarHTML();
110112
?>
111-
<body>
112-
<?php echo getNavBarHTML() ?>
113113
<div id="page">
114114
<div class="w-100 py-1">
115115
<div class="float-left pl-3">

0 commit comments

Comments
 (0)