Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
osticket
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docker
osticket
Commits
02cb791b
Commit
02cb791b
authored
9 years ago
by
Jared Hancock
Browse files
Options
Downloads
Patches
Plain Diff
Fix sprious "oops select at least one item" popup
parent
5273c349
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
include/staff/users.inc.php
+25
-23
25 additions, 23 deletions
include/staff/users.inc.php
with
25 additions
and
23 deletions
include/staff/users.inc.php
+
25
−
23
View file @
02cb791b
...
@@ -75,7 +75,7 @@ $users->order_by($order . $order_column);
...
@@ -75,7 +75,7 @@ $users->order_by($order . $order_column);
<div
class=
"pull-right"
>
<div
class=
"pull-right"
>
<?php
if
(
$thisstaff
->
hasPerm
(
User
::
PERM_CREATE
))
{
?>
<?php
if
(
$thisstaff
->
hasPerm
(
User
::
PERM_CREATE
))
{
?>
<a
class=
"action-button popup-dialog"
<a
class=
"
green button
action-button popup-dialog"
href=
"#users/add"
>
href=
"#users/add"
>
<i
class=
"icon-plus-sign"
></i>
<i
class=
"icon-plus-sign"
></i>
<?php
echo
__
(
'Add User'
);
?>
<?php
echo
__
(
'Add User'
);
?>
...
@@ -93,15 +93,8 @@ $users->order_by($order . $order_column);
...
@@ -93,15 +93,8 @@ $users->order_by($order . $order_column);
</span>
</span>
<div
id=
"action-dropdown-more"
class=
"action-dropdown anchor-right"
>
<div
id=
"action-dropdown-more"
class=
"action-dropdown anchor-right"
>
<ul>
<ul>
<?php
if
(
$thisstaff
->
hasPerm
(
User
::
PERM_DELETE
))
{
?>
<?php
if
(
$thisstaff
->
hasPerm
(
User
::
PERM_EDIT
))
{
?>
<li><a
class=
"users-action"
href=
"#delete"
>
<li><a
href=
"#add-to-org"
class=
"users-action"
>
<i
class=
"icon-trash icon-fixed-width"
></i>
<?php
echo
__
(
'Delete'
);
?>
</a></li>
<?php
}
if
(
$thisstaff
->
hasPerm
(
User
::
PERM_EDIT
))
{
?>
<li><a
href=
"#orgs/lookup/form"
onclick=
"javascript:
$.dialog('ajax.php/orgs/lookup/form', 201);
return false;"
>
<i
class=
"icon-group icon-fixed-width"
></i>
<i
class=
"icon-group icon-fixed-width"
></i>
<?php
echo
__
(
'Add to Organization'
);
?>
</a></li>
<?php
echo
__
(
'Add to Organization'
);
?>
</a></li>
<?php
<?php
...
@@ -121,6 +114,11 @@ if ('disabled' != $cfg->getClientRegistrationMode()) { ?>
...
@@ -121,6 +114,11 @@ if ('disabled' != $cfg->getClientRegistrationMode()) { ?>
<i
class=
"icon-unlock icon-fixed-width"
></i>
<i
class=
"icon-unlock icon-fixed-width"
></i>
<?php
echo
__
(
'Unlock'
);
?>
</a></li>
<?php
echo
__
(
'Unlock'
);
?>
</a></li>
<?php
}
<?php
}
if
(
$thisstaff
->
hasPerm
(
User
::
PERM_DELETE
))
{
?>
<li
class=
"danger"
><a
class=
"users-action"
href=
"#delete"
>
<i
class=
"icon-trash icon-fixed-width"
></i>
<?php
echo
__
(
'Delete'
);
?>
</a></li>
<?php
}
}
# end of registration-enabled? ?>
}
# end of registration-enabled? ?>
</
ul
>
</
ul
>
</
div
>
</
div
>
...
@@ -270,9 +268,25 @@ $(function() {
...
@@ -270,9 +268,25 @@ $(function() {
$form
.
submit
();
$form
.
submit
();
};
};
var
options
=
{};
var
options
=
{};
if
(
action
===
'
delete
'
)
if
(
action
===
'
delete
'
)
{
options
[
'
deletetickets
'
]
options
[
'
deletetickets
'
]
=
__
(
'
Also delete all associated tickets and attachments
'
);
=
__
(
'
Also delete all associated tickets and attachments
'
);
}
else
if
(
action
===
'
add-to-org
'
)
{
$
.
dialog
(
'
ajax.php/orgs/lookup/form
'
,
201
,
function
(
xhr
,
json
)
{
var
$form
=
$
(
'
form#users-list
'
);
try
{
var
json
=
$
.
parseJSON
(
json
),
org_id
=
$form
.
find
(
'
#org_id
'
);
if
(
json
.
id
)
{
org_id
.
val
(
json
.
id
);
goBaby
(
'
setorg
'
,
true
);
}
}
catch
(
e
)
{
}
});
return
;
}
if
(
!
confirmed
)
if
(
!
confirmed
)
$
.
confirm
(
__
(
'
You sure?
'
),
undefined
,
options
).
then
(
submit
);
$
.
confirm
(
__
(
'
You sure?
'
),
undefined
,
options
).
then
(
submit
);
else
else
...
@@ -288,18 +302,6 @@ $(function() {
...
@@ -288,18 +302,6 @@ $(function() {
goBaby
(
$
(
this
).
attr
(
'
href
'
).
substr
(
1
));
goBaby
(
$
(
this
).
attr
(
'
href
'
).
substr
(
1
));
return
false
;
return
false
;
});
});
$
(
document
).
on
(
'
dialog:close
'
,
function
(
e
,
json
)
{
$form
=
$
(
'
form#users-list
'
);
try
{
var
json
=
$
.
parseJSON
(
json
),
org_id
=
$form
.
find
(
'
#org_id
'
);
if
(
json
.
id
)
{
org_id
.
val
(
json
.
id
);
goBaby
(
'
setorg
'
,
true
);
}
}
catch
(
e
)
{
}
});
});
});
</script>
</script>
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