Jump to content

dotnetic

Members
  • Posts

    1,070
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by dotnetic

  1. @schwarzdesign Try deleting the LazyCron.cache file in dist\site\assets\cache, then it could work again.
  2. @SubMon @pwired Did you see yet? Take a look at the video. It seems to become a nice page builder for ProcessWire.
  3. I tried to replace the InputfieldCheckbox render function with a hook in my `_init.php`but it did not work. I get the error in the screenshot below. Here is my hook function: $this->addHookAfter('InputfieldCheckbox::render', function ($event) { // outside a class // $page = $event->object; // if ($page->template == 'admin') return; // tell ProcessWire we are replacing the method we've hooked $event->replace = true; $label = ''; $user = wire('user'); if ($user->language) $label = Inputfield::getSetting("checkboxLabel$user->language"); if (!$label) $label = Inputfield::getSetting("checkboxLabel"); if (!$label && $this->checkedValueIsLabel) $label = $this->checkedValue; if (!$label) $label = Inputfield::getSetting('label2'); $this->set('skipLabel', $this->description || $label ? Inputfield::skipLabelFor : Inputfield::skipLabelHeader); if (!$label) $label = $this->label; // TBA: if($this->uncheckedValue) return $this->renderRadio(); $attrs = Inputfield::getAttributes(); $attrs['value'] = $this->checkedValue; $out = "<label><input type='checkbox' " . Inputfield::getAttributesString($attrs) . " />" . "<span class='pw-no-select'>" . $label . "</span></label>"; $event->return = $out; });
  4. @Klenkes To accomplish this, you need to replace line 94 in InputfieldCheckbox.module "<span class='pw-no-select'>" . $this->entityEncode($label) . "</span></label>"; with this: "<span class='pw-no-select'>" . $label . "</span></label>"; but it isn't a good idea to modify core parts. @ryan Is it possible that you remove the entityEncode from InputfieldSelect in the core, so we can use hyperlinks, classes, etc. in the label, or are there any security concerns? What Klenkes describes is a common need here in Germany. The other solution using InputfieldMarkup isn't as good as this solution. However I think one could replace the render function of the InputfieldCheckbox.module with a hook, but it would be nicer to have this feature in the core. What do you think?
  5. Thanks for removing the branding. I bought a drink for you. Cheers ?
  6. Looks very nice. But the UI when you hover over an item could be a little more in the style of PW (UIkit) It would be good if you could support plugins for the grid builder, so we can use another framework than Bootstrap.
  7. Hi @bernhard I tried to test and reproduce why this isn't working. When you install RockGrid and RockFinder from URL from Gitlab, then the RockGrid is downloaded and installed into a folder named "FieldtypeRockGrid". But RockFinder tries to look for files in a folder named "RockGrid". So Rockfinder tester isn't working and shows the error that I described and @mel47 also described. That's the first problem. You can solve it, if you download the zip file from gitlab, unzip it in your site/modules folder and remove the "-master" from the folder name, so the name of the folder is "RockGrid". The second problem is, that if your processwire installation is not in the root of the virtual host of Apache (for example in a subdirectory), then the URLs for loading RockGrid's assets isn't correct because it tries to load the files from the root and does not take the subdirectory into account. In one example installation I have two separate PW installations under the same virtual host but in different subdirectories (mydomain.localhost/pw1, mydomain.localhost/pw2). That might be the exact same problem that @mel47 has. If you open RockTester then it is trying to load http://mydomain.localhost/site/modules/RockGrid/plugins/cellHoverInfo.css instead of http://mydomain.localhost/pw1/site/modules/RockGrid/plugins/cellHoverInfo.css
  8. @Jules Vau Yes, thats correct. The setting in site/config.php overwrites the one in the wire directory.
  9. Wow, I waited so long for something like this. I think this could push ProcessWire really forward. When do you plan to release? And will it be a paid module or a free one? Thank you for creating this.
  10. The problem was, that I did not rename the downloaded folder from Gitlab from "RockGrid-master" to "RockGrid". After doing this, it works
  11. I installed the module and RockFinder, but when calling "Rock Finder Tester" the SQL query works, but no grid is displayed. There is a JavaScript error in the console which looks like this: (index):205 Uncaught ReferenceError: RockGrid is not defined at initGrid_ProcessRockFinderResult ((index):205) at (index):216
  12. Thank you Bernhard for finally releasing this module. I can not wait to play with it and share improvements, if I have any. I really can think of many use cases where this grid would be mandatory because it offers so much possibilities.
  13. I exactly think the same as Adrian.
  14. Clapped. Also on Medium ? Thanks for your insights and the PageQueryBoss module looks promising. I think I have a use for it in the near future.
  15. I want to create a repeater field via API and add fields to it. I read that there is a property repeaterFields, but when I try to add a field it does not appear in the ProcessWire backend. I put this code into my tracy console: $fields->delete($fields->get('quiz_answers')); $fields->delete($fields->get('quiz_correct_answer')); $repeater = new Field; $repeater->type = wire('modules')->get('FieldtypeRepeater'); $repeater->name = 'quiz_answers'; $repeater->label = 'Answer'; $repeater->repeaterCollapse = 3; $repeater->required = true; $repeater->repeaterAddLabel = 'Neue Antwort hinzufügen'; // $field->parent_id = wire('pages')->get("name=for-field-{$field->id}")->id; // $field->template_id = $template->id; $repeater->save(); $checkbox = new Field; $checkbox->type = $this->modules->get("FieldtypeCheckbox"); $checkbox->name = "quiz_correct_answer"; $checkbox->label ="This is the correct answer"; $checkbox->tags = 'quiz'; $checkbox->save(); //add fields to repeaterFields $repeaterFieldsArray = array(); $repeaterFieldsArray[] = $checkbox->id; $repeater->repeaterFields = $repeaterFieldsArray; $repeater->save(); But when I go and edit the repeater field 'quiz_answers', no field appears at details -> repeater fields. What is the correct way to add one ore more fields to the repeater via API? Maybe @teppo or @adrian could help me out with this, as you both seem to have some experience with repeater fields? Parts of my code are stolen, copied inspired by https://gist.github.com/teppokoivula/8889040 and https://github.com/adrianbj/ProcessAdminActions/blob/master/actions/PageTableToRepeaterMatrix.action.php#L227
  16. Just a quick thought: I think it is better and more flexible if you use an options field with autocomplete and "chosen select multiple (extra module)" for the column widths, offsets etc. Right now it looks very cumbersome. Take a look at my screencast at https://screencast-o-matic.com/watch/cF1OY3FYE2
  17. Because of that, I use Smarty as my template engine now, because it is closer to the ProcessWire syntax. But in one project I still have to use twig ? Also twig often throws errors, when you try to access a property/variable that isn't defined, but then you can use page["myvar"] instead without getting an error.
  18. @tpr Thanks for your suggestion. Yeah I was using a mixup of jQuery and vanilla JS, as my script was vanilla before as I used it outside of the admin. I needed to change your code a lil bit, because the type is a property and not an attribute. The new updated version is attached to my first post now.
  19. Get rid of the confirm password field and use an unmasking button instead Many articles like http://uxmovement.com/forms/why-the-confirm-password-field-must-die and recent user studies show, that there are UX problems with a confirm password field. Also there are comments who disagree with this behaviour. An example of a good password field UX is the signup form of MailChimp https://login.mailchimp.com/signup/ Luke Wroblewski from Google also described the problems with masked password fields, especially for mobile users: https://www.lukew.com/ff/entry.asp?1653 Why would the enhancement be useful to users? A confirm password field does not really add verification that you typed your password correctly. Users tend to make the same typing errors again, if they repeat their password. It would be better to use a show/hide password button, so a user can see the password he typed. This would remove friction and frustration. Luke even wrote, that he displays people’s passwords by default in the Polar app. I did not implement this at the time, but think it is a smart move. Maybe I implement it as an option. Fully functional module is ready Right now I have a working InputfieldPassword to use with AdminThemeUikit. Here is a video of the new Inputfield in action: https://youtu.be/PEWp89TOUsU It would be nice if you vote for this feature request on github if you think it is useful. You can download the module here. InputfieldPassword.zip
  20. Hello @Sten So what exactly is the problem? Don't you get any output? What happens? What is you path to templates in the config of the module? I have /templates/views and with my twig files in this directory everything works fine. Did you choose twig as the template files suffix? Your code and extend seem to be correct. The global template file field has to be empty so you can work with extends like you do
  21. @bernhard Ever heard of Release early, release often ?
×
×
  • Create New...