browser to preemptively fill them with data)
/*
* Form functions
*/
+function form_init()
+{
+ var form = document.getElementById('form_edit');
+
+ if (!form) return;
+
+ for (var i=0; i<form.children.length; i++)
+ if (form.children[i].tagName.toLowerCase() == 'input'
+ && form.children[i].type.toLowerCase() == 'password')
+ form.children[i].value = '';
+}
+
function save_callback(data)
{
info('Datensatz gespeichert');
function build_form($name, $fields)
{
+ global $jscode;
$ret = array();
+ $jscode[] = 'Rico.onLoad( function() {';
+ $jscode[] = "form_init();";
+ $jscode[] = '});';
+
$ret[] = '<div class="form">';
$ret[] = '<p id="form_title">Datensatz bearbeiten</p>';
$ret[] = '<form id="form_edit">';