fieldtemplates.html 2.52 KB
Newer Older
Rafael Ostertag's avatar
Rafael Ostertag committed
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">


    <link rel="stylesheet" href="../css/bootstrap.min.css">
    <link rel="stylesheet" href="../css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="../css/jqx.base.css">
    <link rel="stylesheet" href="../css/jqx.bootstrap.css">
    <link rel="stylesheet" href="../css/qfq-bs.css">

    <title>Field Templates</title>
</head>
<body>

<form id="myForm" class="form-horizontal" data-toggle="validator">
    <input type="hidden" name="s" value="badcaffee1234">
    <div class="form-group">
        <div class="col-md-2">
            <b class="control-label">Fotowand</b>
        </div>
        <div class="col-md-6 qfq-fields" id="target"
             data-qfq-line-template="#template">

        </div>
    </div>
    <div class="form-group">
        <div class="col-md-1">
            <button type="button" onclick="QfqNS.addFields('#template', '#target')">Add</button>
        </div>
    </div>
</form>

<script id="template" type="text/template">
    <div class="form-inline qfq-line">
        <div class="form-group">
            <label for="id1_%d" class="control-label">Zeile (A-K)</label>
            <input id="id1_%d" type="text" class="form-control" name="name1_%d">
        </div>
        <div class="form-group">
            <label for="id2_%d" class="control-label">Zeile (1-10)</label>
            <input id="id2_%d" type="text" class="form-control" name="name2_%d">
        </div>

        <div class="form-group">
            <div class="checkbox">
                <label>
                    <input type="checkbox" name="name3_%d">Zweizeilig
                </label>
            </div>
        </div>

        <div class="form-group qfq-delete-button">
            <button type="button" onclick="QfqNS.removeFields(this)">Remove</button>
        </div>
    </div>
</script>

<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>

<script src="../js/validator.min.js"></script>

<script src="../js/jqx-all.js"></script>
<script src="../js/globalize.js"></script>
<script src="../js/tinymce.min.js"></script>
<script src="../js/EventEmitter.min.js"></script>
<script src="../js/qfq.debug.js"></script>


<script type="text/javascript">
    $(function () {
        $(".qfq-fields").each(
            function () {
                QfqNS.initializeFields(this);
            }
        );
    });
</script>
</body>
</html>