RADIUSdesk

This is an old revision of the document!


Extra Fields To Click-To-Connect Pop-Up

Introduction

  • The Dynamic Login Pages applet has a dedicated section for Click-To-Connect.
  • By default there is an option for the user to first supply their email before they can connect to the Internet.
  • This can be set with and additional expiry date.
  • When these are selected the following happens:
    • The Click-ToConnect is displayed as normal.
    • When the user clicks the button, a check is done if there is a need for the user to supply anything (Based on his MAC Address and if there is an expiry date which now is active with this login page)
    • If there is such a need there is a pop-up window asking the user to provide their email before the Internet connectivity will commence.
  • There might however be the need to also provide additional info besides the email address.
  • This document will show which files needs to be tweaked for that.
  • We will add the following fields
    • A Phone number that needs to be 8 digits long.
    • A field called DN which is also a number that needs to be 7 digits long.

Files To Edit

pnlDynamicDetailClickToConnect.js

  • Locate the file pnlDynamicDetailClickToConnect.js.
  • It is typically under /var/www/rdcore/rd/classic/src/view/dynamicDetails/pnlDynamicDetailClickToConnect.js
  • We will define two combo boxes below cmbReSupply
var cmbReSupplyP = Ext.create('Ext.form.ComboBox', {
    fieldLabel      : 'Re-Supply Phone Interval',
    store           : reSupply,
    queryMode       : 'local',
    displayField    : 'name',
    valueField      : 'id',
    name            : 'ctc_resupply_phone_interval',
    itemId          : 'cmbReSupplyPhone',
    labelCls        : 'lblRd',
    allowBlank      : false,
    forceSelection  : true,
    value           : 0
});
 
var cmbReSupplyDn = Ext.create('Ext.form.ComboBox', {
    fieldLabel      : 'Re-Supply DN Interval',
    store           : reSupply,
    queryMode       : 'local',
    displayField    : 'name',
    valueField      : 'id',
    name            : 'ctc_resupply_dn_interval',
    itemId          : 'cmbReSupplyDn',
    labelCls        : 'lblRd',
    allowBlank      : false,
    forceSelection  : true,
    value           : 0
});
  • Then we will add check boxes for these below the email checkbox
{
    xtype       : 'checkbox',      
    fieldLabel  : 'Require Phone To Connect',
    itemId      : 'chkCtcRequirePhone',
    name        : 'ctc_require_phone',
    inputValue  : 'ctc_require_phone',
    checked     : false,
    disabled    : true
},
cmbReSupplyP,
{
    xtype       : 'checkbox',      
    fieldLabel  : 'Require DN To Connect',
    itemId      : 'chkCtcRequireDn',
    name        : 'ctc_require_dn',
    inputValue  : 'ctc_require_dn',
    checked     : false,
    disabled    : true
},
cmbReSupplyDn