CINXE.COM
Submit a paper
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <link href="/css/dist/css/bootstrap.min.css" rel="stylesheet"> <title>Submit a paper</title> <link rel="stylesheet" href="/css/eprint.css?v=10"> <style> .alert-help { /* background-color: #f4ffff;*/ background-color: #fffaf4; color: #040404; } fieldset.form-section { padding: 1rem 2rem; } div.authorWrapper { background-color: #f0f0f0; padding: 10px; margin-top: 1rem; } /* hide some up, down, and delete buttons on authors. */ div.authorWrapper:last-child .move-author-down { visibility: hidden; } div.authorWrapper:first-child .move-author-up, div.authorWrapper:only-child .deleteauthor { visibility: hidden; } button.deleteauthor, button.deleteaffil { padding: .1rem .3rem; font-size: .7rem; } div.affiliation:only-child button.deleteaffil { visibility: hidden; } select[required], input[type="text"][required]:placeholder-shown, input.is-required:placeholder-shown, select.is-required { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23faa' class='bi bi-asterisk' viewBox='-4 -4 24 24'%3E%3Cpath d='M8 0a1 1 0 0 1 1 1v5.268l4.562-2.634a1 1 0 1 1 1 1.732L10 8l4.562 2.634a1 1 0 1 1-1 1.732L9 9.732V15a1 1 0 1 1-2 0V9.732l-4.562 2.634a1 1 0 1 1-1-1.732L6 8 1.438 5.366a1 1 0 0 1 1-1.732L7 6.268V1a1 1 0 0 1 1-1z'%3E%3C/path%3E%3C/svg%3E") !important; background-repeat: no-repeat; background-position: right calc(0.375em + 0.1875rem) center; background-size: calc(0.5em + 0.375rem) calc(0.5em + 0.375rem); } .was-validated input.form-control:placeholder-shown:valid { border: 1px solid #ced4da; background-image: none !important; } .was-validated .form-select[data-chosen=""]:valid { border: 1px solid #ced4da; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"); } .was-validated input[type="email"].is-invalid, .was-validated input.authorName.is-invalid { border-color: #dc3545 !important; padding-right: calc(1.5em + 0.75rem); background-image: none; background-repeat: no-repeat; background-position: right calc(0.375em + 0.1875rem) center; background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); } .was-validated textarea.form-control[id="abstract"]:invalid { background-image:none; } .was-validated textarea.form-control[id="abstract"].is-invalid { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e"); } .was-validated input.form-control[type="email"]:valid:focus, .was-validated input.form-control[type="email"]:valid, { background-image: url( data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== ); border-color: #d0d0d0 !important; } select, input { scroll-margin-top: 13rem; } input::placeholder { color: rgba(0,0,0,.4) !important; } div.orcidSuggest { position: absolute; top: 1.5rem; left: 0; background-color: #d0d0d0; color: #404040; width: 100% !important; max-height: 200px; overflow-y: scroll; transition: all 0.5s ease; } .searchButton { width: 1em; height: 1em; margin-top: .25rem !important; margin-bottom: .25rem !important; } </style> <script src="/js/autocomplete/autoComplete.min.js"></script> <link rel="stylesheet" href="/js/autocomplete/autoComplete.02.css"> <script> MathJax = { tex: { inlineMath: [['$', '$'], ['\\(', '\\)']], displayMath: [ ['$$','$$'], ["\\[","\\]"] ], processEnvironments: false }, loader: { load: [ "ui/safe", "ui/lazy", ], }, options: { safeOptions: { allow: { URLs: "none", classes: "safe", cssIDs: "safe", styles: "safe", }, }, } }; </script> <script id="MathJax-script" async src="/js/mathjax/tex-chtml.js"></script> </head> <body> <noscript> <h1 class="text-center">What a lovely hat</h1> <h4 class="text-center">Is it made out of <a href="https://iacr.org/tinfoil.html">tin foil</a>?</h4> </noscript> <div class="fixed-top" id="topNavbar"> <nav class="navbar navbar-custom navbar-expand-lg"> <div class="container px-0 justify-content-between justify-content-lg-evenly"> <div class="order-0 align-items-center d-flex"> <button class="navbar-toggler btnNoOutline" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent" aria-controls="navbarContent" aria-expanded="false"> <span class="icon-bar top-bar"></span> <span class="icon-bar middle-bar"></span> <span class="icon-bar bottom-bar"></span> </button> <a class="d-none me-5 d-lg-inline" href="https://iacr.org/"><img class="iacrlogo" src="/img/iacrlogo_small.png" alt="IACR Logo" style="max-width:6rem;"></a> </div> <a class="ePrintname order-1" href="/"> <span class="longNavName">Cryptology ePrint Archive</span> </a> <div class="collapse navbar-collapse order-3" id="navbarContent"> <ul class="navbar-nav me-auto ms-2 mb-2 mb-lg-0 justify-content-end w-100"> <li class="ps-md-3 nav-item dropdown"> <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false"> Papers </a> <ul class="dropdown-menu me-3" aria-labelledby="navbarDropdown"> <span class="text-dark mx-3" style="white-space:nowrap;">Updates from the last:</span> <li><a class="dropdown-item ps-custom" href="/days/7">7 days</a></li> <li><a class="dropdown-item ps-custom" href="/days/31">31 days</a></li> <li><a class="dropdown-item ps-custom" href="/days/183">6 months</a></li> <li><a class="dropdown-item ps-custom" href="/days/365">365 days</a></li> <li><hr class="dropdown-divider"></li> <li><a class="dropdown-item" href="/byyear">Listing by year</a></li> <li><a class="dropdown-item" href="/complete">All papers</a></li> <li><a class="dropdown-item" href="/complete/compact">Compact view</a></li> <li><a class="dropdown-item" href="https://www.iacr.org/news/subscribe">Subscribe</a></li> <li><hr class="dropdown-divider"></li> <li><a class="dropdown-item" href="/citation.html">How to cite</a></li> <li><hr class="dropdown-divider"></li> <li><a class="dropdown-item" href="/rss">Harvesting metadata</a></li> </ul> </li> <li class="ps-md-3 nav-item dropdown"> <a class="nav-link dropdown-toggle" href="#" id="submissionsDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false"> Submissions </a> <ul class="dropdown-menu me-3" aria-labelledby="submissionsDropdown"> <li><a class="dropdown-item" href="/submit">Submit a paper</a></li> <li><a class="dropdown-item" href="/revise">Revise or withdraw a paper</a></li> <li><a class="dropdown-item" href="/operations.html">Acceptance and publishing conditions</a></li> </ul> </li> <li class="ps-md-3 nav-item dropdown"> <a class="nav-link dropdown-toggle" href="#" id="aboutDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false"> About </a> <ul class="dropdown-menu me-3" aria-labelledby="aboutDropdown"> <li><a class="dropdown-item" href="/about.html">Goals and history</a></li> <li><a class="dropdown-item" href="/news.html">News</a></li> <li><a class="dropdown-item" href="/stats">Statistics</a></li> <li><a class="dropdown-item" href="/contact.html">Contact</a></li> </ul> </li> </ul> </div> <div class="dropdown ps-md-2 text-right order-2 order-lg-last"> <button class="btn btnNoOutline" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false"> <img src="/img/search.svg" class="searchIcon" alt="Search Button"/> </button> <div id="searchDd" class="dropdown-menu dropdown-menu-end p-0" aria-labelledby="dropdownMenuButton1"> <form action="/search" method="GET"> <div class="input-group"> <input id="searchbox" name="q" type="search" class="form-control" autocomplete="off"> <button class="btn btn-secondary border input-group-append ml-2"> Search </button> </div> </form> <div class="ms-2 p-1 d-none"><a href="/search">Advanced search</a></div> </div> </div> </div> </nav> </div> <main id="eprintContent" class="container px-3 py-4 p-md-4"> <h2 class="mt-2 mb-5">Submit a paper</h2> <div class="alert alert-help shadow-sm" role="alert"> Before submitting a paper, please read the <a href="operations.html#acceptance">acceptance criteria</a>, the <a href="operations.html#license">licensing conditions</a>, the information on <a href="operations.html#publication">further and double publication</a>, and the rules for <a href="operations.html#revisions">revision and withdrawals</a>. Afterwards please fill out the form below. </div> <form class="needs-validation" novalidate action="/submit" enctype="multipart/form-data" method="post" accept-charset="UTF-8"> <fieldset class="form-section mb-3"> <legend>Title</legend> <input type="text" class="form-control is-required" name="title" id="title" placeholder="Enter title" aria-describedby="titleHelp" required oninput="renderTitle()" minlength="1" pattern="[^\x00-\x09\x0b-\x1f\x7f-\x9f]+"> <div class="invalid-feedback"> Title is required. Use UTF-8 encoded characters instead of HTML entities. Mathematics is allowed within $ symbols. </div> <div class="mt-2 ms-3" id="renderedTitle"></div> <div id="titleHelp" class="form-text text-muted">HTML tags and entities are not allowed. The & character is allowed, but not recommended. <a target="_blank" href="//www.mathjax.org/">MathJax</a> is supported for LaTeX mathematics. Names with accents should be encoded in UTF-8 instead of TeX. </div> </fieldset> <fieldset id="authors" class="form-section mb-3"> <legend>Authors</legend> <p class="alert alert-help small"> Please use UTF-8 character encoding for non-ascii characters (not TeX codes or HTML entities). All authors should be listed, and should appear in the order they are on the paper. ORCID IDs are optional, but helpful to identify authors and given them citation credit. ROR IDs are optional, but perform the same function as ORCID IDs for institutions. </p> <div id="authorFields"> </div> <div id="invalidAuthors" class="text-danger d-none"> At least one author must have an email. </div> <div class="mt-3"> <button type="button" class="btn btn-dark" onclick="addAuthor()">Add another author</button> </div> </fieldset> <div class="form-section mb-3"> <div class="row"> <div class="col-6"> <fieldset class="form-section"> <legend>Abstract</legend> <textarea class="form-control is-required" name="abstract" id="abstract" rows="10" aria-describedby="abstractHelp" oninput="renderAbstract()" minlength="64" required></textarea> <div id="short_abstract" class="d-none text-danger mt-2"> An abstract must be at least 64 characters. Please be more descriptive. </div> <div id="invalid_abstract" class="d-none alert alert-danger">Your abstract contains unprintable characters or invalid UTF-8. This is often caused by copying and pasting from a PDF file, resulting in mangled text. Please remove invalid characters. </div> <div id="abstractHelp" class="mb-3 form-text text-muted"> You may use UTF-8 characters and LaTeX conventions for math (displayed with <a target="_blank" href="//www.mathjax.org/">MathJax</a>); HTML tags are not allowed and will not be rendered. Be careful copying from a PDF - it often generates invalid UTF-8. </div> </fieldset> </div> <div class="col-6"> <legend class="mt-3">Rendered abstract </legend> <div id="renderedAbstract" style="white-space: pre-wrap;"></div> </div> </div> <div class="d-none alert alert-help my-2" role="tooltip" id="abstract_latex"> We have detected a character usually used in LaTeX. Please make sure to only use <strong>LaTeX math commands</strong>. The Cryptology ePrint Archive uses <a href="//www.mathjax.org/">MathJax</a> which only renders mathematics. For example, you should not use <code>\emph{...}</code> for italics, and you should not include any <code>\cite{...}</code> commands. Names should be written in UTF-8 rather than TeX escape codes (e.g., å instead of \r{a}). </div> </fieldset> <fieldset class="form-section mb-3"> <legend>Category and Keywords</legend> <div class="row"> <div class="col-sm-4"> <label for="category">Category</label> <select name="category" id="category" class="form-select" data-chosen="" onchange="this.dataset.chosen=this.value"> <option selected value="">(Please choose a category)</option> <option value="Applications" >Applications</option> <option value="Cryptographic protocols" >Cryptographic protocols</option> <option value="Foundations" >Foundations</option> <option value="Implementation" >Implementation</option> <option value="Secret-key cryptography" >Secret-key cryptography</option> <option value="Public-key cryptography" >Public-key cryptography</option> <option value="Attacks and cryptanalysis" >Attacks and cryptanalysis</option> </select> </div> <div class="col-sm-8"> <label for="keywords">Keywords</label> <input type="text" autocomplete="off" class="form-control" name="keywords" id="keywords" placeholder="Keywords" pattern="[^\\\{\}]*" aria-describedby="keywordsHelp" oninput="checkKeywords(this)"> <div class="invalid-feedback"> Use commas to separate the different keyword phrases. Individual keyword phrases are limited to at most 40 characters. LaTeX encoding is not allowed.<span class="fw-bold" id="badWord"></span> </div> <div class="mt-2" id="keywordlist"> </div> <div id="keywordsHelp" class="form-text text-muted">Keywords should be separated by commas.</div> </div> </div> </fieldset> <fieldset class="form-section" id="publicationInformation"> <legend>Publication Information</legend> <p> Is the submitted paper <a target="_blank" href="about.html#publication">published elsewhere? </a> In other words, has this paper already appeared in another original publication or do you know that it will appear elsewhere? </p> <div class="container px-5 py-3"> <div class="row mb-3 gx-5"> <div class="col-auto form-check"> <input type="radio" class="form-check-input" name="publcode" id="publcode1" value="1" required > <label for="publcode1" class="form-check-label">Published nowhere else. Please update in the future if it is published elsewhere.</label> </div> </div> <div class="row mb-3 gx-5"> <div class="form-check col-auto"> <input type="radio" class="form-check-input" name="publcode" id="publcode2" value="2" required > <label for="publcode2" class="form-check-label">Published in an IACR publication</label> </div> <div id="iacrVenue" class="d-none col-auto"> <select name="iacrpubl" id="iacrpubl" class="form-select form-select-sm" aria-describedby="iacrpublHelp"> <option disabled selected value="">(Select the IACR publication)</option> <option value="JOC">Journal of Cryptology</option> <option value="ASIACRYPT">ASIACRYPT</option> <option value="CIC">Communications in Cryptology</option> <option value="CRYPTO">CRYPTO</option> <option value="EUROCRYPT">EUROCRYPT</option> <option value="PKC">PKC</option> <option value="TCC">TCC</option> <option value="TCHES">TCHES (CHES)</option> <option value="TOSC">ToSC (FSE)</option> <option value="RWC" disabled>RWC does publish papers - list as preprint</option> </select> <label id="iacrpublHelp" for="iacrVenue">Required</label> </div> <div id="iacrYear" class="d-none col-auto"> <input type="number" class="form-control form-control-sm" name="iacryear" id="iacryear" min="1981" placeholder="Year" aria-describedby="iacryearHelp"> <label id="iacryearHelp" for="iacryear">Required</label> </div> </div> <div class="row gx-5 mb-3"> <div class="form-check col-auto"> <input type="radio" class="form-check-input" name="publcode" id="publcode3" value="3" required> <label for="publcode3" class="form-check-label"> Published elsewhere </label> </div> <div id="otherVenue" class="d-none col-6"> <input type="text" class="form-control form-control-sm" name="origpubl" id="origpubl" placeholder="Specify venue" aria-describedby="publcode3Help" value="" minlength="4"> <label id="publcode3Help" for="origpubl">Required</label> </div> </div> </div> </fieldset> <fieldset id="doiNode" class="form-section d-none"> <div class="row mb-3"> <div class="col-auto"> <label for="origdoi" class="col-form-label">Digital object identifier (DOI):</label> </div> <div class="col-auto"> <input type="text" class="form-control form-control-sm" name="origdoi" id="origdoi" placeholder="For example, 10.1007/BF00206322" aria-describedby="origdoiHelp" pattern="^10.\d{4,9}/[-._;()/:a-zA-Z0-9]+$"> <div class="invalid-feedback"> DOI should start with 10 (do not include https://doi.org/) </div> <small id="origdoiHelp" class="form-text text-muted">If known, provide the <a href="https://en.wikipedia.org/wiki/Digital_object_identifier">DOI</a> <span class="fw-bold">without</span> the URL prefix <span class="font-monospace">https://dx.doi.org/</span>. </small> </div> </div> </fieldset> <fieldset id="diffNode" class="form-section d-none"> <label>Difference with original</label> <div class="form-check mt-2"> <input type="radio" class="form-check-input" name="revisiontype" id="REVISION_SAME" value="SAME" > <label class="form-check-label" for="REVISION_SAME"> SUBMISSION IS THE <strong>SAME</strong> AS THE ORIGINAL PUBLICATION<br> (The submission is the version that the authors sent to publisher of the original publication, perhaps using different formatting and fixing typos; select this for the <em>IACR version</em> and other similar <em>self-archival versions</em>.) </label> </div> <div class="form-check"> <input type="radio" class="form-check-input" name="revisiontype" id="REVISION_MINOR" value="MINOR" > <label class="form-check-label" for="REVISION_MINOR"> THERE ARE <strong>MINOR</strong> DIFFERENCES BETWEEN THE SUBMISSION AND THE ORIGINAL PUBLICATION<br> (Minor differences mean less than 25% of material is different, such as correcting mistakes or rewritten portions of text; select this when the submission is a <em>corrected</em>, <em>revised</em>, or similar version of the original publication.) </label> </div> <div class="form-check"> <input type="radio" class="form-check-input" name="revisiontype" id="REVISION_MAJOR" value="MAJOR" > <label class="form-check-label" for="REVISION_MAJOR"> THERE ARE <strong>MAJOR</strong> DIFFERENCES BETWEEN THE SUBMISSION AND THE ORIGINAL PUBLICATION<br> (Major differences mean more than 25% of material is different, such as extending results or rewriting the majority of text; select this when the submission is a <em>full</em>, <em>expanded</em>, or similar version of the original publication.) </label> </div> </fieldset> <fieldset class="form-section mt-3"> <legend>Submission Content</legend> <label class="form-label mt-3" for="submitpdf">PDF file</label> <input class="form-control is-required" name="submitpdf" id="submitpdf" type="file" accept="application/pdf" accept=".pdf"> <div class="invalid-feedback">PDF file is required</div> <small id="submitpdfHelp" class="form-text text-muted">The paper must be in PDF format and fit on ISO A4-sized or US letter-sized paper. The file should include the email address(es) of the author(s).</small> </fieldset> <fieldset class="form-section mb-3"> <legend>Details</legend> <label class="form-label" for="note">Additional notes</label> <textarea class="form-control" name="note" id="note" rows="4" aria-describedby="noteHelp"></textarea> <div> <small id="noteHelp" class="form-text text-muted">This will be publicly visible. You can use it to describe revisions or add other information. This is not intended for publication details; that appears elsewhere in the form.</small> </div> <label class="mt-2 form-label" for="editor_note">Message to editor(s)</label> <textarea class="form-control" name="editor_note" id="editor_note" rows="4" aria-describedby="messageHelp"></textarea> <div> <small id="messageHelp" class="form-text text-muted">This message will only be seen by the Cryptology ePrint Archive editor(s). </small> </div> </fieldset> <fieldset class="form-section mb-3"> <legend>License</legend> <div class="row"> <div class="col-sm-8"> <select name="license" id="license" class="form-select" data-chosen="" onchange="this.dataset.chosen=this.value" required > <option selected value="">(select a license)</option> <option value="CC_BY" >CC BY: Creative Commons Attribution</option> <option value="CC_BY_SA" >CC BY-SA: Creative Commons Attribution-ShareAlike</option> <option value="CC_BY_NC" >CC BY-NC: Creative Commons Attribution-NonCommercial</option> <option value="CC_BY_NC_SA" >CC BY-NC-SA: Creative Commons Attribution-NonCommercial-ShareAlike</option> <option value="CC_BY_NC_ND" >CC BY-NC-ND: Creative Commons Attribution-NonCommercial-NoDerivs</option> <option value="CC0" >CC0: No rights reserved</option> </select> <div class="invalid-feedback">A license is required</div> <div class="form-text"> <p> You must grant to IACR a non-exclusive and <strong>irrevocable license</strong> chosen from the list above. For help in choosing a license, see <a target="_blank" href="/licenses">this document</a>. </p> </div> </div> </div> </fieldset> <fieldset class="form-section mb-3"> <legend>Confirmation</legend> <div class="form-check"> <input type="checkbox" class="form-check-input is-required" name="confirmation" id="confirmation" value="1" required> <label class="form-check-label" for="confirmation"> I confirm the <a target="_blank" href="operations.html#acceptance">acceptance criteria</a>, the <a target="_blank" href="operations.html#license">licensing conditions</a>, the information on <a target="_blank" href="operations.html#publication">further and double publication</a>, and the rules for <a target="_blank" href="operations.html#revisions">revision and withdrawals</a>. These conditions imply that: </label> <ul> <li>The IACR has a non-exclusive and <strong>irrevocable license</strong> to distribute the paper.</li> <li>The paper can be revised or withdrawn but <strong>all versions remain accessible </strong>.</li> <li>Once withdrawn, the paper <strong>cannot</strong> be resurrected and follow-up versions of the same work will <strong>not</strong> be accepted later as another paper.</li> </ul> </div> </fieldset> <fieldset class="mb-5"> <button id="submitButton" class="btn btn-primary btn-lg btn-block" type="submit">Submit</button> <button class="btn btn-secondary btn-lg btn-block ms-3" type="reset" id="clear">Clear</button> </fieldset> </form> <script> var iacrVenueNode = document.getElementById('iacrVenue'); var iacrpubl = document.getElementById('iacrpubl'); var iacrYearNode = document.getElementById('iacrYear'); var iacryear = document.getElementById('iacryear'); var otherVenueNode = document.getElementById('otherVenue'); var origpubl = document.getElementById('origpubl'); var diffNode = document.getElementById('diffNode'); var doiNode = document.getElementById('doiNode'); var revisionsame = document.getElementById('REVISION_SAME'); var revisionminor = document.getElementById('REVISION_MINOR'); var revisionmajor = document.getElementById('REVISION_MAJOR'); var abstractField = document.getElementById('abstract') var renderedAbstract = document.getElementById('renderedAbstract'); var titleField = document.getElementById('title') var renderedTitle = document.getElementById('renderedTitle'); var abstractLatex = document.getElementById('abstract_latex'); var invalidAbstract = document.getElementById('invalid_abstract'); var shortAbstract = document.getElementById('short_abstract'); var affiliations = []; // populated with a fetch. var badWord = document.getElementById('badWord'); var keywordlist = document.getElementById('keywordlist'); function addAuthor() { let counter = document.querySelectorAll('.authorWrapper').length; let authorTemplate = `<div id="author-${counter}" class="authorWrapper" data-authorid="${counter}"> <div class="d-flex align-items-center"> <label class="me-4">Author <span class="authornum">${counter+1}</span></label> <button type="button" class="btn btn-sm shadow-none move-author-down" onclick="moveAuthor(this, 1);" title="Move down in author list">▼</button> <button type="button" class="btn btn-sm shadow-none move-author-up" onclick="moveAuthor(this, -1);" title="Move up in author list">▲</button> <button type="button" class="btn btn-sm ms-1 mt-1 deleteauthor" title="Remove author" onclick="removeAuthor(this)"><span aria-hidden="true">❌</span></button> </div> <div class="row mt-3"> <div class="col col-md-7"> <input type="text" class="form-control is-required authorName" name="authorFullname-${counter}" id="authorFullname-${counter}" placeholder="Author name (e.g., John Q. Smith)" value="" required oninput="clearAuthor(this)"> <div class="invalid-feedback">Author name is required. You may not use HTML entities or LaTeX. Also, do not specify more than one author in the author name field. You can add additional authors with the button below.</div> <div class="form-text"> Each author should be entered separately. Use their full name as it appears on the paper, but do not use honorifics or titles or footnotes (e.g., no Prof. or Fellow or PhD). </div> </div> <div class="col col-md-5"> <div class="d-flex"> <div class="input-group"> <button class="btn btn-outline-secondary orcidButton" type="button" onclick="searchOpenAlex(this)" onblur="closeOrcidSuggest(this)" title="Search for author metadata" disabled> <img src="/img/search-outline.png" class="searchButton"> </button> <input autocomplete="off" type="text" oninput="orcidCheck(this)" class="form-control orcid" name="authorOrcid-${counter}" id="authorOrcid-${counter}" data-index="${counter}" placeholder="ORCID ID xxxx-xxxx-xxxx-xxxx" pattern="[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{3}[0-9X]" value=""> </div> </div> <div class="orcidDropdown position-relative"> <div class="orcidStatus""></div> <div class="orcidSuggest list-group shadow"></div> </div> <div class="invalid-feedback"> Invalid Orcid ID </div> <div class="orcidName d-none text-success mt-2"></div> <div class="form-text"> ORCID IDs are 16 digits. You can search for a coauthor's ORCID ID at <a href="https://orcid.org/" target="_blank">orcid.org</a> </div> </div> </div> <div class="row mt-3"> <div class="col col-md-7"> <input type="email" class="form-control" name="email-${counter}" id="email-${counter}" placeholder="Author email" oninput="checkEmail(this)"> <div class="invalid-feedback"> Invalid email address </div> <div class="form-text"> At least one author is required to supply an email address, but we recommend that all authors have an email for future contact purposes. The email address will be publicly visible. </div> </div> </div> <label class="form-label mt-3">Affiliation(s) <button type="button" class="btn btn-sm btn-dark ms-5 addAffilBtn" onclick="addAffiliation(this)">Add another affiliation</button> </label> <div class="affiliations"> </div> <!-- /affiliations --> </div>`; let authorFields = document.getElementById('authorFields'); authorFields.insertAdjacentHTML('beforeend', authorTemplate); let addAffilButton = document.querySelector(`#author-${counter} .addAffilBtn`); addAffiliation(addAffilButton); return true; } function addAffiliation(el) { let authorNode = el.closest('.authorWrapper'); let counter = authorNode.querySelectorAll('.affiliation.form-control').length; let authorid = authorNode.dataset.authorid; let affiliationTemplate = `<div class="row mt-3 affiliation"> <div class="col col-md-6"> <input autocomplete="off" type="text" class="affiliation form-control" name="authorAffiliation-${authorid}-${counter}" id="authorAffiliation-${authorid}-${counter}" placeholder="Institution name" pattern="[^\\\{\}]+"> <div class="invalid-feedback">Affiliation may not contain LaTeX.</div> <div class="form-text">Individual institutions should be listed separately. Do not include departments.</div> </div> <div class="col col-md-5"> <input type="text" class="form-control ror" name="authorAffiliationROR-${authorid}-${counter}" id="authorAffiliationROR-${authorid}-${counter}" pattern="^https://ror.org/0[0-9a-zA-HJKMNP-Z]{6}[0-9]{2}$" placeholder="https://ror.org/03s65by71"> <div class="invalid-feedback">ROR IDs are URLs under ror.org. You can look up ROR IDs at <a target="_blank" href="https://ror.org/search">ror.org</a></div> <div class="form-text">ROR IDs are recommended. You can look up ROR IDs at <a target="_blank" href="https://ror.org/search">ror.org</a></div> </div> <div class="col-md-1"> <button type="button" class="align-items-center btn btn-sm mt-1 deleteaffil btn-sm ms-1" title="Remove affiliation" onclick="removeAffiliation(this)"><span aria-hidden="true">❌</span></button> </div> </div>`; let affiliationsNode = authorNode.querySelector('.affiliations'); affiliationsNode.insertAdjacentHTML('beforeend', affiliationTemplate); let id = `authorAffiliation-${authorid}-${counter}`; addAutocomplete(document.getElementById(id)); } var namePattern = RegExp('^(?!.*( and |[!^@#$%&*{}~<>:\\[\\]`_+=|/?;\\p{C}0-9\x00-\x09\x0b-\x1f\x7f-\x9f\\\\])).*$', 'u'); function clearAuthor(el) { if (namePattern.test(el.value)) { el.classList.remove('is-invalid'); } else { el.classList.add('is-invalid'); } // This is called if the author name is changed, to make sure we clear all fields // for that author. This is perhaps unfortunate because it clears the ORCID id, // but we don't want people to edit the name and leave an improper ORCID id. let authorWrapper = el.closest('.authorWrapper'); if (el.value) { authorWrapper.querySelector('.orcidButton').disabled = false; } else { authorWrapper.querySelector('.orcidButton').disabled = true; } authorWrapper.querySelector('input.orcid').value = ''; authorWrapper.querySelectorAll('input.affiliation').forEach(e => { e.value = ''; }); authorWrapper.querySelectorAll('input.ror').forEach(e => { e.value = ''; }); } function removeAffiliation(el) { // el is the button to remove the affiliation. let affilNode = el.parentElement.parentElement; let authorNode = affilNode.parentElement; affilNode.remove(); // Update name and id on each of the affiliation inputs. They have the form // authorAffiliation-{authornum}-{affilnum} or // authorAffiliationROR-{authornum}-{affilnum} let affiliationNodes = authorNode.querySelectorAll('div.affiliation'); for (let i = 0; i < affiliationNodes.length; i++) { let inputs = affiliationNodes[i].querySelectorAll('input'); for (let j = 0; j < inputs.length; j++) { let parts = inputs[j].id.split('-'); parts[2] = i.toString(); inputs[j].id = parts.join('-'); parts = inputs[j].name.split('-'); parts[2] = i.toString(); inputs[j].name = parts.join('-'); } } } function renumberAuthors() { let authors = document.querySelectorAll('.authorWrapper'); for (let i = 0; i < authors.length; i++) { authors[i].id = 'author-' + i; authors[i].querySelector('.authornum').textContent = i + 1; authors[i].dataset.authorid = i; let inputs = authors[i].querySelectorAll('input'); for (let j = 0; j < inputs.length; j++) { let parts = inputs[j].name.split('-'); parts[1] = i.toString(); inputs[j].name = parts.join('-'); parts = inputs[j].id.split('-'); parts[1] = i.toString(); inputs[j].id = parts.join('-'); } } } function moveAuthor(el, direction) { let target = el.closest('.authorWrapper'); let id = parseInt(target.dataset.authorid); let newid = direction > 0 ? id+1 : id-1; let authorFields = document.getElementById('authorFields'); if (direction > 0) { // down newid = id + 1; authorFields.insertBefore(target, document.getElementById('author-' + (id+2))); } else { authorFields.insertBefore(target, document.getElementById('author-' + (id-1))); } renumberAuthors(); document.getElementById('author-' + newid).scrollIntoView({behavior:'smooth'}); } function removeAuthor(el) { el.closest('.authorWrapper').remove(); // id = el.parentElement.parentElement.dataset.authorid; // document.getElementById('author-'+id).remove(); renumberAuthors(); } function renderTitle() { // Forbid display mathematics in title. if (titleField.value.indexOf('$$') >= 0) { titleField.value = titleField.value.replace('$$', '$'); } renderedTitle.textContent = titleField.value; // .replace('<', '{\\lt}').replace('>', '{\\gt}'); MathJax.typeset(); } function setOrcid(index, orcid) { let orcidInput = document.getElementById('authorOrcid-' + index); orcidInput.value = orcid.toString(); orcidInput.closest('.authorWrapper').querySelector('.orcidDropdown').classList.add('d-none'); orcidInput.classList.remove('is-invalid'); } function setAuthorData(index, orcid, affiliation, ror) { // Called when a result from openalex is selected. let authorWrapper = document.querySelectorAll('.authorWrapper')[index]; authorWrapper.querySelector('.orcid').value = orcid; if (affiliation !== 'undefined') { let affilInput = authorWrapper.querySelector('input.affiliation'); if (affilInput.value == '') { affilInput.value = affiliation; if (ror) { authorWrapper.querySelector('.ror').value = ror; } else { authorWrapper.querySelector('.ror').value = ''; } } } let orcidInput = document.getElementById('authorOrcid-' + index); orcidInput.value = orcid.toString(); authorWrapper.querySelector('.orcidDropdown').classList.add('d-none'); orcidInput.classList.remove('is-invalid'); } function setOrcidSuggestions(index, num, results) { console.dir(index); // index is the author index. num is number of results from openalex, results is the results with orcid id. let authorWrapper = document.querySelectorAll('.authorWrapper')[index]; authorWrapper.querySelector('.orcidDropdown').classList.remove('d-none'); let status = authorWrapper.querySelector('.orcidStatus'); let fullName = authorWrapper.querySelector('input'); searchHTML = '<a target="_blank" href="https://orcid.org/orcid-search/search?searchQuery=' + encodeURIComponent(fullName.value) + '">'+fullName.value + '</a>'; if (results.length == 0) { status.innerHTML = 'No suggestions: try ' + searchHTML } else { status.innerHTML = 'Search for ' + searchHTML } let select = authorWrapper.querySelector('.orcidSuggest'); select.innerHTML = ''; if (results) { select.innerHTML = results.map((item) => { let div = `<div onmousedown="setAuthorData(${index}, '${item.id}', '${item.affiliation}', '${item.ror}')" class="list-group-item list-group-item-action"><div>${item.name} (${item.id})</div>`; if (item.affiliation) { div += `<div class="ps-3">${item.affiliation}</div>` } return div + '</div>'; }).join(''); } else { select.innerHTML = '<div class="text-warning">No suggestions</div>'; } } function closeOrcidSuggest(el) { // This is used because the blur event would prevent the onclick from firing. setTimeout(() => { el.closest('.authorWrapper').querySelector('.orcidDropdown').classList.add('d-none'); }, 300); } function searchOpenAlex(el) { let authorWrapper = el.closest('.authorWrapper'); let index = authorWrapper.dataset.authorid; let inputs = authorWrapper.querySelectorAll('input'); let fullName = inputs[0]; if (!fullName.value || fullName.value.length < 3) { return; } authorWrapper.querySelector('.orcidName').classList.add('d-none'); let orcidInput = inputs[1]; // See https://docs.openalex.org/api let url = 'https://api.openalex.org/authors?mailto=openalex@iacr.org&filter=display_name.search:' + encodeURIComponent(fullName.value); fetch(url, {}).then(response => { if (response.status != 200) { console.warn('problem with lookup'); console.dir(response); } return response.json(); }).then((data) => { console.dir(data); let results = []; data.results.forEach(res => { if (res.orcid) { console.dir(res); let person = {'name': res.display_name, 'id': res.orcid.substring(18)}; let last_known_affil = res.last_known_institution; if (last_known_affil) { if(last_known_affil.display_name) { person['affiliation'] = last_known_affil.display_name; } if (last_known_affil.ror) { person['ror'] = last_known_affil.ror; } if (last_known_affil.country) { person['country'] = last_known_affil.country; } } results.push(person); } }); console.dir(results); setOrcidSuggestions(index, data.results.length, results); }); } // This is not used, but preserved for posterity in case we switch. // Note that the results returned by autocomplete are different than from search. function searchForAuthor(el) { let authorWrapper = el.closest('.authorWrapper'); let index = authorWrapper.dataset.authorid; let inputs = authorWrapper.querySelectorAll('input'); let fullName = inputs[0]; if (!fullName.value || fullName.value.length < 3) { return; } authorWrapper.querySelector('.orcidName').classList.add('d-none'); let orcidInput = inputs[1]; // See https://docs.openalex.org/api let url = 'https://api.openalex.org/autocomplete/authors?mailto=openalex@iacr.org&q=' + encodeURIComponent(fullName.value); fetch(url, {}).then(response => { if (response.status != 200) { console.warn('problem with lookup'); console.dir(response); } return response.json(); }).then((data) => { console.dir(data); let results = []; data.results.forEach(res => { if (res.orcid) { console.dir(res); let person = {'name': res.display_name, 'id': res.orcid.substring(18)}; let last_known_affil = res.last_known_institution; if (last_known_affil) { if(last_known_affil.display_name) { person['affiliation'] = last_known_affil.display_name; } if (last_known_affil.ror) { person['ror'] = last_known_affil.ror; } if (last_known_affil.country) { person['country'] = last_known_affil.country; } } results.push(person); } }); console.dir(results); setOrcidSuggestions(index, data.results.length, results); }); } function checkAbstract() { invalidAbstract.classList.add('d-none'); shortAbstract.classList.add('d-none'); if (abstractField.value.length < 64) { console.log('abstract is too short'); abstractField.classList.add('is-invalid'); shortAbstract.classList.remove('d-none'); return false; } let patt = /[\x00-\x09\x0b-\x0c\x0e-\x1f\x7f-\x9f]/; if (abstractField.value.match(patt) != null) { console.log('abstract has invalid characters'); abstractField.classList.add('is-invalid'); invalidAbstract.classList.remove('d-none'); return false; } abstractField.classList.remove('is-invalid'); return true; } // This is called as the abstract is edited in order to render the // abstract on the right. It also performs checks on the abstract. function renderAbstract() { let pattern = /(\\|{|})+/; if (abstractField.value.match(pattern) != null) { abstractLatex.classList.remove('d-none'); } else { abstractLatex.classList.add('d-none'); } renderedAbstract.textContent = abstractField.value; MathJax.typeset(); } // This looks up the orcid id to make sure it's legit, and is only // fired when someone hand edits the orcid field. If the orcid id // is legit, then it displays the name associated with it. function orcidCheck(target) { let authorWrapper = target.closest('.authorWrapper'); if (target.value.match(/^[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{3}[0-9X]$/)) { let url = 'https://pub.orcid.org/v2.0/' + target.value + '/record'; fetch(url, { headers: { "Accept": "application/orcid+json" } }).then(response => { if (response.status !== 200) { target.classList.add('is-invalid'); console.log('Looks like there was a problem. Status Code: ' + response.status); return; } else { target.classList.remove('is-invalid'); } response.json().then(function(data) { let el = authorWrapper.querySelector('.orcidName'); if (el) { el.classList.remove('d-none'); if ('person' in data && 'name' in data['person']) { let name = data['person']['name']; if ('credit-name' in name && name['credit-name']) { name = name['credit-name']['value']; } else { name = name['given-names']['value'] + ' ' + name['family-name']['value']; } console.dir('orcid name is ' + name); el.innerText = 'Orcid name match: ' + name; } else { el.innerText = ''; } } else { console.warn('no element for orcidName'); } console.dir(target); }); }).catch(function(err) { console.log('Fetch Error: ', err); }); } } // This will reject some legitimate email addresses, because there are // a lot of legacy cases like uunet and source routing that is still // accepted by mail servers. We don't care, because the purpose is to // prevent fat-fingering things like "foo@foo@gmail.com or "foo at gmail" // The pattern we are using came from // https://stackoverflow.com/questions/46155/whats-the-best-way-to-validate-an-email-address-in-javascript?rq=1 // Note that this function takes an <input> element as argument and changes // the CSS classes. The css on emails is deliberately set to ignore the // :invalid pseudoclass that is provided by the browser, since type="email" // is too lax for us. function checkEmail(el) { let isValid = true; // empty value is considered valid for our purposes. if (el.value) { isValid = String(el.value) .toLowerCase() .match( /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ ); } if (isValid) { el.classList.remove('is-invalid'); el.classList.remove('border-warning'); } else { el.classList.add('is-invalid'); } return isValid; } // At least one author email is required, and all names are required. function checkEmails() { let emailInputs = document.querySelectorAll('input[type="email"]'); let num = 0; for (let i = 0; i < emailInputs.length; i++) { if (emailInputs[i].value.length > 0) { if (checkEmail(emailInputs[i])) { console.log('email ' + i + ' is valid'); num++; } else { console.log('email ' + i + ' is invalid'); return false; } } else { // empty values are ok. console.log('missing email ' + i); emailInputs[i].classList.add('border-warning'); emailInputs[i].classList.remove('is-invalid'); } } return (num > 0); } function checkKeywords(el) { keywordlist.innerText = ''; if (el.value.length > 120) { badWord.innerText = "At most 120 characters are allowed" el.classList.add('is-invalid'); return; } let words = el.value.split(',').map((w) => { return w.trim(); }); let longest = words.reduce((a,b) => { return a.length > b.length ? a : b; }); if (longest.length > 40) { badWord.innerText = longest + ' is too long'; el.classList.add('is-invalid'); } else { badWord.innerText = ''; el.classList.remove('is-invalid'); keywordlist.innerHTML = words.map(function(a){return '<span class="badge bg-secondary me-2">'+a+'</span>'}).join(''); } } function checkAuthorNames() { let num = 0; document.querySelectorAll('input.authorName').forEach(input => { if (namePattern.test(input.value)) { input.classList.remove('is-invalid'); } else { console.log('illegal author name:' + input.value); num++; input.classList.add('is-invalid'); } }); return num == 0; } // Check that the published section is ok before submission. This has complicated // dependencies if it has been previously published. Note that the server will // also perform validation on the constructed Paper object. // @return boolean function checkPublished() { let publishedOption = document.querySelector('input[name="publcode"]:checked'); if (!publishedOption) { return false; } let publcode = publishedOption.value; switch(publcode) { case '1': // not published before iacrpubl.classList.remove('is-invalid'); iacrpubl.classList.remove('is-valid'); iacryear.classList.remove('is-invalid'); iacryear.classList.remove('is-valid'); return true; case '2': // published by iacr // check if venue is selected if (!iacrpubl.value) { console.log('iacrpubl is required'); iacrpubl.classList.add('is-invalid'); iacrpubl.classList.remove('is-valid'); return false; } else { iacrpubl.classList.remove('is-invalid'); iacrpubl.classList.add('is-valid'); } if (!iacryear.value) { console.log('iacryear is required'); iacryear.classList.add('is-invalid'); iacryear.classList.remove('is-valid'); return false; } else { iacryear.classList.remove('is-invalid'); iacryear.classList.add('is-valid'); } return true; case '3': // published elsewhere iacrpubl.classList.remove('is-invalid'); iacrpubl.classList.remove('is-valid'); iacryear.classList.remove('is-invalid'); iacryear.classList.remove('is-valid'); if (!origpubl.value) { origpubl.classList.add('is-invalid'); origpubl.classList.remove('is-valid'); return false; } else { origpubl.classList.add('is-valid'); origpubl.classList.remove('is-invalid'); } return true; default: // should not happen console.warn('unknown state of howpublished'); return false; } } function setPublCode(id) { switch(id) { case 'publcode1': iacrVenueNode.classList.add('d-none'); iacrYearNode.classList.add('d-none'); otherVenueNode.classList.add('d-none'); diffNode.classList.add('d-none'); doiNode.classList.add('d-none'); iacrpubl.classList.remove('is-required'); iacryear.classList.remove('is-required'); origpubl.classList.remove('is-required'); revisionsame.removeAttribute('required'); revisionminor.removeAttribute('required'); revisionmajor.removeAttribute('required'); iacrpubl.removeAttribute('required'); iacryear.removeAttribute('required'); origpubl.removeAttribute('required'); break; case 'publcode2': iacrVenueNode.classList.remove('d-none'); iacrYearNode.classList.remove('d-none'); otherVenueNode.classList.add('d-none'); diffNode.classList.remove('d-none'); doiNode.classList.remove('d-none'); iacrpubl.classList.add('is-required'); iacryear.classList.add('is-required'); origpubl.classList.remove('is-required'); revisionsame.required = true; revisionminor.required = true; revisionmajor.required = true; iacrpubl.required = true; iacryear.required = true; origpubl.removeAttribute('required'); break; case 'publcode3': iacrVenueNode.classList.add('d-none'); iacrYearNode.classList.add('d-none'); otherVenueNode.classList.remove('d-none'); diffNode.classList.remove('d-none'); doiNode.classList.remove('d-none'); iacrpubl.classList.remove('is-required'); iacryear.classList.remove('is-required'); origpubl.classList.add('is-required'); revisionsame.required = true; revisionminor.required = true; revisionmajor.required = true; iacrpubl.removeAttribute('required'); iacryear.removeAttribute('required'); origpubl.required = true; break; default: console.log('unknown selected'); break; } } let radios = document.querySelectorAll('[name=publcode]'); for (let i =0; i < radios.length; i++) { radios[i].addEventListener('change', function(evt) { setPublCode(evt.target.id); }); } // Function to handle the autocomplete on a ROR input element. function updateROR(evt) { let el = evt.target; let selected = evt.detail.selection.value; el.value = selected.n; let parts = el.id.split('-'); parts[0] = 'authorAffiliationROR'; let id = parts.join('-'); document.getElementById(id).value = 'https://ror.org/' + selected.r; } function addAutocomplete(el) { const ac = new autoComplete({ diacritics: true, data: { src: affiliations, // Note: n stands for name, and a stands for acronym. keys: ['a', 'n'] }, selector: '#' + el.id, // Filter duplicates. resultsList: { maxResults: 20 }, filter: (list) => { const filteredResults = Array.from( new Set(list.map((value) => value.match)) ).map((inst) => { return list.find((value) => value.match === inst); }); return filteredResults; }, resultItem: { element: (item, data) => { item.style = "display: flex;justify-content: space-between"; item.innerHTML = ` <span style="text-overflow:ellipsis;white-space: nowrap; overflow: hidden;"> ${data.value.n}</span> <span style="display:flex;align-items:center;font-size:13px;font-weight:100;"> ${data.value.a} </span>`; }, highlight: true } }); el.addEventListener('selection', updateROR); } </script> <script> addAuthor(); </script> </main> <div class="container-fluid mt-auto" id="eprintFooter"> <a href="https://iacr.org/"> <img id="iacrlogo" src="/img/iacrlogo_small.png" class="img-fluid d-block mx-auto" alt="IACR Logo"> </a> <div class="colorDiv"></div> <div class="alert alert-success w-75 mx-auto"> Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content. </div> </div> <script src="/css/bootstrap/js/bootstrap.bundle.min.js"></script> <script> var topNavbar = document.getElementById('topNavbar'); if (topNavbar) { document.addEventListener('scroll', function(e) { if (window.scrollY > 100) { topNavbar.classList.add('scrolled'); } else { topNavbar.classList.remove('scrolled'); } }) } </script> <script> (function() { 'use strict' // If someone comes back to this form, we want the button enabled again. document.getElementById('submitButton').disabled = false; let form = document.querySelector('.needs-validation'); form.addEventListener('submit', function (event) { console.log('checking validity'); // Strip leading and trailing spaces. This causes minlength and maxlength // attributes to be ignored on firefox, so we validate them in this function. document.querySelectorAll('input[type="text"],input[type="email"],textarea').forEach(el => { el.value = el.value.trim(); }); form.classList.add('was-validated') // Note: this will not work as expected on firefox because minlength and // maxlength is not validated on inputs if they are modified by javascript. if (!form.checkValidity()) { event.preventDefault() event.stopPropagation() // Scroll to the first wrong one. let wrong = document.querySelector('input:invalid,input.is-invalid,textarea:invalid,select:invalid,select.is-invalid'); if (wrong) { console.log('invalid element'); console.dir(wrong); wrong.scrollIntoView({behavior: 'smooth', block:'start'}); } console.log('form is not valid'); return; } if (!checkAuthorNames()) { console.log('author name is invalid'); event.preventDefault(); event.stopPropagation(); document.getElementById('authorFields').scrollIntoView({behavior: 'smooth', block: 'start'}); document.getElementById('invalidAuthors').classList.remove('d-none'); return; } if (!checkAbstract()) { console.log('abstract is invalid'); event.preventDefault(); event.stopPropagation(); abstractField.scrollIntoView({behavior: 'smooth', block: 'start'}); return; } if (!checkEmails()) { console.log('emails not valid'); event.preventDefault() event.stopPropagation() document.getElementById('authorFields').scrollIntoView({behavior: 'smooth', block: 'start'}); document.getElementById('invalidAuthors').classList.remove('d-none'); return; } document.getElementById('invalidAuthors').classList.add('d-none'); if (!checkPublished()) { console.log('publication section not filled out'); event.preventDefault() event.stopPropagation() document.getElementById('publicationInformation').scrollIntoView({behavior: 'smooth', block:'start'}); return; } // prevent clicking the button twice while it submits. It doesn't prevent someone // from hitting the back button and resubmitting. document.getElementById('submitButton').disabled = true; return true; }, false); // Fetch the ror.json data set for autocomplete on affiliations with ROR IDs. fetch('/js/autocomplete/ror.json', { mode: 'no-cors', }).then(response => { if (response.status !== 200) { console.log('Looks like there was a problem. Status Code: ' + response.status); console.dir(response); return; } response.json().then(function(data) { affiliations = data; let inputs = document.querySelectorAll('input.affiliation'); inputs.forEach(el => { addAutocomplete(el); }); }); }).catch(function(err) { console.log('Fetch Error: ', err); }); })(); </script> </body> </html>