Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
e18ae7f8
Commit
e18ae7f8
authored
Oct 27, 2016
by
假想控
Committed by
GitHub
Oct 27, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update user_add.html
禁止创建root用户
parent
e5286686
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
user_add.html
templates/juser/user_add.html
+3
-3
No files found.
templates/juser/user_add.html
View file @
e18ae7f8
...
@@ -126,6 +126,7 @@ $('#userForm').validator({
...
@@ -126,6 +126,7 @@ $('#userForm').validator({
timely
:
2
,
timely
:
2
,
theme
:
"yellow_right_effect"
,
theme
:
"yellow_right_effect"
,
rules
:
{
rules
:
{
check_name
:
[
/
(?!
^root$
)
^
[\w
.
]{2,20}
$/i
,
'大小写字母数字和下划线小数点,2-20位,并且非root'
],
check_username
:
[
/^
[\w
.
]{3,20}
$/
,
'大小写字母数字和下划线小数点'
],
check_username
:
[
/^
[\w
.
]{3,20}
$/
,
'大小写字母数字和下划线小数点'
],
type_m
:
function
(
element
){
type_m
:
function
(
element
){
return
$
(
"#M"
).
is
(
":checked"
);
return
$
(
"#M"
).
is
(
":checked"
);
...
@@ -133,7 +134,7 @@ $('#userForm').validator({
...
@@ -133,7 +134,7 @@ $('#userForm').validator({
},
},
fields
:
{
fields
:
{
"username"
:
{
"username"
:
{
rule
:
"required;check_username"
,
rule
:
"required;check_username
;check_name
"
,
tip
:
"输入用户名"
,
tip
:
"输入用户名"
,
ok
:
""
,
ok
:
""
,
msg
:
{
required
:
"必须填写!"
}
msg
:
{
required
:
"必须填写!"
}
...
@@ -174,4 +175,4 @@ $('#userForm').validator({
...
@@ -174,4 +175,4 @@ $('#userForm').validator({
{
#
})
#
}
{
#
})
#
}
</script>
</script>
{% endblock %}
{% endblock %}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment