<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Test git form saver</title>
  </head>
  <body>

    <h2>Generate token</h2>
    <form action="./token" method="POST">
      <div>
        <label for="repo">Repository URL</label>
        <input name="repo" value="git@github.com:peterdemin/git-form-saver-demo.git" />
      </div>
      <div>
        <label for="file">File path inside of the repository</label>
        <input name="file" value="README.md" />
      </div>
      <div>
        <label for="secret">Optional secret</label>
        <input name="secret" value="" />
      </div>
      <div>
        <button>Send</button>
      </div>
    </form>

    <h2>Explicit redirect to tested</h2>
    <form action="./" method="POST">
      <div>
        <label for="say">What do you want to say?</label>
        <input name="say" id="say" value="Hi" />
      </div>
      <div>
        <label for="to">Who do you want to say it to?</label>
        <input name="to" id="to" value="Mom" />
      </div>
      <input type=hidden name="redirect" value="{{ base_url }}{{ url('test_done_page') }}" />
      <input type=hidden name="repo" value="git@github.com:peterdemin/git-form-saver-demo.git" />
      <input type=hidden name="file" value="README.md" />
      <div>
        <button>Send</button>
      </div>
    </form>

    <h2>Implicit redirect back</h2>
    <form action="./" method="POST">
      <div>
        <label for="what">What do you want to get?</label>
        <input name="what" value="Cucumber" />
      </div>
      <div>
        <label for="where">Where do you want to get it?</label>
        <input name="where" value="Jar" />
      </div>
      <input type=hidden name="repo" value="git@github.com:peterdemin/git-form-saver-demo.git" />
      <input type=hidden name="file" value="README.md" />
      <div>
        <button>Send</button>
      </div>
    </form>

    <h2>All fields explicit</h2>
    <form action="./" method="POST">
      <div>
        <label for="text">Text</label>
        <input name="text" id="text" value="Text" />
      </div>
      <div>
        <label for="redirect">Redirect target after submission</label>
        <input name="redirect" value="{{ base_url }}{{ url('test_done_page') }}" />
      </div>
      <div>
        <label for="repo">Repository URL</label>
        <input name="repo" value="git@github.com:peterdemin/git-form-saver-demo.git" />
      </div>
      <div>
        <label for="file">File path inside of the repository</label>
        <input name="file" value="README.md" />
      </div>
      <div>
        <button>Send</button>
      </div>
    </form>

  </body>
</html>
