fix: Duplicate ID when the uses views the push and the lookup modals

pull/771/head
Raphaël Vinot 2023-08-29 18:34:07 +02:00
parent 6a6ac01f3f
commit 1c516d58f3
2 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@
</br> </br>
<div class="btn-group" role="group" aria-label="MISP Selector" id="mispSelector"> <div class="btn-group" role="group" aria-label="MISP Selector" id="mispSelector">
{%for name in misps_occurrences %} {%for name in misps_occurrences %}
<button type="button" value="{{name.replace(' ', '_')}}" class="btn btn-outline-primary {%if name == current_misp%}active{%endif%}" href="#">{{name}}</a></li> <button type="button" value="lookup_{{name.replace(' ', '_')}}" class="btn btn-outline-primary {%if name == current_misp%}active{%endif%}" href="#">{{name}}</a></li>
{%endfor%} {%endfor%}
</div> </div>
{%endif%} {%endif%}
@ -17,7 +17,7 @@
<div id="allInstances"> <div id="allInstances">
{% for name, occurrences in misps_occurrences.items() %} {% for name, occurrences in misps_occurrences.items() %}
<div id="{{name.replace(' ', '_')}}" {%if name != current_misp%}style="display:none"{%endif%}> <div id="lookup_{{name.replace(' ', '_')}}" {%if name != current_misp%}style="display:none"{%endif%}>
{% set hits, root_url = occurrences %} {% set hits, root_url = occurrences %}
{% if hits %} {% if hits %}
<ul> <ul>

View File

@ -4,7 +4,7 @@
</br> </br>
<div class="btn-group" role="group" aria-label="MISP Selector" id="mispSelector"> <div class="btn-group" role="group" aria-label="MISP Selector" id="mispSelector">
{%for name in misp_instances_settings %} {%for name in misp_instances_settings %}
<button type="button" value="{{name.replace(' ', '_')}}" <button type="button" value="push_{{name.replace(' ', '_')}}"
class="btn btn-outline-primary {%if name == current_misp%}active{%endif%}" href="#">{{name}}</a></li> class="btn btn-outline-primary {%if name == current_misp%}active{%endif%}" href="#">{{name}}</a></li>
{%endfor%} {%endfor%}
</div> </div>
@ -13,7 +13,7 @@
<div id="allInstances"> <div id="allInstances">
{%for name, misp_settings in misp_instances_settings.items() %} {%for name, misp_settings in misp_instances_settings.items() %}
<div id="{{name.replace(' ', '_')}}" {%if name != current_misp%}style="display:none"{%endif%}> <div id="push_{{name.replace(' ', '_')}}" {%if name != current_misp%}style="display:none"{%endif%}>
<form role="form" action="{{ url_for('web_misp_push_view', tree_uuid=tree_uuid) }}" <form role="form" action="{{ url_for('web_misp_push_view', tree_uuid=tree_uuid) }}"
method=post enctype=multipart/form-data> method=post enctype=multipart/form-data>
<label for="misp_instance_name" class="col-sm-2 col-form-label">Submit event to:</label> <label for="misp_instance_name" class="col-sm-2 col-form-label">Submit event to:</label>