Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
864c89c5
Commit
864c89c5
authored
Aug 01, 2017
by
Leigh B Stoller
Browse files
Add silent option to project denial.
parent
3f18341f
Changes
4
Hide whitespace changes
Inline
Side-by-side
www/aptui/approve-projects.ajax
View file @
864c89c5
...
...
@@ -273,7 +273,10 @@ function Do_Deny()
}
$message
=
$ajax_args
[
"message"
];
$deleteuser
=
(
$ajax_args
[
"deleteuser"
]
==
1
?
1
:
0
);
$silent
=
0
;
if
(
isset
(
$ajax_args
[
"silent"
])
&&
$ajax_args
[
"silent"
]
==
1
)
{
$silent
=
1
;
}
if
(
!
(
$leader
=
$project
->
GetLeader
()))
{
TBERROR
(
"Error getting leader for
$pid
"
,
0
);
SPITAJAX_ERROR
(
-
1
,
"Internal error getting project leader"
);
...
...
@@ -333,17 +336,18 @@ function Do_Deny()
"see the email sent to your testbed-ops list"
);
return
;
}
# This works cause we still have the project object in memory.
SendProjAdminMail
(
$project
,
"ADMIN"
,
"
$headname
'
$headuid
' <
$headuid_email
>"
,
"Project application '
$pid
' has been denied!"
,
"This message is to notify you that your project application
\n
"
.
"for
$pid
has been denied.
\n
"
.
(
$message
==
""
?
""
:
"----------------------------------------------------------------
\n
"
.
"
\n
"
.
$message
.
"
\n
"
));
if
(
!
$silent
)
{
# This works cause we still have the project object in memory.
SendProjAdminMail
(
$project
,
"ADMIN"
,
"
$headname
'
$headuid
' <
$headuid_email
>"
,
"Project application '
$pid
' has been denied!"
,
"This message is to notify you that your project application
\n
"
.
"for
$pid
has been denied.
\n
"
.
(
$message
==
""
?
""
:
"----------------------------------------------------------------
\n
"
.
"
\n
"
.
$message
.
"
\n
"
));
}
SPITAJAX_RESPONSE
(
0
);
}
...
...
www/aptui/js/approve-projects.js
View file @
864c89c5
...
...
@@ -246,7 +246,8 @@ $(function ()
sup
.
HideModal
(
"
#deny-modal
"
);
var
message
=
$
(
'
#deny-body
'
).
val
();
var
deleteuser
=
(
$
(
'
#deny-delete-user
'
).
is
(
"
:checked
"
)
?
1
:
0
);
console
.
info
(
"
Deny
"
,
pid
,
message
,
deleteuser
);
var
silent
=
(
$
(
'
#deny-silent
'
).
is
(
"
:checked
"
)
?
1
:
0
);
console
.
info
(
"
Deny
"
,
pid
,
message
,
deleteuser
,
silent
);
var
callback
=
function
(
json
)
{
sup
.
HideWaitWait
();
...
...
@@ -265,7 +266,8 @@ $(function ()
"
Deny
"
,
{
"
pid
"
:
pid
,
"
message
"
:
message
,
"
deleteuser
"
:
deleteuser
});
"
deleteuser
"
:
deleteuser
,
"
silent
"
:
silent
});
xmlthing
.
done
(
callback
);
}
...
...
www/aptui/template/approve-projects.html
View file @
864c89c5
<style>
.tablesorter
.filtered
{
display
:
none
;
}
</style>
<div
class=
'row'
>
<div
class=
'col-lg-12 col-lg-offset-0
col-md-12 col-md-offset-0
...
...
www/aptui/template/project-approval-list.html
View file @
864c89c5
...
...
@@ -117,8 +117,10 @@
placeholder=
"Please enter a message"
type=
"text"
></textarea>
</div>
<center>
Delete user account?
<br>
<input
type=
checkbox
id=
deny-delete-user
value=
yes
checked
>
Delete user account?
<br>
<input
type=
checkbox
id=
deny-silent
value=
yes
>
Silent (no email)?
<br>
</center>
<br>
<center>
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment