Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions templates/safebars_v2.html
Original file line number Diff line number Diff line change
Expand Up @@ -2139,7 +2139,7 @@ <h3>Study session setup</h3>
<div class="materials-body">
<div class="field">
<label for="projectTitle">Project title</label>
<input id="projectTitle" type="text" placeholder="Give this protocol a short working title">
<textarea id="projectTitle" class="textarea-short" placeholder="Give this protocol a short working title"></textarea>
</div>
<div class="field">
<label for="projectReviewContext">Research area and ethics-review context</label>
Expand Down Expand Up @@ -2789,7 +2789,7 @@ <h3>Plain-language guide to interface terms</h3>
Object.entries(artifactInputs).forEach(([key, id]) => artifacts[key] = $(id).value.trim());
const payload = {
project: {
title: $("projectTitle").value.trim(),
title: $("projectTitle").value.trim().replace(/\s+/g, " "),
review_context: $("projectReviewContext").value.trim(),
context: $("projectContext").value.trim(),
target_people: $("targetPeople").value.trim(),
Expand Down
19 changes: 19 additions & 0 deletions tests/test_encounter_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,25 @@ def test_workspace_and_v1_routes_are_available(self):
self.assertIn(b"Keep your record", workspace.data)
self.assertIn(b"Six short questions", workspace.data)
self.assertIn(b"Research area and ethics-review context", workspace.data)
self.assertIn(
b'<textarea id="projectTitle" class="textarea-short"',
workspace.data,
)
self.assertIn(
b'<textarea id="projectReviewContext" class="textarea-short"',
workspace.data,
)
self.assertIn(
b'<textarea id="projectContext" class="textarea-short"',
workspace.data,
)
self.assertIn(
b'<textarea id="targetPeople" class="textarea-short"',
workspace.data,
)
self.assertIn(b"resize: vertical", workspace.data)
self.assertNotIn(b"max-height: 72px", workspace.data)
self.assertNotIn(b"project-scroll-field", workspace.data)
self.assertNotIn(b"What are you studying", workspace.data)
self.assertIn(b"Intake completed", workspace.data)
self.assertIn(b"Done \xc2\xb7 review populated fields", workspace.data)
Expand Down
Loading