${_('Authentication Access Tokens')}

%if c.user_auth_tokens: %for auth_token in c.user_auth_tokens: %endfor %else: %endif
${c.user.api_key}
${_('Built-in')} all ${_('expires')}: ${_('never')} ${h.secure_form(url('edit_user_auth_tokens', user_id=c.user.user_id),method='delete')} ${h.hidden('del_auth_token',c.user.api_key)} ${h.hidden('del_auth_token_builtin',1)} ${h.end_form()}
${auth_token.api_key}
${auth_token.description} ${auth_token.role_humanized} %if auth_token.expires == -1: ${_('expires')}: ${_('never')} %else: %if auth_token.expired: ${_('expired')}: ${h.age_component(h.time_to_utcdatetime(auth_token.expires))} %else: ${_('expires')}: ${h.age_component(h.time_to_utcdatetime(auth_token.expires))} %endif %endif ${h.secure_form(url('edit_user_auth_tokens', user_id=c.user.user_id),method='delete')} ${h.hidden('del_auth_token',auth_token.api_key)} ${h.end_form()}
${_('No additional auth tokens specified')}
${h.secure_form(url('edit_user_auth_tokens', user_id=c.user.user_id), method='put')}
${h.text('description', class_='medium', placeholder=_('Description'))} ${h.select('lifetime', '', c.lifetime_options)} ${h.select('role', '', c.role_options)}
${h.submit('save',_('Add'),class_="btn btn-small")} ${h.reset('reset',_('Reset'),class_="btn btn-small")}
${h.end_form()}