mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Fixed crazy messed up indentation in TableField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@59518 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
92d91c0fd2
commit
3a817610bc
@ -340,7 +340,7 @@ class TableField extends TableListField {
|
||||
* Called on save, it creates the appropriate objects and writes them
|
||||
* to the database.
|
||||
*/
|
||||
function saveData($dataObjects,$ExistingValues = true){
|
||||
function saveData($dataObjects,$ExistingValues = true) {
|
||||
$savedObj = array();
|
||||
$fieldset = $this->FieldSetForRow();
|
||||
|
||||
@ -356,9 +356,7 @@ class TableField extends TableListField {
|
||||
if($dataObjects) {
|
||||
foreach ($dataObjects as $objectid => $fieldValues) {
|
||||
// we have to "sort" new data first, and process it in a seperate saveData-call (see setValue())
|
||||
if($objectid === "new") {
|
||||
continue;
|
||||
}
|
||||
if($objectid === "new") continue;
|
||||
|
||||
// extra data was creating fields, but
|
||||
if($this->extraData) {
|
||||
@ -383,10 +381,10 @@ class TableField extends TableListField {
|
||||
|
||||
foreach($fieldValues as $type => $value) {
|
||||
if(is_array($this->extraData)){ // if the field is an actual datafield (not a preset hiddenfield)
|
||||
if(!in_array($type, array_keys($this->extraData))){
|
||||
if(!in_array($type, array_keys($this->extraData))) {
|
||||
$dataFields[$type] = $value;
|
||||
}
|
||||
}else{ // all fields are real
|
||||
} else { // all fields are real
|
||||
$dataFields[$type] = $value;
|
||||
}
|
||||
}
|
||||
@ -411,6 +409,8 @@ class TableField extends TableListField {
|
||||
|
||||
}
|
||||
return $savedObj;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -664,7 +664,7 @@ class TableField_Item extends TableListField_Item {
|
||||
$field->Name = $combinedFieldName;
|
||||
$field->setValue($field->dataValue());
|
||||
$field->addExtraClass('col'.$i);
|
||||
$field->setForm($this->Parent()->getForm());
|
||||
$field->setForm($this->data);
|
||||
|
||||
// transformation
|
||||
if(isset($this->parent->transformationConditions[$origFieldName])) {
|
||||
|
Loading…
Reference in New Issue
Block a user