Hi, I have another issue: I try to "Duplicate Page" - an EDIT PAGE, on a specific TABLE and the system freeze for about 1minute and after that UNFREEZE but do not duplicate the Page. I already have a Duplicate of Edita page, so at a point the mechanism worked. Why is not working anymore on this TABLE (to many fields ?) ? On another table is working. STEPS TO REPRODUCE: 1) Duplicate an EDIT Page 2) Duplicate same EDIT Page 3) Duplicate same EDIT Page... ...after a number of duplications, you will be not able to Duplicate the Page. Thanks in advance for any hint ! Catalin
Hi, If we bought v 2.7.3 ( PHPRad Classic 2.7.3 ) which is current version, the license will work with the new release or we have to buy again the platform ? All the best, Catalin
For me didn't work. Working method is: 1) Edit the file "page-script.js" 2) Go to section you need. e.g.: "$(document).on('click', '.open-page-inline', function(e){" 3) Find line "var newRow = $('<tr class="child-row"><td colspan="' + colspan + '"><div class="row justify-content-center"><div class="col-md-6"> [...]" 4) Modify: "class="col-md-6" " in "class="col-md-12"" or "class="col-md-11"" .whatever works for you ! All the best, Catalin
Hi, Is there a Roadmap for PHPRad ? For USERS, supporting PHPRad will be very helpfull to have a roadmap like: - 2021 - Summer - V.28.0 will be released NEW Features in this release: - Form Wizzard - Diferrent form templates - Wizzard for reports - etc. - 2021 - Winter - v28.1 - new and exciting features ..etc. Tks, Catalin PS: lack of roadmap is not good, will demotivate the community !
Wilvin rules !!!! Thanks Wilvin for your help, I spent lot of time to figure out the error. Solution: If you guys have a menu like: MENU1 - LINK 1 (here you have to place LINK 1) Submenu 1 - LINK 1 Submenu 2 - LINK 2 MENU2 - LINK 3 (here you have to place LINK 3) Submenu 3 - LINK 3 Submenu 4 - LINK 4 etc. ...so be aware at LINK1 ...LINK 3 etc. when you use ROLE BASED security !!! Many thanks to Wilvin ! ...and I strongly advise you all to BUY the application to support the developers to continue the work! ...and also register to https://www.patreon.com/willvinofficial ...you will learn a lot and will have support ! (which is very useful)
After a series of tests, my conclusion is: "User Records Management" mess-up the ACL so is to be avoid for now. I assume write/initialize somewhere in the project a section for ACL, remaining during further publishing of the project; even if you toggle check all in the Roles and Permissions nothing is published in the menu. Any fix will be welcomed because users has to recreate the project and made again all changes ...which is crazy!
@Catalin please make sure the current user role logged in has been given access to the pages, else the menu will not appear.
Hi Wilvin, Of course, I have checked "Toggle Check All" in "Role Base Access Control" for all roles... NONE is working. I suspect "User Record Management" ...messed up things there. I created a new project and RoleBased restrictions are working.... so is there a "cache" non re-writable ..remaining from a publishing to another. QUESTION: where/how can I handle my own the restriction for the MENU (with custom code ?) ? Thanks for heping, Catalin
@Catalin please Clos the phprad application, open it again and publish the project to a different folder.
Hi Wilvin, I did it nothing happened. Once "Roles and Permissions" are activated static, NOTHNG appear in the MENU (even I have published in another folder). Any idea why or how to solve this ? Many thanks, Catalin
PS: any NEW table I add appear in the MENU ...old tables no... I deleted the menu, rewrite again: same result
Hi, With "Static Role Permission" nothing is published in PROJECT MENU. I erased all roles, created new roles ...again recreated initial roles, nothing happens. MENU published is empty. I "toggle check all" all tables, to be visible: no result. The behavior was changed after I have played with "User records management" and deactivated after.
Any help ? Any idea how to make it working ?
Thanks in advance, Catalin PS: Legacy roles (old roles deleted already) remained present when I activate "User records Management". How can I correct this ?
Hi, I saw that: ClientEvents ....do not work in Modal or Inline VIEWs... Is there a way to make it working ? Thanks in advance for any help on this topic, Catalin !
Sorry to say but is a NASTY BUG related with this feature, as follow: 1) In the PAGE-SCRIPTS.JS in case an event is sent to server al the time is written in the JS file as: $('#ctrl-Field_Name').on('change', function(){ ...} but WITHOUT "Table_Name" and this will duplicate the functions in JS file, because SAME FIELD named "ctrl-Field_Name" may appear in several Tables with different functions... 2) In this regard, you receive random-values depending on which function is executed. Is a nasty bug ! Correct call into the PAGE-SCRIPTS.JS for the function should be written as: $('#ctrl-Table_name.Field_Name').on('change', function(){ ...}
This is a VERY USEFUL functionality, please do a work around ...and let me know This error may make the ClientEvent useless because of impredictibility described, which is bad because is a cool and useful functionality.
To better understand I'm giving you bellow a sample code from the Application.
;$('#ctrl-Cod_Unic_Linie_Buget').on('change', function(){ let Cod_Unic_Linie_Buget = $(this).val(); sendCimLinieBugetProiect(Cod_Unic_Linie_Buget); }); function sendCimLinieBugetProiect(Cod_Unic_Linie_Buget){ var data = {// We are trying to organize our data for the server codliniebuget: Cod_Unic_Linie_Buget } //We now make an ajax post to the server var request = $.ajax({ type: 'POST', // the type of request we are making. url: siteAddr+'api/getLinieBugetProiect/?csrf_token='+csrfToken, //our api link/url data: data, // the data we are sending to the server cache: false, // we dont want the request to be cached. //dataType: 'json' //the type of data we expect our api to return. }); // Now we check for response that will be gotten from the server. // Callback handler that will be called on success request.done(function (response, textStatus, jqXHR){ $('#ctrl-Categorie').val(response.data.Nume_cat_cheltuiala_eligibila); $('#ctrl-Subcategorie').val(response.data.Nume_subcat_cheltuiala_eligibila); }); // Now we check for errors we get when trying to make our post request. // Callback handler that will be called on failure request.fail(function (jqXHR, textStatus, errorThrown){ // Log the error to the console console.error( "The following error occurred: "+ textStatus, errorThrown ); }); } $('#ctrl-Cod_Unic_Linie_Buget').on('change', function(){ let Cod_Unic_Linie_Buget = $(this).val(); sendLinieBugetProiect(Cod_Unic_Linie_Buget); }); function sendLinieBugetProiect(Cod_Unic_Linie_Buget){ var data = {// We are trying to organize our data for the server codliniebuget: Cod_Unic_Linie_Buget } //We now make an ajax post to the server var request = $.ajax({ type: 'POST', // the type of request we are making. url: siteAddr+'api/getLinieBugetProiect/?csrf_token='+csrfToken, //our api link/url data: data, // the data we are sending to the server cache: false, // we dont want the request to be cached. //dataType: 'json' //the type of data we expect our api to return. }); // Now we check for response that will be gotten from the server. // Callback handler that will be called on success request.done(function (response, textStatus, jqXHR){ $('#ctrl-Categorie').val("Something Else"); $('#ctrl-Subcategorie').val("Random text");
Sorry to say but is a NASTY BUG related with this feature, as follow: 1) In the PAGE-SCRIPTS.JS in case an event is sent to server al the time is written in the JS file as: $('#ctrl-Field_Name').on('change', function(){ ...} but WITHOUT "Table_Name" and this will duplicate the functions in JS file, because SAME FIELD named "ctrl-Field_Name" may appear in several Tables with different functions... 2) In this regard, you receive random-values depending on which function is executed. Is a nasty bug ! Correct call into the PAGE-SCRIPTS.JS for the function should be written as: $('#ctrl-Table_name.Field_Name').on('change', function(){ ...} This is a VERY USEFUL functionality, please do a work around ...and let me know To better understand I'm giving you bellow a sample code from the Application.
;$('#ctrl-Cod_Unic_Linie_Buget').on('change', function(){ let Cod_Unic_Linie_Buget = $(this).val(); sendCimLinieBugetProiect(Cod_Unic_Linie_Buget); }); function sendCimLinieBugetProiect(Cod_Unic_Linie_Buget){ var data = {// We are trying to organize our data for the server codliniebuget: Cod_Unic_Linie_Buget } //We now make an ajax post to the server var request = $.ajax({ type: 'POST', // the type of request we are making. url: siteAddr+'api/getLinieBugetProiect/?csrf_token='+csrfToken, //our api link/url data: data, // the data we are sending to the server cache: false, // we dont want the request to be cached. //dataType: 'json' //the type of data we expect our api to return. }); // Now we check for response that will be gotten from the server. // Callback handler that will be called on success request.done(function (response, textStatus, jqXHR){ $('#ctrl-Categorie').val(response.data.Nume_cat_cheltuiala_eligibila); $('#ctrl-Subcategorie').val(response.data.Nume_subcat_cheltuiala_eligibila); }); // Now we check for errors we get when trying to make our post request. // Callback handler that will be called on failure request.fail(function (jqXHR, textStatus, errorThrown){ // Log the error to the console console.error( "The following error occurred: "+ textStatus, errorThrown ); }); } $('#ctrl-Cod_Unic_Linie_Buget').on('change', function(){ let Cod_Unic_Linie_Buget = $(this).val(); sendLinieBugetProiect(Cod_Unic_Linie_Buget); }); function sendLinieBugetProiect(Cod_Unic_Linie_Buget){ var data = {// We are trying to organize our data for the server codliniebuget: Cod_Unic_Linie_Buget } //We now make an ajax post to the server var request = $.ajax({ type: 'POST', // the type of request we are making. url: siteAddr+'api/getLinieBugetProiect/?csrf_token='+csrfToken, //our api link/url data: data, // the data we are sending to the server cache: false, // we dont want the request to be cached. //dataType: 'json' //the type of data we expect our api to return. }); // Now we check for response that will be gotten from the server. // Callback handler that will be called on success request.done(function (response, textStatus, jqXHR){ $('#ctrl-Categorie').val("Something Else"); $('#ctrl-Subcategorie').val("Random text");
Any idea on how to do that ? ...I need a FULL-WIDTH "Detail-View" on-click on a "master-View" field... I have attached an image for more clarity... Thanks again in advance for any help possible, Catalin !
Many thanks Willvin: worked for me, amazing ! My code bellow, as inspiration for others:
$('#ctrl-Pret_unitar_fara_TVA').on('change', function(){ //initialize variables with fields values var pretUnitar = $(this).val(); //current field where event take place var Numar_de_luni = $('#ctrl-Numar_de_luni').val(); (pay attention: Database field name is Numar_de_luni) var Cantitate = $('#ctrl-Cantitate').val(); //assignment of calculation to another field $('#ctrl-Valoare_totala_fara_TVA').val(pretUnitar * Numar_de_luni * Cantitate); });