mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
API CHANGE Removed support for undocumented and only partially implemented FormField->reserveNL flag, which is just the opposite of the documented and more frequently used FormField->dontEscape flag.
This commit is contained in:
parent
23adf71e5f
commit
b438a0a095
@ -94,7 +94,7 @@ class CurrencyField_Readonly extends ReadonlyField{
|
||||
*/
|
||||
function Field() {
|
||||
if($this->value){
|
||||
$val = $this->dontEscape ? ($this->reserveNL?Convert::raw2xml($this->value):$this->value) : Convert::raw2xml($this->value);
|
||||
$val = $this->dontEscape ? $this->value : Convert::raw2xml($this->value);
|
||||
$val = _t('CurrencyField.CURRENCYSYMBOL', '$') . number_format(preg_replace('/[^0-9.]/',"",$val), 2);
|
||||
|
||||
}else {
|
||||
@ -126,7 +126,7 @@ class CurrencyField_Disabled extends CurrencyField{
|
||||
*/
|
||||
function Field() {
|
||||
if($this->value){
|
||||
$val = $this->dontEscape ? ($this->reserveNL?Convert::raw2xml($this->value):$this->value) : Convert::raw2xml($this->value);
|
||||
$val = $this->dontEscape ? $this->value : Convert::raw2xml($this->value);
|
||||
$val = _t('CurrencyField.CURRENCYSYMBOL', '$') . number_format(preg_replace('/[^0-9.]/',"",$val), 2);
|
||||
|
||||
}else {
|
||||
|
@ -394,7 +394,7 @@ class FormField extends RequestHandler {
|
||||
* Our base FormField class just returns a span containing the value. This should be overridden!
|
||||
*/
|
||||
function Field() {
|
||||
if($this->value) $value = $this->dontEscape ? ($this->reserveNL ? nl2br($this->value) : $this->value) : Convert::raw2xml($this->value);
|
||||
if($this->value) $value = $this->dontEscape ? $this->value : Convert::raw2xml($this->value);
|
||||
else $value = '<i>(' . _t('FormField.NONE', 'none') . ')</i>';
|
||||
|
||||
$attributes = array(
|
||||
|
@ -26,9 +26,7 @@ class LookupField extends DropdownField {
|
||||
if(!isset($mappedValue)) $mappedValue = $this->value ? $this->value : "<i>(none)</i>";
|
||||
|
||||
if($this->value) {
|
||||
$val = $this->dontEscape
|
||||
? ($this->reserveNL?Convert::raw2xml($this->value):$this->value)
|
||||
: Convert::raw2xml($this->value);
|
||||
$val = $this->dontEscape ? $this->value : Convert::raw2xml($this->value);
|
||||
} else {
|
||||
$val = '<i>(none)</i>';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user