mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-07 04:23:17 +09:00
Harden Formbuilder style and textarea defaults
This commit is contained in:
1 parent
409639d22a
commit
d3338292b7
2 files changed
+6
-3
No files matched your search
@@ -267,6 +267,9 @@ class Service implements InjectionAwareInterface
|
||||
}
|
||||
|
||||
$result['style'] = json_decode($result['style'] ?? '', true);
|
||||
if (!is_array($result['style'])) {
|
||||
$result['style'] = ['type' => 'default', 'show_title' => '1'];
|
||||
}
|
||||
$result['fields'] = $this->fieldsJsonDecode($this->getFormFields($result['id']));
|
||||
|
||||
return $result;
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
<label class="form-label" for="textarea-width">{{ 'Width'|trans }}</label>
|
||||
<div class="input-group">
|
||||
<input type="hidden" name="textarea_option[]" value="width">
|
||||
<input class="form-control" type="text" name="textarea_size[]" value="{{field.options.width}}" id="textarea-width">
|
||||
<input class="form-control" type="text" name="textarea_size[]" value="{{ field.options.width|default('300') }}" id="textarea-width">
|
||||
<span class="input-group-text">{{ 'px'|trans }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -115,7 +115,7 @@
|
||||
<label class="form-label" for="textarea-height">{{ 'Height'|trans }}</label>
|
||||
<div class="input-group">
|
||||
<input type="hidden" name="textarea_option[]" value="height">
|
||||
<input class="form-control" type="text" name="textarea_size[]" value="{{field.options.height}}" id="textarea-height">
|
||||
<input class="form-control" type="text" name="textarea_size[]" value="{{ field.options.height|default('100') }}" id="textarea-height">
|
||||
<span class="input-group-text">{{ 'px'|trans }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -199,7 +199,7 @@
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% elseif field.type == "textarea" %}
|
||||
<textarea class="form-control" name="default_value" style="width: {{ field.options.width }}px; height: {{ field.options.height }}px;">{{ field.default_value }}</textarea>
|
||||
<textarea class="form-control" name="default_value" style="width: {{ field.options.width|default('300') }}px; height: {{ field.options.height|default('100') }}px;">{{ field.default_value }}</textarea>
|
||||
{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in new issue
Block a user