CINXE.COM
Debian New Member Process
<!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <link rel="shortcut icon" href="https://nm.debian.org/static/favicon.ico"> <link rel="stylesheet" href="https://nm.debian.org/static/common/bootstrap4/css/bootstrap.min.css" /> <link rel="stylesheet" href="https://nm.debian.org/static/common/jquery-datatables/css/dataTables.bootstrap4.css" /> <link rel="stylesheet" href="https://nm.debian.org/static/common/fork-awesome/css/fork-awesome.css" /> <script src="https://nm.debian.org/static/common/jquery/jquery.min.js"></script> <script src="https://nm.debian.org/static/common/popper.js/umd/popper.min.js"></script> <script src="https://nm.debian.org/static/common/bootstrap4/js/bootstrap.min.js"></script> <script src="https://nm.debian.org/static/common/jquery-datatables/jquery.dataTables.min.js"></script> <script src="https://nm.debian.org/static/common/jquery-datatables/dataTables.bootstrap4.min.js"></script> <title>Debian New Member Process</title> <link rev="made" href="mailto:nm@debian.org"> <link type="text/css" rel="stylesheet" media="all" href="https://nm.debian.org/static/css/nm2.css"> <script id="ALL_STATUS" type="application/json">[["STATUS_DC", "dc", "DC", "a", "Debian Contributor"], ["STATUS_DC_GA", "dc_ga", "DC+account", "a", "Debian Contributor, with guest account"], ["STATUS_DM", "dm", "DM", "a", "Debian Maintainer"], ["STATUS_DM_GA", "dm_ga", "DM+account", "a", "Debian Maintainer, with guest account"], ["STATUS_DD_U", "dd_u", "DD, upl.", "a", "Debian Developer, uploading"], ["STATUS_DD_NU", "dd_nu", "DD, non-upl.", "a", "Debian Developer, non-uploading"], ["STATUS_EMERITUS_DD", "dd_e", "DD, emeritus", "a", "Debian Developer, emeritus"], ["STATUS_REMOVED_DD", "dd_r", "DD, removed", "a", "Debian Developer, removed"]]</script> <script src="https://nm.debian.org/static/js/nm.js"></script> <script type="text/javascript"> (function() { "use strict"; window.nm2.url_api_people = "/api/people/"; })(); </script> <style type="text/css"> .errorlist { color: red; } </style> <script type="text/javascript"> (function($) { "use strict"; class Search { constructor() { this.self_url = new URL(window.location.href); this.api = new window.nm2.API(); this.el_form = document.getElementById("search_form"); this.el_perstable = document.getElementById("perstable"); this.el_startmessage = document.getElementById("startmessage"); this.old_query = null; this.onchange_timeout = null; this.query_sequence = 0; this.table = $(this.el_perstable).DataTable({ paging: false, searching: false, columns: [ { data: null, render: (data, type, row, meta) => { const st = window.nm2.ALL_STATUS[data.status]; if (type == "sort") return st.sequence; return data.status_description ? data.status_description : st.ldesc; }, }, { data: null, render: (data, type, row, meta) => { const status_changed = new Date(data.status_changed * 1000); if (type == "sort") return status_changed; return status_changed.toISOString().substr(0, 10); }, }, { data: null, render: (data, type, row, meta) => { return data.uid ? data.uid : "--"; }, }, { data: null, render: (data, type, row, meta) => { if (type == "sort") return data.fullname; let a = document.createElement("a"); a.setAttribute("href", data.url); a.textContent = data.fullname; return a.outerHTML; }, }, ], }); // $(this.el_perstable).hide(); // form.keypress(form_changed); $(this.el_form).keyup(evt => { this.form_changed(); }); $(this.el_form).change(evt => { this.form_changed(); }); // Only submit the form if it is allowed and if there are no results $(this.el_form).submit(ev => { ev.preventDefault(); return false; }); for (const el of ["name", "uid", "fpr", "status"]) { const val = this.self_url.searchParams.get(el); if (!val) continue; $(`#id_${el}`).val(val); } this.form_changed(); } form_changed() { if (this.onchange_timeout != null) clearTimeout(this.onchange_timeout); this.onchange_timeout = setTimeout(() => { this.search(); }, 200); } build_query() { let data = new Map(); let re_fields = { "name": true, "email": true, "uid": true }; for (let val of $(this.el_form).serializeArray()) { if (val.name == "csrfmiddlewaretoken") continue; const value = val.value.trim(); if (value == "") continue; if (re_fields[val.name]) data.set(val.name, "/" + value.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1") + "/"); else data.set(val.name, value); } return data; } async search() { // Assign each search invocation a sequence number to cancel runs when // a further search has been started const sequence = ++this.query_sequence; $(this.el_startmessage).hide(); // Check if the form has been filled const query = this.build_query(); // If not, just leave stuff hidden and do nothing if (query.size == 0) { $(this.el_startmessage).show(); this.table.clear(); this.table.draw(); return; } // If nothing changed, avoid an ajac query if (this.old_query !== null && this.old_query.size == query.size) { let changed = false; for (let [key, val] of this.old_query) if (query.get(key) != val) { console.debug(`${key} changed ${key} → ${query.get(key)}`); changed = true; break; } if (!changed) { console.debug("filter not changed: skipping search"); return; } } const res = await this.api.people(query); if (sequence < this.query_sequence) // If while, we were waiting for result a new query was started, // abort this one and let the next one come through return; this.table.clear(); this.table.rows.add(res.r); this.table.columns.adjust().draw(); this.old_query = query; } } function main() { let search = new Search(); } document.addEventListener("DOMContentLoaded", evt => { main(); }); })(jQuery); </script> </head> <body> <nav id="main-navbar1" class="navbar navbar-expand-sm navbar-light bg-light"> <a class="navbar-brand" href="/"><img src="https://nm.debian.org/static/debian/img/openlogo-50.png"></img></a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarSupportedContent"> <ul class="navbar-nav mr-auto"> <li class="nav-item"><a class="nav-link" href="/public/findperson/"><span class="fa fa-search"></span> People</a></li> <li class="nav-item"><a class="nav-link" href="/wizard/"><span class="fa fa-magic"></span> Site wizard</a></li> </ul> <ul class="navbar-nav navbar-right"> <li class="nav-item"><a href="/signon/login/"><span class="fa fa-sign-in"></span> Login</a></li> </ul> </div> </nav> <div aria-live="polite" aria-atomic="true" class="position-relative"> <div style="position: absolute; top: 0; right: 0;"> </div> </div> <div id="main-content" class="container-fluid mt-2"> <h1>Find person</h2> <div class="lead"> Fill in fields of the form to look for <a href="/public/people/">people</a>. </div> <form id="search_form" class="mt-4" action="/public/findperson/" method="post"><input type="hidden" name="csrfmiddlewaretoken" value="bZyBNwaC731JEhB8o4iDacU1q9NzcjgHfPnHGiWQ0afryaK68lLdMx6gjARLf1g0"> <div class="form-group row"> <div class="col-sm-3"><label for="id_name">Name:</label></div> <div class="col-sm-9"><input type="text" name="name" autofocus="autofocus" minlength="40" class="form-control" id="id_name"> </div> </div> <div class="form-group row"> <div class="col-sm-3"><label for="id_uid">Uid:</label></div> <div class="col-sm-9"><input type="text" name="uid" minlength="40" class="form-control" id="id_uid"> </div> </div> <div class="form-group row"> <div class="col-sm-3"><label for="id_fpr">Fingerprint:</label></div> <div class="col-sm-9"><input type="text" name="fpr" size="60" minlength="40" class="form-control" id="id_fpr"> </div> </div> <div class="form-group row"> <div class="col-sm-3"><label for="id_status">Current status in the project:</label></div> <div class="col-sm-9"><select name="status" class="form-control" required id="id_status"> <option value="" selected>---------</option> <option value="dc">Debian Contributor</option> <option value="dc_ga">Debian Contributor, with guest account</option> <option value="dm">Debian Maintainer</option> <option value="dm_ga">Debian Maintainer, with guest account</option> <option value="dd_u">Debian Developer, uploading</option> <option value="dd_nu">Debian Developer, non-uploading</option> <option value="dd_e">Debian Developer, emeritus</option> <option value="dd_r">Debian Developer, removed</option> </select> </div> </div> <div class="form-group row"> <div class="col-sm-3"><label for="id_email">Email address:</label></div> <div class="col-sm-9"><input type="email" name="email" maxlength="254" class="form-control" required id="id_email"> </div> </div> </form> <p id="startmessage">Results are shown as you type.</p> <table id="perstable" class="table table-hover table-sm"> <thead> <tr> <th>Status</th> <th>Since</th> <th>Account name</th> <th>Name</th> </tr> </thead> <tbody> </tbody> </table> </div> <footer id="main-footer" class="card mt-3 d-print-none"> <div class="card-body"> <p class="card-text"><small> <a href="/license/">Copyright</a> © 2012--2020 <a href="https://wiki.debian.org/Teams/FrontDesk">Debian Front Desk</a>. Source code is <a href="https://salsa.debian.org/nm-team/nm.debian.org">available on Salsa</a>. Report bugs on <a href="https://salsa.debian.org/nm-team/nm.debian.org/-/issues">Salsa</a> or the <a href="http://bugs.debian.org/nm.debian.org">Debian BTS</a>. </small> </p> <form action="/i18n/setlang/" method="post"><input type="hidden" name="csrfmiddlewaretoken" value="bZyBNwaC731JEhB8o4iDacU1q9NzcjgHfPnHGiWQ0afryaK68lLdMx6gjARLf1g0"> <input type="hidden" name="next" value="/public/findperson/" /> <p class="card-text"><small> This page is also available in the following languages: <button class="btn btn-link m-0 p-0 border-0 " title="German" name="language" value="de">Deutsch</button>, <button class="btn btn-link m-0 p-0 border-0 current" title="English" name="language" value="en">English</button>, <button class="btn btn-link m-0 p-0 border-0 " title="Spanish" name="language" value="es">español</button>, <button class="btn btn-link m-0 p-0 border-0 " title="Italian" name="language" value="it">italiano</button>, <button class="btn btn-link m-0 p-0 border-0 " title="French" name="language" value="fr">français</button> </p> </form> </div> </footer> </body> </html>