Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d92716d6
authored
May 22, 2018
by
Szabolcs Gelencser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure default lease's role selector doesn't show up
parent
48c95e94
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
circle/dashboard/templates/dashboard/lease-edit.html
+5
-3
circle/dashboard/views/template.py
+6
-0
No files found.
circle/dashboard/templates/dashboard/lease-edit.html
View file @
d92716d6
...
...
@@ -16,8 +16,8 @@
{% endwith %}
<form
method=
"post"
>
{% csrf_token %}
<div
class=
"row"
>
<div
class=
"col-md-7"
>
<div
class=
"row
container-fluid
"
>
<div
{%
if
not
is_default
%}
class=
"col-md-7"
{%
endif
%}
>
{{ form.name|as_crispy_field }}
<label>
Suspend in
</label>
<div
class=
"input-group interval-input"
>
...
...
@@ -42,10 +42,12 @@
<div
class=
"input-group-addon"
>
months
</div>
</div>
</div>
{% if not is_default %}
<div
class=
"col-md-5"
>
{{ form.roles }}
</div>
<div
class=
"form-group container-fluid"
>
{% endif %}
<div
class=
"form-group"
>
<div
class=
"controls "
>
<input
type=
"submit"
name=
"submit"
value=
"Save changes"
class=
"btn btn-primary"
id=
"submit-id-submit"
>
</div>
...
...
circle/dashboard/views/template.py
View file @
d92716d6
...
...
@@ -60,6 +60,7 @@ from .util import (
DeleteViewBase
,
TransferOwnershipConfirmView
,
TransferOwnershipView
)
logger
=
logging
.
getLogger
(
__name__
)
from
django.conf
import
settings
class
TemplateChoose
(
LoginRequiredMixin
,
TemplateView
):
...
...
@@ -433,6 +434,11 @@ class LeaseDetail(LoginRequiredMixin, PolicyMixin,
kwargs
[
'roles'
]
=
keystone
.
role_list
(
self
.
request
)
return
kwargs
def
get_context_data
(
self
,
*
args
,
**
kwargs
):
context
=
super
(
LeaseDetail
,
self
)
.
get_context_data
(
*
args
,
**
kwargs
)
context
[
'is_default'
]
=
settings
.
DEFAULT_LEASE_NAME
==
self
.
object
.
name
return
context
class
LeaseDelete
(
DeleteViewBase
):
model
=
Lease
...
...
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