diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-05-17 21:55:51 -0400 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-05-17 21:55:51 -0400 |
commit | 793d48dc9e1d73d871bf34d9f7c1da8916134d1b (patch) | |
tree | eca9b97ed3da44402029f6509be9df539524ad73 /actions/profilesettings.php | |
parent | 81e037558f784d3784f61ef2dd9d17acc79255ec (diff) |
smaller packet
darcs-hash:20080518015551-84dde-65964e140ed0b6c23aeee368fcffccdc14d71c61.gz
Diffstat (limited to 'actions/profilesettings.php')
-rw-r--r-- | actions/profilesettings.php | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/actions/profilesettings.php b/actions/profilesettings.php index fff6e3bd9..f1f4844d1 100644 --- a/actions/profilesettings.php +++ b/actions/profilesettings.php @@ -24,6 +24,8 @@ require_once(INSTALLDIR.'/lib/settingsaction.php'); class ProfilesettingsAction extends SettingsAction { function show_form($msg=NULL, $success=false) { + $user = common_current_user(); + $profile = $user->getProfile(); common_show_header(_t('Profile settings')); $this->settings_menu(); $this->message($msg, $success); @@ -31,20 +33,23 @@ class ProfilesettingsAction extends SettingsAction { 'id' => 'profilesettings', 'action' => common_local_url('profilesettings'))); - 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')); + # 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_input('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_element('input', array('name' => 'submit', 'type' => 'submit', - 'id' => 'submit'), - _t('Login')); - common_element('input', array('name' => 'cancel', - 'type' => 'button', - 'id' => 'cancel'), - _t('Cancel')); + 'id' => 'submit', + 'value' => _t('Save'))); common_element_end('form'); common_show_footer(); } |