Skip to content

Commit

Permalink
RDISCROWD-7779 project dup task setting (#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterkle authored Feb 13, 2025
1 parent 23ef928 commit 9c2d3da
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions templates/projects/update.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ <h3>{{_('Enable project syncing')}}</h3>
{% if 'data_access' in form %}
{{ render_select2_field(form.data_access, config.DATA_ACCESS_MESSAGE.replace('SHORT_NAME', project.short_name) if config.DATA_ACCESS_MESSAGE else None) }}
{% endif %}
<h4>{{_('Task Duplication Check')}}</h4>
{% if 'enable_duplicate_task_check' in form %}
{{ render_checkbox_field(form.enable_duplicate_task_check, title=_('Enable duplicate task check')) }}
{% endif %}
<div id="duplicate_task_field_config">
{{ render_select2_field(form.duplicate_task_check_duplicate_fields, config={ "tags": true, "tokenSeparators": [',', ' '], "placeholder": "Enter a comma separated list." }) }}
{{ render_checkbox_field(form.duplicate_task_check_completed_tasks, title=_('Include completed tasks in task duplication check.')) }}
</div>
<div class="form-actions">
<button type="submit" name='btn' value="Save the changes" class="btn btn-primary">{{_('Save the changes')}}</button>
</div>
Expand Down Expand Up @@ -128,6 +136,16 @@ <h3>{{_('Transfer project ownership')}}</h3>
event.preventDefault();
$('#remove-password-form').submit();
});

if ($('#enable_duplicate_task_check').is(":checked")) {
$('#duplicate_task_field_config').show();
} else {
$('#duplicate_task_field_config').hide();
}

$('#enable_duplicate_task_check').click(function(event) {
$('#duplicate_task_field_config').toggle();
})
});
</script>
{% endif %}
Expand Down

0 comments on commit 9c2d3da

Please sign in to comment.