Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Kulya
OpnSense
Commits
5f27b92c
Commit
5f27b92c
authored
Jun 27, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup js in system_usermanager.php for
https://github.com/opnsense/core/issues/1005
parent
14465f99
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
61 deletions
+19
-61
system_usermanager.php
src/www/system_usermanager.php
+19
-61
No files found.
src/www/system_usermanager.php
View file @
5f27b92c
...
...
@@ -375,63 +375,6 @@ include("head.inc");
<?php
include
(
"fbegin.inc"
);
?>
<script
type=
"text/javascript"
>
//
<!
[
CDATA
[
function
clear_selected
(
id
)
{
selbox
=
document
.
getElementById
(
id
);
count
=
selbox
.
options
.
length
;
for
(
index
=
0
;
index
<
count
;
index
++
)
{
selbox
.
options
[
index
].
selected
=
false
;
}
}
function
remove_selected
(
id
)
{
selbox
=
document
.
getElementById
(
id
);
index
=
selbox
.
options
.
length
-
1
;
for
(;
index
>=
0
;
index
--
)
{
if
(
selbox
.
options
[
index
].
selected
)
{
selbox
.
remove
(
index
);
}
}
}
function
copy_selected
(
srcid
,
dstid
)
{
src_selbox
=
document
.
getElementById
(
srcid
);
dst_selbox
=
document
.
getElementById
(
dstid
);
count
=
dst_selbox
.
options
.
length
;
for
(
index
=
count
-
1
;
index
>=
0
;
index
--
)
{
if
(
dst_selbox
.
options
[
index
].
value
==
''
)
{
dst_selbox
.
remove
(
index
);
}
}
count
=
src_selbox
.
options
.
length
;
for
(
index
=
0
;
index
<
count
;
index
++
)
{
if
(
src_selbox
.
options
[
index
].
selected
)
{
option
=
document
.
createElement
(
'
option
'
);
option
.
text
=
src_selbox
.
options
[
index
].
text
;
option
.
value
=
src_selbox
.
options
[
index
].
value
;
dst_selbox
.
add
(
option
,
null
);
}
}
}
function
move_selected
(
srcid
,
dstid
)
{
copy_selected
(
srcid
,
dstid
);
remove_selected
(
srcid
);
}
function
presubmit
()
{
clear_selected
(
'
notgroups
'
);
selbox
=
document
.
getElementById
(
"
groups
"
);
count
=
selbox
.
options
.
length
;
for
(
index
=
0
;
index
<
count
;
index
++
)
{
selbox
.
options
[
index
].
selected
=
true
;
}
}
//]]>
</script>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
// remove certificate association
...
...
@@ -543,6 +486,21 @@ $( document ).ready(function() {
});
$
(
'
.datepicker
'
).
datepicker
();
$
(
"
#add_groups
"
).
click
(
function
(){
$
(
"
#groups
"
).
append
(
$
(
"
#notgroups option:selected
"
));
$
(
"
#notgroups option:selected
"
).
remove
();
$
(
"
#groups option:selected
"
).
prop
(
'
selected
'
,
false
);
});
$
(
"
#remove_groups
"
).
click
(
function
(){
$
(
"
#notgroups
"
).
append
(
$
(
"
#groups option:selected
"
));
$
(
"
#groups option:selected
"
).
remove
();
$
(
"
#notgroups option:selected
"
).
prop
(
'
selected
'
,
false
);
});
$
(
"
#save
"
).
click
(
function
(){
$
(
"
#groups > option
"
).
prop
(
'
selected
'
,
true
);
$
(
"
#notgroups > option
"
).
prop
(
'
selected
'
,
false
);
});
});
</script>
...
...
@@ -562,7 +520,7 @@ $( document ).ready(function() {
<div
class=
"tab-content content-box col-xs-12 table-responsive"
>
<?php
if
(
$act
==
"new"
||
$act
==
"edit"
)
:?>
<
form
method
=
"post"
name
=
"iform"
id
=
"iform"
onsubmit
=
"presubmit()"
>
<
form
method
=
"post"
name
=
"iform"
id
=
"iform"
>
<
input
type
=
"hidden"
id
=
"act"
name
=
"act"
value
=
"<?=
$act
;?>"
/>
<
input
type
=
"hidden"
id
=
"userid"
name
=
"userid"
value
=
"<?=(isset(
$id
) ?
$id
: '');?>"
/>
<
input
type
=
"hidden"
id
=
"priv_delete"
name
=
"priv_delete"
value
=
""
/>
<!--
delete
priv
action
-->
...
...
@@ -664,11 +622,11 @@ $( document ).ready(function() {
</td>
<td
class=
"text-center"
>
<br
/>
<a
href=
"javascript:move_selected('notgroups','groups')
"
class=
"btn btn-default btn-xs"
data-toggle=
"tooltip"
title=
"
<?=
gettext
(
"Add groups"
);
?>
"
>
<a
id=
"add_groups
"
class=
"btn btn-default btn-xs"
data-toggle=
"tooltip"
title=
"
<?=
gettext
(
"Add groups"
);
?>
"
>
<span
class=
"glyphicon glyphicon-arrow-right"
></span>
</a>
<br
/><br
/>
<a
href=
"javascript:move_selected('groups','notgroups')
"
class=
"btn btn-default btn-xs"
data-toggle=
"tooltip"
title=
"
<?=
gettext
(
"Remove groups"
);
?>
"
>
<a
id=
"remove_groups
"
class=
"btn btn-default btn-xs"
data-toggle=
"tooltip"
title=
"
<?=
gettext
(
"Remove groups"
);
?>
"
>
<span
class=
"glyphicon glyphicon-arrow-left"
></span>
</a>
</td>
...
...
@@ -885,7 +843,7 @@ $( document ).ready(function() {
<tr>
<td>
</td>
<td>
<input
name=
"save"
type=
"submit"
class=
"btn btn-primary"
value=
"
<?=
gettext
(
"Save"
);
?>
"
/>
<input
name=
"save"
id=
"save"
type=
"submit"
class=
"btn btn-primary"
value=
"
<?=
gettext
(
"Save"
);
?>
"
/>
<input
type=
"button"
class=
"btn btn-default"
value=
"
<?=
gettext
(
"Cancel"
);
?>
"
onclick=
"window.location.href='
<?=
isset
(
$_SERVER
[
'HTTP_REFERER'
])
?
$_SERVER
[
'HTTP_REFERER'
]
:
'/system_usermanager.php'
;
?>
'"
/>
<?php
...
...
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