This commit is contained in:
Yonel Ceruto 2019-09-18 17:49:21 -04:00
parent bc5590a95a
commit f1ebb04cb4
54 changed files with 0 additions and 245 deletions

View File

@ -1,9 +0,0 @@
<?php foreach ($attr as $k => $v): ?>
<?php if ('placeholder' === $k || 'title' === $k): ?>
<?php printf('%s="%s" ', $view->escape($k), $view->escape(false !== $translation_domain ? $view['translator']->trans($v, $attr_translation_parameters, $translation_domain) : $v)) ?>
<?php elseif (true === $v): ?>
<?php printf('%s="%s" ', $view->escape($k), $view->escape($k)) ?>
<?php elseif (false !== $v): ?>
<?php printf('%s="%s" ', $view->escape($k), $view->escape($v)) ?>
<?php endif ?>
<?php endforeach ?>

View File

@ -1,2 +0,0 @@
id="<?php echo $view->escape($id) ?>" name="<?php echo $view->escape($full_name) ?>"<?php if ($disabled): ?> disabled="disabled"<?php endif ?>
<?php echo $attr ? ' '.$view['form']->block($form, 'attributes') : '' ?>

View File

@ -1,3 +0,0 @@
<div>
<?php echo $view['form']->widget($form) ?>
</div>

View File

@ -1,4 +0,0 @@
<?php if (!$label) { $label = isset($label_format)
? strtr($label_format, ['%name%' => $name, '%id%' => $id])
: $view['form']->humanize($name); } ?>
<button type="<?php echo isset($type) ? $view->escape($type) : 'button' ?>" <?php echo $view['form']->block($form, 'button_attributes') ?>><?php echo $view->escape(false !== $translation_domain ? $view['translator']->trans($label, $label_translation_parameters, $translation_domain) : $label) ?></button>

View File

@ -1,5 +0,0 @@
<input type="checkbox"
<?php echo $view['form']->block($form, 'widget_attributes') ?>
<?php if (strlen($value) > 0): ?> value="<?php echo $view->escape($value) ?>"<?php endif ?>
<?php if ($checked): ?> checked="checked"<?php endif ?>
/>

View File

@ -1,8 +0,0 @@
<?php if ($disabled): ?>disabled="disabled" <?php endif ?>
<?php foreach ($choice_attr as $k => $v): ?>
<?php if ($v === true): ?>
<?php printf('%s="%s" ', $view->escape($k), $view->escape($k)) ?>
<?php elseif ($v !== false): ?>
<?php printf('%s="%s" ', $view->escape($k), $view->escape($v)) ?>
<?php endif ?>
<?php endforeach ?>

View File

@ -1 +0,0 @@
<?php echo $view['form']->block($form, 'choice_widget_options') ?>

View File

@ -1,5 +0,0 @@
<?php if ($expanded): ?>
<?php echo $view['form']->block($form, 'choice_widget_expanded') ?>
<?php else: ?>
<?php echo $view['form']->block($form, 'choice_widget_collapsed') ?>
<?php endif ?>

View File

@ -1,18 +0,0 @@
<select
<?php if ($required && null === $placeholder && $placeholder_in_choices === false && $multiple === false && (!isset($attr['size']) || $attr['size'] <= 1)):
$required = false;
endif; ?>
<?php echo $view['form']->block($form, 'widget_attributes', [
'required' => $required,
]) ?>
<?php if ($multiple): ?> multiple="multiple"<?php endif ?>
>
<?php if (null !== $placeholder): ?><option value=""<?php if ($required && empty($value) && '0' !== $value): ?> selected="selected"<?php endif?>><?php echo '' != $placeholder ? $view->escape(false !== $translation_domain ? $view['translator']->trans($placeholder, [], $translation_domain) : $placeholder) : '' ?></option><?php endif; ?>
<?php if (count($preferred_choices) > 0): ?>
<?php echo $view['form']->block($form, 'choice_widget_options', ['choices' => $preferred_choices]) ?>
<?php if (count($choices) > 0 && null !== $separator): ?>
<option disabled="disabled"><?php echo $view->escape($separator) ?></option>
<?php endif ?>
<?php endif ?>
<?php echo $view['form']->block($form, 'choice_widget_options', ['choices' => $choices]) ?>
</select>

View File

