Skip to content

Commit

Permalink
Merge pull request #410 from getodk/autosend
Browse files Browse the repository at this point in the history
Add autosend to managed QR codes
  • Loading branch information
matthew-white authored Jan 14, 2021
2 parents f8a495c + 99558b1 commit cddb691
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
12 changes: 8 additions & 4 deletions src/components/field-key/qr-panel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ export default {
const settings = {
server_url: apiPaths.serverUrlForFieldKey(token, projectId)
};
if (this.managed) settings.form_update_mode = 'match_exactly';
if (this.managed) {
settings.form_update_mode = 'match_exactly';
settings.autosend = 'wifi_and_cellular';
}
return settings;
}
}
Expand Down Expand Up @@ -165,10 +168,11 @@ export default {
"legacyCode": "Legacy QR Code"
}
},
// "Get Blank Form" is the text of a button in ODK Collect.
{
"managed": "Collect will exactly match the Forms available to “{displayName}” including automatically applying updates. Users will not need to manually Get Blank Forms.",
"legacy": "Users will have to manually Get Blank Forms on the device and determine which Forms to update.",
// "Get Blank Form" is the text of a button in ODK Collect.
"managed": "Collect will exactly match the Forms available to “{displayName}” including automatically applying updates. Users will not need to manually Get Blank Forms. Additionally, finalized Forms will be sent automatically as soon as a connection is found.",
// "Get Blank Form" and "Send Finalized Form" are the text of buttons in ODK Collect.
"legacy": "Users will have to manually Get Blank Forms on the device and determine which Forms to update. They will also need to manually Send Finalized Forms."
},
{
"managed": {
Expand Down
3 changes: 2 additions & 1 deletion test/components/field-key/qr-panel.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ describe('FieldKeyQrPanel', () => {
const { token } = testData.extendedFieldKeys.last();
panel.first(CollectQr).getProp('settings').should.eql({
server_url: `/v1/key/${token}/projects/1`,
form_update_mode: 'match_exactly'
form_update_mode: 'match_exactly',
autosend: 'wifi_and_cellular'
});
});

Expand Down
6 changes: 3 additions & 3 deletions transifex/strings_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -911,12 +911,12 @@
},
"1": {
"managed": {
"string": "Collect will exactly match the Forms available to “{displayName}” including automatically applying updates. Users will not need to manually Get Blank Forms.",
"string": "Collect will exactly match the Forms available to “{displayName}” including automatically applying updates. Users will not need to manually Get Blank Forms. Additionally, finalized Forms will be sent automatically as soon as a connection is found.",
"developer_comment": "\"Get Blank Form\" is the text of a button in ODK Collect."
},
"legacy": {
"string": "Users will have to manually Get Blank Forms on the device and determine which Forms to update.",
"developer_comment": "\"Get Blank Form\" is the text of a button in ODK Collect."
"string": "Users will have to manually Get Blank Forms on the device and determine which Forms to update. They will also need to manually Send Finalized Forms.",
"developer_comment": "\"Get Blank Form\" and \"Send Finalized Form\" are the text of buttons in ODK Collect."
}
},
"2": {
Expand Down

0 comments on commit cddb691

Please sign in to comment.