mirror of
https://github.com/hanzoai/jube-fork.git
synced 2026-11-02 14:29:36 +00:00
168 lines
6.3 KiB
HTML
Executable File
168 lines
6.3 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Items</title>
|
|
<meta charset="utf-8">
|
|
<link href="../content/shared/styles/examples-offline.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.common.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.rtl.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.default.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.default.mobile.min.css" rel="stylesheet">
|
|
<script src="../../js/jquery.min.js"></script>
|
|
<script src="../../js/jszip.min.js"></script>
|
|
<script src="../../js/kendo.all.min.js"></script>
|
|
<script src="../content/shared/js/console.js"></script>
|
|
<script>
|
|
|
|
</script>
|
|
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<a class="offline-button" href="../index.html">Back</a>
|
|
|
|
<div id="example">
|
|
<div class="demo-section k-content">
|
|
<div id="validation-success"></div>
|
|
|
|
<form id="exampleform"></form>
|
|
</div>
|
|
|
|
<script>
|
|
$(document).ready(function () {
|
|
var validationSuccess = $("#validation-success");
|
|
|
|
$("#exampleform").kendoForm({
|
|
orientation: "horizontal",
|
|
formData: {
|
|
TextBox: "John Doe",
|
|
NumericTextBox: 2,
|
|
MaskedTextBox: 21313,
|
|
DatePicker: new Date(),
|
|
DateTimePicker: new Date(),
|
|
Switch: true,
|
|
RadioGroup: "Admin",
|
|
CheckBoxGroup: ["Spanish"],
|
|
ComboBox: 1,
|
|
DropDownList: 2
|
|
},
|
|
items: [
|
|
{
|
|
field: "TextBox",
|
|
label: "TextBox:",
|
|
validation: { required: true }
|
|
},
|
|
{
|
|
field: "NumericTextBox",
|
|
editor: "NumericTextBox",
|
|
label: "NumericTextBox:",
|
|
validation: { required: true }
|
|
},
|
|
{
|
|
field: "MaskedTextBox",
|
|
editor: "MaskedTextBox",
|
|
label: "MaskedTextBox:",
|
|
validation: { required: true }
|
|
},
|
|
{
|
|
field: "DatePicker",
|
|
editor: "DatePicker",
|
|
label: "DatePicker:",
|
|
validation: { required: true }
|
|
},
|
|
{
|
|
field: "DateTimePicker",
|
|
editor: "DateTimePicker",
|
|
label: "DateTimePicker:",
|
|
validation: { required: true }
|
|
},
|
|
{
|
|
field: "RadioGroup",
|
|
editor: "RadioGroup",
|
|
label: "RadioGroup:",
|
|
validation: { required: true },
|
|
editorOptions: {
|
|
items: ["Admin", "Manager", "Employee"],
|
|
layout: "horizontal",
|
|
labelPosition: "before"
|
|
}
|
|
},
|
|
{
|
|
field: "CheckBoxGroup",
|
|
editor: "CheckBoxGroup",
|
|
label: "CheckBoxGroup:",
|
|
validation: { required: false },
|
|
editorOptions: {
|
|
items: ["English", "Russian", "Spanish"],
|
|
layout: "horizontal",
|
|
labelPosition: "before"
|
|
}
|
|
},
|
|
{
|
|
field: "Switch",
|
|
editor: "Switch",
|
|
label: "Switch:",
|
|
validation: { required: true }
|
|
},
|
|
{
|
|
field: "ComboBox", editor: "ComboBox", label: "ComboBox:", validation: { required: true },
|
|
editorOptions: {
|
|
placeholder: "Select product",
|
|
dataTextField: "ProductName",
|
|
dataValueField: "ProductID",
|
|
filter: "contains",
|
|
dataSource: {
|
|
type: "odata",
|
|
serverFiltering: true,
|
|
transport: {
|
|
read: {
|
|
url: "https://demos.telerik.com/kendo-ui/service/Northwind.svc/Products",
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
field: "DropDownList", editor: "DropDownList", label: "DropDownList:", validation: { required: true },
|
|
editorOptions: {
|
|
placeholder: "Select product",
|
|
dataTextField: "ProductName",
|
|
dataValueField: "ProductID",
|
|
filter: "contains",
|
|
dataSource: {
|
|
type: "odata",
|
|
serverFiltering: true,
|
|
transport: {
|
|
read: {
|
|
url: "https://demos.telerik.com/kendo-ui/service/Northwind.svc/Products",
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
validateField: function(e) {
|
|
validationSuccess.html("");
|
|
},
|
|
submit: function (e) {
|
|
e.preventDefault();
|
|
validationSuccess.html("<div class='k-messagebox k-messagebox-success'>Form data is valid!</div>");
|
|
},
|
|
clear: function(ev) {
|
|
validationSuccess.html("");
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
<style>
|
|
.k-list-horizontal{
|
|
margin-top: 5px;
|
|
}
|
|
</style>
|
|
</div>
|
|
|
|
|
|
</body>
|
|
</html>
|