Skip to content

Commit

Permalink
fix up UI options for hashing and private
Browse files Browse the repository at this point in the history
  • Loading branch information
dale-wahl committed Aug 29, 2023
1 parent 8b4d71c commit 99f2991
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
14 changes: 13 additions & 1 deletion common/lib/config_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,19 @@
"default": True,
"tooltip": "If a dataset is a JSON file but it can be mapped to a CSV file, show the CSV in the preview instead"
"of the underlying JSON."
}
},
"ui.offer_hashing": {
"type": UserInput.OPTION_TOGGLE,
"default": True,
"help": "Offer pseudonymisation",
"tooltip": "Add a checkbox to the 'create dataset' forum to allow users to toggle pseudonymisation."
},
"ui.offer_private": {
"type": UserInput.OPTION_TOGGLE,
"default": True,
"help": "Offer create as private",
"tooltip": "Add a checkbox to the 'create dataset' forum to allow users to make a dataset private."
},
}

# These are used in the web interface for more readable names
Expand Down
9 changes: 4 additions & 5 deletions webtool/templates/create-dataset.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ <h2><span>Create new dataset</span></h2>
</div>

<div id="data-options">
{% if __user_config("ui.offer_hashing") %}
<p class="form-intro">4CAT can remove information it identifies as relating to an item's author, or
replace it with a <a href="https://techterms.com/definition/hash">hashed</a> value. Other
personal information may persist; it is your responsibility to further anonymise data where
Expand All @@ -50,19 +51,17 @@ <h2><span>Create new dataset</span></h2>
</select>
</div>
</div>
{% endif %}
{% if __config_expire_offer_private %}
{% endif %}
{% if __user_config("ui.offer_private") %}
<div class="form-element">
<label for="data-make-private">Make private:</label>
<div class="filter-parameters">
<label><input type="checkbox" name="make-private" id="data-make-private" checked="checked"> Make dataset private</label>
<button class="tooltip-trigger" aria-controls="tooltip-dataset-private" aria-label="Extended help for option">?</button>
</div>


<p role="tooltip" id="tooltip-dataset-private">This will only hide your dataset from other users. It will NOT encrypt your data and server administrators will still be able to view it. If you are working with sensitive data, you should consider running your own 4CAT instance.</p>
</div>
{% endif %}
{% endif %}
<div class="form-element">
<label for="dataset-label">Dataset name:</label>
<input id="dataset-label" name="label">
Expand Down

0 comments on commit 99f2991

Please sign in to comment.