Niharika29 has uploaded a new change for review.
https://gerrit.wikimedia.org/r/325112
Change subject: Add two questions for 2017 iteration
......................................................................
Add two questions for 2017 iteration
1. Specify if they are a paid staff or contract worker for any Wikimedia org
2. Specify if they are a board member for any Wikimedia org
Bug: T151371
Change-Id: Ie917ec4e3bba178a6898b323879f82ea81da6261
---
A data/db/migrations/20161202-update-questions-2017.sql
M data/db/schema.mysql
M data/i18n/en.json
M data/i18n/qqq.json
M data/templates/apply.html
M data/templates/review/view.html
M src/Forms/Apply.php
7 files changed, 72 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/wikimedia/wikimania-scholarships
refs/changes/12/325112/1
diff --git a/data/db/migrations/20161202-update-questions-2017.sql
b/data/db/migrations/20161202-update-questions-2017.sql
new file mode 100644
index 0000000..3804105
--- /dev/null
+++ b/data/db/migrations/20161202-update-questions-2017.sql
@@ -0,0 +1,9 @@
+-- Alter schema for 2017 round
+
+ALTER TABLE scholarships
+ ADD COLUMN staff TINYINT(1) DEFAULT NULL AFTER engage10,
+ ADD COLUMN staffOrg VARCHAR(128) DEFAULT NULL AFTER staff,
+ ADD COLUMN board TINYINT(1) DEFAULT NULL AFTER staffOrg,
+ ADD COLUMN boardOrg VARCHAR(128) DEFAULT NULL AFTER board
+ ;
+
diff --git a/data/db/schema.mysql b/data/db/schema.mysql
index 7ec4004..75aad19 100644
--- a/data/db/schema.mysql
+++ b/data/db/schema.mysql
@@ -44,6 +44,10 @@
, engage8 TINYINT(1) DEFAULT NULL
, engage9 TINYINT(1) DEFAULT NULL
, engage10 TINYINT(1) DEFAULT NULL
+ , staff TINYINT(1) DEFAULT NULL
+ , staffOrg VARCHAR(128) DEFAULT NULL
+ , board TINYINT(1) DEFAULT NULL
+ , boardOrg VARCHAR(128) DEFAULT NULL
, involvement TEXT
, contribution TEXT
, experience TEXT
diff --git a/data/i18n/en.json b/data/i18n/en.json
index 4aa6aa4..603a8d8 100644
--- a/data/i18n/en.json
+++ b/data/i18n/en.json
@@ -73,6 +73,8 @@
"form-wmfagree-error": "To proceed, please agree to the applicant
rights condition.",
"form-wmfAgreeName-error": "Please fill in your full name in the given
field to agree to the terms and conditions.",
"form-engage10-error": "Please select how you have engaged in the
Wikimedia movement",
+ "form-staffOrg-error": "Please indicate the Wikimedia organization
you're a paid or contract worker for.",
+ "form-boardOrg-error": "Please indicate the Wikimedia organization
you're a board member for.",
"required-field": "Required field",
@@ -118,6 +120,12 @@
"form-engagement-option8": "Participant in Wikimedia organized events
(e.g. photographer contributing to Wiki Loves Monuments, workshop attendee)",
"form-engagement-option9": "Organizer of Wikimedia events (e.g. WLM,
edit-a-thons)",
"form-engagement-option10": "None of the above",
+
+ "form-wikimedia-staff": "Are you currently a paid or contract staff of
any Wikimedia organization?",
+ "form-wikimedia-board": "Are you currently board member of any
Wikimedia organization?",
+ "form-staff-organization": "If yes, please identify the Wikimedia
organization here:",
+ "form-board-organization": "If yes, please identify the Wikimedia
organization here:",
+
"form-community": "Primary language community on wiki:",
"form-active-project": "Most active Wikimedia project:",
"form-active-project2": "Second most active Wikimedia project (if
applicable):",
@@ -299,6 +307,8 @@
"review-view-study": "Field of study",
"review-view-username": "Username:",
"review-view-alt-users": "Other usernames:",
+ "review-view-staff-member": "Staff member for:",
+ "review-view-board-member": "Board member for:",
"review-view-community": "Primary language community:",
"review-view-active-projects": "Main wiki project:",
"review-view-secondary-project": "Secondary wiki project:",
diff --git a/data/i18n/qqq.json b/data/i18n/qqq.json
index d29d4ce..f7b193d 100644
--- a/data/i18n/qqq.json
+++ b/data/i18n/qqq.json
@@ -70,6 +70,8 @@
"form-wmfagree-error": "Error message shown to user when user does not
agree to applicant rights and conditions.",
"form-wmfAgreeName-error": "Error message shown to user when user does
not enter full name agreeing the terms and conditions.",
"form-engage10-error": "Error message shown to user when user does not
select any types of engagement",
+ "form-staffOrg-error": "Error message shown to user when they did not
indicate the Wikimedia organization they work for",
+ "form-boardOrg-error": "Error message shown to user when they did not
indicate the Wikimedia organization they're a board member for",
"required-field": "Shown at the top of the data input form to explain
the styling of required form fields to the user",
"form-contact-info": "Form section label",
"form-fname": "Input label, followed by text box",
@@ -111,6 +113,10 @@
"form-engagement-option8": "Option for user engagement in Wikimedia
movement",
"form-engagement-option9": "Option for user engagement in Wikimedia
movement",
"form-engagement-option10": "Option for user engagement in Wikimedia
movement",
+ "form-wikimedia-staff": "Input label, followed by yes and no radio
buttons",
+ "form-wikimedia-board": "Input label, followed by yes and no radio
buttons",
+ "form-staff-organization": "Input label, followed by text box",
+ "form-board-organization": "Input label, followed by text box",
"form-community": "Input label, followed by select list for language
communities",
"form-active-project": "Input label, followed by 3 select lists of
Wikimedia projects (eg Wikipedia, Commons)",
"form-active-project2": "Input label, followed by 3 select lists of
Wikimedia projects (eg Wikipedia, Commons)",
@@ -267,6 +273,8 @@
"review-view-study": "Report label",
"review-view-username": "Report label.\n{{Identical|Username}}",
"review-view-alt-users": "Report label",
+ "review-view-staff-member": "Report label",
+ "review-view-board-member": "Report label",
"review-view-community": "Report label",
"review-view-active-projects": "Report label.\n{{Identical|Wiki}}",
"review-view-secondary-project": "Report label",
diff --git a/data/templates/apply.html b/data/templates/apply.html
index 5fb4c87..5b477aa 100644
--- a/data/templates/apply.html
+++ b/data/templates/apply.html
@@ -130,6 +130,10 @@
'engage9': 'form-engagement-option9'|message,
'engage10': 'form-engagement-option10'|message
} ) }}
+ {{ forms.yesNo( ctx, 'form-wikimedia-staff', 'staff', { 'required':true }
) }}
+ {{ forms.text( ctx, 'form-staff-organization', 'staffOrg') }}
+ {{ forms.yesNo( ctx, 'form-wikimedia-board', 'board', { 'required':true }
) }}
+ {{ forms.text( ctx, 'form-board-organization', 'boardOrg') }}
{{ forms.textArea( ctx, 'form-extent-explain', 'involvement', {
'required':true } ) }}
{{ forms.textArea( ctx, 'form-contrib-explain', 'contribution', {
'required':true, 'escape':false } ) }}
{{ forms.textArea( ctx, 'form-collaboration-explain', 'collaboration', {
'required':true } ) }}
diff --git a/data/templates/review/view.html b/data/templates/review/view.html
index 9002d31..9d2ff92 100644
--- a/data/templates/review/view.html
+++ b/data/templates/review/view.html
@@ -125,6 +125,22 @@
<dt>{{ 'review-view-alt-users'|message }}</dt>
<dd>{{ schol.alt_users }}</dd>
{% endif %}
+ <dt>{{ 'review-view-staff-member'|message }}</dt>
+ <dd>
+ {% if schol.staff %}
+ {{ schol.staffOrg }}
+ {% else %}
+ {{ '-' }}
+ {% endif %}
+ </dd>
+ <dt>{{ 'review-view-board-member'|message }}</dt>
+ <dd>
+ {% if schol.board %}
+ {{ schol.boardOrg }}
+ {% else %}
+ {{ '-' }}
+ {% endif %}
+ </dd>
{% if schol.project %}
<dt>{{ 'review-view-active-projects'|message }}</dt>
<dd>{{ schol.project }}</dd>
diff --git a/src/Forms/Apply.php b/src/Forms/Apply.php
index 9512390..3ff758c 100644
--- a/src/Forms/Apply.php
+++ b/src/Forms/Apply.php
@@ -91,6 +91,10 @@
$this->expectBool( 'engage8' );
$this->expectBool( 'engage9' );
$this->expectBool( 'engage10' );
+ $this->requireBool( 'staff' );
+ $this->expectString( 'staffOrg', [ 'validate' => [ $this,
'validateStaffOrg'] ] );
+ $this->requireBool( 'board' );
+ $this->expectString( 'boardOrg', [ 'validate' => [ $this,
'validateBoardOrg'] ] );
$this->requireString( 'involvement' );
$this->requireString( 'contribution' );
$this->requireString( 'experience' );
@@ -167,6 +171,22 @@
}
/**
+ * @param mixed $value Value of param
+ * @return bool True if valid, false otherwise
+ */
+ protected function validateStaffOrg( $value ) {
+ return $this->get( 'staff' ) ? (bool)$value : true;
+ }
+
+ /**
+ * @param mixed $value Value of param
+ * @return bool True if valid, false otherwise
+ */
+ protected function validateBoardOrg( $value ) {
+ return $this->get( 'board' ) ? (bool)$value : true;
+ }
+
+ /**
* Get the date of birth composite key value.
*
* @return DateTime|null Timestamp or null if invalid
@@ -234,6 +254,7 @@
'username', 'alt_users', 'project', 'project2',
'community',
'engage1', 'engage2', 'engage3', 'engage4', 'engage6',
'engage6', 'engage7', 'engage8', 'engage9', 'engage10',
+ 'staff', 'staffOrg', 'board', 'boardOrg',
'involvement', 'contribution', 'experience',
'collaboration',
'prev_scholar', 'goals', 'involvement', 'contribution',
'wm05', 'wm06', 'wm07', 'wm08', 'wm09', 'wm10', 'wm11',
'wm12', 'wm13', 'wm14', 'wm15',
--
To view, visit https://gerrit.wikimedia.org/r/325112
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie917ec4e3bba178a6898b323879f82ea81da6261
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/wikimania-scholarships
Gerrit-Branch: master
Gerrit-Owner: Niharika29 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits