Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
hshassets
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
django
hshassets
Commits
3727c391
Commit
3727c391
authored
7 years ago
by
Tim Fechner
Browse files
Options
Downloads
Patches
Plain Diff
Add two new form layout elements
+ <div class="box"> + <article class="message">
parent
ff7bf2f6
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
hshassets/forms/elements.py
+19
-0
19 additions, 0 deletions
hshassets/forms/elements.py
setup.py
+1
-1
1 addition, 1 deletion
setup.py
with
20 additions
and
1 deletion
hshassets/forms/elements.py
+
19
−
0
View file @
3727c391
...
@@ -57,6 +57,25 @@ class Card(AbstractElement):
...
@@ -57,6 +57,25 @@ class Card(AbstractElement):
return
format_html
(
self
.
markup
,
self
.
title
,
content
)
return
format_html
(
self
.
markup
,
self
.
title
,
content
)
class
Box
(
AbstractElement
):
markup
=
'
<div class=
"
box
"
>{}</div>
'
def
render
(
self
,
content
):
return
format_html
(
self
.
markup
,
content
)
class
Message
(
AbstractElement
):
markup
=
'
<article class=
"
message {}
"
><div class=
"
message-header
"
><p>{}</p></div><div class=
"
message-body
"
>{}</div></article>
'
def
__init__
(
self
,
*
args
,
title
=
''
,
css_class
=
''
,
**
kwargs
):
super
().
__init__
(
*
args
,
**
kwargs
)
self
.
title
=
title
self
.
css_class
=
css_class
def
render
(
self
,
content
):
return
format_html
(
self
.
markup
,
self
.
css_class
,
self
.
title
,
content
)
class
Submit
(
AbstractElement
):
class
Submit
(
AbstractElement
):
markup
=
'
<div class=
"
field
"
><div class=
"
control
"
><button type=
"
submit
"
class=
"
button {}
"
>{}</button></div></div>
'
markup
=
'
<div class=
"
field
"
><div class=
"
control
"
><button type=
"
submit
"
class=
"
button {}
"
>{}</button></div></div>
'
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
3727c391
...
@@ -7,7 +7,7 @@ os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
...
@@ -7,7 +7,7 @@ os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup
(
setup
(
name
=
'
django-hshassets
'
,
name
=
'
django-hshassets
'
,
version
=
'
1.
4.4
'
,
version
=
'
1.
5.0
'
,
packages
=
find_packages
(),
packages
=
find_packages
(),
include_package_data
=
True
,
include_package_data
=
True
,
license
=
'
MIT License
'
,
license
=
'
MIT License
'
,
...
...
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