Skip to content

Commit

Permalink
API CHANGE Removed FormResponse class, use custom HTTP status codes t…
Browse files Browse the repository at this point in the history
…o communicate state on text/html responses, or use text/json for more structured data responses
  • Loading branch information
chillu committed Mar 9, 2012
1 parent fa6142c commit e6be56e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 278 deletions.
273 changes: 0 additions & 273 deletions control/FormResponse.php

This file was deleted.

2 changes: 1 addition & 1 deletion forms/ComplexTableField.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ function FieldHolder() {
$js = <<<JS
$('$id').GB_Caption = '$this->popupCaption';
JS;
FormResponse::add($js);
// FormResponse::add($js);
} else {
$js = <<<JS
Event.observe(window, 'load', function() { \$('$id').GB_Caption = '$this->popupCaption'; });
Expand Down
2 changes: 1 addition & 1 deletion forms/TableField.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ function saveInto(DataObject $record) {
$this->value = null;
$items = $this->sourceItems();

FormResponse::update_dom_id($this->id(), $this->FieldHolder());
// FormResponse::update_dom_id($this->id(), $this->FieldHolder());
}
}

Expand Down
3 changes: 0 additions & 3 deletions forms/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
*
* Acts as a visitor to individual form fields.
*
* @todo Automatically mark fields after serverside validation and replace the form through
* FormResponse if the request was made by ajax.
*
* @package forms
* @subpackage validators
*/
Expand Down

5 comments on commit e6be56e

@jahbini
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems a bit terse for workarounds. Got examples? Pointers to TFM??

@chillu
Copy link
Member Author

@chillu chillu commented on e6be56e Apr 14, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its custom dev now. If you still require the functionality, simply copy the class from a 2.4 install, it should work in 3.0 as well (just no longer supported).

@jahbini
Copy link

@jahbini jahbini commented on e6be56e Apr 14, 2012 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chillu
Copy link
Member Author

@chillu chillu commented on e6be56e Apr 14, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello! Not sure what kind of JS you're trying to evaluate here, but I'd suggest validating it through JSLint to ensure you don't have a syntax error. But that's best continued on the forum, rather than comments on a (more or less unrelated) commit hehe. I'm not aware of any developers in your region, although that doesn't say much ... :) You know about the dev network, right? http://www.silverstripe.org/silverstripe-developer-network/

All the best from Germany
Ingo

@jahbini
Copy link

@jahbini jahbini commented on e6be56e Apr 14, 2012 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.