Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Developer Documentation
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
Service Desk
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
brienne
Developer Documentation
Commits
d4964538
Commit
d4964538
authored
7 years ago
by
Sean Madsen
Browse files
Options
Downloads
Patches
Plain Diff
Auto-import "Section elements" wiki page
https://wiki.civicrm.org/confluence/display/CRMDOC/Section+elements
parent
aa6565d8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/framework/ui.md
+102
-0
102 additions, 0 deletions
docs/framework/ui.md
with
102 additions
and
0 deletions
docs/framework/ui.md
+
102
−
0
View file @
d4964538
...
@@ -1098,3 +1098,105 @@ CiviCRM 4.2 and below):
...
@@ -1098,3 +1098,105 @@ CiviCRM 4.2 and below):
</div>
</div>
</div>
</div>
# Section elements
This element is to be used in the case that you have a number of
elements that can be broken down into small groups of information. A
good example of it's use is in the contribution page template.
Here each logical grouping of related form elements are wrapped by a
"section" div:
<div
class=
"code panel"
style=
"border-width: 1px;"
>
<div
class=
"codeContent panelContent"
>
<div class="section amount_other-section">
<div class="label">
<label for="amount_other">Other Amount</label>
</div>
<div class="content">
$ <input type="text" class="form-text" id="amount_other" name="amount_other" onfocus="useAmountOther();" maxlength="10" size="10"/>
</div>
<div class="clear"/>
</div>
</div>
</div>
the abstraction of this for elements
**with**
a label is as follows:
<div
class=
"code panel"
style=
"border-width: 1px;"
>
<div
class=
"codeContent panelContent"
>
<div class="section unique_section_name-section">
<div class="label">
<label>Section Label</label>
</div>
<div class="content">
Section Content
</div>
<div class="clear"/>
</div>
</div>
</div>
which is generated using the following .tpl syntax:
<div
class=
"code panel"
style=
"border-width: 1px;"
>
<div
class=
"codeContent panelContent"
>
<div class="section {$form.element_name.name}-section">
<div class="label">{$form.element_name.label}</div>
<div class="content">{$form.element_name.html}</div>
<div class="clear"></div>
</div>
</div>
</div>
the abstraction of this for elements
**without**
a label is as follows
(this will keep the content in line with content from other section's
that
**are**
using labels):
<div
class=
"code panel"
style=
"border-width: 1px;"
>
<div
class=
"codeContent panelContent"
>
<div class="section unique_section_name-section">
<div class="content">
Section Content
</div>
<div class="clear"/>
</div>
</div>
</div>
the abstraction of this for elements
**without**
a label is as follows
(this allow the content to take up the space normally reserved for
labels):
<div
class=
"code panel"
style=
"border-width: 1px;"
>
<div
class=
"codeContent panelContent"
>
<div class="section unique_section_name-section nolabel-section">
<div class="content">
Section Content
</div>
<div class="clear"/>
</div>
</div>
</div>
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