Improve design of reports page

This commit is contained in:
Skylar Ittner 2018-01-29 00:00:51 -07:00
parent fc42984e4a
commit 96f7c31e88

View File

@ -1,5 +1,4 @@
<?php <?php
/* This Source Code Form is subject to the terms of the Mozilla Public /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@ -8,10 +7,12 @@ require_once __DIR__ . '/../required.php';
redirectifnotloggedin(); redirectifnotloggedin();
?> ?>
<div class="card border-brown">
<form action="lib/reports.php" method="GET" target="_BLANK"> <form action="lib/reports.php" method="GET" target="_BLANK">
<div class="card-body">
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-6"> <div class="col-12 col-sm-6">
<div class="form-group">
<label for="type"><?php lang("report type"); ?></label> <label for="type"><?php lang("report type"); ?></label>
<select name="type" class="form-control" required> <select name="type" class="form-control" required>
<option value="users"><?php lang("users") ?></option> <option value="users"><?php lang("users") ?></option>
@ -21,7 +22,10 @@ redirectifnotloggedin();
<option value="security"><?php lang("security log") ?></option> <option value="security"><?php lang("security log") ?></option>
</select> </select>
</div> </div>
<div class="col-xs-12 col-sm-6"> </div>
<div class="col-12 col-sm-6">
<div class="form-group">
<label for="type"><?php lang("format"); ?></label> <label for="type"><?php lang("format"); ?></label>
<select name="format" class="form-control" required> <select name="format" class="form-control" required>
<option value="csv"><?php lang("csv file") ?></option> <option value="csv"><?php lang("csv file") ?></option>
@ -30,12 +34,16 @@ redirectifnotloggedin();
</select> </select>
</div> </div>
</div> </div>
<br /> </div>
</div>
<?php <?php
$code = uniqid(rand(10000000,99999999), true); $code = uniqid(rand(10000000, 99999999), true);
$database2->insert('report_access_codes', ['code' => $code, 'expires' => date("Y-m-d H:i:s", strtotime("+5 minutes"))]); $database2->insert('report_access_codes', ['code' => $code, 'expires' => date("Y-m-d H:i:s", strtotime("+5 minutes"))]);
?> ?>
<input type="hidden" name="code" value="<?php echo $code; ?>" /> <input type="hidden" name="code" value="<?php echo $code; ?>" />
<button type="submit" class="btn btn-success" id="genrptbtn"><i class="fa fa-download"></i> <?php lang("generate report"); ?></button> <div class="card-footer d-flex">
</form> <button type="submit" class="btn btn-success ml-auto" id="genrptbtn"><i class="fas fa-download"></i> <?php lang("generate report"); ?></button>
</div>
</form>
</div>