Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
73724790
authored
Mar 05, 2014
by
Oláh István Gergely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix change_status message
parent
940c9070
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
circle/dashboard/templates/dashboard/confirm/ajax-node-status.html
+1
-1
circle/dashboard/templates/dashboard/confirm/node-status.html
+1
-1
circle/dashboard/views.py
+3
-2
No files found.
circle/dashboard/templates/dashboard/confirm/ajax-node-status.html
View file @
73724790
...
...
@@ -15,7 +15,7 @@
<form
action=
""
method=
"POST"
>
{% csrf_token %}
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
Cancel
</button>
<input
type=
"hidden"
name=
"change_status"
value=
"
_
"
/>
<input
type=
"hidden"
name=
"change_status"
value=
""
/>
<button
class=
"btn btn-warning"
>
Yes, {{ status }}
</button>
</form>
</div>
...
...
circle/dashboard/templates/dashboard/confirm/node-status.html
View file @
73724790
...
...
@@ -25,7 +25,7 @@
<form
action=
""
method=
"POST"
>
{% csrf_token %}
<a
class=
"btn btn-default"
>
Back
</a>
<input
type=
"hidden"
name=
"change_status"
value=
"
_
"
/>
<input
type=
"hidden"
name=
"change_status"
value=
""
/>
<button
class=
"btn btn-warning"
>
Yes, {{ status }}
</button>
</form>
</div>
...
...
circle/dashboard/views.py
View file @
73724790
...
...
@@ -454,9 +454,10 @@ class NodeDetailView(LoginRequiredMixin, SuperuserRequiredMixin, DetailView):
return
context
def
post
(
self
,
request
,
*
args
,
**
kwargs
):
print
request
.
POST
if
request
.
POST
.
get
(
'new_name'
):
return
self
.
__set_name
(
request
)
if
request
.
POST
.
get
(
'change_status'
):
if
request
.
POST
.
get
(
'change_status'
)
is
not
None
:
return
self
.
__set_status
(
request
)
return
redirect
(
reverse_lazy
(
"dashboard.views.node-detail"
,
kwargs
=
{
'pk'
:
self
.
get_object
()
.
pk
}))
...
...
@@ -1261,7 +1262,7 @@ class NodeStatus(LoginRequiredMixin, SuperuserRequiredMixin, DetailView):
return
context
def
post
(
self
,
request
,
*
args
,
**
kwargs
):
if
request
.
POST
.
get
(
'change_status'
):
if
request
.
POST
.
get
(
'change_status'
)
is
not
None
:
return
self
.
__set_status
(
request
)
return
redirect
(
reverse_lazy
(
"dashboard.views.node-detail"
,
kwargs
=
{
'pk'
:
self
.
get_object
()
.
pk
}))
...
...
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