Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement dynamic dropdown #33

Merged
merged 1 commit into from
Oct 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,4 @@ TLDR: fix deployment using either the log files or by poking around with ```eb s

# Note for testing locally
- replace host with "localhost"
- source file with secrets
21 changes: 18 additions & 3 deletions form_builder/templates/form_builder/CLIP_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,26 @@ <h1>eCLIP (CLIPper) Form Builder</h1>
<h2>Add new sample (Full paths only)</h2>
<div class="row">
<label for="experiment">Experiment name (alphanumeric or underscores only, no spaces)</label>
<div class="col"><input class="form-control" type="text" name="experiment" id="experiment" pattern="[a-zA-Z0-9_]+"></div>
<div class="col"><input class="form-control" type="text" name="experiment" id="experiment" pattern="[a-zA-Z0-9_]+" list="experiment-select"></div>
<datalist name="experiment-select" id="experiment-select">
{% for fastq in fastq %}
<option value="{{fastq.experiment}}">{{ fastq.experiment }}</option>
{% endfor %}
</datalist>
<label for="sample">Sample name (alphanumeric or underscores only, no spaces)</label>
<div class="col"><input class="form-control" type="text" name="sample" id="sample" pattern="[a-zA-Z0-9_]+"></div>
<div class="col"><input class="form-control" type="text" name="sample" id="sample" pattern="[a-zA-Z0-9_]+" list="sample-select"></div>
<datalist name="sample-select" id="sample-select">
{% for fastq in fastq %}
<option value="{{fastq.sample}}">{{ fastq.sample }}</option>
{% endfor %}
</datalist>
<label for="cells">Cells (alphanumeric or underscores only, no spaces)</label>
<div class="col"><input class="form-control" type="text" name="cells" id="cells" pattern="[a-zA-Z0-9_]+"></div>
<div class="col"><input class="form-control" type="text" name="cells" id="cells" pattern="[a-zA-Z0-9_]+" list="cell-select"></div>
<datalist name="cell-select" id="cell-select">
{% for fastq in fastq %}
<option value="{{fastq.cells}}">{{ fastq.cells }}</option>
{% endfor %}
</datalist>
</div>
<div class="row">
{% include 'form_builder/fastq_submit.html' %}
Expand Down
3 changes: 3 additions & 0 deletions form_builder/templates/form_builder/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
{% block css %}{% endblock %}

<script src="../../scripts/base.js" type="module"></script>


</head>

<body>
Expand Down