From af936c05c8363f745c04a8af886633140c504c31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20=20MENAGER?= <herve.menager@pasteur.fr> Date: Sun, 25 Feb 2018 22:00:30 +0100 Subject: [PATCH] correct modal multiselect naming strategy use param_name instead of label Former-commit-id: bb1f2d4772884ce184abdb0b0539300aa7674c06 --- ippisite/ippidb/templates/compound_list.html | 8 ++++---- ippisite/ippidb/templates/multiselection_modal.html | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ippisite/ippidb/templates/compound_list.html b/ippisite/ippidb/templates/compound_list.html index 50321929..21abc5ec 100644 --- a/ippisite/ippidb/templates/compound_list.html +++ b/ippisite/ippidb/templates/compound_list.html @@ -33,10 +33,10 @@ <main class="col-12" role="main"> <form> <div class="row"> - {% include "multiselection_button.html" with label="PPI" %} - {% include "multiselection_button.html" with label="Disease" %} - {% include "multiselection_button.html" with label="Organism" %} - {% include "multiselection_button.html" with label="Bound complex" %} + {% include "multiselection_button.html" with label="PPI" param_name="ppi" %} + {% include "multiselection_button.html" with label="Disease" param_name="disease" %} + {% include "multiselection_button.html" with label="Organism" param_name="taxonomy" %} + {% include "multiselection_button.html" with label="Bound complex" param_name="boundcomplex" %} </div> <div class="row"> <span class="col-md-6"><span>{{ count }} compounds</span> diff --git a/ippisite/ippidb/templates/multiselection_modal.html b/ippisite/ippidb/templates/multiselection_modal.html index 283e9741..12c5685d 100644 --- a/ippisite/ippidb/templates/multiselection_modal.html +++ b/ippisite/ippidb/templates/multiselection_modal.html @@ -1,4 +1,4 @@ -<div class="modal fade" id="modal-{{ label }}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> +<div class="modal fade" id="modal-{{ param_name }}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> @@ -40,7 +40,7 @@ </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> - <button type="button" class="btn btn-primary" onclick="$('#modal-{{ label }}').modal('hide'); changeSelection('{{ param_name }}');">Apply</button> + <button type="button" class="btn btn-primary" onclick="$('#modal-{{ param_name }}').modal('hide'); changeSelection('{{ param_name }}');">Apply</button> </div> </div> </div> -- GitLab