Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scheduling-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SMASCH
scheduling-system
Commits
4f56c348
Commit
4f56c348
authored
6 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
activity_type is disabled when editing voucher
parent
50714faa
No related branches found
No related tags found
1 merge request
!151
Resolve "voucher should have optional activy type (free text)"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
smash/web/forms/voucher_forms.py
+1
-0
1 addition, 0 deletions
smash/web/forms/voucher_forms.py
with
1 addition
and
0 deletions
smash/web/forms/voucher_forms.py
+
1
−
0
View file @
4f56c348
...
@@ -57,6 +57,7 @@ class VoucherForm(ModelForm):
...
@@ -57,6 +57,7 @@ class VoucherForm(ModelForm):
if
instance
and
instance
.
pk
:
if
instance
and
instance
.
pk
:
self
.
fields
[
'
voucher_type
'
].
widget
.
attrs
[
'
readonly
'
]
=
True
self
.
fields
[
'
voucher_type
'
].
widget
.
attrs
[
'
readonly
'
]
=
True
self
.
fields
[
'
hours
'
].
widget
.
attrs
[
'
readonly
'
]
=
True
self
.
fields
[
'
hours
'
].
widget
.
attrs
[
'
readonly
'
]
=
True
self
.
fields
[
'
activity_type
'
].
widget
.
attrs
[
'
readonly
'
]
=
True
self
.
fields
[
'
usage_partner
'
].
widget
.
attrs
[
'
readonly
'
]
=
True
self
.
fields
[
'
usage_partner
'
].
widget
.
attrs
[
'
readonly
'
]
=
True
if
instance
.
status
in
[
VOUCHER_STATUS_USED
,
VOUCHER_STATUS_EXPIRED
]:
if
instance
.
status
in
[
VOUCHER_STATUS_USED
,
VOUCHER_STATUS_EXPIRED
]:
...
...
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