diff --git a/openstack/code/CandidateApplicationForm.php b/openstack/code/CandidateApplicationForm.php index c6ca4c3..415aa74 100644 --- a/openstack/code/CandidateApplicationForm.php +++ b/openstack/code/CandidateApplicationForm.php @@ -22,7 +22,7 @@ class CandidateApplicationForm extends HoneyPotForm { new TextAreaField('RelationshipToOpenStack',"What is your relationship to OpenStack, and why is its success important to you? What would you say is your biggest contribution to OpenStack's success to date?"), new TextAreaField('Experience',"Describe your experience with other non profits or serving as a board member. How does your experience prepare you for the role of a board member?"), new TextAreaField('BoardsRole',"What do you see as the Board's role in OpenStack's success?"), - new TextAreaField('TopPriority',"What do you think the top priority of the Board should be in 2014?") + new TextAreaField('TopPriority',"What do you think the top priority of the Board should be in 2015?") ); $actionButton = new FormAction('save', 'Save Candidate Application'); diff --git a/openstack/code/ElectionPage.php b/openstack/code/ElectionPage.php index a6c37c7..f743c8f 100644 --- a/openstack/code/ElectionPage.php +++ b/openstack/code/ElectionPage.php @@ -48,6 +48,12 @@ $NominationsCloseField->setConfig('showdropdown', true); $fields->addFieldToTab('Root.Main', $NominationsCloseField, 'Content'); + // Nomination App Deadline + $NominationAppDeadlineField = new DateField('NominationAppDeadline','Date candidates must have completed the application in order to be listed (11:59PM this day)'); + $NominationAppDeadlineField->setConfig('showcalendar', true); + $NominationAppDeadlineField->setConfig('showdropdown', true); + $fields->addFieldToTab('Root.Content.Main', $NominationAppDeadlineField, 'Content'); + // Elections Open $ElectionsOpenField = new DateField('ElectionsOpen','Date the elections open (12:00AM this day)'); $ElectionsOpenField->setConfig('showcalendar', true); @@ -135,4 +141,4 @@ 'CandidateListGold' ); - } \ No newline at end of file + } diff --git a/registration/code/EditProfilePage.php b/registration/code/EditProfilePage.php index f4116e7..edef584 100755 --- a/registration/code/EditProfilePage.php +++ b/registration/code/EditProfilePage.php @@ -394,8 +394,16 @@ class EditProfilePage_Controller extends Page_Controller $Candidate->write(); $questions = array('Bio' => 'Bio','RelationshipToOpenStack' => 'RelationshipToOpenStack','Experience' => 'Experience' ,'BoardsRole' => 'BoardsRole' ,'TopPriority' => 'TopPriority'); // Must answer all questions, but can save work as they go, so we're going to check here rather than set up validators - foreach ($data as $key => $value) { - if (array_key_exists($key,$questions) && strlen($value) < 4) { + + if( + (strlen($data['Bio'])) < 4 || + (strlen($data['RelationshipToOpenStack'])) < 4 || + (strlen($data['Experience'])) < 4 || + (strlen($data['BoardsRole'])) < 4 || + (strlen($data['TopPriority'])) < 4 + + ) { + $Candidate->HasAcceptedNomination = FALSE; $form->saveInto($Candidate); $Candidate->write(); @@ -403,7 +411,6 @@ class EditProfilePage_Controller extends Page_Controller $this->setMessage('Success', 'Your edits have been saved but you will need to provide full answers to all these questions to be eligible as a candidate.'); $this->redirectBack(); return; - } } $Candidate->HasAcceptedNomination = TRUE; diff --git a/themes/openstack/templates/Layout/Includes/NominationEmail.ss b/themes/openstack/templates/Layout/Includes/NominationEmail.ss index c6cea29..76bfe27 100644 --- a/themes/openstack/templates/Layout/Includes/NominationEmail.ss +++ b/themes/openstack/templates/Layout/Includes/NominationEmail.ss @@ -16,7 +16,7 @@ <% else %>

You have not yet accepted the nomination. If you would like to accept your nomination and run in the OpenStack Individual Board Member election, you can do that here: http://www.openstack.org/profile/election/

Once you accept the nomination and complete the application, you'll need a total of 10 nominations from members before you appear on the ballot. You currently have $countNominations nomination<% if countNominations = 1 %><% else %>s<% end_if %>.

-

If you wish to run in the 2014 Individual Director election, you must accept your nomination by December 13, 2013 and submit your candidate application.

+

If you wish to run in the {$Election.Title}, you must accept your nomination by {$Election.NominationAppDeadline.Format(F d Y)} and submit your candidate application.

<% end_if %> <% end_loop %>