Access form from a url with autoconnect
Posted: Thu Aug 13, 2015 11:16 am
Hi,
I modified the code and nucommon.js index.php to allow direct access to a form and registration.
It certainly deserves to be optimized or corrected.
I use the parameter "f".
index.php
Line 33: $k = isset($_GET['k']) ? $_GET['k'] : ''; $f = isset($_GET['f']) ? $_GET['f'] : ''; // LTR : direct access to a form
Line 59: window.nuPrimaryKey = '$k'; window.form_id = '$f'; // LTR : direct access to a form
Line 118: toggleModalMode(window.nuPrimaryKey, window.form_id); //toggleModalMode(); // LTR : direct access to a form
Line 120: nuLogin(window.nuUsername, window.nuPassword, window.nuPrimaryKey, window.form_id); // nuLogin(window.nuUsername, window.nuPassword, window.nuPrimaryKey);
nucommon.js
Line 138: function toggleModalMode(k,f){ //function toggleModalMode(){ //-- login screen // LTR : direct access to a form
Line 268: nuLogin(undefined,undefined,k,f); // nuLogin(); // LTR : direct access to a form
Line 276: e.setAttribute('onclick', 'nuLogin(undefined,undefined,"'+k+'","'+f+'")'); // e.setAttribute('onclick', 'nuLogin()'); // LTR : direct access to a form
Line 1543: function nuLogin(u, p, k, f){ //function nuLogin(u, p, k){ // LTR : direct access to a form
Line 1553: if(typeof u == "undefined" || typeof p == "undefined"){ //if(arguments.length == 0){ // LTR : direct access to a form
Line 1576: toggleModalMode(k,f); //toggleModalMode(); // LTR : direct access to a form
Line 1580: window.nuFORM.form_id = f == '' ? data.DATA['index_id'] : f; //window.nuFORM.form_id = data.DATA['index_id']; // LTR : direct access to a form
Line 1589: //w.record_id = '-1'; // LTR : direct access to a form
Many greetings
I modified the code and nucommon.js index.php to allow direct access to a form and registration.
It certainly deserves to be optimized or corrected.
I use the parameter "f".
index.php
Line 33: $k = isset($_GET['k']) ? $_GET['k'] : ''; $f = isset($_GET['f']) ? $_GET['f'] : ''; // LTR : direct access to a form
Line 59: window.nuPrimaryKey = '$k'; window.form_id = '$f'; // LTR : direct access to a form
Line 118: toggleModalMode(window.nuPrimaryKey, window.form_id); //toggleModalMode(); // LTR : direct access to a form
Line 120: nuLogin(window.nuUsername, window.nuPassword, window.nuPrimaryKey, window.form_id); // nuLogin(window.nuUsername, window.nuPassword, window.nuPrimaryKey);
nucommon.js
Line 138: function toggleModalMode(k,f){ //function toggleModalMode(){ //-- login screen // LTR : direct access to a form
Line 268: nuLogin(undefined,undefined,k,f); // nuLogin(); // LTR : direct access to a form
Line 276: e.setAttribute('onclick', 'nuLogin(undefined,undefined,"'+k+'","'+f+'")'); // e.setAttribute('onclick', 'nuLogin()'); // LTR : direct access to a form
Line 1543: function nuLogin(u, p, k, f){ //function nuLogin(u, p, k){ // LTR : direct access to a form
Line 1553: if(typeof u == "undefined" || typeof p == "undefined"){ //if(arguments.length == 0){ // LTR : direct access to a form
Line 1576: toggleModalMode(k,f); //toggleModalMode(); // LTR : direct access to a form
Line 1580: window.nuFORM.form_id = f == '' ? data.DATA['index_id'] : f; //window.nuFORM.form_id = data.DATA['index_id']; // LTR : direct access to a form
Line 1589: //w.record_id = '-1'; // LTR : direct access to a form
Many greetings