XH 1.6: Different Kinds of Inputs for Config Forms

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
svasti
Posts: 1648
Joined: Wed Dec 17, 2008 5:08 pm
Location: Bielefeld, Germany
Contact:

Re: XH 1.6: Different Kinds of Inputs for Config Forms

Postby svasti » Mon Sep 09, 2013 2:36 pm

I played around with the different options and I would prefer the last possibility:
cmb wrote:An alternative would be to use inputs for options which have a short value currently, and textareas for those with a long value:

Code: Select all

$omcf = isset($mcf[$key])
    ? $mcf[$key]
    : (utf8_strlen($val) <= 50 ? 'string' : 'text');

It preserves the possibility to save config data by just hitting the return key while at the same time longer entries are nicely visible and editable. I mean, you get the best of both worlds.

svati

manu
Posts: 534
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: XH 1.6: Different Kinds of Inputs for Config Forms

Postby manu » Thu May 21, 2015 7:33 am

manu wrote:var_dump outputs "test".
This comes from the FF form autocomplete feature.
After deletion of this certain password it worked well.
How about a password_OLD field with

Code: Select all

autocomplete="off"
?

It's just annoying. In FF 38.0.1 the password autocomplete problem arises again, even with autocomplete="off" in the form field. In FF 36.0.1 it still works. Do you make similar experiences?

EDIT: very interesting comment @bugsilla..
and here the complete FF 38 changelog

Holger
Site Admin
Posts: 2480
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany
Contact:

Re: XH 1.6: Different Kinds of Inputs for Config Forms

Postby Holger » Thu May 21, 2015 8:32 am

manu wrote:Do you make similar experiences?
Yes, can confirm it. Really annoying ... :roll:

manu
Posts: 534
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: XH 1.6: Different Kinds of Inputs for Config Forms

Postby manu » Thu May 21, 2015 9:35 am

more interesting insights.

cmb
Posts: 9964
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa
Contact:

Re: XH 1.6: Different Kinds of Inputs for Config Forms

Postby cmb » Thu May 21, 2015 10:54 am

manu wrote:In FF 38.0.1 the password autocomplete problem arises again, even with autocomplete="off" in the form field.

A quick workaround for those who are affected is to modify the field type in cmsimple/metaconfig.php:

Code: Select all

$mcf['security']['password']="hidden";
This way the password can't be changed anymore in the config dialog, though.

For XH 1.6.7 we may have to come up with a solution, unless Mozilla reverts the change.
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

svasti
Posts: 1648
Joined: Wed Dec 17, 2008 5:08 pm
Location: Bielefeld, Germany
Contact:

Re: XH 1.6: Different Kinds of Inputs for Config Forms

Postby svasti » Thu Jun 11, 2015 1:39 pm

cmb wrote:For XH 1.6.7 we may have to come up with a solution, unless Mozilla reverts the change.
Any solution in view? :shock:

cmb
Posts: 9964
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa
Contact:

Re: XH 1.6: Different Kinds of Inputs for Config Forms

Postby cmb » Thu Jun 11, 2015 2:54 pm

svasti wrote:
cmb wrote:For XH 1.6.7 we may have to come up with a solution, unless Mozilla reverts the change.
Any solution in view? :shock:

Haven't thought about this issue anymore; it's not on the 1.6.7 roadmap.

Now I've checked the HTML5 spec, and it says:
The "off" keyword indicates either that the control's input data is particularly sensitive (for example the activation code for a nuclear weapon); or that it is a value that will never be reused (for example a one-time-key for a bank login) and the user will therefore have to explicitly enter the data each time, instead of being able to rely on the UA to prefill the value for him; or that the document provides its own autocomplete mechanism and does not want the user agent to provide autocompletion values.

Let's hope that no nuclear weapon will be triggered by users having autocomplete enabled. :roll:

Most likely the simpleset solution is to clear the field with JS. Please test the following patch:

Code: Select all

Index: core/js/admin.js
===================================================================
--- core/js/admin.js   (revision 1610)
+++ core/js/admin.js   (working copy)
@@ -530,4 +530,17 @@
             XH.displayTextLength(description, indicator);
         }
     }
-}());
+
+    function undoNonsense() {
+        var inputs = document.getElementsByName("PL3bbeec384_security_password_OLD");
+        if (inputs) {
+            inputs[0].value = "";
+        }
+    }
+    if (typeof window.addEventListener !== "undefined") {
+        window.addEventListener("load", undoNonsense, false);
+    } else if (typeof window.attachEvent !== "undefined") {
+        window.attachEvent("onload", undoNonsense);
+    }
+
+}());
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

svasti
Posts: 1648
Joined: Wed Dec 17, 2008 5:08 pm
Location: Bielefeld, Germany
Contact:

Re: XH 1.6: Different Kinds of Inputs for Config Forms

Postby svasti » Thu Jun 11, 2015 3:44 pm

yep, works, and I put in into the todo list with your name.

cmb
Posts: 9964
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa
Contact:

Re: XH 1.6: Different Kinds of Inputs for Config Forms

Postby cmb » Tue Jun 16, 2015 12:49 am

svasti wrote:yep, works, and I put in into the todo list with your name.

Implemented (r1654, r1655).
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+


Return to “Open Development”

Who is online

Users browsing this forum: No registered users and 1 guest