uncia/uncia/frontend/templates/account.haml

62 lines
1.9 KiB
Plaintext

- extends "base.html"
- set title = 'Login'
- block content
%div{'class': 'section account token'}
%h2{'class': 'title'} Tokens
%table{'class': 'tokens'}
%tr{'class': 'header'}
%td{'class': 'col1'} Token ID
%td Timestamp
%td{'class': 'col2'} Action
-for token in tokens
-if token.token == cookie.token
-set current = 'active'
-else
-set current = ''
%tr{'class': 'token_row {{current}}'}
%td{'class': 'col1'}
-if current == 'active'
{{token.token}} ({{current}})
-else
{{token.token}}
%td
{{token.timestamp}}
%td{'class': 'col2'}
-if current != 'active'
%form{'action': 'https://{{config.host}}/account/token', 'method': 'post'}
%input{'type': 'hidden', 'name': 'token', 'value': '{{token.token}}'}
%input{'type': 'submit', 'value': 'Delete'}
-else
n/a
%div{'class': 'section account profile'}
%h2{'class': 'title'} Display Name
%form{'action': 'https://{{config.host}}/account/name', 'method': 'post'}
%input{'type': 'text', 'name': 'displayname', 'placeholder': 'displayname', 'value': '{{user.username}}'}
%br
%input{'type': 'submit', 'value': 'Submit'}
%div{'class': 'section account password'}
%h2{'class': 'title'} Password
%form{'action': 'https://{{config.host}}/account/password', 'method': 'post'}
%input{'type': 'password', 'name': 'password', 'placeholder': 'old password'}
%br
%input{'type': 'password', 'name': 'newpass1', 'placeholder': 'new password'}
%br
%input{'type': 'password', 'name': 'newpass2', 'placeholder': 'new password again'}
%br
%input{'type': 'submit', 'value': 'Submit'}
%div{'class': 'section account delete'}
%h2{'class': 'title'} Delete Account
%form{'action': 'https://{{config.host}}/account/delete', 'method': 'post'}
%input{'type': 'password', 'name': 'password', 'placeholder': 'password'}
%br
%input{'type': 'submit', 'value': 'Delete'}