- common_input('nickname', _t('Nickname'));
- common_input('fullname', _t('Full name'));
- common_input('email', _t('Email address'));
- common_input('homepage', _t('Homepage'));
- common_input('bio', _t('Bio'));
- common_input('location', _t('Location'));
- common_element('input', array('name' => 'submit',
- 'type' => 'submit',
- 'id' => 'submit'),
- _t('Login'));
- common_element('input', array('name' => 'cancel',
- 'type' => 'button',
- 'id' => 'cancel'),
- _t('Cancel'));
+ # too much common patterns here... abstractable?
+ common_input('nickname', _t('Nickname'),
+ ($this->arg('nickname')) ? $this->arg('nickname') : $profile->nickname);
+ common_input('fullname', _t('Full name'),
+ ($this->arg('fullname')) ? $this->arg('fullname') : $profile->fullname);
+ common_input('email', _t('Email address'),
+ ($this->arg('email')) ? $this->arg('email') : $user->email);
+ common_input('homepage', _t('Homepage'),
+ ($this->arg('homepage')) ? $this->arg('homepage') : $profile->homepage);
+ common_textarea('bio', _t('Bio'),
+ ($this->arg('bio')) ? $this->arg('bio') : $profile->bio);
+ common_input('location', _t('Location'),
+ ($this->arg('location')) ? $this->arg('location') : $profile->location);
+ common_submit('submit', _t('Save'));