Skip to content
This repository was archived by the owner on Nov 8, 2018. It is now read-only.

fix opportunities-page #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions application/controllers/opportunities.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ public function submit($id = FALSE, $saved = FALSE)

// Copy the form as errors, so the errors will be stored with keys
// corresponding to the form field names
//$captcha = Captcha::factory();
$errors = $form;
$form_error = FALSE;
$form_sent = FALSE;
Expand All @@ -90,10 +89,8 @@ public function submit($id = FALSE, $saved = FALSE)
$post->add_rules('available_from', 'required', 'date_mmddyyyy', 'length[3,10]');
$post->add_rules('available_until', 'required', 'date_mmddyyyy', 'length[3,10]');
$post->add_rules('contact', 'required', 'length[3,20]');
$post->add_rules('add_info', 'required', 'length[3,50]');
$post->add_rules('add_info', 'length[3,50]');

// Test to see if things passed the rule checks
// Skip CSRF check since we have a CAPTCHA already
if ($post->validate())
{
// If valid post to Database
Expand Down Expand Up @@ -126,9 +123,6 @@ public function submit($id = FALSE, $saved = FALSE)
$this->template->content->form_error = $form_error;
}

// Inline Javascript
// $this->template->content->date_picker_js = $this->_date_picker_js();

/**
* Opportunities Thanks Page
*/
Expand Down
2 changes: 1 addition & 1 deletion application/i18n
Submodule i18n updated from d24b15 to e7d72e
4 changes: 2 additions & 2 deletions sql/upgrade118-119.sql
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ CREATE TABLE IF NOT EXISTS `opportunities` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`resource_available` varchar(75) NOT NULL,
`pcv_name` varchar(75) NOT NULL,
`available_from` datetime DEFAULT NULL,
`available_until` datetime DEFAULT NULL,
`available_from` varchar(75) DEFAULT NULL,
`available_until` varchar(75) DEFAULT NULL,
`contact` varchar(75) NOT NULL,
`add_info` text DEFAULT NULL,
PRIMARY KEY (`id`)
Expand Down
4 changes: 2 additions & 2 deletions sql/ushahidi.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1492,8 +1492,8 @@ CREATE TABLE IF NOT EXISTS `opportunities` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`resource_available` varchar(75) NOT NULL,
`pcv_name` varchar(75) NOT NULL,
`available_from` datetime DEFAULT NULL,
`available_until` datetime DEFAULT NULL,
`available_from` varchar(75) DEFAULT NULL,
`available_until` varchar(75) DEFAULT NULL,
`contact` varchar(75) NOT NULL,
`add_info` text DEFAULT NULL,
PRIMARY KEY (`id`)
Expand Down