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
7949ed91
There was a problem fetching the pipeline metadata.
Commit
7949ed91
authored
6 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
multiple === operators changed into "in" operator
parent
715564e8
No related branches found
No related tags found
1 merge request
!135
voucher model modified
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
smash/web/forms/voucher_forms.py
+2
-2
2 additions, 2 deletions
smash/web/forms/voucher_forms.py
smash/web/templates/vouchers/add_edit.html
+1
-1
1 addition, 1 deletion
smash/web/templates/vouchers/add_edit.html
with
3 additions
and
3 deletions
smash/web/forms/voucher_forms.py
+
2
−
2
View file @
7949ed91
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
smash/web/templates/vouchers/add_edit.html
+
1
−
1
View file @
7949ed91
...
...
@@ -61,7 +61,7 @@
</form>
{% if voucher.id %}
<h3
class=
"box-title"
>
List of voucher partner sessions
{% if voucher.status
==
'NEW
' or voucher.status == '
IN_USE' %}
{% if voucher.status
in
'NEW
,
IN_USE' %}
<a
title=
"add a new voucher partner session"
id=
"add-voucher-partner-session"
...
...
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