mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-11 08:43:10 +00:00
refactoring how/where fields get their classes added
This commit is contained in:
parent
62fc679720
commit
269dfe62f5
20 changed files with 223 additions and 190 deletions
|
|
@ -388,6 +388,7 @@
|
|||
<li class="icon icon-warning">warning</li>
|
||||
<li class="icon icon-success">success</li>
|
||||
<li class="icon icon-date">date</li>
|
||||
<li class="icon icon-time">time</li>
|
||||
<li class="icon icon-form">form</li>
|
||||
</ul>
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ class ExampleForm(forms.Form):
|
|||
url = forms.URLField(required=True)
|
||||
email = forms.EmailField(max_length=254)
|
||||
date = forms.DateField()
|
||||
time = forms.TimeField()
|
||||
select = forms.ChoiceField(choices=CHOICES)
|
||||
boolean = forms.BooleanField(required=False)
|
||||
|
||||
|
|
|
|||
|
|
@ -195,9 +195,20 @@ class EditHandler(object):
|
|||
return ""
|
||||
|
||||
def field_classnames(self):
|
||||
classname = self.field_type() + "test"
|
||||
|
||||
if self.bound_field.field.required:
|
||||
classname += " required"
|
||||
if self.bound_field.errors:
|
||||
classname += " error"
|
||||
|
||||
return classname
|
||||
|
||||
|
||||
def input_classnames(self):
|
||||
"""
|
||||
Additional classnames to add to the <li> when rendering this within a
|
||||
<ul class="fields">
|
||||
Additional classnames to add to the .input surrounding the input field.
|
||||
Mainly used to identify certain field types boolean_field, url_field, date_field etc
|
||||
"""
|
||||
return ""
|
||||
|
||||
|
|
@ -367,16 +378,7 @@ class BaseFieldPanel(EditHandler):
|
|||
def field_type(self):
|
||||
return camelcase_to_underscore(self.bound_field.field.__class__.__name__)
|
||||
|
||||
def field_classnames(self):
|
||||
classname = self.field_type()
|
||||
if self.bound_field.field.required:
|
||||
classname += " required"
|
||||
if self.bound_field.errors:
|
||||
classname += " error"
|
||||
|
||||
return classname
|
||||
|
||||
object_template = "wagtailadmin/edit_handlers/field_panel_object.html"
|
||||
object_template = "wagtailadmin/edit_handlers/single_field_panel.html"
|
||||
|
||||
def render_as_object(self):
|
||||
return mark_safe(render_to_string(self.object_template, {
|
||||
|
|
|
|||
|
|
@ -419,43 +419,85 @@ li.focused > .help{
|
|||
.boolean_field .help, .radio .help{
|
||||
opacity:1;
|
||||
}
|
||||
.iconfield {
|
||||
position:relative;
|
||||
|
||||
/*
|
||||
This is expected to go on the parent of the input/select/textarea
|
||||
so in most cases .input
|
||||
*/
|
||||
.iconfield, /* generic */
|
||||
.date_field,
|
||||
.time_field,
|
||||
.date_time_field,
|
||||
.url_field{
|
||||
.input{
|
||||
position:relative;
|
||||
|
||||
&:before, &:after{
|
||||
font-family:wagtail;
|
||||
position:absolute;
|
||||
top:0.5em;
|
||||
line-height:100%;
|
||||
font-size:2em;
|
||||
color:$color-grey-3;
|
||||
}
|
||||
&:before{
|
||||
left:0.3em;
|
||||
}
|
||||
&:after{
|
||||
right:0.5em;
|
||||
}
|
||||
}
|
||||
|
||||
input:not([type=radio]), input:not([type=checkbox]), input:not([type=submit]), input:not([type=button]){
|
||||
padding-left:2.5em;
|
||||
}
|
||||
|
||||
&:before, &:after{
|
||||
font-family:wagtail;
|
||||
position:absolute;
|
||||
top:0.4em;
|
||||
font-size:1.4em;
|
||||
color:$color-grey-3;
|
||||
}
|
||||
&:before{
|
||||
left:0.5em;
|
||||
}
|
||||
&:after{
|
||||
right:0.5em;
|
||||
/* smaller fields required slight repositioning of icons */
|
||||
&.field-small{
|
||||
.input{
|
||||
&:before, &:after{
|
||||
font-size:1.5em;
|
||||
top:0.3em;
|
||||
}
|
||||
&:before{
|
||||
left:0.5em;
|
||||
}
|
||||
&:after{
|
||||
right:0.5em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* special case for search spinners */
|
||||
&.icon-spinner:after{
|
||||
color:$color-teal;
|
||||
opacity:0.8;
|
||||
font-size:20px;
|
||||
width:20px;
|
||||
height:20px;
|
||||
line-height:23px;
|
||||
text-align:center;
|
||||
top:0.3em;
|
||||
}
|
||||
}
|
||||
|
||||
.date_field,
|
||||
.date_time_field{
|
||||
.input:before{
|
||||
@extend .icon-date:before;
|
||||
}
|
||||
}
|
||||
|
||||
.time_field{
|
||||
.input:before{
|
||||
@extend .icon-time:before;
|
||||
}
|
||||
}
|
||||
|
||||
.url_field{
|
||||
.input:before{
|
||||
@extend .icon-link:before;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.fields li{
|
||||
.fields > li{
|
||||
@include clearfix();
|
||||
padding-top:0.5em;
|
||||
padding-bottom:1.2em;
|
||||
|
|
@ -679,18 +721,17 @@ input[type=submit], input[type=reset], input[type=button], .button, button{
|
|||
@include column(2);
|
||||
padding-top:1.2em;
|
||||
padding-left:0;
|
||||
}
|
||||
|
||||
.model_multiple_choice_field &,
|
||||
.boolean_field &,
|
||||
.model_choice_field &,
|
||||
.image_field &,
|
||||
.file_field &{
|
||||
/* these fields are formatted differently and label alignment must change */
|
||||
.model_multiple_choice_field,
|
||||
.boolean_field,
|
||||
.model_choice_field,
|
||||
.image_field,
|
||||
.file_field{
|
||||
label{
|
||||
padding-top:0;
|
||||
}
|
||||
|
||||
.boolean_field &{
|
||||
padding-bottom:0;
|
||||
}
|
||||
}
|
||||
|
||||
input[type=submit], input[type=reset], input[type=button], .button, button{
|
||||
|
|
@ -721,5 +762,5 @@ input[type=submit], input[type=reset], input[type=button], .button, button{
|
|||
.field-content{
|
||||
@include column(10);
|
||||
padding-right:0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -97,13 +97,6 @@ header{
|
|||
}
|
||||
}
|
||||
|
||||
/* mozilla specific hack */
|
||||
@-moz-document url-prefix() {
|
||||
.iconfield.icon-spinner:after{
|
||||
line-height:20px;
|
||||
}
|
||||
}
|
||||
|
||||
.page-explorer header{
|
||||
margin-bottom:0;
|
||||
padding-bottom:0em;
|
||||
|
|
|
|||
|
|
@ -209,9 +209,9 @@
|
|||
}
|
||||
.icon-spinner:after{
|
||||
width:1em;
|
||||
animation: spin 1s infinite;
|
||||
-webkit-animation: spin 1s infinite;
|
||||
-moz-animation: spin 1s infinite;
|
||||
animation: spin 0.5s infinite linear;
|
||||
-webkit-animation: spin 0.5s infinite linear;
|
||||
-moz-animation: spin 0.5s infinite linear;
|
||||
content:"1";
|
||||
}
|
||||
.icon-pick:before{
|
||||
|
|
@ -233,6 +233,9 @@
|
|||
.icon-date:before{
|
||||
content:"7";
|
||||
}
|
||||
.icon-time:before{
|
||||
content:"8";
|
||||
}
|
||||
.icon-success:before{
|
||||
content:"9";
|
||||
}
|
||||
|
|
@ -245,6 +248,7 @@
|
|||
.icon-form:before{
|
||||
content:"$";
|
||||
}
|
||||
|
||||
.icon.text-replace{
|
||||
font-size:0em;
|
||||
line-height:0;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,29 @@
|
|||
{
|
||||
"IcoMoonType": "selection",
|
||||
"icons": [
|
||||
{
|
||||
"icon": {
|
||||
"paths": [
|
||||
"M632.913 707.493l-173.647-173.649v-232.782h105.469v189.094l142.759 142.757zM512 90.125c-232.995 0-421.875 188.88-421.875 421.875s188.88 421.875 421.875 421.875 421.875-188.88 421.875-421.875-188.88-421.875-421.875-421.875zM512 828.406c-174.747 0-316.406-141.659-316.406-316.406s141.659-316.406 316.406-316.406c174.747 0 316.406 141.659 316.406 316.406s-141.659 316.406-316.406 316.406z"
|
||||
],
|
||||
"tags": [
|
||||
"clock",
|
||||
"time",
|
||||
"schedule"
|
||||
],
|
||||
"grid": 16
|
||||
},
|
||||
"properties": {
|
||||
"id": 72,
|
||||
"order": 9,
|
||||
"prevSize": 32,
|
||||
"code": 56,
|
||||
"name": "clock",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"iconIdx": 72
|
||||
},
|
||||
{
|
||||
"icon": {
|
||||
"paths": [
|
||||
|
|
@ -20,7 +43,7 @@
|
|||
"name": "lock39copy",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 0
|
||||
},
|
||||
{
|
||||
|
|
@ -42,7 +65,7 @@
|
|||
"name": "lock39-open",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 1
|
||||
},
|
||||
{
|
||||
|
|
@ -63,7 +86,7 @@
|
|||
"name": "form",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 2
|
||||
},
|
||||
{
|
||||
|
|
@ -82,7 +105,7 @@
|
|||
"name": "uni61",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 3
|
||||
},
|
||||
{
|
||||
|
|
@ -101,7 +124,7 @@
|
|||
"name": "uni62",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 4
|
||||
},
|
||||
{
|
||||
|
|
@ -120,7 +143,7 @@
|
|||
"name": "uni63",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 5
|
||||
},
|
||||
{
|
||||
|
|
@ -139,7 +162,7 @@
|
|||
"name": "uni64",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 6
|
||||
},
|
||||
{
|
||||
|
|
@ -158,7 +181,7 @@
|
|||
"name": "uni65",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 7
|
||||
},
|
||||
{
|
||||
|
|
@ -177,7 +200,7 @@
|
|||
"name": "uni66",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 8
|
||||
},
|
||||
{
|
||||
|
|
@ -196,7 +219,7 @@
|
|||
"name": "uni67",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 9
|
||||
},
|
||||
{
|
||||
|
|
@ -215,7 +238,7 @@
|
|||
"name": "uni69",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 10
|
||||
},
|
||||
{
|
||||
|
|
@ -234,7 +257,7 @@
|
|||
"name": "uni6A",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 11
|
||||
},
|
||||
{
|
||||
|
|
@ -253,7 +276,7 @@
|
|||
"name": "uni6B",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 12
|
||||
},
|
||||
{
|
||||
|
|
@ -272,7 +295,7 @@
|
|||
"name": "uni6C",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 13
|
||||
},
|
||||
{
|
||||
|
|
@ -291,7 +314,7 @@
|
|||
"name": "uni6E",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 14
|
||||
},
|
||||
{
|
||||
|
|
@ -310,7 +333,7 @@
|
|||
"name": "uni68",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 15
|
||||
},
|
||||
{
|
||||
|
|
@ -329,7 +352,7 @@
|
|||
"name": "uni6F",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 16
|
||||
},
|
||||
{
|
||||
|
|
@ -348,7 +371,7 @@
|
|||
"name": "uni71",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 17
|
||||
},
|
||||
{
|
||||
|
|
@ -367,7 +390,7 @@
|
|||
"name": "uni72",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 18
|
||||
},
|
||||
{
|
||||
|
|
@ -386,7 +409,7 @@
|
|||
"name": "uni73",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 19
|
||||
},
|
||||
{
|
||||
|
|
@ -405,7 +428,7 @@
|
|||
"name": "uni74",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 20
|
||||
},
|
||||
{
|
||||
|
|
@ -424,7 +447,7 @@
|
|||
"name": "uni75",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 21
|
||||
},
|
||||
{
|
||||
|
|
@ -443,7 +466,7 @@
|
|||
"name": "uni76",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 22
|
||||
},
|
||||
{
|
||||
|
|
@ -462,7 +485,7 @@
|
|||
"name": "uni77",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 23
|
||||
},
|
||||
{
|
||||
|
|
@ -481,7 +504,7 @@
|
|||
"name": "uni78",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 24
|
||||
},
|
||||
{
|
||||
|
|
@ -500,7 +523,7 @@
|
|||
"name": "uni7A",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 25
|
||||
},
|
||||
{
|
||||
|
|
@ -519,7 +542,7 @@
|
|||
"name": "uni41",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 26
|
||||
},
|
||||
{
|
||||
|
|
@ -538,7 +561,7 @@
|
|||
"name": "uni42",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 27
|
||||
},
|
||||
{
|
||||
|
|
@ -557,7 +580,7 @@
|
|||
"name": "uni44",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 28
|
||||
},
|
||||
{
|
||||
|
|
@ -576,7 +599,7 @@
|
|||
"name": "uni43",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 29
|
||||
},
|
||||
{
|
||||
|
|
@ -595,7 +618,7 @@
|
|||
"name": "uni45",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 30
|
||||
},
|
||||
{
|
||||
|
|
@ -614,7 +637,7 @@
|
|||
"name": "uni46",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 31
|
||||
},
|
||||
{
|
||||
|
|
@ -633,7 +656,7 @@
|
|||
"name": "uni47",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 32
|
||||
},
|
||||
{
|
||||
|
|
@ -652,7 +675,7 @@
|
|||
"name": "uni48",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 33
|
||||
},
|
||||
{
|
||||
|
|
@ -671,7 +694,7 @@
|
|||
"name": "uni49",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 34
|
||||
},
|
||||
{
|
||||
|
|
@ -690,7 +713,7 @@
|
|||
"name": "uni4A",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 35
|
||||
},
|
||||
{
|
||||
|
|
@ -709,7 +732,7 @@
|
|||
"name": "uni4B",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 36
|
||||
},
|
||||
{
|
||||
|
|
@ -728,7 +751,7 @@
|
|||
"name": "uni4C",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 37
|
||||
},
|
||||
{
|
||||
|
|
@ -747,7 +770,7 @@
|
|||
"name": "uni4D",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 38
|
||||
},
|
||||
{
|
||||
|
|
@ -766,7 +789,7 @@
|
|||
"name": "uni4E",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 39
|
||||
},
|
||||
{
|
||||
|
|
@ -785,7 +808,7 @@
|
|||
"name": "uni4F",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 40
|
||||
},
|
||||
{
|
||||
|
|
@ -804,7 +827,7 @@
|
|||
"name": "uni50",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 41
|
||||
},
|
||||
{
|
||||
|
|
@ -823,7 +846,7 @@
|
|||
"name": "uni51",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 42
|
||||
},
|
||||
{
|
||||
|
|
@ -842,7 +865,7 @@
|
|||
"name": "uni79",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 43
|
||||
},
|
||||
{
|
||||
|
|
@ -861,7 +884,7 @@
|
|||
"name": "uni52",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 44
|
||||
},
|
||||
{
|
||||
|
|
@ -880,7 +903,7 @@
|
|||
"name": "uni54",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 45
|
||||
},
|
||||
{
|
||||
|
|
@ -899,7 +922,7 @@
|
|||
"name": "uni57",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 46
|
||||
},
|
||||
{
|
||||
|
|
@ -918,7 +941,7 @@
|
|||
"name": "uni58",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 47
|
||||
},
|
||||
{
|
||||
|
|
@ -937,7 +960,7 @@
|
|||
"name": "uni59",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 48
|
||||
},
|
||||
{
|
||||
|
|
@ -956,7 +979,7 @@
|
|||
"name": "uni5A",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 49
|
||||
},
|
||||
{
|
||||
|
|
@ -975,7 +998,7 @@
|
|||
"name": "uni56",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 50
|
||||
},
|
||||
{
|
||||
|
|
@ -994,7 +1017,7 @@
|
|||
"name": "uni31",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 51
|
||||
},
|
||||
{
|
||||
|
|
@ -1013,7 +1036,7 @@
|
|||
"name": "uni55",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 52
|
||||
},
|
||||
{
|
||||
|
|
@ -1032,7 +1055,7 @@
|
|||
"name": "uni33",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 53
|
||||
},
|
||||
{
|
||||
|
|
@ -1051,7 +1074,7 @@
|
|||
"name": "uni32",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 54
|
||||
},
|
||||
{
|
||||
|
|
@ -1070,7 +1093,7 @@
|
|||
"name": "uni35",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 55
|
||||
},
|
||||
{
|
||||
|
|
@ -1089,7 +1112,7 @@
|
|||
"name": "uni36",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 56
|
||||
},
|
||||
{
|
||||
|
|
@ -1108,7 +1131,7 @@
|
|||
"name": "uni30",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 57
|
||||
},
|
||||
{
|
||||
|
|
@ -1127,7 +1150,7 @@
|
|||
"name": "uni3F",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 58
|
||||
},
|
||||
{
|
||||
|
|
@ -1146,7 +1169,7 @@
|
|||
"name": "uni21",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 59
|
||||
},
|
||||
{
|
||||
|
|
@ -1165,7 +1188,7 @@
|
|||
"name": "uni39",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 60
|
||||
},
|
||||
{
|
||||
|
|
@ -1184,7 +1207,7 @@
|
|||
"name": "uni53",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 61
|
||||
},
|
||||
{
|
||||
|
|
@ -1203,7 +1226,7 @@
|
|||
"name": "uni34",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 62
|
||||
},
|
||||
{
|
||||
|
|
@ -1222,7 +1245,7 @@
|
|||
"name": "uni37",
|
||||
"ligatures": ""
|
||||
},
|
||||
"setIdx": 0,
|
||||
"setIdx": 1,
|
||||
"iconIdx": 63
|
||||
}
|
||||
],
|
||||
|
|
@ -1245,13 +1268,14 @@
|
|||
"baseline": 6.25,
|
||||
"whitespace": 50
|
||||
},
|
||||
"showMetadata": false,
|
||||
"showMetrics": true,
|
||||
"useClassSelector": false,
|
||||
"classSelector": ".icon",
|
||||
"embed": false
|
||||
"resetPoint": 58880
|
||||
},
|
||||
"imagePref": {
|
||||
"color": 0,
|
||||
"height": 32,
|
||||
"columns": 16,
|
||||
"margin": 16
|
||||
},
|
||||
"imagePref": {},
|
||||
"historySize": 100,
|
||||
"showCodes": true,
|
||||
"search": "",
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -17,6 +17,7 @@
|
|||
<glyph unicode="5" d="M135 424h241v-23h-241zM405 247l-127-124v222h-45v-220l-125 122-33-32 181-181 181 181z" />
|
||||
<glyph unicode="6" d="M136 424h241v-23h-241zM108 122l126 124v-222h45v220l126-122 32 32-181 181-181-181z" />
|
||||
<glyph unicode="7" d="M387.836 13.063h-263.672c-43.671 0-79.102 35.431-79.102 79.101v263.672c0 34.607 22.248 63.446 52.734 74.158v-34.607c0-22.248 18.127-39.551 39.551-39.551s39.551 17.303 39.551 39.551v39.551h158.203v-39.551c0-22.248 18.127-39.551 39.551-39.551s39.551 17.303 39.551 39.551v34.607c30.487-10.712 52.735-39.551 52.735-74.158v-263.672c0-43.671-35.431-79.101-79.101-79.101zM414.203 303.101h-316.406v-210.938c0-14.832 11.535-26.367 26.367-26.367h263.672c14.832 0 26.367 11.536 26.367 26.367zM308.735 171.265h52.735v-52.735h-52.735zM308.735 250.367h52.735v-52.734h-52.735zM229.633 171.265h52.734v-52.735h-52.734zM229.633 250.367h52.734v-52.734h-52.734zM150.531 171.265h52.734v-52.735h-52.734zM150.531 250.367h52.734v-52.734h-52.734zM374.652 382.203c-7.416 0-13.183 5.768-13.183 13.184v39.551h26.367v-39.551c0-7.416-5.768-13.184-13.183-13.184zM137.347 382.203c-7.416 0-13.183 5.768-13.183 13.184v39.551h26.367v-39.551c0-7.416-5.768-13.184-13.184-13.184z" />
|
||||
<glyph unicode="8" d="M316.457 126.253l-86.823 86.825v116.391h52.734v-94.547l71.38-71.379zM256 434.938c-116.498 0-210.938-94.44-210.938-210.938s94.44-210.938 210.938-210.938 210.938 94.44 210.938 210.938-94.44 210.938-210.938 210.938zM256 65.797c-87.374 0-158.203 70.829-158.203 158.203s70.829 158.203 158.203 158.203c87.374 0 158.203-70.829 158.203-158.203s-70.829-158.203-158.203-158.203z" />
|
||||
<glyph unicode="9" d="M256 449c-123.926 0-225-101.074-225-225s101.074-225 225-225c123.926 0 225 101.074 225 225s-101.074 225-225 225zM220.844 120.289l-102.832 103.711 39.551 39.551 63.281-64.16 135.351 135.351 39.551-39.551z" />
|
||||
<glyph unicode="?" d="M253.188 445.25c60.938 0 112.5-20.625 156.563-62.813 43.125-42.188 65.625-93.75 67.5-154.688 0-60.938-20.625-113.438-63.75-156.563-42.188-44.063-93.75-66.563-154.688-68.438-60.938 0-113.438 20.625-156.563 63.75-44.063 42.188-66.563 93.75-67.5 154.688s19.688 113.438 62.813 156.563c43.125 44.063 94.688 66.563 155.625 67.5zM252.25 89.938c9.375 0 17.813 2.813 23.438 8.438 5.625 6.563 9.375 14.063 9.375 22.5 0 10.313-1.875 17.813-8.438 24.375-5.625 5.625-14.063 8.438-23.438 8.438 0 0-0.938 0-0.938 0-9.375 0-16.875-2.813-22.5-8.438-6.563-5.625-9.375-13.125-10.313-22.5 0-9.375 2.813-16.875 9.375-23.438 5.625-5.625 13.125-9.375 22.5-9.375 0 0 0.938 0 0.938 0zM331.938 247.438c8.438 10.313 12.188 22.5 12.188 37.5 0 24.375-8.438 43.125-25.313 55.313s-38.438 17.813-64.688 17.813c-20.625 0-37.5-3.75-49.688-12.188-22.5-13.125-33.75-36.563-34.688-70.313 0 0 0-1.875 0-1.875s52.5 0 52.5 0c0 0 0 1.875 0 1.875 0 8.438 2.813 16.875 7.5 26.25 5.625 7.5 14.063 11.25 26.25 11.25 13.125 0 21.563-2.813 25.313-9.375 4.688-6.563 7.5-13.125 7.5-21.563 0-5.625-2.813-12.188-7.5-18.75-2.813-3.75-6.563-7.5-10.313-9.375 0 0-2.813-1.875-2.813-1.875-1.875-1.875-3.75-3.75-7.5-5.625-2.813-1.875-6.563-4.688-9.375-7.5-3.75-1.875-6.563-4.688-10.313-7.5s-6.563-5.625-8.438-8.438c-3.75-6.563-6.563-18.75-8.438-37.5 0 0 0-3.75 0-3.75s52.5 0 52.5 0c0 0 0 1.875 0 1.875 0 3.75 0 8.438 1.875 13.125 1.875 6.563 5.625 12.188 13.125 17.813 0 0 13.125 8.438 13.125 8.438 15 11.25 23.438 18.75 27.188 24.375z" />
|
||||
<glyph unicode="A" d="M232 109l176 175c3 4 5 8 5 13s-2 9-5 13l-29 29c-4 4-8 6-13 6s-10-2-13-6l-134-133-60 60c-3 4-8 5-13 5s-9-1-13-5l-29-29c-3-4-5-8-5-13s2-9 5-13l103-102c3-4 7-6 12-6s10 2 13 6zM475 361v-274c0-23-8-42-24-58s-35-24-58-24h-274c-23 0-42 8-58 24s-24 35-24 58v274c0 23 8 42 24 58s35 24 58 24h274c23 0 42-8 58-24s24-35 24-58z" />
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 55 KiB |
Binary file not shown.
Binary file not shown.
|
|
@ -44,6 +44,7 @@ form{
|
|||
}
|
||||
}
|
||||
label{
|
||||
width:auto;
|
||||
color:white;
|
||||
}
|
||||
input[type=submit]{
|
||||
|
|
@ -85,22 +86,7 @@ form{
|
|||
}
|
||||
.iconfield:before{
|
||||
display:none;
|
||||
}
|
||||
|
||||
.full label{
|
||||
@include border-radius(2px);
|
||||
text-transform:uppercase;
|
||||
padding:2px 5px;
|
||||
position:absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
margin-top:-1px;
|
||||
font-size:0.7em;
|
||||
z-index:1;
|
||||
margin:0.2em 0;
|
||||
line-height:1.5em;
|
||||
font-weight:normal;
|
||||
}
|
||||
}
|
||||
|
||||
/* Special full-width, one-off fields i.e a single text or textarea input */
|
||||
.full input{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "wagtailadmin/edit_handlers/field_panel_field.html" %}
|
||||
{% extends "wagtailadmin/shared/field.html" %}
|
||||
{% load i18n %}
|
||||
{% comment %}
|
||||
Either the chosen or unchosen div will be shown, depending on the presence
|
||||
|
|
|
|||
|
|
@ -1,23 +1 @@
|
|||
<div class="field">
|
||||
{{ field.label_tag }}
|
||||
<div class="field-content">
|
||||
<div class="input {{ input_classes }} ">
|
||||
{% block form_field %}
|
||||
{{ field }}
|
||||
{% endblock %}
|
||||
<span></span>
|
||||
</div>
|
||||
{% if field.help_text %}
|
||||
<p class="help">{{ field.help_text }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if field.errors %}
|
||||
<p class="error-message">
|
||||
{% for error in field.errors %}
|
||||
<span>{{ error }}</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include "wagtailadmin/shared/field.html" %}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
<legend>{{ self.heading }}</legend>
|
||||
<ul class="fields">
|
||||
{% for child in self.children %}
|
||||
<li {% if child.field_classnames %}class="{{ child.field_classnames }}"{% endif %}>
|
||||
{{ child.render_as_field }}
|
||||
</li>
|
||||
<li>{{ child.render_as_field }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<fieldset>
|
||||
<legend>{{ self.heading }}</legend>
|
||||
<ul class="fields">
|
||||
<li class="{{ self.field_classnames }}">{{ field_content }}</li>
|
||||
<li>{{ field_content }}</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
{% load wagtailadmin_tags %}
|
||||
<div class="field {{ field.field_classnames }} {{ field|fieldtype }} {{ field_classes }}">
|
||||
{{ field.label_tag }}
|
||||
<div class="field-content">
|
||||
<div class="input {{ field.input_classnames }} {{ input_classes }} ">
|
||||
{% block form_field %}
|
||||
{{ field }}
|
||||
{% endblock %}
|
||||
|
||||
{# This span only used on rare occasions by certain types of input #}
|
||||
<span></span>
|
||||
</div>
|
||||
{% if field.help_text %}
|
||||
<p class="help">{{ field.help_text }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if field.errors %}
|
||||
<p class="error-message">
|
||||
{% for error in field.errors %}
|
||||
<span>{{ error|escape }}</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,25 +1,4 @@
|
|||
{% load wagtailadmin_tags %}
|
||||
<li class="{% if field.field.required %}required{% endif %} {{ field.css_classes }} {{ field|fieldtype }} {{ li_classes }} {% if field.errors %}error{% endif %}">
|
||||
<div class="field">
|
||||
{{ field.label_tag }}
|
||||
<div class="field-content">
|
||||
<div class="input {{ input_classes }} ">
|
||||
{% block form_field %}
|
||||
{{ field }}
|
||||
{% endblock %}
|
||||
<span></span>
|
||||
</div>
|
||||
{% if field.help_text %}
|
||||
<p class="help">{{ field.help_text }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if field.errors %}
|
||||
<p class="error-message">
|
||||
{% for error in field.errors %}
|
||||
<span>{{ error|escape }}</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<li class="{% if field.field.required %}required{% endif %} {{ wrapper_classes }} {{ li_classes }} {% if field.errors %}error{% endif %}">
|
||||
{% include "wagtailadmin/shared/field.html" %}
|
||||
</li>
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
<form class="col search-form" action="{% url search_url %}" method="get">
|
||||
<ul class="fields">
|
||||
{% for field in search_form %}
|
||||
{% include "wagtailadmin/shared/field_as_li.html" with field=field input_classes="field-small iconfield icon-search" %}
|
||||
{% include "wagtailadmin/shared/field_as_li.html" with field=field field_classes="field-small iconfield" input_classes="icon-search" %}
|
||||
{% endfor %}
|
||||
<li class="submit visuallyhidden"><input type="submit" value="Search" class="button" /></li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
<div class="col search-bar">
|
||||
<ul class="fields row rowflush">
|
||||
{% for field in select_date_form %}
|
||||
{% include "wagtailadmin/shared/field_as_li.html" with field=field input_classes="field-small iconfield icon-date" li_classes="col4" %}
|
||||
{% include "wagtailadmin/shared/field_as_li.html" with field=field field_classes="field-small" li_classes="col4" %}
|
||||
{% endfor %}
|
||||
<li class="submit col2">
|
||||
<button name="action" value="filter" class="button">{% trans 'Filter' %}</button>
|
||||
|
|
|
|||
Loading…
Reference in a new issue