Skip to content

Commit

Permalink
fix(task): fixed missing fields on new task page
Browse files Browse the repository at this point in the history
closes #416
  • Loading branch information
christopherpickering committed Sep 18, 2023
1 parent a481e4d commit e96882a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions web/static/js/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -593,11 +593,15 @@
p.querySelector('.task-query-location').style.display = 'none';
p.querySelector('.task-sourceSsh').style.display = 'none';
p.querySelector('.task-query-headers').style.display = 'none';
p.querySelector('.task-query-cache').style.display = 'none';
p.querySelector('.task-query-requireOut').style.display = 'none';

if (t.value === '1') {
p.querySelector('.task-sourceDatabase').style.removeProperty('display');
p.querySelector('.task-query-location').style.removeProperty('display');
p.querySelector('.task-query-headers').style.removeProperty('display');
p.querySelector('.task-query-cache').style.removeProperty('display');
p.querySelector('.task-query-requireOut').style.removeProperty('display');
} else if (t.value === '2') {
p.querySelector('.task-sourceSmb').style.removeProperty('display');
} else if (t.value === '3') {
Expand Down
11 changes: 6 additions & 5 deletions web/templates/pages/task/new/query_location.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@
</div>
</section>
<div class="field task-query-headers"
{% if not t or not t.source_type_id or t.source_type_id == 3 or t.source_type_id == 2 or t.source_type_id == 5 or t.source_type_id == 6 %}

{% if t and t.source_type_id in [3,2,5,6] %}
style="display:none;"
{% endif %}>
<input class="is-checkradio is-info"
Expand All @@ -184,8 +185,8 @@
name="task_include_query_headers"
value="{%- if not t or (t and t.source_query_include_header == 1) -%} 1 {%- else -%} 0 {%- endif -%}" />
</div>
<div class="field"
{% if not t or not t.source_type_id or t.source_type_id == 3 or t.source_type_id == 2 or t.source_type_id == 5 or t.source_type_id == 6 %}
<div class="field task-query-cache"
{% if t and t.source_type_id in [3,2,5,6] %}
style="display:none;"
{% endif %}>
<input class="is-checkradio is-info"
Expand All @@ -197,8 +198,8 @@
name="task_enable_source_cache"
value="{%- if not t or (t and t.enable_source_cache == 1) -%} 1 {%- else -%} 0 {%- endif -%}" />
</div>
<div class="field"
{% if not t or not t.source_type_id or t.source_type_id == 3 or t.source_type_id == 2 or t.source_type_id == 5 or t.source_type_id == 6 %}
<div class="field task-query-requireOut"
{% if t and t.source_type_id in [3,2,5,6] %}
style="display:none;"
{% endif %}>
<input class="is-checkradio is-info"
Expand Down

0 comments on commit e96882a

Please sign in to comment.