PacketFence - BTS - PacketFence
View Issue Details
0001393PacketFencecaptive portalpublic2012-03-06 15:552012-04-18 10:00
dwuelfrath 
dwuelfrath 
normalminoralways
closedfixed 
devel 
3.3.03.3.0 
0115ce1b1a6d264cf77d1ca8e8e8e6315ebec5f5
0001393: Cancel button on mobile confirmation guest page
When hitting the cancel button on the guest self-registration mobile confirmation page, pf::web::generate_registration_page is called even if $Config{'registration'}{'nbregpages'} is equal to 0.
Hit Cancel on the mobile confirmation page (guest self-registration) and you'll be redirected to the multiple pages registration process.
If in the case you don't have the multiple pages registration process, you'll reach an error clicking "Next page".
No tags attached.
Issue History
2012-03-06 15:55dwuelfrathNew Issue
2012-03-06 16:00dwuelfrathNote Added: 0002601
2012-03-06 16:10dwuelfrathNote Added: 0002602
2012-03-06 16:15dwuelfrathAssigned To => dwuelfrath
2012-03-06 16:15dwuelfrathStatusnew => assigned
2012-03-28 15:05obilodeauNote Added: 0002628
2012-03-29 12:19obilodeauNote Added: 0002629
2012-03-29 12:25obilodeaugit revision => 0115ce1b1a6d264cf77d1ca8e8e8e6315ebec5f5
2012-03-29 12:25obilodeauNote Added: 0002630
2012-03-29 12:25obilodeauStatusassigned => resolved
2012-03-29 12:25obilodeauFixed in Version => +1
2012-03-29 12:25obilodeauResolutionopen => fixed
2012-04-18 09:51obilodeauTarget Version => 3.3.0
2012-04-18 09:51obilodeauFixed in Version+1 => 3.3.0
2012-04-18 09:59obilodeauNote Added: 0002655
2012-04-18 10:00obilodeauStatusresolved => closed

Notes
(0002601)
dwuelfrath   
2012-03-06 16:00   
Current behavior:
# Handling Cancel first
if (defined($cgi->param("action")) && $cgi->param("action") eq 'Cancel') {
    $session->clear(["pin"]);
    pf::web::generate_registration_page($cgi, $session, $destination_url, $mac,1);
    return (0);
}

Needs to be:
# Handling Cancel first
if (defined($cgi->param("action")) && $cgi->param("action") eq 'Cancel') {
    $session->clear(["pin"]);
    if ($Config{'registration'}{'nbregpages'} == 0) {
        $logger->info("$mac redirected to authentication page");
        pf::web::generate_login_page($cgi, $session, $destination_url, $mac);
        return (0);
    } else {
        $logger->info("$mac redirected to multi-page registration process");
        pf::web::generate_registration_page($cgi, $session, $destination_url, $mac);
        return (0);
    }
}
(0002602)
dwuelfrath   
2012-03-06 16:10   
After discussion:

Current:
Current behavior:
# Handling Cancel first
if (defined($cgi->param("action")) && $cgi->param("action") eq 'Cancel') {
    $session->clear(["pin"]);
    pf::web::generate_registration_page($cgi, $session, $destination_url, $mac,1);
    return (0);
}

Will be:
Current behavior:
# Handling Cancel first
if (defined($cgi->param("action")) && $cgi->param("action") eq 'Cancel') {
    $session->clear(["pin"]);
    pf::web::guest::generate_registration_page($cgi, $session, $destination_url, $mac,1);
    return (0);
}
(0002628)
obilodeau   
2012-03-28 15:05   
additionally translated buttons don't trigger proper actions (because $cgi->param("action") will not equal 'Cancel', it will be 'Annuler' in french)

remember to change it in both location
(0002629)
obilodeau   
2012-03-29 12:19   
After some discussion, we decided to get rid of the button entirely. People who want it can add a link in the template and decide where they prefer to redirect.
(0002630)
obilodeau   
2012-03-29 12:25   
fixed in stable
(0002655)
obilodeau   
2012-04-18 09:59   
fix released in 3.3.0 last friday