Answering my own question... the least worst solution seems to be a
customization of signin.html in a portal profile is gui-editable and synced so
most supportable. Provided in case any one cares. So this is now a feature
request thread instead :). Please can we have modern input types and
autocomplete hints added to the next official release? Thanks!! :D
(Oh, I don't know how these templates work ... can I use a switch statement
instead?)
<!-- START signin.html -->
<form action="/signup" method="post">
[% IF sms_carriers %]
[% out = form.get_field("mobileprovider").options(sms_carriers) %]
[% END %]
[% IF fields.exists('aup') %]
<div class="card">
[% form.get_field('aup').render | none %]
</div>
[% END %]
<div class="card[% IF fields.exists('aup') %] card--hidden card--disabled[% END %]
layout layout--center">
<div class="layout__item u-2/3 u-1/1-palm">
[% FOREACH field IN fields.keys %]
[% NEXT IF field == 'aup' %]
<div class="input-container">
[% IF field == 'telephone' %]
<div>
<label for="fields[telephone]">Telephone</label>
<input type="tel" name="fields[telephone]" id="fields[telephone]" value=""
autocomplete="tel">
</div>
[% ELSE %]
[% IF field == 'email' %]
<div>
<label for="fields[email]">Email</label>
<input type="email" name="fields[email]" id="fields[email]" value=""
autocomplete="email">
</div>
[% ELSE %]
[% IF field == 'firstname' %]
<div>
<label for="fields[firstname]">Firstname</label>
<input type="email" name="fields[firstname]" id="fields[firstname]" value=""
autocomplete="given-name">
</div>
[% ELSE %]
[% IF field == 'lastname' %]
<div>
<label for="fields[lastname]">Lastname</label>
<input type="email" name="fields[lastname]" id="fields[lastname]" value=""
autocomplete="family-name">
</div>
[% ELSE %]
[% form.get_field(field).render | none %]
[% END %]
[% END %]
[% END %]
[% END %]
</div>
[% END %]
<button type="submit" name="submit" class="btn btn--full u-mt">
<div class="flag">
<div class="flag__img">[% svgIcon(id='ic_done_black_24px',size='small') %]</div>
<p class="flag__body">[% i18n("Submit") %]</p>
</div>
</button>
</div>
</div>
</form>
<!-- END signin.html -->
On Nov 02, 2016, at 01:33 PM, Greg Harewood <[email protected]> wrote:
We have a slightly customized portal for guests and we expect them to enter
their own phone and email. Many of them are logging on with smartphones or
iPads.
I REALLY want to be able to serve
....
<div class="input-container">
<div>
<label for="fields[email]">Email</label>
<input type="email" name="fields[email]" id="fields[email]" value="">
</div>
</div>
...
<div class="input-container">
<div>
<label for="fields[telephone]">Telephone</label>
<input type="tel" name="fields[telephone]" id="fields[telephone]" value="">
</div>
</div>
Note the modified types to bring up the email and phone keypads on iPhone.
This is such a big deal for usability on smartphones, I was surprised that it
wasn't already present.
I'm not an expert on perl FormHandler (or in fact perl). It seems to me that
it supports Email but not Telephone types out of the box, so that we need to do
two things:
1. To activate existing email support, add "has '+is_html5' => (default => 1);" in the
right place - "html/captive-portal/lib/captiveportal/Form/Authentication.pm" works, but see
below.
2. To add phone support, add a custom Telephone type in
"html/pfappserver/lib/pfappserver/Form/Field/" and then cite it with has_field in
"html/captive-portal/lib/captiveportal/Form/Authentication.pm"
Oh for the good old days when I could have just hacked the html plain text.
This is becoming an enormous sledgehammer to crack a nut. Can anyone help?
This is a little beyond my skills now.
Ideally all of these changes would go in one of my new auth source module files
(because I can't expect ops to maintain and apply diffs for every upgrade)....
html/pfappserver/lib/pfappserver/Form/Config/Authentication/Source/JLPvisitorEmail.pm
html/pfappserver/lib/pfappserver/Form/Config/PortalModule/Authentication/JLPvisitorEmail.pm
html/pfappserver/root/authentication/source/type/JLPvisitorEmail.tt
html/captive-portal/lib/captiveportal/PacketFence/DynamicRouting/Module/Authentication/JLPvisitorEmail.pm
html/captive-portal/lib/captiveportal/DynamicRouting/Module/Authentication/JLPvisitorEmail.pm
lib/pf/Authentication/Source/JLPvisitorEmailSource.pm
Thanks!
Greg
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users