Jump to content

Pavel Radvan

Members
  • Posts

    68
  • Joined

  • Last visited

Everything posted by Pavel Radvan

  1. Hi. Thanks and I tried new version v1.7.1 and now it works nice. It appears that you have two versions - 1.7.1 newest commercial (i could download from baumrock) and directly from PW is possible to update to 2.1.0 Which one is right ?
  2. Hi. This function you write is ok - I need to have already linked pages visible and option to add ONLY new to referenced page children which will be also linked. I do not need to see list from dropdown, because every children is new and always unique and others are not used for new page. Customer do not need to choose from previous created children pages of referenced page, because every new one is unique... For this reason I need only to have visible list of already linked children pages from referenced page (already done by script from imported data) and to disable that "add" button with dropdown list. Button "create new" is needed so this should be there ... Customer is creating new data by link from frontend which starts function and hook and creates new page (with predefined major data) where is that page reference field I am talking about. In this case there is no linked page and customer do not need to click and see other children pages to select (it is for him of not use) , but needs ONLY to add new, because every time it is new (no need of other items in referenced page children) When customer is editing data (again in backend) then he needs to see previously selected linked children pages from referenced page and again do not need to have option to select from others... He needs to change linked items or to create new. Do you understand now ?
  3. I have to specify that I have page for contracts and it is linked to another page to its children (products items) - so for this reason it is used page refernce field. In system I am working on is about 1200 pages for one type of contract linked to about 5000 pages of product items and about 8000 pages for other type of contract linked to about 50000 pages of product items. I hope this help to explain more the situation...
  4. It is more complex...I have pages in PW which are contracts - for more info please look here where is all explained: https://processwire.com/talk/topic/29959-link-page-with-multiple-pages-by-field-value-in-backend/ I completed import of data and linked tables (pages) with other data from pages by script. So now parent pages are linked with children pages. Parent page has its template and children page also has its template. I could use "children" tab, but part of contract page is not only children from one page, there are also other fields in template... So I need just have in parent page template field with visible linked children pages and option to add only new pages and not to show dropdown - it is not for my need it is mainly for customer request. Just to have only "create new" button and not accidentally show large dropdown by click on "add" button... Is that more clear for you ?
  5. I need reference field to have in admin pages linked and editable data for customer... Is possible to achieve same design of editing parent page with children (linked to it) other way ?
  6. Hi. Yes it is selected and that function I want to let customer add new child pages. Input field is Page/ListSelectMultiple. Here is screenshot - site is my language (Czech as default) As you could see there is selected and linked one item (child page) and that first button with dropdown is first one "Přidat" - in English it is "Add". Second one is to create new "Vytvořit novou" - this I need to have visible... I need to hide that first button with dropdown ("Přidat") Or if it is possible to have same function with same design without need of dropdown selections ??? What do you think ?
  7. Hi. I could explain. I am working on system for my customer who has contracts and in contracts are products items. Parent page is contract and child pages are product items. Every product items is unique so when customer adds new product item it is not used in other contracts then current. I had to import older data from MS Access tables and I used page reference field only for linking specific product items for parent contract page. Customer is using PW admin for editing data since I do not want to create extra forms for same functions on frontend. So now I have all in PW, but customer wants to hide that "add" button - mainly to disable dropdown, because is using only "new" button for adding only new child page. For this reason I need to hide that dropdown. So result should be only "new" button visible and that "add" hidden... If there is possible to have some permission or access rules setting to allow for some user in PW only to add new child page without dropdown of all current - it would be nice... Do you understand now ?
  8. I am little stuck on option to hide dropdown button on page reference input. I have child pages from page reference field linked and visible and they should not be addable from list of referenced pages. I need only option to add new child pages from parent page but not to show dropdown of all not linked. New child pages are every time unique so when they are added they are linked with parent Is possible to disable or hide that dropdown "add" button ? Thanks for any help...
  9. Hi. I created topic here: https://processwire.com/talk/topic/30167-rockpdf-pdf-filename-format-and-option-to-sign-documents/#comment-242526
  10. Hi. I am sorry I did not have time sooner. Regarding my questions in pub I created topic for them here. So first was about pdf filename format. I have in ready.php this: // add hook after page has been saved - pdf pro ks $wire->addHookAfter("Pages::saved(template=ks-import-hlavicka)", function ($event) { $page = $event->arguments(0); /** @var RockPdf $pdf */ $pdf = $event->wire->modules->get('RockPdf'); $pdf ->load("/site/templates/ks-tisk.php", [ // make saved page available as $page // in the loaded document file 'page' => $page, ]) ->saveToField( page: $page, field: 'pdf', filename: $page->name, append: false, ); }); $page->name is for example nz-0556-24 and when I look for file in page editor it shows this: It is filename with "." at the end. When I click on it and save it I have file named "nz-0556-24_.pdf" Is possible to eliminate that "." and "_" ???? Next question was just how to integrate some secure form of electronic sign of PDF documents. I could include image with sign but there could be nice to have some option to include digital signatures and certificates same way as is possible to normal PDF documents. I searched for mPDF about it but there is no option there. There is info that mPDF is not supporting it on github : https://github.com/mpdf/mpdf/issues/184 So for me it would be nice to have it in RockPdf but it is not crucible now. Just let me know what could be done with that filename...
  11. Hi. I saw your newsletter and you mentioned country I am from - Czech Republic - it is nice... I have to mention that last few days I implemented Rock PDF (I have subscription for Suite) and it is wonderful. I have some question about it. Since I will be using it for PDF contracts I have to create PDF file with name created from PW Page title or name - name works fine, but it creates name of file witch ends with "." When I save it, it creates file with this format PageName_.pdf How to disable that "_" on end of file? Next question is how to include some form of signage to that PDF. Do you have any plans to have option to include signatures or digital sign or for example QR codes? Thanks for answer Pavel
  12. It it here https://processwire.com/talk/messenger/5614/?do=findComment&comment=34986
  13. Thanks for reply. I am just figuring another think and it is validating data before creation of new page - it is for preparing right contract number so customer just click on new contract button on frontend and PW should prepare new page with constructed name from several parts and fields. But I need to validate if there is not already another contract number already, but before it is created. I already discussed this with @ryan, but it seems that he is quite busy. I will invite you to this and just need some small hint to figure it...
  14. It seems I find myself where is problem with script from you. This version is working for me: foreach($pages->find("template=ks-import-hlavicka") as $cp) { $polozky = $pages->find("template=polozka_ks, id_hlavicka_ks={$cp->id_hlavicka_ks}, status<" . Page::statusTrash); $cp->Polozky_ks->add($polozky); $cp->setAndSave('Polozky_ks',$polozky); } Most important is that in setAndSave is needed to specify that page field to which I need to save changes and update data... Without it there was no change in data...and no linked other pages... Regarding page reference field with single-page input, there is not needed to use "add" method. It throws error if I used it for adding data, because I had same data already on same page... I tried to add linked page with customer data to contract page and it is always only one customer for contract... So thanks for your initial hint with script and now it is working...hope this could help to others also...
  15. Hi. I did not have time to test it sooner so I did it today. I used your script which was run from tracy console and there is final variant of it : foreach($pages->find("template=ks-import-hlavicka") as $cp) { $polozky = $pages->find("template=polozka_ks, id_hlavicka_ks={$cp->id_hlavicka_ks}, status<" . Page::statusTrash); $cp->id_polozka_ks->add($polozky); $cp->setAndSave('polozky'); } where id_polozka_ks is that integer id field which is on both pages of contracts and products. As you could see in one of contract pages, there is no linked data: But system is linked to see items from products template: Script just reported that executed with 4487.67 ms, 15.1 MB What do you think of it - is there any problematic part or I need some permissions to interconnect data to pages ? Thanks for reply Pavel
  16. OK. Now I understand...so that is only github update check date...I see it is on other modules too...
  17. Hi. Thanks for answer. I have another project which is based on PHP 8.3 and I think there is no warning in vscode... Regarding version and updates I am little bit confused with this: Screenshot from PW module repository: Screenshot from github: Which is right ? github or pw in date of updated ? Is module on pw repository same with content or on github...?
  18. Hi. Your module is super and backups are working nice. I have there error from VSCODE which is showing this: ${} string interpolation' is deprecated since PHP 8.2 It is in this file: \site\modules\Duplicator\Classes\ClientAmazonS3.php Also there is date of update module on PW directory 2024/05/14 and I have version 1.5.2 which is latest but not from 14yh May this year... Is the date of development version or where I could get actual version? Is that error in new version solved ? Thank you
  19. Hi. Thank you. I hope this evening try it. If there will be some problem I will let you know...
  20. Thanks very much for reply and I have to explain current situation more. I am sorry but mys system is in my language (Czech), but I think it is clearly visible in pictures how are fields and IDs. I have imported data from Access in form of CSV trable files. This import was done always from one table to one page to create lots of children pages. I could as ne example of data take table with one type contracts named "ks-hlavicka" which is table of contracts (chidren pages) and details (head of contract) and products table is named "ks-old-pol" (also children pages). Each of those tables have numeric field "id_hlavicka_ks" with label ID hlavičky KS or ID hl KS. Here are screenshots from admin (backend): Contract: Product item: As you could see there is same ID in both pages. This is actual current situation. There is not page reference field yet in those pages - I need to know how to prepare it to template for scripts or guides or by your advice... On Frontend I could use API of PW to show content by ID but I would like to have interconnected pages also visible in admin (backend). What I want is to achieve this - it is example of created contract on another page with products items linked in page reference field: Same functionality I would like to have same for product also with connected customers(also they have IDs) which are on contracts. But after I will have some script or guide to link products I think other connected data could be handled by same way. Here are screenshots of templates for contract (ks_hlavicka) and product item (ks_polozka_old): Does this helped to you to understand ? Let me know how you think is possible to make that interlinked connections. Thanks Pavel
  21. Yes. There is imported lots of pages of product items (products) with "contract head ID". Same "contract head ID" is also on pages which are contracts. I am using pages->find and pages->get and other function on frontend to show them by this ID - so it now all works on frontend. But when I click to edit product in backend it shows only current product without link to contract there. So reason for this is to have editable contracts in backend and with already selected products(multiple) in page reference field of specific contract. When I create now in PW new contract I could select by page reference field multiple products - but I do not want to do it manually for next several thousands of contracts... I hope this is understandable for you...
  22. I have more explored your script. I do not have array of products IDs. I have products as pages already in PW and each of this product has numeric field with its ID. Is it possible to link all those pages(they have main parent page("products") by this script with corresponding pages by same contract ID ?
×
×
  • Create New...