106 lines
3.5 KiB
XML
106 lines
3.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
|
<xsl:output method="html" encoding="utf-8" indent="yes"/>
|
|
|
|
<!-- Parameters -->
|
|
|
|
<xsl:param name="VERSION">1.0</xsl:param>
|
|
<xsl:param name="PAGE-TITLE">Add Report</xsl:param>
|
|
<xsl:param name="PAGE-NAME">addReport</xsl:param>
|
|
|
|
<xsl:template match="/">
|
|
|
|
<script src="js/{$PAGE-NAME}.js?version={$VERSION}"/>
|
|
|
|
<div class="{$PAGE-NAME}">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-header bg-primary text-white p-1 ps-3 border-bottom-0">
|
|
<i class="bi bi-printer me-2"/>
|
|
<xsl:value-of select="$PAGE-TITLE"/>
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<form action="" name="{$PAGE-NAME}" method="post" id="{$PAGE-NAME}">
|
|
|
|
<input type="hidden" name="action" value="Reports.addReport"/>
|
|
<input type="hidden" name="step" value="add"/>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-4 mb-3">
|
|
<label class="form-label" for="report_name">Name</label>
|
|
<input type="text" class="form-control form-control-sm" name="report_name" id="report_name" maxlength="100" autocomplete="off" autofocus="autofocus"/>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-4 mb-3">
|
|
<label class="form-label" for="report_class">Class</label>
|
|
<input type="text" class="form-control form-control-sm" name="report_class" id="report_class" maxlength="100" autocomplete="off"/>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-4 mb-3">
|
|
<label class="form-label" for="report_type">Type</label>
|
|
<select class="form-select form-select-sm" name="report_type" id="report_type" size="1">
|
|
<xsl:apply-templates select="//Constants/ReportTypes"/>
|
|
</select>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-8 mb-3">
|
|
<label class="form-label" for="report_description">Description</label>
|
|
<input type="text" class="form-control form-control-sm" name="report_description" id="report_description" maxlength="100" autocomplete="off"/>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-8 mb-3">
|
|
<label class="form-label" for="report_target">Target</label>
|
|
<input type="text" class="form-control form-control-sm" name="report_target" id="report_target" maxlength="50" autocomplete="off"/>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<div class="buttons mt-2 mb-2">
|
|
<button type="button" class="btn btn-sm btn-primary me-2 btnCancel"><i class="bi bi-box-arrow-left me-2"/>Cancel</button>
|
|
<button type="button" class="btn btn-sm btn-primary me-2 btnSave"><i class="bi bi-save me-2"/>Save</button>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</xsl:template>
|
|
|
|
<!-- Template for Type dropdown -->
|
|
|
|
<xsl:template match="Constants/ReportTypes">
|
|
<xsl:for-each select="ReportType">
|
|
<xsl:sort select="."/>
|
|
<option value="{.}">
|
|
<xsl:value-of select="." />
|
|
</option>
|
|
</xsl:for-each>
|
|
</xsl:template>
|
|
|
|
</xsl:stylesheet>
|