Niharika29 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/397804 )
Change subject: More modifications to the form ...................................................................... More modifications to the form - Replaces one question with another (string change only) - Adds a text field as a follow-up question to another (validation dependent) Bug: T181072 Change-Id: I8f143d7324764f047bd0cdd37b1d4e34efe91114 --- A data/db/migrations/20171212-add-scholarship-orgs-field.sql M data/db/schema.mysql M data/i18n/en.json M data/templates/apply.html M data/templates/review/view.html M src/Forms/Apply.php 6 files changed, 29 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/wikimania-scholarships refs/changes/04/397804/1 diff --git a/data/db/migrations/20171212-add-scholarship-orgs-field.sql b/data/db/migrations/20171212-add-scholarship-orgs-field.sql new file mode 100644 index 0000000..903a2ea --- /dev/null +++ b/data/db/migrations/20171212-add-scholarship-orgs-field.sql @@ -0,0 +1,2 @@ +-- Add column for scholarship organizations people apply for +ALTER TABLE scholarships ADD COLUMN scholarorgs VARCHAR(255) DEFAULT NULL AFTER separatejury; diff --git a/data/db/schema.mysql b/data/db/schema.mysql index 74523d9..2e43ecf 100644 --- a/data/db/schema.mysql +++ b/data/db/schema.mysql @@ -17,6 +17,7 @@ , type ENUM('partial', 'full', 'either') DEFAULT NULL , chapteragree TINYINT(1) NOT NULL DEFAULT '0' , separatejury TINYINT(1) NOT NULL DEFAULT '0' + , scholarorgs VARCHAR(255) DEFAULT NULL , fname VARCHAR(32) DEFAULT NULL , lname VARCHAR(32) DEFAULT NULL , email VARCHAR(64) DEFAULT NULL diff --git a/data/i18n/en.json b/data/i18n/en.json index 261706d..4dbb8ef 100644 --- a/data/i18n/en.json +++ b/data/i18n/en.json @@ -31,7 +31,7 @@ "deadline-passed": "<p>Scholarship application deadline was February 20, 23:59 UTC.</p>\n<p>We will notify applicants in April 2018 about the result of their application.</p>\n<p>Please see the <a href='https://wikimania2018.wikimedia.org/wiki/Special:MyLanguage/Scholarships'>scholarships page</a> on the wiki for more details.</p>", - "form-intro": "<p>This is the application for sponsorship to attend <a href=\"https://wikimania2018.wikimedia.org/wiki/Special:MyLanguage/Main_Page\">Wikimania 2018</a>, the annual international conference centered on Wikimedia projects. Awardees will receive a scholarship which will cover conference registration fees, hotel, and roundtrip travel to Wikimania in Cape Town, South Africa, July 18-22, 2018.</p>\n<p><b>Applications may be submitted in any language</b>, but every applicant must <b>provide evidence of English language abilities</b> that are at a level which would enable them to participate in Wikimania, a conference which is primarily conducted in English. Sufficient English abilities could be demonstrated in the application itself or elsewhere.</p>\n<p>This is not a scholarship for university study. Applications not obviously related to the conference will be discarded.</p>\n<p>Please carefully consider your financial needs before applying for a scholarship to attend Wikimania. There are limited funds available and many applicants do not have the financial means to attend Wikimania without this opportunity. Thank you.</p>\n<p>Please note that <strong>if you need more then 10 minutes to complete this application, please draft your answers in a text editor</strong>, reload this page and then copy-paste your answers into corresponding fields before submitting. This application may give an error (\"Missing or invalid CSRF token\") if it is open for more then 15 minutes before submitting.</p>\n<p>The deadline to apply is <strong>February 20, 23:59 UTC</strong>.</p> ", + "form-intro": "<p>This is the application for sponsorship to attend <a href=\"https://wikimania2018.wikimedia.org/wiki/Special:MyLanguage/Main_Page\">Wikimania 2018</a>, the annual international conference centered on Wikimedia projects. Awardees will receive a scholarship which will cover conference registration fees, hotel, and roundtrip travel to Wikimania in Cape Town, South Africa, July 18-22, 2018.</p>\n<p><b>Applications may be submitted in any language</b>, but every applicant must <b>provide evidence of English language abilities</b> that are at a level which would enable them to participate in Wikimania, a conference which is primarily conducted in English. Sufficient English abilities could be demonstrated in the application itself or elsewhere.</p>\n<p>Please carefully consider your financial needs before applying for a scholarship to attend Wikimania. There are limited funds available and many applicants do not have the financial means to attend Wikimania without this opportunity. Thank you.</p>\n<p>Please note that <strong>if you need more then 10 minutes to complete this application, please draft your answers in a text editor</strong>, reload this page and then copy-paste your answers into corresponding fields before submitting. This application may give an error (\"Missing or invalid CSRF token\") if it is open for more then 15 minutes before submitting.</p>\n<p>The deadline to apply is <strong>January 22, 2018, 23:59 UTC</strong>.</p> ", "form-intro-faq": "<a href='https://wikimania2018.wikimedia.org/wiki/Special:MyLanguage/Scholarships/FAQ'>Frequently asked questions</a>", @@ -47,6 +47,7 @@ "form-gender_other-error": "Please describe your self-defined gender identity.", "form-reports-error": "Please provide links to your previous scholarship reports.", "form-scholarship-error": "Please select the scholarship type", + "form-scholarorgs-error": "Please tell us the organizations you are applying for a scholarship with.", "form-wmfAgreeGuardian-error": "Please enter your legal guardian's name.", "form-fname-error": "Please enter your first name.", "form-lname-error": "Please enter your last name.", @@ -132,7 +133,7 @@ "form-contrib-explain": "What’s something great that happened as a result of these activities? This could be described either quantitatively or qualitatively, and could impact either online or offline. Here are some <a href=\"https://wikimania2018.wikimedia.org/wiki/Special:MyLanguage/Scholarships#Relevant_experience\">examples</a> that might help.", "form-experience-explain": "How do you usually share your experiences (or things you’ve learned) with your community? Examples of on-wiki summaries/reports, blog posts, meetup talks, etc. are welcome here.", "form-collaboration-explain": "What collaborations with other Wikimedians or Wikimedia organizations are you most proud of?", - "form-missing-knowledge-explain": "What knowledge matters to you that is still missing in the Wikimedia movement? Who has been left out? What are some ways you might participate at Wikimania to help address this?", + "form-missing-knowledge-explain": "Wikimania 2018's theme is focusing on supporting underrepresented voices and filling knowledge gaps in our movement. What are some communities, forms of knowledge, or subjects that are important to you and still missing from Wikimedia? How would you like to participate at Wikimania to help address this?", "form-interest": "Attendance and involvement in Wikimania", @@ -151,7 +152,8 @@ "form-privacy": "Privacy", "form-review": "All information contained in this application will be reviewed by the members of the <a href=\"https://wikimania2018.wikimedia.org/wiki/Special:MyLanguage/Scholarship_committee\">Wikimania Scholarship Committee</a>. All personal information will be held strictly confidential by the Committee, and the <a href=\"https://wikimediafoundation.org/\">Wikimedia Foundation</a>.", "form-chapteragree": "<p>Wikimedia movement organizations (Chapters, Thematic organizations, and User Groups) also offer scholarships for Wikimania, separate from the Wikimedia Foundation Scholarship Program. While this application is submitted for a Wikimedia Foundation Scholarship, a Wikimedia movement organization may request access to applications that are relevant to their country or community, for the purpose of selecting and awarding their own, independently awarded scholarships.</p> \n Please indicate whether or not you would like your information shared with other, independent Wikimedia movement organizations.", - "form-separatejury": "Some Wikimedia movement organizations proceed with the results of the international Wikimania Scholarship Committee results, some will create their own jury process. In the second case, do you intend to apply for funding there, too? If so, we will work with the organisation in question to arrange the best solution.", + "form-separatejury": "Do you intend to apply to any local Chapter / other movement organization(s) for scholarship funding to Wikimania 2018?", + "form-scholarorgs": "If so, please list the organizations below:", "form-rights-heading": "Applicant Rights & Consent to Data Processing and Transfer", "form-rights1": "I as an applicant for a Wikimedia Foundation ('WMF') scholarship relating to my participation in the 2018 Wikimania conference hosted in Cape Town (South Africa), hereby acknowledge and affirmatively consent to the following as a prerequisite to the consideration of my 2018 Wikimania scholarship application ('Application'):", @@ -302,6 +304,7 @@ "review-view-scholarship-type": "Scholarship type:", "review-view-chapteragree": "Share info with chapters?", "review-view-separatejury": "Apply with independent orgs?", + "review-view-scholarorgs": "Orgs:", "review-view-name": "Name:", "review-view-email": "Email:", "review-view-residence": "Residence:", @@ -326,7 +329,7 @@ "review-view-contrib-explain": "What’s something interesting that happened as a result of these activities?", "review-view-experience-explain": " How do you usually share your experiences (or things you’ve learned) with your community? Examples of on-wiki summaries/reports, blog posts, meetup talks, etc. are welcome here.", "review-view-collaboration-explain": "What collaborations with other Wikimedians or Wikimedia organizations are you most proud of?", - "review-view-missing-knowledge-explain": "What knowledge matters to you that is still missing in the Wikimedia movement? Who has been left out? What are some ways you might participate at Wikimania to help address this?", + "review-view-missing-knowledge-explain": "Wikimania 2018's theme is focusing on supporting underrepresented voices and filling knowledge gaps in our movement. What are some communities, forms of knowledge, or subjects that are important to you and still missing from Wikimedia? How would you like to participate at Wikimania to help address this?", "review-view-engagement": "Engagement with the Wikimedia movement", "review-view-visa": "Will get visa?", "review-view-travel-conditions": "Agrees to travel conditions?", diff --git a/data/templates/apply.html b/data/templates/apply.html index c4d9a13..5891c03 100644 --- a/data/templates/apply.html +++ b/data/templates/apply.html @@ -85,8 +85,9 @@ <fieldset> <legend>{{ 'form-scholarship-type'|message }}</legend> {{ forms.i18nSelect( ctx, 'form-scholarship', 'type', { 'form-scholarship-partial': 'partial', 'form-scholarship-full': 'full', 'form-scholarship-either': 'either' }, { 'required':true, 'escape':false } ) }} - {{ forms.yesNo( ctx, 'form-chapteragree', 'chapteragree', { 'escape':false, 'required': true } ) }} - {{ forms.yesNo( ctx, 'form-separatejury', 'separatejury', { 'escape':false, 'required': true } ) }} + {{ forms.yesNo( ctx, 'form-chapteragree', 'chapteragree', { 'escape':false, 'required':true } ) }} + {{ forms.yesNo( ctx, 'form-separatejury', 'separatejury', { 'escape':false, 'required':true } ) }} + {{ forms.text( ctx, 'form-scholarorgs', 'scholarorgs' ) }} </fieldset> <fieldset> @@ -137,7 +138,7 @@ {{ forms.textArea( ctx, 'form-contrib-explain', 'contribution', { 'required':true, 'escape':false } ) }} {{ forms.textArea( ctx, 'form-collaboration-explain', 'collaboration', { 'required':true } ) }} {{ forms.textArea( ctx, 'form-experience-explain', 'experience', { 'required':true } ) }} - {{ forms.textArea( ctx, 'form-missing-knowledge-explain', 'missingKnowledge' ) }} + {{ forms.textArea( ctx, 'form-missing-knowledge-explain', 'missingKnowledge', { 'required':true } ) }} </fieldset> <fieldset> diff --git a/data/templates/review/view.html b/data/templates/review/view.html index 4a995f2..7ec68d7 100644 --- a/data/templates/review/view.html +++ b/data/templates/review/view.html @@ -36,6 +36,8 @@ <dd>{{ helpers.yesNo( schol.chapteragree ) }}</dd> <dt>{{ 'review-view-separatejury'|message }}</dt> <dd>{{ helpers.yesNo( schol.separatejury ) }}</dd> + <dt>{{ 'review-view-scholarorgs'|message }}</dt> + <dd>{{ schol.scholarorgs }}</dd> </dl> </div> </div> diff --git a/src/Forms/Apply.php b/src/Forms/Apply.php index 00cffda..c94c1d4 100644 --- a/src/Forms/Apply.php +++ b/src/Forms/Apply.php @@ -54,6 +54,7 @@ $this->requireInArray( 'type', [ 'partial', 'full', 'either' ] ); $this->requireBool( 'chapteragree' ); $this->requireBool( 'separatejury' ); + $this->expectString( 'scholarorgs', [ 'validate' => [ $this, 'validateScholarOrgs' ] ] ); // Contact information $this->requireString( 'fname' ); @@ -132,6 +133,16 @@ */ protected function validateGenderOther( $value ) { return $this->get( 'gender' ) == 'o' ? (bool)$value : true; + } + + /** + * Validate that scholarorgs is provided if separatejury == true. + * + * @param mixed $value Value of param + * @return bool True if value is valid, false otherwise + */ + protected function validateScholarOrgs( $value ) { + return $this->get( 'separatejury' ) ? (bool)$value : true; } /** @@ -235,8 +246,8 @@ */ public function save() { $colnames = [ - 'type', 'chapteragree', 'separatejury', 'fname', 'lname', 'email', 'residence', - + 'type', 'chapteragree', 'separatejury', 'scholarorgs', + 'fname', 'lname', 'email', 'residence', 'haspassport', 'nationality', 'airport', 'languages', 'dob', 'gender', 'gender_other', 'occupation', 'areaofstudy', 'username', 'alt_users', 'project', 'project2', 'community', -- To view, visit https://gerrit.wikimedia.org/r/397804 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8f143d7324764f047bd0cdd37b1d4e34efe91114 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/wikimania-scholarships Gerrit-Branch: master Gerrit-Owner: Niharika29 <nko...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits