Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
justinfreeman (Agileware)
Core
Commits
a5685d55
Commit
a5685d55
authored
11 years ago
by
colemanw
Browse files
Options
Downloads
Plain Diff
Merge pull request #2479 from colemanw/css
Form style improvements
parents
6a0a63fa
c5b53a6f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CRM/Core/Form/Renderer.php
+4
-4
4 additions, 4 deletions
CRM/Core/Form/Renderer.php
css/civicrm.css
+30
-12
30 additions, 12 deletions
css/civicrm.css
with
34 additions
and
16 deletions
CRM/Core/Form/Renderer.php
+
4
−
4
View file @
a5685d55
...
...
@@ -160,19 +160,19 @@ class CRM_Core_Form_Renderer extends HTML_QuickForm_Renderer_ArraySmarty {
$class
=
$element
->
getAttribute
(
'class'
);
$type
=
$element
->
getType
();
if
(
empty
(
$class
))
{
$class
=
'form-'
.
$type
;
if
(
!
$class
)
{
if
(
$type
==
'text'
)
{
$size
=
$element
->
getAttribute
(
'size'
);
if
(
!
empty
(
$size
))
{
if
(
array_key_exists
(
$size
,
self
::
$_sizeMapper
))
{
$class
=
$class
.
' '
.
self
::
$_sizeMapper
[
$size
];
$class
.
=
' '
.
self
::
$_sizeMapper
[
$size
];
}
}
}
}
$class
.
=
(
$class
?
' '
:
''
)
.
'crm-form-'
.
$type
;
if
(
$required
)
{
$class
.
=
' required'
;
}
...
...
This diff is collapsed.
Click to expand it.
css/civicrm.css
+
30
−
12
View file @
a5685d55
...
...
@@ -293,9 +293,8 @@ div.crm-container fieldset label{
width
:
6em
;
}
.crm-container
input
[
type
=
"text"
]
.form-text
,
.crm-container
input
[
type
=
"text"
]
.dateplugin
,
.crm-container
input
[
type
=
"password"
]
{
.crm-container
input
.crm-form-text
,
.crm-container
input
.dateplugin
{
border
:
1px
solid
#999
;
vertical-align
:
middle
;
padding
:
1px
2px
;
...
...
@@ -3762,24 +3761,43 @@ div.m ul#civicrm-menu,
}
.crm-container
.select2-container
{
min-width
:
15em
!important
;
font-size
:
11px
;
}
/* Multi-selects: Move background image into outer container so we can place an icon in the inner container */
.crm-container
.select2-container-multi
,
/* Also style other form inputs to match */
.crm-container
input
.form-text
{
/* Style civi form inputs to match select2 */
.crm-container
input
.crm-form-text
{
background-image
:
-webkit-gradient
(
linear
,
0%
0%
,
0%
100%
,
color-stop
(
1%
,
#eee
),
color-stop
(
15%
,
#fff
));
background-image
:
-webkit-linear-gradient
(
top
,
#eee
1%
,
#fff
15%
);
background-image
:
-moz-linear-gradient
(
top
,
#eee
1%
,
#fff
15%
);
background-image
:
linear-gradient
(
top
,
#eee
1%
,
#fff
15%
);
}
/* Add arrow icon to multi-selects */
.crm-container
.select2-container-multi
.select2-choices
{
background
:
url("../i/TreeMinus.gif")
no-repeat
scroll
right
5px
;
.crm-container
.select2-container-multi
.select2-choices
:before
{
background
:
url("../packages/jquery/plugins/select2/select2.png")
no-repeat
scroll
0
-4px
;
content
:
""
;
display
:
block
;
height
:
15px
;
position
:
absolute
;
right
:
0
;
top
:
5px
;
width
:
20px
;
}
/* Add search icon to ajax multi-selects and opened multi-selects */
.crm-container
.select2-container-multi.select2-container-active
.select2-choices
,
.crm-container
.select2-container-multi.crm-ajax-select
.select2-choices
{
background
:
url("../packages/jquery/plugins/select2/select2.png")
no-repeat
scroll
right
-22px
;
.crm-container
.select2-container-multi.select2-container-active
.select2-choices
:before
,
.crm-container
.select2-container-multi.crm-ajax-select
.select2-choices
:before
{
background-position
:
right
-26px
;
}
/* Reduce select2 size to match other inputs */
.crm-container
.select2-container-multi
.select2-choices
{
min-height
:
25px
;
}
.crm-container
.select2-container-multi
.select2-choices
.select2-search-choice
{
padding
:
2px
5px
2px
18px
;
}
.crm-container
.select2-container-multi
.select2-choices
.select2-search-field
input
{
padding
:
4px
;
}
.crm-container
.select2-search-choice-close
{
top
:
2px
;
}
/* Add search icon to ajax single-selects */
.crm-container
.crm-ajax-select
.select2-arrow
b
{
...
...
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