Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
1.8 kB
2
Indexable
Never
<!doctype html>
<html lang="en">

<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">


    {% load static %}
    {% load humanize %}
</head>

<body>
    <header class="navbar navbar-expand-lg navbar-light bg-primary">
        <div class="container-fluid">
            <a class="navbar-brand" href="#">
                <img src="{% static 'assets/images/unicef.png' %}" alt="Logo" class="rounded" height="60">
            </a>
        </div>
    </header>
    <div class="container mt-2">
        <div class="row">
            <div class="d-flex align-items-center">
                <input type="text" name="" id="gaugevalue" class="form-control m-1">
                <input type="button" value="T&eacute;l&eacute;charger pdf" class="btn btn-primary"
                    onclick="downloadPdf()">
            </div>
        </div>
    </div>
    


    <!-- Include Plotly.js library -->
    <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
        crossorigin="anonymous"></script>
</body>
<script>
    downloadPdf = () => {
        var gaugevaluetext = document.getElementById("gaugevalue").value;
        var url = "download_charts_pdf?gaugevalue=" + encodeURIComponent(gaugevaluetext);
        window.location.href = url;
    }
</script>

</html>