Matze

Members
  • Content count

    16
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Matze

  • Rank
    Jr. Member

Recent Profile Visitors

300 profile views
  1. Thank you Robin, this worked very fine. So I'm close: The password field isnt required anymore and it's hidden if the page is published. Only if the page is unpublished it's still visible. Any reason for this? Or any idea how to hide completely, independent of published or not? Thank you so much!
  2. The hook worked perfectly, thank you very much! Now i just need to find out how to hide the password field in Admin, too. There is no "visibility" option for the password field? Any reason for this? I tried to manage this over access control, but this was causing new problems. Unchecking the "view" checkbox for admin role ( and automatically guest, too) was disabling the possibility to check password in script via Password->matches().
  3. Well, thank you very much, but no, it’s a secondary password to set, for some reasons. But it's not set via Admin. But i need the field for the password. So the question is still: why is a password required if i uncheck "required" in the field definition?
  4. Hey there, is there a possibility to make a password field not required. Whatever i try (no check or check the required option in field definition) it is always set to "required" and gives an error () if i try to save or create a new page with this field in its template. Required password was not specified, Missing required value Is it possible? Thanks! Matze
  5. Well thanks a lot for your replies. I will have a look at all the CK template options!
  6. Hi there, ist it possible to predefine content like text or html snippet for ck editor? So if i start a new page with this template containing this ck-editor-field there is already pre-written some text/html in this field? thanks
  7. Well, yes indeed. But that was just for a quick result reporting. My main goal is not to use jQuery anymore and completely switch to good old JavaScript. Inspired by UIKit framework 😏
  8. Works perfect. Thanks a lot!
  9. Hi there, I'm trying to get to work some AJAX call with vanilla Javascript, not jQuery. Anything seems to work so far, but the !$config->ajax seems to be ignored. To find out whats the problem by comparing both, jquery and plain javascipt, i built this template. commenting out //loadJquery(''); or loadVanilla(''); switches the two variants. (empty url variable means that the same pages will be loaded.) The problem: the pure Javascript function ("loadVanilla") is loading the full page content into the dc-container, which is wrong. The jQuery function ("loadJquery") only loads the part outside of the if(!$config->ajax): - which is as it should be. So - any help with this, what am i doing wrong? Thanks a lot - Matze <?php namespace ProcessWire; if(!$config->ajax): ?> (some static content)<br> <a id="loadlink" href="#">load</a><br> <?php endif; // end if not ajax ?> <span id="dc-container">(dynamic content)</span> <?php if(!$config->ajax): ?> <script src="http://code.jquery.com/jquery-3.3.1.min.js"></script> <script> var loadlink = document.getElementById('loadlink'); loadlink.addEventListener('click', function(event) { //loadJquery(''); loadVanilla(''); event.preventDefault() }); function loadVanilla(url) { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("dc-container").innerHTML = 'loaded: ' + this.responseText + (' (by vanilla javascript)'); } }; xhttp.open("POST", "", true); xhttp.send(); } function loadJquery(url){ // Load content $.ajax({ type: "POST", url: url, data: { ajax: true }, success: function(data,status){ pageData = data; } }).done(function(){ // when finished and successful document.getElementById("dc-container").innerHTML = 'loaded: ' + pageData + ' (by jquery ajax)'; }); } </script> <?php endif; // end if not ajax ?>
  10. My fault, haven't seen this. That's perfect, thank you.
  11. As said in the title. For me (and maybe other german fellows) it would be a big help if ä, ö, ü would be automatically changed to ae, oe, ue and not just to a , o , u (I am referring to the moment when creating a new page, then typing the page title and the name field is automatically filled with the url name)