Permalink
Browse files

Merge pull request #28 from shawnpwalsh/master

Move timezone field from Account page to Contact page so that changes to it are saved
  • Loading branch information...
2 parents 6bf887c + 9aa2c64 commit 8aa0aef4aa355a030ebbc83361909df4d99cb480 @phpfreak committed Nov 16, 2012
@@ -76,7 +76,6 @@ function edit_profile() {
'fax_number' => $user->getFaxNumber(),
'mobile_number' => $user->getMobileNumber(),
'home_number' => $user->getHomeNumber(),
- 'timezone' => $user->getTimezone(),
'is_admin' => $user->getIsAdmin(),
'auto_assign' => $user->getAutoAssign(),
'use_LDAP' => $user->getUseLDAP(),
@@ -190,6 +190,7 @@ function edit() {
'company_id' => $contact->getCompanyId(),
'title' => $contact->getTitle(),
'email' => $contact->getEmail(),
+ 'timezone' => $contact->getTimezone(),
'office_number' => $contact->getOfficeNumber(),
'fax_number' => $contact->getFaxNumber(),
'mobile_number' => $contact->getMobileNumber(),
@@ -14,6 +14,7 @@
<?php } // if ?>
<h2><?php echo lang('file'); ?>: <?php echo $file->getObjectName(true); ?></h2>
<form action="<?php echo $file->getAddRevisionUrl() ?>" method="post" enctype="multipart/form-data">
+ <?php tpl_display(get_template_path('form_errors')) ?>
<div id="fileRevisionComment">
<?php echo label_tag(lang('revision comment'), 'fileRevisionComment') ?>
<?php echo textarea_field('revision[comment]', array_var($revision_data, 'comment'), array('class' => 'short', 'id' => 'fileRevisionComment')) ?>
@@ -125,6 +125,11 @@
</div>
<div>
+ <?php echo label_tag(lang('timezone'), 'contactFormTimezone', true)?>
+ <?php echo select_timezone_widget('contact[timezone]', array_var($contact_data, 'timezone'), array('id' => 'contactFormTimezone', 'class' => 'long')) ?>
+ </div>
+
+ <div>
<fieldset>
<legend><?php echo lang('avatar') ?></legend>
<?php if ($contact->hasAvatar()) { ?>
@@ -53,11 +53,6 @@
<?php echo lang('user locale desc') ?>
</div>
- <div>
- <?php echo label_tag(lang('timezone'), 'userFormTimezone', true)?>
- <?php echo select_timezone_widget('user[timezone]', array_var($user_data, 'timezone'), array('id' => 'userFormTimezone', 'class' => 'long')) ?>
- </div>
-
<?php if ($user->isNew() || logged_user()->isAdministrator()) { ?>
<fieldset>
<legend><?php echo lang('password') ?></legend>

0 comments on commit 8aa0aef

Please sign in to comment.