BUG 10148 I added validation to value 1 in checkbox SOLVED
I added validation to value 1 in checkbox
This commit is contained in:
@@ -2916,7 +2916,7 @@ class XmlForm_Field_Checkbox extends XmlForm_Field
|
|||||||
*/
|
*/
|
||||||
public function maskValue ($value, &$owner)
|
public function maskValue ($value, &$owner)
|
||||||
{
|
{
|
||||||
return ($value === $this->value) ? $value : $this->falseValue;
|
return ($value === $this->value || $value == 1) ? $this->value : $this->falseValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4164,8 +4164,8 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText
|
|||||||
$mask = '%Y-%m-%d'; //set default
|
$mask = '%Y-%m-%d'; //set default
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->defaultValue != "") {
|
if ($this->defaultValue != "") {
|
||||||
$defaultValue = masktophp( $mask, $defaultValue);
|
$defaultValue = masktophp( $mask, $defaultValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strpos( $mask, '%' ) === false) {
|
if (strpos( $mask, '%' ) === false) {
|
||||||
@@ -5461,38 +5461,38 @@ function masktophp ($mask, $value)
|
|||||||
if (preg_match('/S/',$tmp)) {
|
if (preg_match('/S/',$tmp)) {
|
||||||
$tmp = str_replace("S", "s", $tmp);
|
$tmp = str_replace("S", "s", $tmp);
|
||||||
}
|
}
|
||||||
if (preg_match('/o/',$tmp)) {
|
if (preg_match('/o/',$tmp)) {
|
||||||
$tmp = str_replace("o", "n", $tmp);
|
$tmp = str_replace("o", "n", $tmp);
|
||||||
}
|
}
|
||||||
if (preg_match('/a/',$tmp)) {
|
if (preg_match('/a/',$tmp)) {
|
||||||
$tmp = str_replace("a", "D", $tmp);
|
$tmp = str_replace("a", "D", $tmp);
|
||||||
}
|
}
|
||||||
if (preg_match('/l/',$tmp)) {
|
if (preg_match('/l/',$tmp)) {
|
||||||
$tmp = str_replace("l", "g", $tmp);
|
$tmp = str_replace("l", "g", $tmp);
|
||||||
}
|
}
|
||||||
if (preg_match('/A/',$tmp)) {
|
if (preg_match('/A/',$tmp)) {
|
||||||
$tmp = str_replace("A", "l", $tmp);
|
$tmp = str_replace("A", "l", $tmp);
|
||||||
}
|
}
|
||||||
if (preg_match('/I/',$tmp)) {
|
if (preg_match('/I/',$tmp)) {
|
||||||
$tmp = str_replace("I", "h", $tmp);
|
$tmp = str_replace("I", "h", $tmp);
|
||||||
}
|
}
|
||||||
if (preg_match('/j/',$tmp)) {
|
if (preg_match('/j/',$tmp)) {
|
||||||
$tmp = str_replace("j", "z", $tmp);
|
$tmp = str_replace("j", "z", $tmp);
|
||||||
}
|
}
|
||||||
if (preg_match('/k/',$tmp)) {
|
if (preg_match('/k/',$tmp)) {
|
||||||
$tmp = str_replace("k", "G", $tmp);
|
$tmp = str_replace("k", "G", $tmp);
|
||||||
}
|
}
|
||||||
if (preg_match('/e/',$tmp)) {
|
if (preg_match('/e/',$tmp)) {
|
||||||
$tmp = str_replace("e", "j", $tmp);
|
$tmp = str_replace("e", "j", $tmp);
|
||||||
}
|
}
|
||||||
if (preg_match('/u/',$tmp)) {
|
if (preg_match('/u/',$tmp)) {
|
||||||
$tmp = str_replace("u", "N", $tmp);
|
$tmp = str_replace("u", "N", $tmp);
|
||||||
}
|
}
|
||||||
if (preg_match('/p/',$tmp)) {
|
if (preg_match('/p/',$tmp)) {
|
||||||
$tmp = str_replace("p", "A", $tmp);
|
$tmp = str_replace("p", "A", $tmp);
|
||||||
}
|
}
|
||||||
if (preg_match('/P/',$tmp)) {
|
if (preg_match('/P/',$tmp)) {
|
||||||
$tmp = str_replace("P", "a", $tmp);
|
$tmp = str_replace("P", "a", $tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($value == 'today') {
|
if ($value == 'today') {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
$_POST['form'] = array_merge($_POST['form'],$_REQUEST['form']);
|
||||||
if ($_GET['APP_UID'] !== $_SESSION['APPLICATION']) {
|
if ($_GET['APP_UID'] !== $_SESSION['APPLICATION']) {
|
||||||
throw new Exception( G::LoadTranslation( 'ID_INVALID_APPLICATION_ID_MSG', array ('<a href=\'' . $_SERVER['HTTP_REFERER'] . '\'>{1}</a>',G::LoadTranslation( 'ID_REOPEN' )
|
throw new Exception( G::LoadTranslation( 'ID_INVALID_APPLICATION_ID_MSG', array ('<a href=\'' . $_SERVER['HTTP_REFERER'] . '\'>{1}</a>',G::LoadTranslation( 'ID_REOPEN' )
|
||||||
) ) );
|
) ) );
|
||||||
|
|||||||
@@ -75,7 +75,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function dynaformSave ( form, bOpen ) {
|
function dynaformSave ( form, bOpen ) {
|
||||||
alert('guardando');
|
|
||||||
var nameDynaForm = getField('DYN_TITLE').value;
|
var nameDynaForm = getField('DYN_TITLE').value;
|
||||||
var proUid = getField('PRO_UID').value;
|
var proUid = getField('PRO_UID').value;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user