Jump to content

bernhard

Members
  • Posts

    5,767
  • Joined

  • Last visited

  • Days Won

    274

Everything posted by bernhard

  1. That sounds awesome! Thx for your great work ?
  2. I think I don't understand what you are trying to do. Why do you need a readonly select? What is the difference to a locked field that just shows the value?
  3. Thx @adrian true. That would be a good option. Though not ideal imho. But the best option we have so far. Thx
  4. Can't you just set the inputfield collapsed to collapsedNoLocked ? https://processwire.com/api/ref/inputfield/#pwapi-methods-collapsed-constants
  5. @ryan SettingsFactory would be another example of how useful a file upload inputfield that is not connected to a pw page could be :
  6. Hi @Macrura, just tried your module and have some suggestions: This is the screen after installation: What do you think of adding this section in the instructions field? https://github.com/outflux3/SettingsFactory#instructions (or at least the link) You could even add a direct link to create a new page under ADMIN (.../page/add/?parent_id=2) or under SETUP (.../page/add/?parent_id=22). Maybe you also want to add this screenshot for anybody wanting to get a quick impression of how this module looks in action (using the kitchen-sink example file): Looks like I should start using your modules for my projects! ? Thx! How do you handle file uploads? Eg site logo, favicon, image placeholder, invoice template etc? Maybe we get a possibility soon: https://processwire.com/talk/topic/22815-new-post-weekly-update-for-27-dec-2019/?do=findComment&comment=195465
  7. I think the best would be to create a custom process module. You can assign a permission to that module so that only some of your users can view this pages in the backend. This page could be a 100% custom UI with a list of all pending users and a button for each of them that adds the role to that user when clicked. class Process extends Process { public static function getModuleInfo() { return [ 'title' => '', 'version' => '0.0.1', 'summary' => '', 'icon' => '', 'requires' => [], 'installs' => [], // name of permission required of users to execute this Process (optional) 'permission' => 'foo', // permissions that you want automatically installed/uninstalled with this module (name => description) 'permissions' => ['foo' => 'May run the foo module'], // page that you want created to execute this module 'page' => [ 'name' => 'helloworld', 'parent' => 'setup', 'title' => 'Hello World' ], // optional extra navigation that appears in admin // if you change this, you'll need to a Modules > Refresh to see changes 'nav' => [ [ 'url' => '', 'label' => 'Hello', 'icon' => 'smile-o', ],[ 'url' => 'something/', 'label' => 'Something', 'icon' => 'beer', ], ] ]; } public function init() { parent::init(); // always remember to call the parent init } /** * */ public function execute() { $this->headline('Manage users'); $this->browserTitle('Manage users'); /** @var InputfieldForm $form */ $form = $this->modules->get('InputfieldForm'); $form->add([ 'type' => 'markup', 'label' => 'foo', 'value' => $this->usersTable(), ]); return $form->render(); } /** * Render users table */ public function usersTable() { $users = $this->pages->find('...'); $out = '<table>'; foreach($users as $user) { $button = "<a href='./activateUser/?id=" . $user->id . "'>activate</a>"; $out .= "<tr><td>{$user->name}</td><td>$button</td></tr>"; } $out .= "</table>"; return $out; } /** * Activate user and redirect to overview */ public function executeActivateUser() { // get user $user = $this->pages->get($this->input->get('id', 'int')); // !!!! caution !!!! // check if user is really a user and if the current user is really allowed // to modify this user! if(!$access) throw new WireException("no access"); // otherwise add role to user $user->of(false); $user->addRole(...); $user->save(); // redirect to overview $this->session->redirect("./"); } }
  8. Pros of PW: You already have a solid and flexible backend (access control, fieldtypes and inputfields, ...) Great fit of frontend + backend (you might be able to build everything as one app) It's really easy to create custom admin pages as @elabx said (see link) All the great things we love about PW Cons: Backend Design/UI/UX/tec (it's not the most modern one, you are limited in styling (or at least it's not that easy, see https://processwire.com/talk/topic/20659-rockskinuikit-easily-and-quickly-skin-your-adminthemeuikit-backend/ as possible workaround)) Many logged in users at the same time? The PW backend might not be resource friendly - no experience with that! Bad Continuous Integration support (see https://processwire.com/talk/topic/21212-alpha-rockmigrations-easy-migrations-from-devstaging-to-live-server/ ) Very limited data listing tools (ListerPro is great for some Listings, but really not great for more complex and more visual ones...) Need a good mobile experience for your backend? You might not be that happy with PW... This list is neither complete nor the only truth ? I don't really have any experience with other frameworks - that was just some experiences I had over the last few years building more complex apps on PW. I'm happy to learn from different opinions ?
  9. Hi Ryan, thx for the great news and happy holidays and a new year to you as well ? That sounds great. I've no idea how you plan to implement this, but I wonder if it could make sense to also have the backend in your mind for this Inputfield ? I've had several occasions where the admin file upload field was not ideal (mostly in ProcessModules and ModuleConfigs). And others had issues as well (eg @Robin S https://github.com/processwire/processwire-issues/issues/964 ). I think also @Gadgetto had problems with some kind of invoice upload field?! I have no specific example right now where and how this would make sense, but maybe others have one?
  10. Nice one, thx for sharing ? The search is definitely interesting. I wonder what the menu items / colors stand for? I guess they have a meaning? Maybe you could add a description on hover of the icons (title tag)? Some suggestions: 1) Uikit does a great job regarding accessibility out of the box (these are the little details I like about Uikit ? ), but your design does not reflect them. You could tweak it with very little effort by adding some :focus and :active rules. 2) The search menu is not usable from the keyboard at all I think. When you type a search phrase, TAB completes the phrase and you cannot navigate through the list of results (because you'll only have the first result left and the others disappear). 3) Is it intentional that you have non-serif font for menu and some(!) headlines and a serif font for the rest? I'm no design/UI/UX expert, but for me, that looks a little weird/incomplete/unprofessional(?).
  11. What about ImageReference like the PageReference we already have? Thx for that preview. What came to my mind instantly was that it would be great to have an option to define a default. This would then be very similar to the "select image from page" option - so maybe these could be combined? Maybe that would be overengineering. Not sure ? Thx for your great work! I will definitely use your module a lot in the future.
  12. Sorry, obviously I missed that info ? I don't know how complex your field output is, but you could nonetheless use my hook and recreate the complete output. Maybe that could even improve your UI.. Just to throw in an idea without knowing your scenario.
  13. // site/ready.php $wire->addHookAfter("Inputfield::render", function($event) { $field = $event->object; if($field->name !== "yourfield") return; $event->return = "<a href='foo/bar'>Your link</a>"; }); You could use one of the Runtime Markup Inputfields or something like the hook above (untested - just an example to get you started).
  14. Hi @Gadgetto Sure, it's very easy: ProcessWire.confirm("foo?", function() { ProcessWire.alert("bar yes"); }, function() { ProcessWire.alert("bar no"); });
  15. Interesting. It looks exactly as if it was drawn using yEd ( https://www.yworks.com/yed-live/ or installable version for Windows) Regarding the Page Builder, as @elabx said, there's nothing plug and play at the moment. See https://www.google.com/search?q=site%3Aprocesswire.com+page+builder
  16. Hi @venkatesham, welcome to the forum, not sure, but I think it is this one: https://github.com/ryancramerdesign/skyscrapers2
  17. This could also solve my request of adding images directly to that page ?
  18. Nextcloud could be an option: https://nextcloud.com/providers/
  19. Makes sense! I don't think it would be confusing, but I understand that you don't want to support this. It was just an idea ? Yeah, but at the moment the alien is the uikit icon, because all other icons in the pw admin come from the fontawesome library ?
  20. I'm not an UI/UX expert either ? Maybe something like this (elements beside the main image smaller, icon in the shared images inputfield larger): That has nothing to do with the theme used. Fontawesome icons are included in all admin themes. It's just the old 4.7 version: https://fontawesome.com/v4.7.0/icons/
  21. Hi @gebeer just tested it and everything works great. Great work! Not sure if the edit link icon is the best solution regarding UI/UX. If a user wants to upload an image I'm not sure if the pencil on the right was the first they were looking for?! Besides that I have to say that I really like your module ? Two more things: 1) What do you think of using pw-panels instead of the modal? I really prefer panels over modals. It's very easy to use and you can easily test it on your own: 1) replace pw-modal class by pw-panel on your link 2) execute pwPanels.init(); in devtools console 3) click your edit link and it will open in a panel Only the ajax reload would have to be triggered on panel close instead of modal close. Maybe you could even make that configurable in your module ? 2) Would would be REALLY great would be an inputfield that can also store custom images on that page. Take a news section as an example (I have this usecase on several projects): The user wants to show a featured image for a news item... Currently my setup is that he has to upload it for every news item. The problem is, that he uses the very same image several times across several news items. Your module would make it possible that he uploads it only once. So far so great ? But what if he wanted to upload an image that is for sure only used on that very single news entry (eg an image of an event). Using your field he'd have to upload that image on the shared folder and it would "bloat" up the shared folder. It would be absolutely awesome if he was able to choose either a picture of the shared folder or a custom upload that is saved for that single page only. Technically this should not be a huge problem as the shared images have their own page to live and the custom image could be saved in the folder of the currently edited page. Thx ?
  22. Not sure, but is this what you are looking for? https://processwire.com/api/ref/inputfield/wrap-attr/
×
×
  • Create New...