<input type="hidden" name="id" id="id" value="{% if 'info' in data and data['info'] and 'id' in data['info'] and data['info']['id'] > 0 %}{{data['info']['id']}}{% end %}" />

<div class="form">
    <label><span>环境名称</span><input type="text" name="update_name" id="update_name" value="{% if 'info' in data and data['info'] and 'name' in data['info'] and data['info']['name'] %}{{data['info']['name']}}{% end %}" placeholder="环境名称" /></label>

    <label><span>环境排序:</span><input type="text" name="update_inorder" id="update_inorder" value="{% if 'info' in data and data['info'] and 'inorder' in data['info'] and data['info']['inorder'] %}{{data['info']['inorder']}}{% end %}" placeholder="排序，数字越小越靠前" /></label>

    <label><span>选择设备:</span></label>
<div class="flex-cont">
    <div class="scroller">
        <ul>
            {% for v in data['gateway'] %}
            <li tab-id="{{v['id']}}" id="gateway_{{v['id']}}"><a href="javascript:;">{{v['name']}}</a></li>
            {% end %}
        </ul>
    </div>
    <div class="scroller">
        {% for k,v in enumerate(data['gateway']) %}
        <ul tab-cont-id="{{v['id']}}" {% if k == 0 %}style="display: block;"{% end %}>
            {% if data['device'] and v['id'] in data['device'] %}
            {% for d in data['device'][v['id']] %}
            <li><label><input type="radio" style="width: 14px;
    height: 14px;
    vertical-align: middle;
    padding: 0;
    margin: 0 10px 0 0;"name="update_device_id" id="update_device_id" value="{{d['id']}}" data-parent="{{v['id']}}" {% if 'device_id' in data['info'] and d['id'] == data['info']['device_id'] %}checked{% end %}><span>{{d['name']}}</span></label></li>
            {% end %}
            {% end %}
        </ul>
        {% end %}
    </div>
</div>
</div>
