PM-595 Creacion de Dynaforms a traves de PMtables
Creacion de Dynaforms a traves de PMtables
This commit is contained in:
@@ -289,6 +289,14 @@ class PmTable
|
|||||||
$columnNode->setAttribute( 'size', $column->field_size );
|
$columnNode->setAttribute( 'size', $column->field_size );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($column->field_type == 'DECIMAL') {
|
||||||
|
if ($column->field_size > 2) {
|
||||||
|
$columnNode->setAttribute( 'scale', 2 );
|
||||||
|
} else {
|
||||||
|
$columnNode->setAttribute( 'scale', 1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$columnNode->setAttribute( 'required', ($column->field_null ? 'false' : 'true') );
|
$columnNode->setAttribute( 'required', ($column->field_null ? 'false' : 'true') );
|
||||||
|
|
||||||
// only define the primaryKey attribute if it is defined
|
// only define the primaryKey attribute if it is defined
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ try {
|
|||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$idPmtable = $oForm->fields[$id]->pmconnection->pmtable != '' ? $oForm->fields[$id]->pmconnection->pmtable : $oForm->fields[$id]->owner->tree->children[0]->attributes['pmtable'];
|
$idPmtable = isset($oForm->fields[$id]->pmconnection->pmtable) && $oForm->fields[$id]->pmconnection->pmtable != '' ? $oForm->fields[$id]->pmconnection->pmtable : $oForm->fields[$id]->owner->tree->children[0]->attributes['pmtable'];
|
||||||
|
|
||||||
if (!($oAdditionalTables->updateDataInTable($idPmtable, $newValues ))) {
|
if (!($oAdditionalTables->updateDataInTable($idPmtable, $newValues ))) {
|
||||||
//<--This is to know if it is a new registry on the PM Table
|
//<--This is to know if it is a new registry on the PM Table
|
||||||
@@ -289,13 +289,13 @@ try {
|
|||||||
$oFolder = new AppFolder();
|
$oFolder = new AppFolder();
|
||||||
|
|
||||||
//***Validating the file allowed extensions***
|
//***Validating the file allowed extensions***
|
||||||
$res = G::verifyInputDocExtension($aID['INP_DOC_TYPE_FILE'], $arrayFileName[$i], $arrayFileTmpName[$i]);
|
$res = G::verifyInputDocExtension($aID['INP_DOC_TYPE_FILE'], $arrayFileName[$i], $arrayFileTmpName[$i]);
|
||||||
if($res->status == 0){
|
if($res->status == 0){
|
||||||
$message = $res->message;
|
$message = $res->message;
|
||||||
G::SendMessageText( $message, "ERROR" );
|
G::SendMessageText( $message, "ERROR" );
|
||||||
$backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] );
|
$backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] );
|
||||||
G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] );
|
G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] );
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--- Validate Filesize of $_FILE
|
//--- Validate Filesize of $_FILE
|
||||||
|
|||||||
@@ -1008,7 +1008,7 @@ function editorFieldsEnableDisable(fieldTypeValue, fieldNull, fieldPrimaryKey, f
|
|||||||
var swI = 1;
|
var swI = 1;
|
||||||
|
|
||||||
//Date
|
//Date
|
||||||
if (fieldTypeValue == "DATE" || fieldTypeValue == "DATETIME" || fieldTypeValue == "TIME") {
|
if (fieldTypeValue == "DATE" || fieldTypeValue == "DATETIME" || fieldTypeValue == "TIMESTAMP" || fieldTypeValue == "TIME") {
|
||||||
swSize = 0; //Disable
|
swSize = 0; //Disable
|
||||||
swPK = 0;
|
swPK = 0;
|
||||||
swAI = 0;
|
swAI = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user