Hi,
I'm fairly driven by what marketing wants this time, but for things like
conference registrations, I'm going to be definitely looking into the
OAuth/SSO options. Will be keeping an interested eye out for what you guys
come up with though :)
Another couple of learnings, thanks to our webteam here:
If the span field has an inner label field that has a for reference in it,
tapping/clicking on the label text will move the cursor to the associated
input box, without having to actually tap/click in the box.
Here's whats on our portal page now i've messed with it:
<span><label for="phone">Phone Number</label></span>
<input class="field" autocomplete="on" id="phone" name="phone" type="text"
value="[% phone | html %]" />
Adding the autocomplete pops up a possibly helpful previously entered value
as well. For me, for this phone value, its my home phone number, but it
might save some people some typing + add accuracy.
In terms of an array being added to the database for a custom field, I'm
pretty sure I've found the problem area.
This isn't a proper patch, because its against possibly the devel branch,
but it allowed me to submit an array of answers via a multiselect into the
database:
I've essentially just replaced inside the foreach loop with a ref test +
crappy handling. A push + join probably would be neater, but I tend to
write for me a few years in the future looking at my code and going "what
idiot...... oh.."
man Catalyst::Request has details, but the old $request->params call is
deprecated, and only returns the first value of a array if called in a
scalar context. Figuring out if something is an array without knowing for a
way of testing for the array is difficult. I opted for the call it as a
reference and test approach.
Now: (line 476) in
/usr/local/pf/html/captive-portal/lib/captiveportal/PacketFence/Controller/Signup.pm
sub setupSelfRegistrationSession : Private {
my ( $self, $c ) = @_;
my $request = $c->request;
foreach my $field (@PERSON_FIELDS) {
if(ref($request->parameters->{$field}) eq "SCALAR"){
$c->session->{$field} = $request->parameters->{$field};
}
elsif(ref($request->parameters->{$field}) eq "ARRAY"){
my $string = "";
foreach my $value (@{$request->parameters->{$field}}){
$string .= $value.",";
}
#get rid of trailing comma
chop $string;
$c->session->{$field} = $string;
}
else {
#not sure else needed, but might be.
$logger->error("ERROR:
".__PACKAGE__."::setupSelfRegistrationSession storing first scalar for
unhandled datatype for field $field");
$c->session->{$field} = $request->parameters->{$field};
}
}
my $phone = $request->param("phone");
$c->session->{company} = $request->param("organization");
$c->session->{telephone} = pf::web::util::validate_phone_number( $phone
);
$c->session->{phone} = pf::web::util::validate_phone_number( $phone
);
$c->session->{sponsor} = lc( $request->param("sponsor_email") );
# guest pid is configurable (defaults to email)
$c->session->{guest_pid} = $c->session->{
$Config{'guests_self_registration'}{'guest_pid'} };
}
Was:
sub setupSelfRegistrationSession : Private {
my ( $self, $c ) = @_;
my $request = $c->request;
foreach my $field (@PERSON_FIELDS) {
$c->session->{$field} = $request->param($field);
}
my $phone = $request->param("phone");
$c->session->{company} = $request->param("organization");
$c->session->{telephone} = pf::web::util::validate_phone_number( $phone
);
$c->session->{phone} = pf::web::util::validate_phone_number( $phone
);
$c->session->{sponsor} = lc( $request->param("sponsor_email") );
# guest pid is configurable (defaults to email)
$c->session->{guest_pid} = $c->session->{
$Config{'guests_self_registration'}{'guest_pid'} };
}
Hope this proves useful,
Cheers,
David
On Thu, May 14, 2015 at 1:34 AM, Derek Wuelfrath <[email protected]>
wrote:
> David,
>
> Peripherally of interest, perhaps: An issue we ran into when doing a bit
> of user testing: people moaned about having to fill in too many fields.
>
> An acquaintance of mine commented on this, and said that they've got
> research saying that the max fields people hit before they get sick of
> entering data and start giving up is 3.
>
> Interesting! Thinking the same way, I hate having to fill in a lot of info
> simply to get access to a service. More and more websites are offering SSO
> based on social networks accounts, or simple email / password field.
>
> Like Fabrice said, we are currently in the rework of the
> self-registration. Phase 1 was to allow custom fields to be displayed and
> should probably be included in PacketFence 5.1.0. Phase 2 consist in
> reworking the self-registration completely to remove all unnecessary fields.
> Cheers!
> dw.
>
> --
> Derek Wuelfrath
> [email protected] :: +1.514.447.4918 (x110) :: +1.866.353.6153 (x110)
> Inverse inc. (www.inverse.ca) :: Leaders behind SOGo (www.sogo.nu) and
> PacketFence (www.packetfence.org)
>
> On May 11, 2015 at 19:24:26, David Murrell ([email protected]) wrote:
>
> Hi,
>
> On this:
>
>
>> Also we probably remove name and surname from the default template and
>> this will be part of the mandatory fields configuration
>>
>
> Peripherally of interest, perhaps: An issue we ran into when doing a bit
> of user testing: people moaned about having to fill in too many fields.
>
> An acquaintance of mine commented on this, and said that they've got
> research saying that the max fields people hit before they get sick of
> entering data and start giving up is 3.
>
> For the portal I'm building at the moment, we've turned firstname/lastname
> into fullname (then stored in firstname), just to try to cut down on the
> mandatory field count.
>
> Cheers,
> David
>
>
>
>
>
>> Regards
>> Fabrice
>>
>>
>> Cheers,
>> David
>>
>> On Fri, May 8, 2015 at 12:37 AM, Fabrice DURAND <[email protected]>
>> wrote:
>>
>>> Hi David,
>>>
>>> i just did a test on a 4.7 version and there is only 3 conflicts that
>>> are really easy to fix.
>>> So it's as you want,patch 4.7 or install 5.0.2 and patch it or wait for
>>> 5.1.
>>>
>>> Regards
>>> Fabrice
>>>
>>> Le 2015-05-07 08:06, David Murrell a écrit :
>>> > Hi,
>>> >
>>> > That's awesome. :)
>>> >
>>> > I'll apply it tomorrow, and see how it goes. Does it need 5.0.2?
>>> >
>>> > Cheers,
>>> > David
>>> >
>>> > On Thu, May 7, 2015 at 11:39 PM, Durand fabrice <[email protected]
>>> > <mailto:[email protected]>> wrote:
>>> >
>>> > Hi David,
>>> >
>>> > this is exactly what we are working on.
>>> >
>>> > We made a branch (fix/mandatory_fields) that fix that. If you want
>>> > you can try to apply the patch of this branch to your setup
>>> > (
>>> https://patch-diff.githubusercontent.com/raw/inverse-inc/packetfence/pull/516.diff
>>> ).
>>> > Also it will be available in the incoming 5.1 release.
>>> >
>>> > Regards
>>> > Fabrice
>>> >
>>> >
>>> >
>>> > Le 2015-05-06 21:30, David Murrell a écrit :
>>> >> Hi,
>>> >>
>>> >> I'm a bit stuck. For a openday here on campus for prospective
>>> >> students, (using packetfence 4.7.0) marketing wants visting
>>> >> students to have wifi internet access on the day in return for
>>> >> some extra data gathered via a custom portal page.
>>> >> -- this might be important? I'm not using the default portal, but
>>> >> a custom one specific for the day.
>>> >>
>>> >> This is fine. Portal submit + dynamic vlan switch on valid auth
>>> >> + dhcp + dynamic deregister in the gui for bad clients works
>>> >> brilliantly. So brilliantly in fact, I'm going to replace our
>>> >> other radius + eduroam connection handling and NPS wired switch
>>> >> auth backend with it.
>>> >>
>>> >> Where I'm stuck: I'm trying to store extra data from the portal
>>> >> page into the database so that we can give it to marketing to do
>>> >> after-the-event marketing to students.
>>> >>
>>> >> If I add something like this to Portal Profiles and
>>> >> Pages/openday/Files/guest.html: (a contrived example, cough)
>>> >>
>>> >> <span>School</span>
>>> >> <input class="field" name="custom_field_1"
>>> >> type="custom_field_1" value="" /><br/>
>>> >>
>>> >> The field pops up on the portal page, I can add data, and mash
>>> >> the register button, and then the custom_field_1 data goes into a
>>> >> black hole somewhere. I can see the page submitting the data
>>> >> via the post request.
>>> >>
>>> >> If I cause the page to not submit by not having all the mandatory
>>> >> fields filled, the custom_field_1 field doesn't include the
>>> >> submitted data in the result page, but the firstname field does.
>>> >>
>>> >> If I extend the mandatory field list to include custom_field_1,
>>> >> then it will show a warning if it does not contain data, but
>>> >> still won't send the submitted data back on the "Missing
>>> >> mandatory parameter(s)" result page.
>>> >>
>>> >> I see the other data in the form being added to the database,
>>> >> (after enabling TRACE) in the logging files:
>>> >>
>>> >> ==> logs/packetfence.log <==
>>> >> attempt #0 to run query person_add_sql from module person
>>> >> SQL statement (person_add_sql): INSERT INTO person
>>> >> (pid, firstname, lastname, email, telephone,
>>> >> company, address, notes, sponsor, anniversary,
>>> >> birthday, gender, lang, nickname, cell_phone,
>>> >> work_phone, title,
>>> >> building_number, apartment_number,
>>> room_number,
>>> >> custom_field_1, custom_field_2,
>>> >> custom_field_3, custom_field_4, custom_field_5,
>>> >> custom_field_6, custom_field_7,
>>> >> custom_field_8, custom_field_9, portal, source)
>>> >> VALUES
>>> >> (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
>>> >> SQL params (person_add_sql): [email protected]
>>> >> <mailto:[email protected]>, first3, last3,
>>> >> [email protected] <mailto:[email protected]>,
>>> >> 033333333, org3, <null>, email activation. Date of arrival:
>>> >> 2015-05-07 12:45:41, <null>, <null>, <null>, <null>, <null>,
>>> >> <null>, <null>, <null>, <null>, <null>, <null>, <null>, <null>,
>>> >> <null>, <null>, <null>, <null>, <null>, <null>, <null>, <null>,
>>> >> openday, email
>>> >> person [email protected] <mailto:[email protected]>
>>> added
>>> >>
>>> >> This is using the email source as it appears to captures more
>>> >> data, not the null provisioner. - it also causes the guest.html
>>> >> section of the portal to be used, rather than the login.html
>>> >> pages. I don't quite understand that mapping, either.
>>> >>
>>> >> Any help would be much appreciated,
>>> >>
>>> >> Thanks in advance.
>>> >>
>>> >> Cheers,
>>> >> David Murrell
>>> >>
>>> >> Systems Engineer - Linux
>>> >> ITS Infrastructure
>>> >> University of Waikato, NZ
>>> >>
>>> >>
>>> >> Other files that may be of use:
>>> >>
>>> >> [root@pktfence-guest pf]# cat conf/provisioning.conf
>>> >> [accept]
>>> >> type=accept
>>> >> description=accept provisioner
>>> >> oses=
>>> >> category=guest
>>> >>
>>> >> [openday]
>>> >> filter=ssid:Open Day
>>> >>
>>> mandatory_fields=email,firstname,lastname,organization,phone,custom_field_1
>>> >> provisioners=accept
>>> >> always_use_redirecturl=enabled
>>> >> redirecturl=http://www.waikato.ac.nz
>>> >> sources=email
>>> >> logo=/content/images/coat-of-arms.png
>>> >> dot1x_recompute_role_from_portal=0
>>> >> filter_match_style=all
>>> >> reuse_dot1x_credentials=0
>>> >>
>>> >>
>>> >>
>>> >>
>>>
>>> ------------------------------------------------------------------------------
>>> >> One dashboard for servers and applications across
>>> Physical-Virtual-Cloud
>>> >> Widest out-of-the-box monitoring support with 50+ applications
>>> >> Performance metrics, stats and reports that give you Actionable
>>> Insights
>>> >> Deep dive visibility with transaction tracing using APM Insight.
>>> >> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>> >>
>>> >>
>>> >> _______________________________________________
>>> >> PacketFence-users mailing list
>>> >> [email protected] <mailto:
>>> [email protected]>
>>> >> https://lists.sourceforge.net/lists/listinfo/packetfence-users
>>> >
>>> >
>>> >
>>>
>>> ------------------------------------------------------------------------------
>>> > One dashboard for servers and applications across
>>> > Physical-Virtual-Cloud
>>> > Widest out-of-the-box monitoring support with 50+ applications
>>> > Performance metrics, stats and reports that give you Actionable
>>> > Insights
>>> > Deep dive visibility with transaction tracing using APM Insight.
>>> > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>> > _______________________________________________
>>> > PacketFence-users mailing list
>>> > [email protected]
>>> > <mailto:[email protected]>
>>> > https://lists.sourceforge.net/lists/listinfo/packetfence-users
>>> >
>>> >
>>> >
>>> >
>>> >
>>> ------------------------------------------------------------------------------
>>> > One dashboard for servers and applications across
>>> Physical-Virtual-Cloud
>>> > Widest out-of-the-box monitoring support with 50+ applications
>>> > Performance metrics, stats and reports that give you Actionable
>>> Insights
>>> > Deep dive visibility with transaction tracing using APM Insight.
>>> > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>> >
>>> >
>>> > _______________________________________________
>>> > PacketFence-users mailing list
>>> > [email protected]
>>> > https://lists.sourceforge.net/lists/listinfo/packetfence-users
>>>
>>>
>>> --
>>> Fabrice Durand
>>> [email protected] :: +1.514.447.4918 (x135) :: www.inverse.ca
>>> Inverse inc. :: Leaders behind SOGo (http://www.sogo.nu) and
>>> PacketFence (http://packetfence.org)
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> One dashboard for servers and applications across Physical-Virtual-Cloud
>>> Widest out-of-the-box monitoring support with 50+ applications
>>> Performance metrics, stats and reports that give you Actionable Insights
>>> Deep dive visibility with transaction tracing using APM Insight.
>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>> _______________________________________________
>>> PacketFence-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/packetfence-users
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> One dashboard for servers and applications across Physical-Virtual-Cloud
>> Widest out-of-the-box monitoring support with 50+ applications
>> Performance metrics, stats and reports that give you Actionable Insights
>> Deep dive visibility with transaction tracing using APM
>> Insight.http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>
>>
>>
>> _______________________________________________
>> PacketFence-users mailing
>> [email protected]https://lists.sourceforge.net/lists/listinfo/packetfence-users
>>
>>
>>
>> --
>> Fabrice [email protected] :: +1.514.447.4918 (x135) ::
>> www.inverse.ca
>> Inverse inc. :: Leaders behind SOGo (http://www.sogo.nu) and PacketFence
>> (http://packetfence.org)
>>
>>
>>
>> ------------------------------------------------------------------------------
>> One dashboard for servers and applications across Physical-Virtual-Cloud
>> Widest out-of-the-box monitoring support with 50+ applications
>> Performance metrics, stats and reports that give you Actionable Insights
>> Deep dive visibility with transaction tracing using APM Insight.
>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>> _______________________________________________
>> PacketFence-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/packetfence-users
>>
>>
>
> ------------------------------------------------------------------------------
>
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
>
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________
> PacketFence-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/packetfence-users
>
>
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users