<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, user-scalable=no" />
    <title>CribJS Header</title>

    <!-- renderjs -->
    <script src="../lib/rsvp.js" type="text/javascript"></script>
    <script src="../lib/renderjs.js" type="text/javascript"></script>
    <script src="../lib/jszip.js" type="text/javascript"></script>
    <script src="../lib/FileSaver.js" type="text/javascript"></script>
    <script src="../lib/mimetype.js" type="text/javascript"></script>
    <script src="../lib/webtorrent.min.js" type="text/javascript"></script>
    <script src="./gadget_global.js" type="text/javascript"></script>

    <!-- Custom -->
    <script src="./gadget_cribjs_page_save_load.js" type="text/javascript"></script>

  </head>
  <body>
    <div class="nav_content save_load container">
      <form class="crib-save-to-zip form-inline">
        <h3>Download Zip</h3>
        <div class="info crib-save-to-zip-status" style="display:none; background-color: #dff0d8;"></div>
        <div class="form-group">
          <label>Path to Export:
            <input class="save-zip-path form-control"
                   name="save-zip-path"
                   type="text" size="30" value=""
                   placeholder="Leave Empty to Export everything"></label>
        </div>
        <div class="form-group">
          <label> to:
            <input name="save-zip-id" class="save-zip-id form-control" type="text" size="30" value="cribjs.zip"></label>
        </div>
        <button name="save-zip-contents" type="submit" class="btn btn-default">Export to Zip</button>
      </form>
      <form class="crib-load-from-zip form-inline">
        <h3>Import from Zip</h3>
        <div class="info crib-load-from-zip-status" style="display:none; background-color: #dff0d8;"></div>
        <div class="form-group">
          <label>Zip File:
            <input name="load-zip-file" class="load-zip-file form-control" type="file" size="30"></label>
        </div>
        <div class="form-group">
          <label> Path to import to:
            <input name="load-zip-path"
                   class="load-zip-path form-control"
                   type="text" size="30"
                   placeholder="Leave Empty to Replace Existing Content">
          </label>
        </div>
        <button name="load-zip-contents" class="load-zip-contents btn btn-default" type="submit">Import from zip</button>
      </form>
      <h3>Share as Torrent</h3>
      <div class="crib-export-to-zip-torrent-status"
           style="display:none; background-color: #dff0d8;"></div>
      <form class="crib-export-torrent form-inline">
        <div class="form-group">
          <label>Path to Export:
            <input class="torrent-save-zip-path form-control"
                   name="torrent-save-zip-path"
                   type="text" size="30" value=""
                   placeholder="Leave Empty to Export everything"></label>
          <button name="submit-crib-export-torrent" class="export-torrent btn btn-default" type="submit">Export Torrent</button>
        </div>
      </form>
      <div class="magnet-link" style="display:none;">
        <p>This Magnet will be valid as long as this page stays open</p>
        <label> Magnet:
        </label>
          <textarea name="load-zip-path" class="magnet-link form-control" readonly value="cribeditor/v1.1">Data</textarea>
      </div>
    <form class="crib-import-torrent form-inline">
      <h3>Import from Torrent</h3>
      <div class="crib-load-from-zip-torrent-status"
           style="display:none; background-color: #dff0d8;"></div>
      <div class="form-group">
        <label>Magnet:
          <input name="zip-magnet" class="zip-magnet form-control" type="text" size="50"></label>
      </div>
      <div class="form-group">
        <label> Path to import to:
          <input name="torrent-load-zip-path"
                 class="torrent-load-zip-path form-control"
                 type="text" size="30"
                 placeholder="Leave Empty to Replace Existing Content">
        </label>
      </div>
      <button name="load-zip-magnet" class="load-zip-magnet btn btn-default" type="submit">Import from Torrent</button>
    </form>
    </div>
    <div data-gadget-url="./gadget_jio.html"
         data-gadget-scope="jio_gadget"
         data-gadget-sandbox="public"></div>
  </body>
</html>