Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hypha
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
ots
hypha
Commits
832217b8
Commit
832217b8
authored
2 years ago
by
Shrikrishna Singh
Committed by
Fredrik Jonsson
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Change edit handlers to panels and also path to templates
parent
4be5ba26
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hypha/apply/funds/edit_handlers.py
+4
-4
4 additions, 4 deletions
hypha/apply/funds/edit_handlers.py
with
4 additions
and
4 deletions
hypha/apply/funds/edit_handlers.py
+
4
−
4
View file @
832217b8
...
@@ -2,7 +2,7 @@ from django.forms import Field, Widget
...
@@ -2,7 +2,7 @@ from django.forms import Field, Widget
from
django.forms.utils
import
pretty_name
from
django.forms.utils
import
pretty_name
from
django.template.loader
import
render_to_string
from
django.template.loader
import
render_to_string
from
django.urls
import
reverse
from
django.urls
import
reverse
from
wagtail.admin.edit_handlers
import
EditHandler
,
FieldPanel
from
wagtail.admin.edit_handlers
import
Panel
,
FieldPanel
from
wagtail.core.models
import
Page
from
wagtail.core.models
import
Page
...
@@ -37,8 +37,8 @@ class DisplayField(Field):
...
@@ -37,8 +37,8 @@ class DisplayField(Field):
widget
=
ReadonlyWidget
widget
=
ReadonlyWidget
class
ReadOnlyPanel
(
EditHandler
):
class
ReadOnlyPanel
(
Panel
):
template
=
'
wagtailadmin/
edit_handler
s/single_field_panel.html
'
template
=
'
wagtailadmin/
panel
s/single_field_panel.html
'
field_template
=
'
wagtailadmin/shared/field.html
'
field_template
=
'
wagtailadmin/shared/field.html
'
def
__init__
(
self
,
attr
,
**
kwargs
):
def
__init__
(
self
,
attr
,
**
kwargs
):
...
@@ -85,7 +85,7 @@ class ReadOnlyPanel(EditHandler):
...
@@ -85,7 +85,7 @@ class ReadOnlyPanel(EditHandler):
class
ReadOnlyInlinePanel
(
ReadOnlyPanel
):
class
ReadOnlyInlinePanel
(
ReadOnlyPanel
):
template
=
'
wagtailadmin/
edit_handler
s/multi_field_panel.html
'
template
=
'
wagtailadmin/
panel
s/multi_field_panel.html
'
def
get_child_edit_handler
(
self
):
def
get_child_edit_handler
(
self
):
child_edit_handler
=
ReadOnlyPanel
(
self
.
attr
)
child_edit_handler
=
ReadOnlyPanel
(
self
.
attr
)
...
...
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