From: Nicolas Iooss Date: Mon, 9 Jun 2014 09:01:54 +0000 (+0200) Subject: When adding a new address to a profile, tick the "can receive mail" checkbox by default X-Git-Tag: xorg/1.1.13~10 X-Git-Url: http://git.polytechnique.org/?p=platal.git;a=commitdiff_plain;h=6c2a3be16c80c7b1a9b571acb2a428e84194344c When adding a new address to a profile, tick the "can receive mail" checkbox by default --- diff --git a/modules/profile.php b/modules/profile.php index 09937a3..7f2136a 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -393,7 +393,7 @@ class ProfileModule extends PLModule pl_content_headers("text/html"); $page->changeTpl('profile/adresses.address.tpl', NO_SKIN); $page->assign('i', $id); - $page->assign('address', array()); + $page->assign('address', array('mail' => true)); $page->assign('profile', Profile::get($pid)); $page->assign('isMe', true); $page->assign('geocoding_removal', true); diff --git a/modules/profile/addresses.inc.php b/modules/profile/addresses.inc.php index 24bc995..ed3e195 100644 --- a/modules/profile/addresses.inc.php +++ b/modules/profile/addresses.inc.php @@ -32,7 +32,7 @@ class ProfileSettingAddresses implements ProfileSetting $addresses[] = $address->toFormArray(); } if (count($addresses) == 0) { - $address = new Address(); + $address = new Address(array('mail' => 1)); $addresses[] = $address->toFormArray(); } return $addresses;