@ -1,6 +0,0 @@
<div <?php echo $view['form']->block($form, 'widget_container_attributes') ?>>
<?php foreach ($form as $child): ?>
<?php echo $view['form']->widget($child) ?>
<?php echo $view['form']->label($child, null, ['translation_domain' => $choice_translation_domain]) ?>
<?php endforeach ?>
</div>

View File

@ -1,13 +0,0 @@
<?php use Symfony\Component\Form\ChoiceList\View\ChoiceGroupView;
$translatorHelper = $view['translator']; // outside of the loop for performance reasons! ?>
<?php $formHelper = $view['form']; ?>
<?php foreach ($choices as $group_label => $choice): ?>
<?php if (is_array($choice) || $choice instanceof ChoiceGroupView): ?>
<optgroup label="<?php echo $view->escape(false !== $choice_translation_domain ? $translatorHelper->trans($group_label, [], $choice_translation_domain) : $group_label) ?>">
<?php echo $formHelper->block($form, 'choice_widget_options', ['choices' => $choice]) ?>
</optgroup>
<?php else: ?>
<option value="<?php echo $view->escape($choice->value) ?>" <?php echo $formHelper->block($form, 'choice_attributes', ['choice_attr' => $choice->attr]) ?><?php if ($is_selected($choice->value, $value)): ?> selected="selected"<?php endif?>><?php echo $view->escape(false !== $choice_translation_domain ? $translatorHelper->trans($choice->label, [], $choice_translation_domain) : $choice->label) ?></option>
<?php endif ?>
<?php endforeach ?>

View File

@ -1,4 +0,0 @@
<?php if (isset($prototype)): ?>
<?php $attr['data-prototype'] = $view->escape($view['form']->row($prototype)) ?>
<?php endif ?>
<?php echo $view['form']->widget($form, ['attr' => $attr]) ?>

View File

@ -1 +0,0 @@
<?php echo $view['form']->block($form, 'form_widget_simple', ['type' => isset($type) ? $type : 'color']);

View File

@ -1 +0,0 @@
<?php echo $view['form']->block($form, 'widget_container_attributes') ?>

View File

@ -1,11 +0,0 @@
<?php if ($widget == 'single_text'): ?>
<?php echo $view['form']->block($form, 'form_widget_simple'); ?>
<?php else: ?>
<div <?php echo $view['form']->block($form, 'widget_container_attributes') ?>>
<?php echo str_replace(['{{ year }}', '{{ month }}', '{{ day }}'], [
$view['form']->widget($form['year']),
$view['form']->widget($form['month']),
$view['form']->widget($form['day']),
], $date_pattern) ?>
</div>
<?php endif ?>

View File

@ -1,7 +0,0 @@
<?php if ($widget == 'single_text'): ?>
<?php echo $view['form']->block($form, 'form_widget_simple'); ?>
<?php else: ?>
<div <?php echo $view['form']->block($form, 'widget_container_attributes') ?>>
<?php echo $view['form']->widget($form['date']).' '.$view['form']->widget($form['time']) ?>
</div>
<?php endif ?>

View File

@ -1 +0,0 @@
<?php echo $view['form']->block($form, 'form_widget_simple', ['type' => isset($type) ? $type : 'email']) ?>

View File

@ -1,3 +0,0 @@
<?php echo $view['form']->start($form) ?>
<?php echo $view['form']->widget($form) ?>
<?php echo $view['form']->end($form) ?>

View File

@ -1 +0,0 @@
<?php if ($form->vars['multipart']): ?>enctype="multipart/form-data"<?php endif ?>

View File

@ -1,4 +0,0 @@
<?php if (!isset($render_rest) || $render_rest): ?>
<?php echo $view['form']->rest($form) ?>
<?php endif ?>
</form>

View File

@ -1,7 +0,0 @@
<?php if (count($errors) > 0): ?>
<ul>
<?php foreach ($errors as $error): ?>
<li><?php echo $view->escape($error->getMessage()) ?></li>
<?php endforeach; ?>
</ul>
<?php endif ?>

View File

@ -1,6 +0,0 @@
<?php if (!empty($help)): ?>
<?php $help_attr['class'] = isset($help_attr['class']) ? trim($help_attr['class'].' help-text') : 'help-text'; ?>
<?php $help = false !== $translation_domain ? $view['translator']->trans($help, $help_translation_parameters, $translation_domain) : $help; ?>
<?php $help = false === $help_html ? $view->escape($help) : $help ?>
<p id="<?php echo $view->escape($id); ?>_help" <?php echo ' '.$view['form']->block($form, 'attributes', ['attr' => $help_attr]); ?>><?php echo $help; ?></p>
<?php endif; ?>

