From ddc383d52f48f6084a33d45340b364bd1a960d20 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Wed, 26 Oct 2011 17:34:58 +0200 Subject: [PATCH] Allows job addresses to be the mail address. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- classes/address.php | 6 ++++-- templates/profile/jobs.job.tpl | 8 ++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/classes/address.php b/classes/address.php index af0e2f0..18f752e 100644 --- a/classes/address.php +++ b/classes/address.php @@ -625,14 +625,16 @@ class Address 'request' => $this->request ); - if ($this->type == self::LINK_PROFILE || $this->type == self::LINK_JOB) { - $address['pub'] = $this->pub; + if ($this->type == self::LINK_JOB) { + $address['pub'] = $this->pub; + $address['mail'] = $this->flags->hasFlag('mail'); } if ($this->type == self::LINK_PROFILE) { static $flags = array('current', 'temporary', 'secondary', 'mail', 'cedex', 'deliveryIssue'); foreach ($flags as $flag) { $address[$flag] = $this->flags->hasFlag($flag); } + $address['pub'] = $this->pub; $address['comment'] = $this->comment; $address['phones'] = Phone::formatFormArray($this->phones); } diff --git a/templates/profile/jobs.job.tpl b/templates/profile/jobs.job.tpl index dde72e9..747347b 100644 --- a/templates/profile/jobs.job.tpl +++ b/templates/profile/jobs.job.tpl @@ -194,6 +194,14 @@ {include file="geoloc/form.address.tpl" prefname="`$jobpref`[w_address]" prefid=$jobid address=$job.w_address class="pair"} + + + + + {if $hiddenaddr} Adresse (masquée) -- 2.1.4