~sircmpwn/meta.sr.ht

ref: 72548bd7545f78670878667674cc7645835a17bd meta.sr.ht/metasrht/templates/profile.html -rw-r--r-- 2.3 KiB
72548bd7Drew DeVault API: Updates per core-go auth changes 1 year, 1 month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{% extends "meta.html" %}
{% block title %}
<title>Profile - {{cfg("sr.ht", "site-name")}} meta</title>
{% endblock %}
{% block content %}
<div class="row">
  <div class="col-lg-12">
    <h3>User Profile</h3>
  </div>
</div>
<div class="row">
  <div class="col-lg-6">
    <form method="POST" action="/profile">
      {{csrf_token()}}
      <div class="form-group">
        <label for="username">
          Username <span class="text-muted">(you can't edit this)</span>
        </label>
        <input
          type="text"
          class="form-control"
          id="username"
          value="{{current_user.username}}"
          readonly />
      </div>
      <div class="form-group">
        <label for="email">Email address <span class="text-danger">*</span></label>
        <input
          type="email"
          class="form-control {{valid.cls("email")}}"
          id="email"
          name="email"
          value="{{email or current_user.email}}" />
        {% if new_email %}
        <div class="alert alert-info">
            An email has been sent to {{current_user.new_email}} to
            confirm this change.
        </div>
        {% endif %}
        {{valid.summary("email")}}
      </div>
      <div class="form-group">
        <label for="url">URL</label>
        <input
          type="text"
          class="form-control {{valid.cls("url")}}"
          id="url"
          name="url"
          value="{{url or current_user.url or ""}}" />
        {{valid.summary("url")}}
      </div>
      <div class="form-group">
        <label for="location">Location</label>
        <input
          type="text"
          class="form-control {{valid.cls("location")}}"
          id="location"
          name="location"
          value="{{location or current_user.location or ""}}" />
        {{valid.summary("location")}}
      </div>
      <div class="form-group">
        <label for="bio">Bio</label>
        <textarea
          class="form-control {{valid.cls("bio")}}"
          placeholder="Markdown supported"
          id="bio"
          name="bio"
          rows="5">{{bio or current_user.bio or ""}}</textarea>
        {{valid.summary("bio")}}
      </div>
      <button type="submit" class="btn btn-primary pull-right">
        Save {{icon("caret-right")}}
      </button>
    </form>
  </div>
</div>
{% endblock %}