Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7892945
Bulk delete Entities
sadiqkhoja Aug 12, 2025
3003c6b
Show bulk events in entity feed
sadiqkhoja Aug 18, 2025
b3c831c
PR Feedback
sadiqkhoja Aug 19, 2025
289f58e
Added tests to demostrate the problems
sadiqkhoja Aug 21, 2025
8491248
Fix space character after redirection
sadiqkhoja Aug 26, 2025
8a9fbaa
PR Feedback
sadiqkhoja Aug 27, 2025
72c8761
Feature getodk/central#973: CreatedBy and CreatedAt filters for Entities
sadiqkhoja Jul 11, 2025
77994a1
Incorporated PR Feedback
sadiqkhoja Aug 27, 2025
7691dc6
Merge pull request #1327 from sadiqkhoja/fixes/space-in-query-param
sadiqkhoja Aug 27, 2025
a0e0aac
chore: upgrades to web-forms v0.14.0 (#1330)
latin-panda Aug 28, 2025
2da539e
Fixes: ability to make multiple submission with public links
sadiqkhoja Aug 27, 2025
1f21a20
Use query parameter single instead of url suffix
sadiqkhoja Aug 28, 2025
bfea9f2
dont redirect when single qp is false
sadiqkhoja Aug 29, 2025
2d26126
Merge pull request #1325 from sadiqkhoja/fixes/end-of-form-behavior
sadiqkhoja Sep 2, 2025
50b4eb6
Copy nginx configuration from central repository
sadiqkhoja Sep 2, 2025
bc0fa3e
Merge pull request #1334 from sadiqkhoja/enketo-redirection-copy
sadiqkhoja Sep 2, 2025
f9acf70
Merge pull request #1332 from getodk/v2025.2.x
matthew-white Sep 2, 2025
6553af8
Merge pull request #1310 from sadiqkhoja/entity-filters
sadiqkhoja Sep 3, 2025
feb98d3
PR Feedback round 2
sadiqkhoja Sep 4, 2025
47d4d86
Merge branch 'master' into features/bulk-delete-entities
sadiqkhoja Sep 5, 2025
5139fb0
Fixes getodk/central#1185: Pass $search to EntityDownload component
sadiqkhoja Jul 23, 2025
270462e
Add toggle for submission map view (#1335)
matthew-white Sep 8, 2025
0807b70
e2e-tests: use npm clean-install (#1337)
alxndrsn Sep 9, 2025
83b3851
PR Feedback round 3
sadiqkhoja Sep 10, 2025
80398ba
Merge pull request #1316 from sadiqkhoja/features/bulk-delete-entities
sadiqkhoja Sep 10, 2025
4f31e03
Merge pull request #1336 from sadiqkhoja/fixes/1185-search-entity-csv
sadiqkhoja Sep 10, 2025
044939d
Fixes getodk/central#1096: Show toast after web forms setting is changed
sadiqkhoja Sep 16, 2025
322c974
Merge pull request #1340 from sadiqkhoja/fixes/toast-message-form-set…
sadiqkhoja Sep 17, 2025
5531b77
Make it easy to undo mockLogin() (#1345)
matthew-white Sep 18, 2025
b24c3b7
Track when requestData resource is set or patched (#1341)
matthew-white Sep 18, 2025
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
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ module.exports = {
$: 'readonly',
alert: 'readonly',
document: 'readonly',
window: 'readonly'
window: 'readonly',
defineModel: 'readonly'
},
rules: {
'arrow-parens': 'off',
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ if [[ ${CI-} = true ]]; then
fi

log "Installing npm packages..."
npm install
npm ci

cd e2e-tests
log "Playwright: $(npx playwright --version)"
Expand Down
7 changes: 4 additions & 3 deletions e2e-tests/tests/enketo.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,20 +251,21 @@ test.describe('Enketo', () => {
await expect(frame.getByRole('heading', { name: 'Successful' })).toBeVisible();
});

test('default value is consistent between rendering enketo directly or via iframe', async ({ page }) => {
test('default value is consistent between rendering enketo directly and via iframe', async ({ page }) => {
await login(page);

const queryWithSpaces = '?d[/data/first_name]=hello earth + hello mars %20 hello jupiter %2B hello saturn';

await page.goto(`${appUrl}/enketo-passthrough/${publishedForm.enketoId}${queryWithSpaces}`);
await expect(page.getByRole('heading', { name: publishedForm.name })).toBeVisible();

const defaultValueInEnketo = await page.getByLabel('First Name').inputValue();
await expect(page.getByLabel('First Name')).toHaveValue('hello earth + hello mars hello jupiter + hello saturn');

await page.goto(`${appUrl}/projects/${projectId}/forms/${publishedForm.xmlFormId}/submissions/new${queryWithSpaces}`);
const iframe = await page.frameLocator('iframe');
await expect(iframe.getByRole('heading', { name: publishedForm.name })).toBeVisible();

await expect(iframe.getByLabel('First Name')).toHaveValue(defaultValueInEnketo);
// except we transform + into space as well in iframe
await expect(iframe.getByLabel('First Name')).toHaveValue('hello earth hello mars hello jupiter + hello saturn');
});
});
22 changes: 20 additions & 2 deletions main.nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@ http {
~^__Host-(session=.+)$ $1;
}

map $args $qp_deliminator {
~.+ "&";
default "?";
}

map $arg_st $redirect_non_single_prefix {
~.+ "${is_args}${args}${qp_deliminator}single=false";
default "/new${is_args}${args}";
}

map $arg_st $redirect_single_prefix {
~.+ "${is_args}${args}";
default "/new${is_args}${args}${qp_deliminator}single=true";
}

server {
listen 8686;
server_name localhost;
Expand All @@ -70,7 +85,9 @@ http {
# Following are the locations that serve a Form and these are redirected to the frontend:
location ~ "^/-/single/(?<enketoId>[a-zA-Z0-9]+)$" {
# Form fill link, public
return 301 "/f/$enketoId$is_args$args";
# If 'st' query parameter is not present, redirect to protected route with single only
# end-of-form behavior (/new?single=true)
return 301 "/f/$enketoId$redirect_single_prefix";
}
location ~ "^/-/preview/(?<enketoId>[a-zA-Z0-9]+)$" {
# preview link
Expand All @@ -81,7 +98,8 @@ http {
# we don't want them to be redirected to central-frontend
location ~ "^/-/(?!thanks$|connection$|login$|logout$|api$|preview$)(?<enketoId>[a-zA-Z0-9]+)$" {
# Form fill link (non-public), or Draft
return 301 "/f/$enketoId/new$is_args$args";
# If 'st' query parameter is present, add ?single=false for public access
return 301 "/f/$enketoId$redirect_non_single_prefix";
}
location = /-/single/check-submitted {
alias ./dist/blank.html;
Expand Down
Loading