Jump to content

dotnetic

Members
  • Posts

    1,037
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by dotnetic

  1. How do I add a class "uk-table" on the frontend to a FieldTypeTable? I am iterating through all elements from an admin template and eventually modify the values (for example concatenate the values of a Page field with a comma), but I don't know how to add the class to the table. The code that I am using right now is in a gist at https://gist.github.com/jmartsch/768d9dc19293528fe9ae82b7a8ee1c42#file-home-php In line 15 https://gist.github.com/jmartsch/768d9dc19293528fe9ae82b7a8ee1c42#file-home-php-L15 I tried to hook into the rendering, but as it is no Inputfield anymore, the hook does not work. Can someone help me please?
  2. It would be nice, if this theme would be selectable as an option on the user profile page instead of replacing the standard Uikit theme. An option to use the normal unmodified AdminThemeUikit would also be good in my opinion.
  3. Take a look at Repeater Matrix a paid ProFields module, which could be what you want. Someone here in the forums was building a "page builder", named DesignMe but seems to not have released it yet.
  4. Or even easier with $session->redirect("/user-profile/$user->name");
  5. Hey @tpr there are settings in AoS for PageListTweaks: Always show pagelist actions and Always show extra actions. Could you make them work also in a ListerPro? I can confirm this bug.
  6. Thank you all for your insights and information. Most people think, that it would not be a smart thing to render the default admin markup. However I am still evaluating options and trying out different things. Thanks @Robin S for his code. At a later time I would like to get an export of many PDFs (100 or 1000, I don't know yet, how many my customer would handle). I tried to find the perfect tool for generating the PDF. I tried WeasyPrint (written in Python) which has very good rendering capabilities. The problem is, that I have to call it from PHP via exec(), and it gives no feedback or errors. Additionally WeasyPrint requires an URL or a file to render to PDF, but does not know anything about my login status in ProcessWire. As my PDFs and pages are protected and should only be visible to logged in users, this is not a real solution ? Another problem is performance. The generation of 100 PDFs from pages would take a long time. First the page with over 150 fields has to be rendered and then the PDF has to be created. Multiply the time with 100 and you are waiting a looooong time. So right now, I think I use the Pages2PDF module which generates a PDF for a page on save and saves it to disk. As a template for the PDF I will try Robin's code to iterate through the Inputfields and get a clean output. When a user then wants to get an export of all PDFs, I just have to gather the files and zip them or combine them into one PDF. This would be really fast. What do you guys think about this approach?
  7. They are regular admin pages. Then in a module I would like to add a button that gathers the HTML of the admin pages and generates one or multiple PDFs out of it.
  8. I have seen Adrian's answer but to hook into the rendering, I need to render the page, as you did in your example. The problem with your example is, that it does not get the HTML of the admin page, but instead of a template file that resides in site/templates. But I need the HTML from the admin page.
  9. But my main question remains: How do I get the HTML of the admin page? Most important is, how do I get it when I am not actually on the page. Because I want to get the HTML of multiple admin pages.
  10. There are different libs out there which convert existing HTML and CSS to a PDF. If I create a Bitmap graphic out of the website, the PDF would not be searchable. So converting to a bitmap is not a solution for me. Looping over the fields and generating own markup would be the exact same process as if I did it on the frontend. I have to take every single fieldtype into account and render it accordingly. This is one thing ProcessWire's admin already does. Although this solution would be a lot cleaner with simpler HTML. Then I would create an own stylesheet and generate the PDF out of it. As I said before, I would not like to do this. But it might be an option.
  11. @bernhard I try to generate PDFs of one one or more admin pages (forms). I built an application with PW where people can enter details (for example a job application or a request form for office material) and there are many fields (150+) in the admin. Also in the admin I ordered and positioned the fields like they should appear on the resulting PDF. So I do not want to make a new template on the frontend level, just to recreate what I already have in the admin. If fields are added I have to change nothing. So I hope to come up with a good solution. I already seen your RockPDF module, and also Pages2PDF and PDFcomposer. Thanks for the additional hint.
  12. I want to create PDFs of certain pages in the admin. I do not want to recreate the admin template on the frontend and write code to show every field that I have in my template. Instead I would like to get just the HTML of the admin page in a variable so I can use it for generating my PDFs. How would I do that? Can it be done via API? Or use ob_start to capture the output?
  13. I really love your Theme but I don't know if it is right to use it because the Uikit version you use, is outdated. Right now there is a RC17 version. Also I think Ryan made some additions in the AdminThemeUikit, do you plan to be on par, if something changes or is added?
  14. I had the same request, and wanted to create a new Inputfield at first. But I think we could see this in a more general manner. It would be nice if we could have field prefixes and suffixes, and also can choose if they are displayed as icons or text. Uikit has some options at least for icons: The icons can even be clickable, you can read about it in the docs: https://getuikit.com/docs/form#form-and-icons I would love to see support for suffixes and prefixes for most inputfields in the core. Me and some other guys like @bernhard are also building applications in the backend and this would be a good addition. Maybe we should open a ticket on github?
  15. This is not intuitive. What does a red header mean? It could be anything. A timer that reads "Time until logout: 10 sec." would be the best from a UX perspective.
  16. @bernhard I would like to do this if someone comes up with a good name for this module *wink*
  17. Okay guys. This was very hard with much trial & error, but I finally got the solution (which is after all very simple). It is even worth an own blog post on my website: How to disable options in select elements that are already selected in another select element Here is a YouTube video of it in action
  18. Yes, thats true if you show all properties from the start. But this is not what I want, because then I have to show lots of fields. I want to keep the form small and simple, and so the user should only select the properties he wants, instead of seeing them all. My script for disabling the options of a select is mostly ready. Now it just needs to work with multiple InputfieldTables.
  19. Hey guys, thanks for your ideas, but actually none of them would handle my problem. I updated the first post, to clarify things a little bit more. @bernhard Functional fields serve a whole different purpose. HandsOnTable seems not to support a Page Reference field and even if so, it would not prevent a user from entering a property multiple times. @BitPoet Matrix fieldtype is nice but also has the problem of preventing a user from entering a property multiple times. @elabx The properties are defined this way. Seems it was a little bit hard to read, that I already use a page reference field, so I updated my first post. I have some other fields, that work similar to what you described. I display them as checkboxes. but the last checkbox requires the input of an additional information (Umgebungsgeräusche) in a textfield. So I could add an additional textfield for every checkbox, and show them conditionally if a checkbox is selected, but that would make it hundreds of them, and this is why I used ProFields: table for it. I really think the best way is to go with ProFields: Table and disable used options in the Page Reference field (Eigenschaft). I will post my solution here as soon as it's ready.
  20. I am looking for the best (or at least a good) way to assign multiple properties to a real world object (a room in my case). The number of properties should be random (because my customer can add as many properties as he wants), but each property should be assigned to the room only once. So right now I have a ProFields: Table with two fields: a page field for the property and another one for a description to the property (it is very important to have a description field for the property). The property (Eigenschaft) field is a page field (Page reference) which has a reference to pages which my customer can configure himself. It is displayed as an select input. Most of the time the users are working in the backend, as I am building a software and not a website with it. The problem is, that I can assign the same property multiple times. What would be the best way so I can select a property only once? Sure I could tell my customer that only the first appearabce of a property he used, would be saved, but a good UI also prevents users from doing so. It is always bad, if a user has to remember how to do things, because then it is not intuitive. So if he is allowed to use multiple properties more than once, what does he think, which value is going to be saved/used? How would I handle this on the server-side? Add a hook before Page::saveReady? Any help is appreciated. Solution: I developed a module Okay guys. This was very hard with much trial & error, but I finally got the solution (which is after all very simple). It is even worth an own blog post on my website: How to disable options in select elements that are already selected in another select element Here is a YouTube video of it in action
  21. Regarding transactions, please also take a look at the newest core addition in 3.0.114 which has a new method $database->supportsTransaction() https://github.com/processwire/processwire/commit/b4aec46a67f7521a0bb8933bf0fb48ae5b9c8303
  22. Please take a look about the new autoheight setting https://www.ag-grid.com/javascript-grid-width-and-height/#auto-height Here is an example where you can switch between a fixed height and autoheight: Example With autoheight enabled the vertical scrollbar appears, which might be a small bug in ag grid, but it doesn't bother me.
  23. @bernhard You should update ag grid to the latest version, as it brings numerous good improvements. See https://www.ag-grid.com/ag-grid-changelog/?fixVersion=18.0.0 and https://www.ag-grid.com/ag-grid-changelog/?fixVersion=19.0.0 I made a quick test with the new version and everything works well in my case. The name of the script has been changed to ag-grid-community.js
×
×
  • Create New...