diff options
Diffstat (limited to 'site/app/views/users/edit.thtml')
-rw-r--r-- | site/app/views/users/edit.thtml | 119 |
1 files changed, 51 insertions, 68 deletions
diff --git a/site/app/views/users/edit.thtml b/site/app/views/users/edit.thtml index 36a1176..5be872d 100644 --- a/site/app/views/users/edit.thtml +++ b/site/app/views/users/edit.thtml @@ -36,49 +36,52 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ - - -/* Prepare translation box element */ -// Retrieve language arrays from bootstrap. -global $valid_languages, $native_languages; -foreach (array_keys($valid_languages) as $key) { - $languages[$key] = $native_languages[$key]['native']; -} -ksort($languages); -$this->translationBox = array( - 'defaultLocale' => LANG, - 'languages' => $languages, - 'table' => 'User', - 'loaded' => false -); ?> -<div class="secondary" role="complementary"> - <?=$this->renderElement('amo2009/categories')?> -</div> - -<div class="primary" role="main"> - <?=$this->renderElement('amo2009/search')?> +<div id="content"> + <?=$this->renderElement('search')?> + <?=$this->renderElement('sidebar', array('pitch' => true))?> + <?=$this->renderElement('app_chooser')?> + + <div id="content-main"> <?php // show confirmation message? if (isset($confirmation_page) && $confirmation_page): ?> - <?echo $this->renderElement('notification', array('type' => 'success', 'msg' => $confirmation_message))?> + <h1><?=$confirmation_message?></h1> <?php if (isset($newemail) && $newemail): ?> - <?echo $this->renderElement('notification', array('type' => 'success', 'description' => sprintf(___('user_edit_confirm_email_sent'), $newemail)));?> + <?php + // @partial translation fallback, 5/5/08 + if (_('user_edit_confirm_email_sent') != 'user_edit_confirm_email_sent') + $_user_edit_confirm_email_sent = _('user_edit_confirm_email_sent'); + else + $_user_edit_confirm_email_sent = 'An email has been sent to your ' + .'address %1$s to confirm your new email address. For the ' + .'change to take effect, you need to click on the link provided ' + .'in this email. Until then, you can keep logging in with your ' + .'current email address.'; + ?> + <p><?=sprintf($_user_edit_confirm_email_sent, $newemail)?></p> <?php endif; ?> - <p><?=$html->link(___('link_return_to_front_page'), '/')?></p> + <?php + // @partial translation fallback, 5/5/08 + if (_('link_return_to_front_page') != 'link_return_to_front_page') + $_link_return_to_front_page = _('link_return_to_front_page'); + else + $_link_return_to_front_page = 'Click here to return to the front page.'; + ?> + <p><?=$html->link($_link_return_to_front_page, '/')?></p> <?php else: // show "edit" form ?> <?php if(isset($errorMessage)): ?> - <?echo $this->renderElement('notification', array('type' => 'error', 'msg' => _('error_formerrors')));?> +<div class="amo-form-error"><?php echo _('error_formerrors'); ?></div> <p></p> <?php endif; ?> @@ -90,68 +93,44 @@ else: <div id="tabbed-editor" class="flora"> <ul class="tabs-nav"> - <li><a href="#profile-user"><span><?=___('user_tab_profile', 'User Profile');?></span></a></li> - <li><a href="#profile-collections"><span><?=___('user_tab_collections');?></span></a></li> - <li><a href="#profile-notifications"><span><?=___('user_tab_notifications');?></span></a></li> - <li><a href="#profile-change-pw-email"><span><?=_('user_change_password_or_email'); ?></span></a></li> - <li><a href="#profile-other"><span><?=___('user_form_otheractions');?></span></a></li> + <li><a href="#profile-user"><span><?=___('user_tab_profile', 'User Profile'); /* @partial: 12/7/08 */ ?></span></a></li> + <li><a href="#profile-notifications"><span><?=___('user_tab_notifications', 'Notifications'); /* @partial: 12/7/08 */ ?></span></a></li> + <li><a href="#profile-changepw"><span><?=_('user_change_password'); ?></span></a></li> + <li><a href="#profile-changeemail"><span><?=___('user_change_email', 'Change Email Address'); /* @partial: translation fallback, 5/5/08 */ ?></span></a></li> + <li><a href="#profile-other"><span><?=___('user_form_otheractions', 'Other Actions');?></span></a></li> </ul> <div id="profile-user"> - <h3 class="hidden"><?=___('user_tab_profile', 'User Profile');?></h3> - <div class="line"> + <h3><?=___('user_tab_profile', 'User Profile'); /* @partial: 12/7/08 */ ?></h3> + <div> <label class="amo-label-large" for="UserFirstname"><?=_('user_form_firstname')?></label> <?=$html->input('User/firstname') ?> <?=$html->tagErrorMsg('User/firstname', _('error_field_required'))?> <?=___('user_required_firstlast_or_nickname', 'A first name, last name or nickname is required.')?> </div> - <div class="line"> + <div> <label class="amo-label-large" for="UserLastname"><?=_('user_form_lastname')?></label> <?=$html->input('User/lastname') ?> <?=$html->tagErrorMsg('User/lastname', _('error_field_required'))?> </div> - <div class="line"> + <div> <label class="amo-label-large" for="UserNickname"><?=_('user_form_nickname')?></label> <?=$html->input('User/nickname') ?> <?=$html->tagErrorMsg('User/nickname', _('error_user_nickname_notunique'))?> </div> - <div class="line"> + <div> <label class="amo-label-large" for="UserEmailhidden"><?=_('user_form_hideemail')?></label> <?=$html->checkBox('User/emailhidden') ?> </div> - <div class="line"> + <div> <label class="amo-label-large" for="UserHomepage"><?=_('user_form_homepage')?></label> <?=$html->input('User/homepage') ?> <?=$html->tagErrorMsg('User/homepage', _('error_invalid_url'))?> </div> - <div class="line"> - <?php - echo $this->renderElement('translationbox', array( - 'field' => 'bio', - 'translations' => $translations['bio'], - 'height' => '100', - 'maxLength' => '500', - 'displayName' => ___('user_form_bio'), - 'description' => ___('user_form_bio_description'), - )); - ?> - </div> </div> - <div id="profile-collections"> - <h3 class="hidden"><?=___('user_tab_collections');?></h3> - <div class="line"> - <?=$html->checkbox('User/display_collections') ?> - <label for="UserDisplayCollections"><?=___('user_form_display_collections')?></label> - </div> - <div class="line"> - <?=$html->checkbox('User/display_collections_fav') ?> - <label for="UserDisplayCollectionsFav"><?=___('user_form_display_collections_fav')?></label> - </div> - </div> - <div id="profile-notifications"> - <h3 class="hidden"><?=___('user_tab_notifications', 'Notifications');?></h3> + <h3><?=___('user_tab_notifications', 'Notifications'); /* @partial: 12/7/08 */ ?></h3> <?php if (empty($userAddons)): ?> <p><?=___('user_notifications_none_available', 'There are currently no notifications available for you to configure.')?></p> <?php else: ?> @@ -166,25 +145,28 @@ else: <?php endif; ?> </div> - <div id="profile-change-pw-email"> + <div id="profile-changepw"> <h3><?=_('user_change_password'); ?></h3> - <div class="line"> + <div> <label class="amo-label-large" for="UserPassword"><?=_('user_form_oldpassword')?></label> <?=$html->password('User/password', array('autocomplete'=>'off')) ?> <?=$html->tagErrorMsg('User/password', _('error_wrong_password'))?> </div> - <div class="line"> + <div> <label class="amo-label-large" for="UserNewpassword"><?=_('user_form_newpassword')?></label> <?=$html->password('User/newpassword', array('autocomplete'=>'off')) ?> <?=$html->tagErrorMsg('User/newpassword', 'error_field_required')?> </div> - <div class="line"> + <div> <label class="amo-label-large" for="UserConfirmpw"><?=_('user_form_confirmpassword')?></label> <?=$html->password('User/confirmpw', array('autocomplete'=>'off')) ?> <?=$html->tagErrorMsg('User/confirmpw', _('error_user_confirmpw_nomatch'))?> </div> - <h3><?=___('user_change_email', 'Change Email Address');?></h3> - <div class="line"> + </div> + + <div id="profile-changeemail"> + <h3><?=___('user_change_email', 'Change Email Address'); /* @partial: translation fallback, 5/5/08 */ ?></h3> + <div> <label class="amo-label-large" for="UserEmail"><?=_('user_form_email')?></label> <?=$html->input('User/email') ?> <?php if (isset($error_email_notunique)) @@ -198,7 +180,7 @@ else: </div> <div id="profile-other"> - <h3 class="hidden"><?=___('user_form_otheractions', 'Other Actions');?></h3> + <h3><?=___('user_form_otheractions', 'Other Actions');?></h3> <p><?=$html->link(___('user_edit_delete_user', 'Delete user account'), '/users/delete');?></p> </div> </div> @@ -208,6 +190,7 @@ else: <?php endif; /* end of form vs. confirmation */ ?> + </div> </div> <script type="text/javascript"> |