Replaced instances of new DataObjectSet() with new ArrayList()

Removed Validator::set_javascript_validation_handler() call
This commit is contained in:
edchipman@gmail.com 2012-04-22 16:25:26 -03:00 committed by Stig Lindqvist
parent 5de26cd897
commit ef3953fc68
3 changed files with 7 additions and 10 deletions

View File

@ -293,9 +293,6 @@ class UserDefinedForm_Controller extends Page_Controller {
public function init() {
parent::init();
// block prototype validation
Validator::set_javascript_validation_handler('none');
// load the jquery
Requirements::javascript(FRAMEWORK_DIR .'/thirdparty/jquery/jquery.js');
Requirements::javascript('userforms/thirdparty/jquery-validate/jquery.validate.min.js');
@ -314,14 +311,14 @@ class UserDefinedForm_Controller extends Page_Controller {
if($hasLocation) {
$content = str_ireplace('$UserDefinedForm', $form->forTemplate(), $this->Content);
return array(
'Content' => DBField::create('HTMLText', $content),
'Content' => DBField::create_field('HTMLText', $content),
'Form' => ""
);
}
}
return array(
'Content' => DBField::create('HTMLText', $this->Content),
'Content' => DBField::create_field('HTMLText', $this->Content),
'Form' => $this->Form()
);
}
@ -678,7 +675,7 @@ JS
$values = array();
$attachments = array();
$submittedFields = new DataObjectSet();
$submittedFields = new ArrayList();
foreach($this->Fields() as $field) {

View File

@ -225,14 +225,14 @@ class EditableFormField extends DataObject {
* @return DataObjectSet
*/
public function CustomRules() {
$output = new DataObjectSet();
$output = new ArrayList();
$fields = $this->Parent()->Fields();
// check for existing ones
if($rules = $this->Dependencies()) {
foreach($rules as $rule => $data) {
// recreate all the field object to prevent caching
$outputFields = new DataObjectSet();
$outputFields = new ArrayList();
foreach($fields as $field) {
$new = clone $field;
@ -471,6 +471,6 @@ class EditableFormField extends DataObject {
$errorMessage = ($this->CustomErrorMessage) ? $this->CustomErrorMessage : $standard;
return DBField::create('Varchar', $errorMessage);
return DBField::create_field('Varchar', $errorMessage);
}
}

View File

@ -81,7 +81,7 @@ class EditableFormFieldTest extends FunctionalTest {
function testPopulateFromPostData() {
$this->logInWithPermission('ADMIN');
$set = new DataObjectSet();
$set = new ArrayList();
$field = new EditableFormField();