2020-09-03 20:00:37 -06:00
|
|
|
<!--
|
|
|
|
Copyright 2020 Netsyms Technologies.
|
|
|
|
This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
-->
|
|
|
|
|
|
|
|
<div class="page" data-name="addevent">
|
|
|
|
|
|
|
|
<div class="navbar">
|
|
|
|
<div class="navbar-bg"></div>
|
|
|
|
<div class="navbar-inner">
|
|
|
|
<div class="left">
|
2020-09-25 18:11:40 -06:00
|
|
|
<a href="#" class="link icon-only back">
|
2020-09-03 20:00:37 -06:00
|
|
|
<i class="icon icon-back"></i>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div class="title"><i class="{{icon}}"></i> Add Event for #{{machineid}}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="fab fab-extended fab-right-bottom color-green" id="save-fab">
|
|
|
|
<a href="#" onclick="addEvent('{{machineid}}');">
|
|
|
|
<!-- Icons For iOS Theme -->
|
|
|
|
<i class="icon f7-icons if-not-md">floppy_disk</i>
|
|
|
|
<!-- Icons For MD Theme -->
|
|
|
|
<i class="icon material-icons md-only">save</i>
|
|
|
|
<div class="fab-text">Save</div>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="page-content">
|
|
|
|
<form id="eventform" style="margin-bottom: 5rem;">
|
|
|
|
<div class="list no-hairlines no-margin-top">
|
|
|
|
<ul>
|
|
|
|
{{#each fields}}
|
|
|
|
{{#js_if "this.type == 'select'"}}
|
|
|
|
<li>
|
|
|
|
<a class="item-link smart-select smart-select-init" id="smartselect-{{name}}" data-close-on-select="true" data-searchbar="true" data-searchbar-placeholder="Search">
|
|
|
|
<select name="{{name}}" class="eventfield" tabindex="{{tabindex}}">
|
|
|
|
{{#if catoptions}}
|
|
|
|
<option value="">Choose</option>
|
|
|
|
{{#each catoptions}}
|
|
|
|
<optgroup label="{{label}}">
|
|
|
|
{{#each options}}
|
|
|
|
<option value="{{value}}" data-display-as="{{value}}">{{label}}</option>
|
|
|
|
{{/each}}
|
|
|
|
</optgroup>
|
|
|
|
{{/each}}
|
|
|
|
{{/if}}
|
|
|
|
{{#if options}}
|
|
|
|
{{#each options}}
|
|
|
|
<option value="{{value}}">{{label}}</option>
|
|
|
|
{{/each}}
|
|
|
|
{{/if}}
|
|
|
|
</select>
|
|
|
|
<div class="item-content">
|
|
|
|
<div class="item-inner">
|
|
|
|
<div class="item-title">{{label}}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{{else}}
|
|
|
|
<li class="item-content item-input">
|
|
|
|
<div class="item-inner">
|
|
|
|
<div class="item-title item-floating-label">{{label}}</div>
|
|
|
|
<div class="item-input-wrap">
|
|
|
|
{{#js_if "this.type == 'textarea'"}}
|
|
|
|
<textarea class="eventfield" rows="4" name="{{name}}" placeholder="" tabindex="{{tabindex}}">{{value}}</textarea>
|
|
|
|
{{else}}
|
|
|
|
{{#js_if "this.type == 'datetime'"}}
|
|
|
|
<input name="{{name}}" type="text" placeholder="Select date and time" readonly="readonly" tabindex="{{tabindex}}" class="eventfield datetime-textbox"/>
|
|
|
|
{{else}}
|
|
|
|
<input class="eventfield" type="{{type}}" name="{{name}}" placeholder="" value="{{value}}" tabindex="{{tabindex}}">
|
|
|
|
<span class="input-clear-button machinefield-clear-button display-none"></span>
|
|
|
|
{{/js_if}}
|
|
|
|
{{/js_if}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
{{/js_if}}
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
var machineid = "{{machineid}}";
|
|
|
|
</script>
|
|
|
|
</div>
|