function usernameField(){
                var obj = {
                    label: 'Username'
                };
                if (data && data.username) {
                    obj.kind = 'panel.element';
                    obj.contents = {
                        usernameText: {
                            kind: 'html',
                            content: data.username
                        },
                        usernameInput: {
                            kind: 'input.hidden',
                            name: 'username',
                            value: data.username || ''
                        }
                    };
                }
                else {
                    obj.kind = 'panel.input.text';
                    obj.name = 'username';
                    obj.validate = 'alpha-num-safe required';
                    obj.value = '';
                }
                return obj;
            }
// username could be text or input element
username could be text or input element
username could be text or input element
function usernameField(){
                var obj = {
                    label: 'Username'
                };
                if (data && data.username) {
                    obj.kind = 'panel.element';
                    obj.contents = {
                        usernameText: {
                            kind: 'html',
                            content: data.username
                        },
                        usernameInput: {
                            kind: 'input.hidden',
                            name: 'username',
                            value: data.username || ''
                        }
                    };
                }
                else {
                    obj.kind = 'panel.input.text';
                    obj.name = 'username';
                    obj.validate = 'alpha-num-safe required';
                    obj.value = '';
                }
                return obj;
            }
function usernameField ( ) { var obj = { label : 'Username' } ; if ( data && data . username ) { obj . kind = 'panel.element' ; obj . contents = { usernameText : { kind : 'html' , content : data . username } , usernameInput : { kind : 'input.hidden' , name : 'username' , value : data . username || '' } } ; } else { obj . kind = 'panel.input.text' ; obj . name = 'username' ; obj . validate = 'alpha-num-safe required' ; obj . value = '' ; } return obj ; }
username could be text or input element
username could be text or input element