Cook field labels
Dieser Commit ist enthalten in:
Ursprung
5e936036e6
Commit
b73b39370f
3 geänderte Dateien mit 12 neuen und 6 gelöschten Zeilen
|
@ -1,6 +1,6 @@
|
||||||
<label for={{field.id}}>
|
<label for={{field.id}}>
|
||||||
{{#if field.label}}
|
{{#if field.label}}
|
||||||
<span class='label-value'>{{field.label}}</span>
|
<span class='label-value'>{{{field.label}}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
|
|
@ -125,8 +125,12 @@
|
||||||
flex-flow: wrap;
|
flex-flow: wrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.field-label {
|
.label-value {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.field-image {
|
.field-image {
|
||||||
|
|
|
@ -28,12 +28,10 @@ end
|
||||||
attr_accessor :dropdown_none
|
attr_accessor :dropdown_none
|
||||||
|
|
||||||
def initialize(attrs)
|
def initialize(attrs)
|
||||||
attrs = attrs || {}
|
@attrs = attrs || {}
|
||||||
|
|
||||||
@id = attrs[:id]
|
@id = attrs[:id]
|
||||||
@type = attrs[:type]
|
@type = attrs[:type]
|
||||||
@required = !!attrs[:required]
|
@required = !!attrs[:required]
|
||||||
@label = attrs[:label]
|
|
||||||
@description = attrs[:description]
|
@description = attrs[:description]
|
||||||
@image = attrs[:image]
|
@image = attrs[:image]
|
||||||
@key = attrs[:key]
|
@key = attrs[:key]
|
||||||
|
@ -42,6 +40,10 @@ end
|
||||||
@choices = []
|
@choices = []
|
||||||
@dropdown_none = attrs[:dropdown_none]
|
@dropdown_none = attrs[:dropdown_none]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def label
|
||||||
|
@label ||= PrettyText.cook(@attrs[:label], keep_emoji_images: true)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
::Wizard::Choice.class_eval do
|
::Wizard::Choice.class_eval do
|
||||||
|
@ -54,7 +56,7 @@ end
|
||||||
end
|
end
|
||||||
|
|
||||||
def label
|
def label
|
||||||
@label ||= PrettyText.cook(@opts[:label], keep_emoji_images: true, postProcessTag: '<div>')
|
@label ||= PrettyText.cook(@opts[:label], keep_emoji_images: true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Laden …
In neuem Issue referenzieren