/
upload.php
32 lines (23 loc) · 1.02 KB
/
upload.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!-- BEGIN YForm_Upload Element -->
<div class="yform-item yform-upload<?php echo empty($errors) ? '' : ' has-errors'; ?>" id="<?php echo Arr::get($attributes, 'id'); ?>-container">
<?php if ( ! empty($label)): ?>
<label for="<?php echo Arr::get($attributes, 'id'); ?>" >
<?php echo $label; ?>
<?php if ($object->get('required') !== FALSE): ?>
<span class="required"><?php echo ($object->required === TRUE)?'*':$object->required; ?></span>
<?php endif; ?>
</label>
<?php endif; ?>
<input <?php echo HTML::attributes($attributes); ?>/>
<?php foreach ($messages as $type => $array): ?>
<?php if ($type !== 'errors'): // We want errors last ?>
<?php foreach ($array as $message): ?>
<div class="message <?php echo $type; ?>"><?php echo $message; ?></div>
<?php endforeach; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php foreach (Arr::get($messages, 'errors', array()) as $error): ?>
<div class="message error"><?php echo $error; ?></div>
<?php endforeach; ?>
</div>
<!-- END YForm_Upload Element -->