Skip to content

Commit a87fc2f

Browse files
committed
addressing @josenavas gui comment
1 parent 1a6762d commit a87fc2f

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

qiita_pet/templates/study_description.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@
184184
form.submit();
185185
}
186186

187-
function delete_sample_template(sample_template_id) {
187+
function delete_sample_template() {
188+
sample_template_id = {{study.sample_template}};
188189
if (confirm('Are you sure you want to delete sample template ID: ' + sample_template_id + '?')) {
189190
var form = $("<form>")
190191
.attr("action", window.location.href)
@@ -556,10 +557,7 @@ <h2><i>{{study_alias}}</i></h2>
556557
<!-- Nav tabs -->
557558
<ul class="nav nav-tabs" role="tablist" id="myTab">
558559
<li class="active">
559-
<a href="#study_information_tab" role="tab" data-toggle="tab">
560-
Study information
561-
<button class="close" title="Remove this sample template" type="button" onclick="delete_sample_template({{study.sample_template}})">&nbsp; ×</button>
562-
</a>
560+
<a href="#study_information_tab" role="tab" data-toggle="tab">Study information</a>
563561
</li>
564562
{% if show_data_tabs %}
565563
<li><a href="#raw_data_tab" role="tab" data-toggle="tab">Raw data</a></li>

qiita_pet/templates/study_description_templates/study_information_tab.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@
5757
<td>
5858
<a class="btn btn-primary" onclick="extend_sample_template();">Add samples to study</a>
5959
</td>
60+
<td>&nbsp; &nbsp;</td>
61+
<td>
62+
<a class="btn btn-danger glyphicon glyphicon-trash" onclick="delete_sample_template();"></a>
63+
</td>
6064
{% end %}
6165
</table>
6266
</div>

0 commit comments

Comments
 (0)