View File

@ -1,8 +0,0 @@
<?php if (false !== $label): ?>
<?php if ($required) { $label_attr['class'] = trim((isset($label_attr['class']) ? $label_attr['class'] : '').' required'); } ?>
<?php if (!$compound) { $label_attr['for'] = $id; } ?>
<?php if (!$label) { $label = isset($label_format)
? strtr($label_format, ['%name%' => $name, '%id%' => $id])
: $view['form']->humanize($name); } ?>
<label<?php if ($label_attr) { echo ' '.$view['form']->block($form, 'attributes', ['attr' => $label_attr]); } ?>><?php echo $view->escape(false !== $translation_domain ? $view['translator']->trans($label, $label_translation_parameters, $translation_domain) : $label) ?></label>
<?php endif ?>

View File

@ -1,5 +0,0 @@
<?php foreach ($form as $child): ?>
<?php if (!$child->isRendered()): ?>
<?php echo $view['form']->row($child) ?>
<?php endif; ?>
<?php endforeach; ?>

View File

@ -1,7 +0,0 @@
<div>
<?php $widgetAttr = empty($help) ? [] : ['attr' => ['aria-describedby' => $id.'_help']]; ?>
<?php echo $view['form']->label($form); ?>
<?php echo $view['form']->errors($form); ?>
<?php echo $view['form']->widget($form, $widgetAttr); ?>
<?php echo $view['form']->help($form); ?>
</div>

View File

@ -1,5 +0,0 @@
<?php foreach ($form as $child) : ?>
<?php if (!$child->isRendered()): ?>
<?php echo $view['form']->row($child) ?>
<?php endif; ?>
<?php endforeach; ?>

View File

@ -1,6 +0,0 @@
<?php $method = strtoupper($method) ?>
<?php $form_method = $method === 'GET' || $method === 'POST' ? $method : 'POST' ?>
<form name="<?php echo $name ?>" method="<?php echo strtolower($form_method) ?>"<?php if ($action !== ''): ?> action="<?php echo $view->escape($action) ?>"<?php endif ?><?php foreach ($attr as $k => $v) { printf(' %s="%s"', $view->escape($k), $view->escape($v)); } ?><?php if ($multipart): ?> enctype="multipart/form-data"<?php endif ?>>
<?php if ($form_method !== $method): ?>
<input type="hidden" name="_method" value="<?php echo $view->escape($method) ?>" />
<?php endif ?>

View File

@ -1,5 +0,0 @@
<?php if ($compound): ?>
<?php echo $view['form']->block($form, 'form_widget_compound')?>
<?php else: ?>
<?php echo $view['form']->block($form, 'form_widget_simple')?>
<?php endif ?>

View File

@ -1,7 +0,0 @@
<div <?php echo $view['form']->block($form, 'widget_container_attributes') ?>>
<?php if (!$form->parent && $errors): ?>
<?php echo $view['form']->errors($form) ?>
<?php endif ?>
<?php echo $view['form']->block($form, 'form_rows') ?>
<?php echo $view['form']->rest($form) ?>
</div>

View File

@ -1 +0,0 @@
<input type="<?php echo isset($type) ? $view->escape($type) : 'text' ?>" <?php echo $view['form']->block($form, 'widget_attributes') ?><?php if (!empty($value) || is_numeric($value)): ?> value="<?php echo $view->escape($value) ?>"<?php endif ?> />

View File

@ -1 +0,0 @@
<?php echo $view['form']->widget($form) ?>

View File

@ -1 +0,0 @@
<?php echo $view['form']->block($form, 'form_widget_simple', ['type' => isset($type) ? $type : 'hidden']) ?>

View File

@ -1 +0,0 @@
<?php echo $view['form']->block($form, 'form_widget_simple', ['type' => isset($type) ? $type : 'number']) ?>

View File

@ -1 +0,0 @@
<?php echo $view['form']->formEncodeCurrency($money_pattern, $view['form']->block($form, 'form_widget_simple')) ?>

View File

@ -1 +0,0 @@
<?php echo $view['form']->block($form, 'form_widget_simple', ['type' => isset($type) ? $type : 'text']) ?>

View File

@ -1 +0,0 @@
<?php echo $view['form']->block($form, 'form_widget_simple', ['type' => isset($type) ? $type : 'password']) ?>

