tagliatelle

Simple self-hosted tagging filesystem webapp
Log | Files | Refs

notes-import-export.html (1083B)


      1 {{template "_header" .}}
      2 <h1>Import and Export Notes</h1>
      3 
      4 {{if .Data.Error}}
      5 <div class="admin-alert admin-alert--error">
      6     <strong>Error:</strong> {{.Data.Error}}
      7 </div>
      8 {{end}}
      9 
     10 {{if .Data.Success}}
     11 <div class="admin-alert admin-alert--success">
     12     <strong>Success:</strong> {{.Data.Success}}
     13 </div>
     14 {{end}}
     15 
     16 <div class="import-form">
     17     <h4 style="margin-bottom: 10px">Export Notes</h4>
     18     <form action="/notes/export" method="GET">
     19         <button type="submit" class="btn btn-primary">Export</button>
     20     </form>
     21 </div>
     22 
     23 <div class="import-form">
     24     <h4 style="margin-bottom: 10px">Import Notes</h4>
     25     <form action="/notes/import" method="POST" enctype="multipart/form-data">
     26         <input type="file" name="file" accept=".txt" required>
     27         <label class="checkbox-label">
     28             <input type="checkbox" name="merge" value="true">
     29             <span>Merge with existing notes (instead of replacing)</span>
     30         </label>
     31         <button type="submit" class="btn btn-primary" style="margin-top: 10px;">Import</button>
     32     </form>
     33 </div>
     34 {{template "_footer"}}