Completed
Push — master ( 801541...0a45a8 )
by Eliurkis
03:53
created

File::prepare()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 15
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace Eliurkis\Crud\FieldTypes;
4
5
class File
6
{
7
    public static function prepare($name)
8
    {
9
        return '<div class="fileinput fileinput-new input-group" data-provides="fileinput">
10
                    <div class="form-control" data-trigger="fileinput">
11
                        <i class="glyphicon glyphicon-file fileinput-exists"></i>
12
                    <span class="fileinput-filename"></span>
13
                    </div>
14
                    <span class="input-group-addon btn btn-default btn-file">
15
                        <span class="fileinput-new">Select file</span>
16
                        <span class="fileinput-exists">Change</span>
17
                        <input type="file" name="'.$name.'"/>
18
                    </span>
19
                    <a href="#" class="input-group-addon btn btn-default fileinput-exists" data-dismiss="fileinput">Remove</a>
20
                </div>';
21
    }
22
}
23