{%extends "base.html"%}
{%from "dbupdate_hidden_fields.html" import hidden_fields%}

{%block title%}Create Study{%endblock%}

{%block css%}
<link rel="stylesheet" href="/static/css/two-column-with-separator.css" />
{%endblock%}

{%block contents%}
<h2 class="heading">{{filename}}: create study</h2>

{%with messages = get_flashed_messages(with_categories=true)%}
{%if messages:%}
<ul>
  {%for category, message in messages:%}
  <li class="{{category}}">{{message}}</li>
  {%endfor%}
</ul>
{%endif%}
{%endwith%}

<div class="row">
  <form method="POST" action="{{url_for('dbinsert.final_confirmation')}}"
	id="select-platform-form" data-genechips="{{genechips_data}}"
	class="two-col-sep-col1">
    <legend>continue with new dataset</legend>
    {{hidden_fields(
    filename, filetype, species=species, genechipid=genechipid,
    studyid=studyid, datasetid=datasetid, totallines=totallines)}}

    <button type="submit" class="btn btn-primary">continue</button>
  </form>
</div>

<div class="row">
  <p class="two-col-sep-separator">OR</p>
</div>

<div class="row">
  <form method="POST" action="{{url_for('dbinsert.select_dataset')}}"
	id="select-platform-form" data-genechips="{{genechips_data}}"
	class="two-col-sep-col2">
    <legend>Select from existing dataset</legend>
    {{hidden_fields(
    filename, filetype, species=species, genechipid=genechipid,
    studyid=studyid, datasetid=datasetid, totallines=totallines)}}

    <button type="submit" class="btn btn-primary">go back</button>
  </form>
</div>
{%endblock%}