View File

@ -1,2 +0,0 @@
<?php $symbol = false !== $symbol ? ($symbol ? ' '.$symbol : ' %') : '' ?>
<?php echo $view['form']->block($form, 'form_widget_simple', ['type' => isset($type) ? $type : 'text']).$view->escape($symbol) ?>

View File

@ -1,5 +0,0 @@
<input type="radio"
<?php echo $view['form']->block($form, 'widget_attributes') ?>
value="<?php echo $view->escape($value) ?>"
<?php if ($checked): ?> checked="checked"<?php endif ?>
/>

View File

@ -1 +0,0 @@
<?php echo $view['form']->block($form, 'form_widget_simple', ['type' => isset($type) ? $type : 'range']);

View File

@ -1 +0,0 @@
<?php echo $view['form']->block($form, 'form_rows') ?>

View File

@ -1 +0,0 @@
<?php echo $view['form']->block($form, 'button_widget', ['type' => isset($type) ? $type : 'reset']) ?>

View File

@ -1 +0,0 @@
<?php echo $view['form']->block($form, 'form_widget_simple', ['type' => isset($type) ? $type : 'search']) ?>

View File

@ -1 +0,0 @@
<?php echo $view['form']->block($form, 'button_widget', ['type' => isset($type) ? $type : 'submit']) ?>

View File

@ -1 +0,0 @@
<?php echo $view['form']->block($form, 'form_widget_simple', ['type' => isset($type) ? $type : 'tel']);

View File

@ -1 +0,0 @@
<textarea <?php echo $view['form']->block($form, 'widget_attributes') ?>><?php echo $view->escape($value) ?></textarea>

View File

@ -1,22 +0,0 @@
<?php if ($widget == 'single_text'): ?>
<?php echo $view['form']->block($form, 'form_widget_simple'); ?>
<?php else: ?>
<?php $vars = $widget == 'text' ? ['attr' => ['size' => 1]] : [] ?>
<div <?php echo $view['form']->block($form, 'widget_container_attributes') ?>>
<?php
// There should be no spaces between the colons and the widgets, that's why
// this block is written in a single PHP tag
echo $view['form']->widget($form['hour'], $vars);
if ($with_minutes) {
echo ':';
echo $view['form']->widget($form['minute'], $vars);
}
if ($with_seconds) {
echo ':';
echo $view['form']->widget($form['second'], $vars);
}
?>
</div>
<?php endif ?>

View File

@ -1 +0,0 @@
<?php echo $view['form']->block($form, 'form_widget_simple', ['type' => isset($type) ? $type : 'url']) ?>

View File

@ -1,3 +0,0 @@
id="<?php echo $view->escape($id) ?>" name="<?php echo $view->escape($full_name) ?>"<?php if ($disabled): ?> disabled="disabled"<?php endif ?>
<?php if ($required): ?> required="required"<?php endif ?>
<?php echo $attr ? ' '.$view['form']->block($form, 'attributes') : '' ?>

View File

@ -1,2 +0,0 @@
<?php if (!empty($id)): ?>id="<?php echo $view->escape($id) ?>"<?php endif ?>
<?php echo $attr ? ' '.$view['form']->block($form, 'attributes') : '' ?>

View File

@ -1,6 +0,0 @@
<tr>
<td></td>
<td>
<?php echo $view['form']->widget($form); ?>
</td>
</tr>

View File

@ -1,11 +0,0 @@
<tr>
<?php $widgetAttr = empty($help) ? [] : ['attr' => ['aria-describedby' => $id.'_help']]; ?>
<td>
<?php echo $view['form']->label($form); ?>
</td>
<td>
<?php echo $view['form']->errors($form); ?>
<?php echo $view['form']->widget($form, $widgetAttr); ?>
<?php echo $view['form']->help($form); ?>
</td>
</tr>

View File

@ -1,11 +0,0 @@
<table <?php echo $view['form']->block($form, 'widget_container_attributes'); ?>>
<?php if (!$form->parent && $errors): ?>
<tr>
<td colspan="2">
<?php echo $view['form']->errors($form); ?>
</td>
</tr>
<?php endif; ?>
<?php echo $view['form']->block($form, 'form_rows'); ?>
<?php echo $view['form']->rest($form); ?>
</table>

View File

@ -1,5 +0,0 @@
<tr style="display: none">
<td colspan="2">
<?php echo $view['form']->widget($form); ?>
</td>
</tr>