<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Jabber login gadget</title>

    <link rel="stylesheet" href="../<%= curl.jquerymobilecss.relative_dest %>">
    <link rel="stylesheet" href="jabberclient_connection.css">

    <script src="../<%= curl.jquery.relative_dest %>"></script>
    <script src="../<%= curl.jquerymobilejs.relative_dest %>"></script>
    <script src="../<%= copy.rsvp.relative_dest %>"></script>
    <script src="../<%= copy.renderjs.relative_dest %>"></script>
    <script src="../<%= curl.strophejs.relative_dest %>"></script>
    <script src="../<%= copy.handlebars.relative_dest %>"></script>
    <script src="../mixin_promise/mixin_promise.js" ></script>

    <script class="login-template" type="text/x-handlebars-template">
      <div class="login-box ui-corner-all ui-shadow">
        <h3>Status: Not connected</h3>
        <h5>XMPP Server:&nbsp{{server}}</h5>
        <form class="login-form" data-ajax="false">
          <div class="ui-field-contain">
            <input type="text" name="jid" placeholder="Jabber ID" value="{{jid}}" required>
          </div>
          <div class="ui-field-contain">
            <input type="password" name="passwd" placeholder="Password" required>
          </div>
          <fieldset class="ui-btn-inline">
            <input type="submit" value="Log In">
          </fieldset>
          {{#if authfail}}
          <p style="color:red;">Bad username or password</p>
          {{/if}}
        </form>
      </div>
    </script>

    <script class="logout-template" type="text/x-handlebars-template">
      <div class="logout-box ui-corner-all ui-shadow">
        <h3>Status: Authenticated</h3>
        <div class="ui-grid-a">
          <div class="ui-block-a"><h4>Server URL</h4></div>
          <div class="ui-block-b"><h5 class="server">{{server}}</h5></div>
        </div>
        <div class="ui-grid-a">
          <div class="ui-block-a"><h4>Jabber ID</h4></div>
          <div class="ui-block-b"><h5 class="jid">{{jid}}</h5></div>
        </div>
        <button class="ui-btn ui-btn-b ui-btn-inline ui-corner-all">Logout</button>
      </div>
    </script>

    <script src="jabberclient_connection.js"></script>
  </head>
  <body>
</html>
