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
Merge requests
!141
Changes asked in
!135
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Changes asked in
!135
hide-disabled-for-voucher-partners
into
master
Overview
0
Commits
3
Pipelines
1
Changes
4
Merged
Piotr Gawron
requested to merge
hide-disabled-for-voucher-partners
into
master
6 years ago
Overview
0
Commits
3
Pipelines
1
Changes
4
Expand
list of voucher partners doesn't include disable column
tooltip on a button changed
0
0
Merge request reports
Compare
master
version 1
2813990c
6 years ago
master (base)
and
latest version
latest version
2813990c
3 commits,
6 years ago
version 1
2813990c
7 commits,
6 years ago
4 files
+
31
−
22
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
smash/web/forms/voucher_forms.py
+
2
−
2
Options
@@ -8,7 +8,7 @@ from django.utils import timezone
from
web.algorithm
import
VerhoeffAlgorithm
from
web.forms.forms
import
DATEPICKER_DATE_ATTRS
from
web.models
import
VoucherType
,
VoucherTypePrice
,
Voucher
,
Worker
from
web.models.constants
import
VOUCHER_STATUS_NEW
,
VOUCHER_STATUS_USED
,
VOUCHER_STATUS_EXPIRED
from
web.models.constants
import
VOUCHER_STATUS_USED
,
VOUCHER_STATUS_EXPIRED
from
web.models.worker_study_role
import
WORKER_VOUCHER_PARTNER
logger
=
logging
.
getLogger
(
__name__
)
@@ -58,7 +58,7 @@ class VoucherForm(ModelForm):
self
.
fields
[
'
hours
'
].
widget
.
attrs
[
'
readonly
'
]
=
True
self
.
fields
[
'
usage_partner
'
].
widget
.
attrs
[
'
readonly
'
]
=
True
if
instance
.
status
==
VOUCHER_STATUS_USED
or
instance
.
status
==
VOUCHER_STATUS_EXPIRED
:
if
instance
.
status
in
[
VOUCHER_STATUS_USED
,
VOUCHER_STATUS_EXPIRED
]
:
self
.
fields
[
'
status
'
].
widget
.
attrs
[
'
readonly
'
]
=
True
self
.
fields
[
'
feedback
'
].
widget
.
attrs
[
'
readonly
'
]
=
True
Loading