<%include file="/pageheader.html"/>

<%!
from kaithem.src import devices
%>

<title>Create Device</title>
<h1>Create Device</h1>
<div class="window paper">
    <form method="post" action="/devices/createDevice">
        %if module:
        <h2>Store in Module(Empty to store in main device list)</h2>
        <Label>Target Module:<input name="module"  value="${module or ''|h}"></Label>
        <Label>Target Resource Name:<input name="resource" value="${resource or ''|h}"></Label>
        %else:
        <p class="Highlight">You may want to consider creating the device in a module instead,
            as modules offer many extra features.
        </p>
        %endif

        <h2>Basic Info</h2>
        %if not module:
            <Label>Name:<input name="name" value="${name|h}"></Label>
        %else:
        <Label>Name:<input name="name" value="${resource|h}" disabled></Label>
        %endif
            <Label>Type:<input name="type" disabled value="${type|h}"></Label>
            <input name="type" type="hidden" value="${type|h}"></Label>


        <input type="submit">
    </form>
</div>
<%include file="/pagefooter.html"/>

