Skip to content

Commit

Permalink
pkp/pkp-lib#6099 Added a required country field to the context form.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasraoni committed Mar 13, 2021
1 parent 8b2beef commit aa58b1d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cypress/tests/data/20-CreateContext.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ describe('Data suite tests', function() {
cy.get('div[id=context-acronym-error-en_US]').find('span').contains('This field is required.');
cy.get('div[id=context-urlPath-error]').find('span').contains('This field is required.');
cy.get('div[id=context-primaryLocale-error]').find('span').contains('This field is required.');
cy.get('div[id=context-country-error]').find('span').contains('This field is required.');
cy.get('input[name="name-en_US"]').type(Cypress.env('contextTitles')['en_US'], {delay: 0});
cy.get('input[name=acronym-en_US]').type('JPK', {delay: 0});
cy.get('span').contains('Enable this preprint server').siblings('input').check();
cy.get('input[name="supportedLocales"][value="en_US').check();
cy.get('input[name="supportedLocales"][value="fr_CA').check();
cy.get('input[name="primaryLocale"][value="en_US').check();
cy.get('select[id=context-country-control]').select('Iceland');

// Test invalid path characters
cy.get('input[name=urlPath]').type('public&-)knowledge', {delay: 0});
Expand Down
3 changes: 3 additions & 0 deletions locale/en_US/manager.po
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ msgstr "Include any information about your server which may be of interest to re
msgid "manager.setup.contextInitials"
msgstr "Server initials"

msgid "manager.setup.selectCountry"
msgstr "Select the country where this server is located, or the country of the mailing address for the server or publisher."

msgid "manager.setup.serverThumbnail"
msgstr "Server thumbnail"

Expand Down
6 changes: 6 additions & 0 deletions schemas/context.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
"nullable"
]
},
"country": {
"type": "string",
"validation": [
"country"
]
},
"enableAuthorScreening": {
"type": "boolean",
"default": 0,
Expand Down

0 comments on commit aa58b1d

Please sign in to comment.