Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/21/2024 in all areas

  1. No worries, giving feedback is already much appreciated and helps a lot ?
    2 points
  2. Yeah! It works! In my case there were 6 RPB fields on one page in the backend. I'm sorry I couldn't be of much help in finding the culprit...
    2 points
  3. InputfieldText (and other inputfield types that extend InputfieldText such as InputfieldTextarea) has a "noTrim" setting that is false by default, which is what causes leading and trailing whitespace to be trimmed out of the field value. This setting isn't included in the config options for text fields (not sure why, perhaps because it's rarely needed) but you can add a config option for it with a hook: $wire->addHookAfter('InputfieldText::getConfigInputfields', function(HookEvent $event) { /** @var InputfieldText */ $inputfield = $event->object; /** @var InputfieldWrapper $wrapper */ $wrapper = $event->return; $field = $inputfield->hasField; // Only for inputfields that are associated with a Field object if(!$field) return; // Add checkbox field to config to control noTrim setting /** @var InputfieldCheckbox $f */ $f = $event->wire()->modules->get('InputfieldCheckbox'); $f->name = 'noTrim'; $f->label = 'No trim'; $f->label2 = 'Do not trim whitespace from the field value'; $f->checked($field->noTrim); if(!$field->noTrim) $f->collapsed = Inputfield::collapsedYes; $wrapper->add($f); }); This will add a "No trim" checkbox to text fields, and if you tick the checkbox the field value won't be trimmed. Result:
    2 points
  4. What I really love about AdminStyleRock is that you simply set one color and the PW backend immediately looks like it was built only for this client: But I'm not a Designer, so I just kept it very much like the default uikit theme. What I don't like is that several parts, especially the important page edit screen and all the inputfields have very low contrast and as I'm using dark mode now I think all the white is quite heavy on the eyes. What I don't like on the reno theme though is that it has totally unique and opinionated colors that never ever fit any of my client's CI. It's really easy to adjust everything of the style using simple css/less, but unfortunately several years passed by and nobody did improve this foundation. I wonder if some designers are still afraid of messing around with the css/less, so I want to ask if we have any designers here that want to work in improving the style in collaboration with me? We can do video calls or I can try to work from figma designs. Maybe we could even think of adding a light/dark mode toggle as we are working on it. Another thing that is not ideal is that it seems to be impossible to find all existing admin styles in the modules directory at the moment? Using the search I found these: In terms of design I think @Noel Boss AdminThemeBoss is very nice, but I don't like that it's an AdminTheme and not just a Style. And I'm not sure if he is still active in the PW world? If anybody has opinions to share or ideas on how to improve the situation please go ahead!
    1 point
  5. That rule was in conflict with native admin urls so I had to change it and use this way: <IfModule mod_rewrite.c> RewriteEngine On RedirectMatch 302 ^(.*)/(en|it|pt)$ /$1/$2/?lang=$2 # ... Hope this help someone else in the near future.
    1 point
  6. Not sure what to tell. You can use hooks and create an alias field that would work with GraphQL and add hooks that would sync with your current dropdown field. But that is a bit hacky and will need to be kept up to date with every new logic that involves your dropdown field. You might as well rename your dropdown option names throughout your code if it is just renaming it. As for the future, my personal advice for ProcessWire users, do not use FieldtypeOptions. Just use FieldtypePage for dropdowns, radio buttons or any type of options field. FieldtypePage takes a bit more time to set up properly as an options field, but in the long run it is always a better approach and much easier to deal with. Sorry, but you'll have to figure that out for yourself. Ask ChatGPT or Google about how to make PHP server to allow requests from any origin.
    1 point
  7. I will also attend to the meeting. Looking forward to see you guys
    1 point
  8. Following from @wbmnfktr's suggestion, note that the documentation for sort=sort states "But note that if the results have multiple parents, the resulting order isn't likely to be that useful." I find that in cases like yours something along the lines suggested in this post is often what I need:
    1 point
  9. I have a few RPB blocks in _main.php. Nowhere else. When editing HOME and I make no changes, PW warns me about loosing changes all the time. Although no changes have been made. At first it all worked fine, but somewhere during the last few days, it started. I disabled RockMigrations and LiveReload temporarily, but no change. I am not sure how to troubleshoot this...
    1 point
  10. Just used this for a field holding private keys. Perfect! Thanks @Robin S ?
    1 point
  11. @lpa Reading over the ProcessWire Weekly, apparently there was definitely an issue that was fixed in the recent dev version. https://weekly.pw/issue/514/#latest-core-updates
    1 point
  12. Hi @Klenkes I've found the issue! Please download v5.3.1 ? FYI: The change event was triggered by the widgets field (or whenever more than one RPB field were present on one page in the backend). Could you please mark the topic as solved? ?
    1 point
  13. I want to pursue this further and get involved. Unfortunately, I have so much to do both personally and professionally that I don't think I can do justice to you and your goal. But maybe I can join in, even just a little, if you want. Uikit is great and I have used it several times. But there are a few things I don't really like about the base. For example, the very light shade of gray that can also be found in the menu in your style. This is not barrier-free (is that how you write it in English?) nor is it user-friendly. Maybe it would be better to mark a hidden page in the menu differently. Maybe better in the PW admin page tree with a meaningful icon or background color. The UIKIT docs have the same problem. Only the active page in the menu has enough contrast. The color tone for (disabled, muted, etc.) in conjunction with the typography, which is then also used for the background, would have to be separated. Light gray as a background color yes, but not as a color for text elements. I think it should be more “form follows function”, especially in the admin area. But it doesn't hurt if it looks good too. With the “normal” PW Admin, I find it better that a few more colors are used than just one primary color. Especially for buttons “Edit”, for example, could be green and the rest dark gray. What would it look like if a customer had a very light pastel color as their primary color? Then it doesn't actually work or the admin would have to completely invert the color. This could possibly even happen automatically using color values. If the contrast of the primary color is not enough, dark mode is activated automatically. With a medium color as the primary color, it becomes difficult to make this decision again... There are still a few things that come to mind, but perhaps the above is something for a basic collection of ideas for an optimal admin theme. Maybe we can talk about it directly in German when we get the chance (Google Translate is also my friend here when I write). But now I have to keep working... Many greetings and thank you very much for everything you do here. I enjoy reading it and following what the „PW-DEV professionals“ are doing here.?? Chris
    1 point
  14. go here: https://processwire.com/talk/clients/purchases/ And look for ProMailer. You should see somthing llike There is a pending renewal invoice for this product. Pay Now If not, just contact Ryan and tell him, you would like to a renewal If the ProMailer key does not belong to you, you have to buy ProMailer first
    1 point
  15. I think you need to extend your annual subscription and this automatically gives you access to the promailer-forum And yes it is possible to have multiple lists. see here:
    1 point
  16. Just keeping this thread up to date in case anyone is searching for how to do this still (and I know I'll forget so it will probably be me), the ProcessPageList module now has a configuration option to let you hide pages from users:
    1 point
  17. I've been working with FieldtypeOptions recently and in the absence of documentation thought I would share some example code: $field = $fields->get('test_options'); /* @var FieldtypeOptions $fieldtype */ $fieldtype = $field->type; // Get existing options // $options is a SelectableOptionsArray (WireArray) // If there are no options yet this will return an empty SelectableOptionsArray $options = $fieldtype->getOptions($field); // Create an option $yellow = new SelectableOption(); $yellow->title = 'Yellow'; $yellow->value = 'yel'; // if you want a different value from the title // Don't set an ID for new options - this is added automatically // Will deal with 'sort' property later // Create another option $orange = new SelectableOption(); $orange->title = 'Orange'; // Add option after the existing options $options->add($yellow); // Get an option by title $green = $options->get('title=Green'); // Insert option at a certain position $options->insertAfter($orange, $green); // Remove an option $options->remove($green); // Reset sort properties (so order of options is the same as the SelectableOptionsArray order) $sort = 0; foreach($options as $option) { $option->sort = $sort; $sort++; } // Set options back to field $fieldtype->setOptions($field, $options);
    1 point
×
×
  • Create New...