Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2021-10-28 02:20:25 +0300
committernachoparker <nacho@ownyourbits.com>2021-11-03 02:11:47 +0300
commitee01a706b11ec5faccb0cc11131dac7d00ed6826 (patch)
tree851037845d95ac97f6cfd599c89eb0279ecf3441
parenta8285767d72d6c8067196a84effc084afba3f160 (diff)
ncp-web: tweak password suggestionsv1.43.2
Signed-off-by: nachoparker <nacho@ownyourbits.com>
-rw-r--r--etc/ncp-config.d/nc-admin.cfg2
-rw-r--r--etc/ncp-config.d/nc-encrypt.cfg3
-rw-r--r--etc/ncp-config.d/nc-passwd.cfg5
-rw-r--r--etc/ncp-config.d/samba.cfg3
-rw-r--r--ncp-web/elements.php6
5 files changed, 13 insertions, 6 deletions
diff --git a/etc/ncp-config.d/nc-admin.cfg b/etc/ncp-config.d/nc-admin.cfg
index fe66a3a9..f4668d62 100644
--- a/etc/ncp-config.d/nc-admin.cfg
+++ b/etc/ncp-config.d/nc-admin.cfg
@@ -16,12 +16,14 @@
"id": "PASSWORD",
"name": "Password",
"value": "",
+ "suggest": "password",
"type": "password"
},
{
"id": "CONFIRM",
"name": "Confirm password",
"value": "",
+ "suggest": "same password",
"type": "password"
}
]
diff --git a/etc/ncp-config.d/nc-encrypt.cfg b/etc/ncp-config.d/nc-encrypt.cfg
index a86e7655..43738667 100644
--- a/etc/ncp-config.d/nc-encrypt.cfg
+++ b/etc/ncp-config.d/nc-encrypt.cfg
@@ -15,7 +15,8 @@
{
"id": "PASSWORD",
"name": "Password",
- "value": "ownyourbits",
+ "value": "",
+ "suggest": "password",
"type": "password"
}
]
diff --git a/etc/ncp-config.d/nc-passwd.cfg b/etc/ncp-config.d/nc-passwd.cfg
index 7c30b1cd..36d4b42a 100644
--- a/etc/ncp-config.d/nc-passwd.cfg
+++ b/etc/ncp-config.d/nc-passwd.cfg
@@ -9,13 +9,14 @@
{
"id": "PASSWORD",
"name": "Password",
- "value": "ownyourbits",
+ "value": "",
"type": "password"
},
{
"id": "CONFIRM",
"name": "Confirm password",
- "value": "ownyourbits",
+ "value": "",
+ "suggest": "password",
"type": "password"
}
]
diff --git a/etc/ncp-config.d/samba.cfg b/etc/ncp-config.d/samba.cfg
index 5ec6c05c..2c6b3e39 100644
--- a/etc/ncp-config.d/samba.cfg
+++ b/etc/ncp-config.d/samba.cfg
@@ -15,7 +15,8 @@
{
"id": "PWD",
"name": "Password",
- "value": "ownyourbits",
+ "value": "",
+ "suggest": "password",
"type": "password"
},
{
diff --git a/ncp-web/elements.php b/ncp-web/elements.php
index 8d67fc17..82f62caf 100644
--- a/ncp-web/elements.php
+++ b/ncp-web/elements.php
@@ -24,8 +24,6 @@ HTML;
$ret .= "<td><label for=\"$ncp_app-$param[id]\">$param[name]</label></td>";
$value = $param['value'];
- if ( $value == '_')
- $value = '';
// default to text input
if (!array_key_exists('type', $param) || $param['type'] == 'directory' || $param['type'] == 'file')
@@ -91,11 +89,15 @@ HTML;
// password
else if ($param['type'] == 'password')
{
+ $suggest = '';
+ if (array_key_exists('suggest', $param))
+ $suggest = $param['suggest'];
$ret .= "<td>";
$ret .= "<input type=\"password\"
name=\"$param[name]\"
id=\"$ncp_app-$param[id]\"
value=\"$value\"
+ placeholder=\"$suggest\"
size=\"40\">";
$ret .= "&nbsp;<img class=\"pwd-btn\" title=\"show password\" src=\"../img/toggle.svg\">";
$ret .= "</td>";