Hi Fabrice,

Sorry for the late reply!

This patch works great! Thank you! I had to dig around a bit to figure out how 
to add it, but I finally found it under Portal Modules.

Now the only issue I have is with Custom fields and the email for activation. I 
have added custom_field_9 to the registration portal, to be able to ask 
employees to enter their department. I have also added a description to the 
English po file, and a translation to the Danish po file:

English file:

msgid "Custom_field_9"
msgstr "Work area"

Danish file:

msgid "Custom_field_9"
msgstr "Arbejdsområde"

The reason I have change custom_field_9 to Custom_field_9 is the fact that the 
portal profile does not pick up the translation if the string is not 
capitalized? This is probably a bug in the code?

Well, I have then edited the configuration -> Portal profiles -> my portal 
profile -> files -> emails -> emails/emails-guest_sponsor_activation.html and 
added the following:

                    [% i18n("Lastname") %]: [% lastname %]</br>
                    [% i18n("Phone number") %]: [% telephone %]</br>
                    [% i18n("Company") %]: [% company %]</br>
                    [% i18n("Custom_field_9") %]: [% custom_field_9 %]</br>
                    [% i18n("Email") %]: [% pid %]</p>

I was then expecting this field to be included in the activation email, but the 
email is just default. I also tried to change some of the fixed text, but this 
also does not reflect in the generated email, so it seems like PF does not 
actually use the customized html file?

I have run pfcmd service pf restart after changing to make absolutely sure it 
was loaded.

How do I proceed with this?



Fra: Fabrice Durand [mailto:fdur...@inverse.ca]
Sendt: 17. marts 2017 21:15
Til: packetfence-devel@lists.sourceforge.net
Emne: Re: [PacketFence-devel] Prefill sponsor, and hide field from registration 

Hello Jes,

try that:




Le 2017-03-17 à 08:30, Jes Kasper Klittum a écrit :

Hi Fabrice,

Sorry for not replying directly to your email, but emails from the dev list has 
not been sent to me for some reason. I can only read your reply in the 
archives. That is also the reason my original mail has been sent to the list 
multiple times.

I have looked at the github link, but I am afraid my knowledge of Perl is 
rather limited, so I have no idea how to achieve what I would like to do.

Any chance you could help me out, by providing a signin.html that hides sponsor 
email, or with this - better - suggestion?



Hi Jes,

IMO the better thing to do is to define a email address directly in the

sponsor module and hide it on the portal.

Something like that but for sponsor email




Fra: Jes Kasper Klittum
Sendt: 15. marts 2017 10:51
Emne: Prefill sponsor, and hide field from registration form

Hey Devs,

In my portal module, I am using two sponsor based authentication modules - one 
for visitors which require the visitor to enter a sponsors email, and one for 
employees which should not require the user to enter the sponsor email, but 
requires a custom field.

Visitor module works as it should, but the employee guest registration needs a 
bit of work.

What I want to achieve is:

If the form contains the mandatory field "custom_field_9", then the sponsor 
email field should be hidden on the form, and prepopulated with an email 
address. This way, when an employee wants to register a device, an email will 
just be sent to IT to approve the access.

I have tried modifying signin.html, but I am not very strong in HTML or perl. 
Any help to achieve the above would be greatly appreciated.

Med venlig hilsen / Best regards,

Jes Kasper Klittum
Head of IT

Ahornvej 1,
DK-4780 Stege


Check out the vibrant tech community on one of the world's most

engaging tech sites, Slashdot.org! http://sdm.link/slashdot


PacketFence-devel mailing list




Fabrice Durand

fdur...@inverse.ca<mailto:fdur...@inverse.ca> ::  +1.514.447.4918 (x135) ::  

Inverse inc. :: Leaders behind SOGo (http://www.sogo.nu) and PacketFence 
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
PacketFence-devel mailing list

Reply via email to