";
}
// line 18
public function getspanToggle($__input__ = null, $__length__ = null, ...$__varargs__)
{
$context = $this->env->mergeGlobals(array(
"input" => $__input__,
"length" => $__length__,
"varargs" => $__varargs__,
));
$blocks = array();
ob_start();
try {
// line 19
echo " ";
$context["space"] = $this->env->getExtension('Grav\Common\Twig\TwigExtension')->repeatFunc(" ", ((($context["length"] ?? null) - twig_length_filter($this->env, ($context["input"] ?? null))) / 2));
// line 20
echo " ";
echo ((($context["space"] ?? null) . ($context["input"] ?? null)) . ($context["space"] ?? null));
echo "
";
} catch (Exception $e) {
ob_end_clean();
throw $e;
} catch (Throwable $e) {
ob_end_clean();
throw $e;
}
return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
}
public function getTemplateName()
{
return "forms/fields/toggle/toggle.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 205 => 20, 202 => 19, 189 => 18, 184 => 59, 174 => 57, 171 => 56, 166 => 55, 163 => 54, 159 => 52, 156 => 51, 153 => 50, 149 => 48, 147 => 47, 144 => 46, 141 => 45, 138 => 44, 133 => 43, 127 => 41, 125 => 40, 121 => 39, 117 => 38, 113 => 37, 109 => 35, 106 => 34, 103 => 33, 99 => 32, 96 => 31, 90 => 30, 87 => 29, 84 => 28, 79 => 27, 77 => 26, 69 => 25, 66 => 24, 63 => 23, 57 => 15, 52 => 14, 49 => 13, 45 => 1, 38 => 9, 36 => 8, 32 => 7, 30 => 6, 28 => 4, 26 => 3, 11 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Twig_Source("{% extends \"forms/field.html.twig\" %}
{% set value = (value is null ? field.default : value) %}
{% set value = (value is same as(false) ? 0 : value) %}
{% set has_hidden = false %}
{% for key, text in field.options %}
{% if key is empty %}
{% set has_hidden = true %}
{% endif %}
{% endfor %}
{% block global_attributes %}
{{ parent() }}
data-grav-field-name=\"{{ (scope ~ field.name)|fieldName }}\"
{% endblock %}
{% macro spanToggle(input, length) %}
{% set space = repeat(' ', (length - input|length) / 2) %}
{{ (space ~ input ~ space)|raw }}
{% endmacro %}
{% block input %}
{% set maxLen = 0 %}
{% for text in field.options %}
{% set translation = grav.twig.twig.filters['tu'] is defined ? text|tu : text|t %}
{% set maxLen = max(translation|length, maxLen) %}
{% endfor %}
{% for key, text in field.options %}
{% set id = \"toggle_\" ~ field.name ~ key %}
{% set translation = (grav.twig.twig.filters['tu'] is defined ? text|tu : text|t)|trim %}
{% endfor %}