acf252f7f3
On the login page, give focus to the username box when the page loads as well as turning autocorrection and auto-capitalization off on the username box. For the developer profile page, we can add some minor validation and typing of certain form fields that allow things like iPhone and Android to customize the presented keyboard to the user, as well as allowing browsers to do some client-side validation. Signed-off-by: Dan McGee <dan@archlinux.org>
40 lines
1.3 KiB
HTML
40 lines
1.3 KiB
HTML
{% extends "base.html" %}
|
|
{% load static from staticfiles %}
|
|
|
|
{% block title %}Arch Linux - Edit Profile{% endblock %}
|
|
|
|
{% block content %}
|
|
<div id="dev-edit-profile" class="box">
|
|
|
|
<h2>Developer Profile</h2>
|
|
|
|
<form id="edit-profile-form" enctype="multipart/form-data" method="post" action="">{% csrf_token %}
|
|
<p><em>Note:</em> This is the public information shown on the developer
|
|
and/or TU profiles page, so please be appropriate with the information
|
|
you provide here.</p>
|
|
<fieldset>
|
|
<p><label>Username:</label>
|
|
<strong>{{ user.username }}</strong></p>
|
|
{{ form.as_p }}
|
|
</fieldset>
|
|
<fieldset>
|
|
{{ profile_form.as_p }}
|
|
</fieldset>
|
|
<p><label></label> <input title="Save changes" type="submit" value="Save" /></p>
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{% load cdn %}{% jquery %}
|
|
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
|
|
<script type="text/javascript">
|
|
modify_attributes({
|
|
'#id_email': {type: 'email'},
|
|
'#id_alias': {autocorrect: 'off', autocapitalize: 'off'},
|
|
'#id_public_email': {autocorrect: 'off', autocapitalize: 'off'},
|
|
'#id_website': {type: 'url'},
|
|
'#id_yob': {pattern: '[0-9]*'}
|
|
});
|
|
</script>
|
|
{% endblock %}
|