Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dokuwiki
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BRIC
dokuwiki
Commits
9b82d43f
Commit
9b82d43f
authored
9 years ago
by
Andreas Gohr
Browse files
Options
Downloads
Patches
Plain Diff
add required attributes in user manager #1388
parent
1de26ac1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/plugins/usermanager/admin.php
+11
-8
11 additions, 8 deletions
lib/plugins/usermanager/admin.php
with
11 additions
and
8 deletions
lib/plugins/usermanager/admin.php
+
11
−
8
View file @
9b82d43f
...
...
@@ -329,12 +329,12 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
ptln
(
" </thead>"
,
$indent
);
ptln
(
" <tbody>"
,
$indent
);
$this
->
_htmlInputField
(
$cmd
.
"_userid"
,
"userid"
,
$this
->
lang
[
"user_id"
],
$user
,
$this
->
_auth
->
canDo
(
"modLogin"
),
$indent
+
6
);
$this
->
_htmlInputField
(
$cmd
.
"_userpass"
,
"userpass"
,
$this
->
lang
[
"user_pass"
],
""
,
$this
->
_auth
->
canDo
(
"modPass"
),
$indent
+
6
);
$this
->
_htmlInputField
(
$cmd
.
"_userpass2"
,
"userpass2"
,
$lang
[
"passchk"
],
""
,
$this
->
_auth
->
canDo
(
"modPass"
),
$indent
+
6
);
$this
->
_htmlInputField
(
$cmd
.
"_username"
,
"username"
,
$this
->
lang
[
"user_name"
],
$name
,
$this
->
_auth
->
canDo
(
"modName"
),
$indent
+
6
);
$this
->
_htmlInputField
(
$cmd
.
"_usermail"
,
"usermail"
,
$this
->
lang
[
"user_mail"
],
$mail
,
$this
->
_auth
->
canDo
(
"modMail"
),
$indent
+
6
);
$this
->
_htmlInputField
(
$cmd
.
"_usergroups"
,
"usergroups"
,
$this
->
lang
[
"user_groups"
],
$groups
,
$this
->
_auth
->
canDo
(
"modGroups"
),
$indent
+
6
);
$this
->
_htmlInputField
(
$cmd
.
"_userid"
,
"userid"
,
$this
->
lang
[
"user_id"
],
$user
,
$this
->
_auth
->
canDo
(
"modLogin"
),
true
,
$indent
+
6
);
$this
->
_htmlInputField
(
$cmd
.
"_userpass"
,
"userpass"
,
$this
->
lang
[
"user_pass"
],
""
,
$this
->
_auth
->
canDo
(
"modPass"
),
false
,
$indent
+
6
);
$this
->
_htmlInputField
(
$cmd
.
"_userpass2"
,
"userpass2"
,
$lang
[
"passchk"
],
""
,
$this
->
_auth
->
canDo
(
"modPass"
),
false
,
$indent
+
6
);
$this
->
_htmlInputField
(
$cmd
.
"_username"
,
"username"
,
$this
->
lang
[
"user_name"
],
$name
,
$this
->
_auth
->
canDo
(
"modName"
),
true
,
$indent
+
6
);
$this
->
_htmlInputField
(
$cmd
.
"_usermail"
,
"usermail"
,
$this
->
lang
[
"user_mail"
],
$mail
,
$this
->
_auth
->
canDo
(
"modMail"
),
true
,
$indent
+
6
);
$this
->
_htmlInputField
(
$cmd
.
"_usergroups"
,
"usergroups"
,
$this
->
lang
[
"user_groups"
],
$groups
,
$this
->
_auth
->
canDo
(
"modGroups"
),
false
,
$indent
+
6
);
if
(
$this
->
_auth
->
canDo
(
"modPass"
))
{
if
(
$cmd
==
'add'
)
{
...
...
@@ -385,9 +385,10 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
* @param string $label
* @param string $value
* @param bool $cando whether auth backend is capable to do this action
* @param bool $required is this field required?
* @param int $indent
*/
protected
function
_htmlInputField
(
$id
,
$name
,
$label
,
$value
,
$cando
,
$indent
=
0
)
{
protected
function
_htmlInputField
(
$id
,
$name
,
$label
,
$value
,
$cando
,
$required
,
$indent
=
0
)
{
$class
=
$cando
?
''
:
' class="disabled"'
;
echo
str_pad
(
''
,
$indent
);
...
...
@@ -407,7 +408,9 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
echo
"<td><label for=
\"
$id
\"
>
$label
: </label></td>"
;
echo
"<td>"
;
if
(
$cando
){
echo
"<input type=
\"
$fieldtype
\"
id=
\"
$id
\"
name=
\"
$name
\"
value=
\"
$value
\"
class=
\"
edit
\"
$autocomp
/>"
;
$req
=
''
;
if
(
$required
)
$req
=
'required="required"'
;
echo
"<input type=
\"
$fieldtype
\"
id=
\"
$id
\"
name=
\"
$name
\"
value=
\"
$value
\"
class=
\"
edit
\"
$autocomp
$req
/>"
;
}
else
{
echo
"<input type=
\"
hidden
\"
name=
\"
$name
\"
value=
\"
$value
\"
/>"
;
echo
"<input type=
\"
$fieldtype
\"
id=
\"
$id
\"
name=
\"
$name
\"
value=
\"
$value
\"
class=
\"
edit disabled
\"
disabled=
\"
disabled
\"
/>"
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment