mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-04 17:57:48 +01:00
Fix per funzionamento campi personalizzati
This commit is contained in:
parent
bff0ddf748
commit
7faaf50888
@ -168,6 +168,8 @@ class HTMLBuilder
|
||||
$result = self::replace($result, $depth + 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$html = str_replace($value, !empty($result) ? $result : $value, $html);
|
||||
}
|
||||
|
||||
@ -197,6 +199,8 @@ class HTMLBuilder
|
||||
// Ricorsione
|
||||
$result = self::replace($result);
|
||||
|
||||
print_r($json);
|
||||
|
||||
return !empty($result) ? $result : json_encode($json);
|
||||
}
|
||||
|
||||
@ -374,7 +378,7 @@ class HTMLBuilder
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function decode($string, $type)
|
||||
public static function decode($string, $type)
|
||||
{
|
||||
$string = '{'.substr($string, strlen(self::$open[$type]), -strlen(self::$close[$type])).'}';
|
||||
|
||||
|
@ -101,6 +101,10 @@ class FieldManager implements ManagerInterface
|
||||
$result .= '
|
||||
</div>';
|
||||
}
|
||||
|
||||
// Forzatura inizializzazione componente
|
||||
$component = \HTMLBuilder\HTMLBuilder::decode($field['content'], 'manager');
|
||||
$result .= '<script>$(document).ready( function(){ input("#'.$component['name'].'").init(); });</script>';
|
||||
}
|
||||
|
||||
if (($key + 1) % 3 != 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user