<%+header%>

<% if page.type == "add" then %> <%:Add an Application%> <% else %> <%:Edit%> <%=app.name%> <% end %>

<% if err and err.notice ~= "" then %>
<%=err.notice%>
<% end %> <% if string.match(REQUEST_URI, "/admin/") then admin = "/admin/commotion" else admin = nil end %>
autocomplete="off"<% end %> action="<%=controller%><%=admin%><%=page.action%>">
value="<%=app.name%>"<% end %>/> <%if err and err.name then%>
<%=err.name%>
<%end%>
<%:This is how your application will be displayed%>.
<%if err and err.description then%>
<%=err.description%>
<%end%>
<%:The description should include a one paragraph summary of the application and any other relevant information%>.
value="<%=app.uri%>"<% end %>/> <%if err and err.uri then%>
<%=err.uri%>
<%end%>
<%:An IP address or URL where the application can be reached%>.
<%=types_string%>
<%:Choose any relevant categories that describe your application%>.
value="<%=app.icon%>" <% else %>value="<%=media%>/commotion-faded.png"<% end %>/> <%if err and err.icon then%>
<%=err.icon%>
<%end%>
<%:This should be a URL of an image file that will be displayed next to the listing of your application%>.
<% if page.type == "edit" then %>
<%:Approved applications are shown to users, while blacklisted applications are not. All applications are approved automatically%>.
<% end %>
<%:Advanced Options%>
value="<%=app.port%>"<% end %>/> <%if err and err.port then%>
<%=err.port%>
<%end%>
<%:If no port is given, it will default to port 80%>.
value="<%=app.ttl%>"<%- else -%>value="5"<%- end -%> /> <%if err and err.ttl then%>
<%=err.ttl%>
<%end%>
<%:How many nodes away your application will be seen. Defaults to 5 hops away%>.
<% if page.allowpermanent == "1" then %>
checked<% end %>/>
<%:If checked, application will not expire%>.
<% end %>
<% if page.type == "edit" then %> <% if app.fingerprint then %><% end %> <% end %>
<%+footer%>