<!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">
        <title>GitHub XXX</title>
        <!-- Bootstrap CSS -->
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="XXX">

        <link href="{{ url_for('static', filename='css/style.css') }}" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <div class="main">
            <div class="container-fluid">
                <h1>XXX GitHub for Open-Science</h1>
                Code and documentation: <a href="127.0.0.1/repository/840c8c57-3c32-451e-bf12-0e20be300389/">127.0.0.1/repository/840c8c57-3c32-451e-bf12-0e20be300389/</a>
                <h2>Create an XXX GitHub repository</h2>
                <p>
                     Fill 1. the Github repo URL and 2. the word list (which can be updated afterwards). 
                    The anonymization of the content is done by replacing all occurrences of words in a list by "XXX".
                    The word list typically contains the institution name, author names, logins, etc... 
                    The README is anonymized as well as all files of the repository. Even filenames are anonymized.
                    In a double-blind submission, put the XXX repository URL (e.g. <a href="http://XXX.4open.science/repository/840c8c57-3c32-451e-bf12-0e20be300389/">http://XXX.4open.science/repository/840c8c57-3c32-451e-bf12-0e20be300389/</a>).
                    </p>
                <form action="" method="post">
                    <div class="form-group">
                        <label for="githubRepository">GitHub Repository</label>
                        <small id="githubRepositoryHelp" class="form-text text-muted">The github url to the repository that you want to anonymize.</small>
                        <input type="url" value="{{ repo.repository }}" class="form-control" name="githubRepository" id="githubRepository" aria-describedby="githubRepository" placeholder="GitHub Repository">
                    </div>
                    <div class="form-group">
                        <label for="ignoredTerms">The text to remove from the repository will be replaced by XXX.</label>
                        <small id="ignoredTermsHelp" class="form-text text-muted">One term per line (case insensitive).</small>
                        <textarea class="form-control" name="terms" id="ignoredTerms" rows="5">{{ repo.terms|join('\n') }}</textarea>
                    </div>
                    <button type="submit" class="btn btn-primary">Submit</button>
                </form>
                {% if not repo %}
                <h2>Edit an XXX GitHub repository</h2>
                <form action="" method="get">
                    <div class="form-group">
                        <label for="name">XXX GitHub Repository</label>
                        <small id="nameHelp" class="form-text text-muted">The id of the XXX GitHub repository.</small>
                        <input class="form-control" name="id" id="name" aria-describedby="name" placeholder="Id XXX GitHub Repository">
                    </div>
                    <div class="form-group">
                        <label for="githubRepository">GitHub Repository</label>
                        <small id="githubRepositoryHelp" class="form-text text-muted">Password: the real Github url.</small>
                        <input type="url" class="form-control" name="githubRepository" id="githubRepository" aria-describedby="githubRepository" placeholder="GitHub Repository">
                    </div>
                    <button type="submit" class="btn btn-primary">Submit</button>
                </form>
                {% endif %}
            </div>
        </div>

        <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="XXX"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="XXX"></script>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="XXX"></script>
    </body>
</html>