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
bfe4ed66
There was a problem fetching the pipeline metadata.
Commit
bfe4ed66
authored
8 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
possibility to change screening number added
parent
7a31738e
No related branches found
No related tags found
1 merge request
!29
possibility to change screening number added
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
smash/web/forms.py
+0
-7
0 additions, 7 deletions
smash/web/forms.py
smash/web/templates/subjects/edit.html
+39
-5
39 additions, 5 deletions
smash/web/templates/subjects/edit.html
with
39 additions
and
12 deletions
smash/web/forms.py
+
0
−
7
View file @
bfe4ed66
...
...
@@ -94,13 +94,6 @@ class SubjectEditForm(ModelForm):
if
was_resigned
:
self
.
fields
[
'
resigned
'
].
disabled
=
True
def
clean_screening_number
(
self
):
instance
=
getattr
(
self
,
'
instance
'
,
None
)
if
instance
and
instance
.
id
:
return
instance
.
screening_number
else
:
return
self
.
cleaned_data
[
'
screening_number
'
]
def
clean
(
self
):
validate_subject_nd_number
(
self
)
...
...
This diff is collapsed.
Click to expand it.
smash/web/templates/subjects/edit.html
+
39
−
5
View file @
bfe4ed66
...
...
@@ -51,9 +51,7 @@
</div>
{% if field.errors %}
<span
class=
"help-block"
>
{{ field.errors }}
</span>
<span
class=
"help-block"
>
{{ field.errors }}
</span>
{% endif %}
</div>
{% endfor %}
...
...
@@ -74,7 +72,7 @@
</form>
</div>
<div
class=
"modal modal-danger fade"
tabindex=
"-1"
role=
"dialog"
>
<div
class=
"modal modal-danger fade"
id=
"confirm-dead-resigned-mark-dialog"
tabindex=
"-1"
role=
"dialog"
>
<div
class=
"modal-dialog"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
...
...
@@ -93,6 +91,25 @@
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
<div
class=
"modal modal-danger fade"
id=
"enable-screening-number-dialog"
tabindex=
"-1"
role=
"dialog"
>
<div
class=
"modal-dialog"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
><span
aria-hidden=
"true"
>
×
</span></button>
<h4
class=
"modal-title"
>
Are you sure that you want to perfom this operation?
</h4>
</div>
<div
class=
"modal-body"
>
<p>
Screening number shouldn't change.
</p>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-outline pull-left"
data-dismiss=
"modal"
>
Cancel
</button>
<button
type=
"button"
id=
"confirm-screening-change"
class=
"btn btn-outline"
>
Yes
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
{% endblock %}
...
...
@@ -122,7 +139,7 @@
}
if
((
!
dead_was_checked
&&
$
(
"
#id_dead
"
).
is
(
"
:checked
"
))
||
(
!
resigned_was_checked
&&
$
(
"
#id_resigned
"
).
is
(
"
:checked
"
)))
{
confirmed
=
false
;
$
(
"
.modal
"
).
modal
(
"
show
"
);
$
(
"
#confirm-dead-resigned-mark-dialog
"
).
modal
(
"
show
"
);
return
false
;
}
});
...
...
@@ -130,7 +147,24 @@
confirmed
=
true
;
$
(
"
form
"
).
submit
();
});
$
(
"
#confirm-screening-change
"
).
click
(
function
()
{
$
(
'
#enable-screening-number-dialog
'
).
modal
(
'
hide
'
);
$
(
"
input[name='screening_number']
"
).
attr
(
"
readonly
"
,
false
);
$
(
"
input[name='screening_number']
"
)[
0
].
focus
();
});
$
(
"
input[name='screening_number']
"
).
attr
(
"
readonly
"
,
true
);
$
(
"
input[name='screening_number']
"
).
after
(
"
<div><a class='btn btn-block btn-danger' onclick='show_screening_number_enable_dialog()'>modify<a/></div>
"
);
});
function
show_screening_number_enable_dialog
()
{
$
(
'
#enable-screening-number-dialog
'
).
modal
(
'
show
'
);
}
</script>
{% include "includes/datepicker.js.html" %}
...
...
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