mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-17 07:41:26 +00:00
Merge pull request #1904 from haiwen/form
[form] improved accessibility for form elements
This commit is contained in:
@@ -105,7 +105,7 @@
|
||||
<img src="{{MEDIA_URL}}img/lock.png" alt="" aria-hidden="true" />
|
||||
<p class="intro" id="dialogTitle">{% trans "This library is password protected" %}</p>
|
||||
<p class="error hide"></p>
|
||||
<input type="password" name="password" class="input" placeholder="{% trans "Password" %}" /><br />
|
||||
<input type="password" name="password" class="input" placeholder="{% trans "Password" %}" title="{% trans "Password" %}" aria-label="{% trans "Password" %}" /><br />
|
||||
<button type="submit" class="submit">{% trans "Submit" %}</button>
|
||||
<p class="tip">{% trans '*The password will be kept in the server for only 1 hour.' %}</p>
|
||||
</form>
|
||||
|
@@ -105,18 +105,18 @@
|
||||
<% if (cur_tab == 'libraries') { %>
|
||||
<% if (option == 'all') { %>
|
||||
<form action="{% url 'sys_repo_search' %}" method="get" class="side-search-form" id="libs-search-form">
|
||||
<input type="text" name="name" class="input" value="" placeholder="{% trans "Search libraries by name..." %}" />
|
||||
<input type="text" name="name" class="input" value="" placeholder="{% trans "Search libraries by name..." %}" title="{% trans "Search libraries by name..." %}" aria-label="{% trans "Search libraries by name..." %}" />
|
||||
</form>
|
||||
<% } %>
|
||||
<% if (option == 'trash') { %>
|
||||
<form action="{% url 'sys_trash_repo_search' %}" method="get" class="side-search-form" id="trash-libs-search-form">
|
||||
<input type="text" name="name" class="input" value="" placeholder="{% trans "Search libraries by owner..." %}" />
|
||||
<input type="text" name="name" class="input" value="" placeholder="{% trans "Search libraries by owner..." %}" title="{% trans "Search libraries by owner..." %}" aria-label="{% trans "Search libraries by owner..." %}" />
|
||||
</form>
|
||||
<% } %>
|
||||
<% } %>
|
||||
<% if (cur_tab == 'groups') { %>
|
||||
<form action="{% url 'sys_group_search' %}" method="get" class="side-search-form" id="groups-search-form">
|
||||
<input type="text" name="name" class="input" value="" placeholder="{% trans "Search groups by name..." %}" />
|
||||
<input type="text" name="name" class="input" value="" placeholder="{% trans "Search groups by name..." %}" title="{% trans "Search groups by name..." %}" aria-label="{% trans "Search groups by name..." %}" />
|
||||
</form>
|
||||
<% } %>
|
||||
</script>
|
||||
|
@@ -1064,7 +1064,7 @@
|
||||
<button id="delete-download-link">{% trans 'Delete' %}</button>
|
||||
<form id="send-download-link-form" action="" class="hide">
|
||||
<label for="email">{% trans "Send to:"%}</label><br />
|
||||
<input type="text" class="input" name="email" placeholder="{% trans "Emails, separated by ','"%}" id="email" /><br />
|
||||
<input type="text" class="input" name="email" placeholder="{% trans "Emails, separated by ','"%}" title="{% trans "Emails, separated by ','"%}" id="email" /><br />
|
||||
<label for="extra-msg">{% trans "Message (optional):"%}</label><br />
|
||||
<textarea class="textarea" name="extra_msg" id="extra-msg"></textarea><br />
|
||||
<p class="error hide"></p>
|
||||
@@ -1112,7 +1112,7 @@
|
||||
<button id="delete-upload-link">{% trans 'Delete' %}</button>
|
||||
<form id="send-upload-link-form" action="" class="hide">
|
||||
<label for="u-email">{% trans "Send to:"%}</label><br />
|
||||
<input type="text" class="input" name="email" placeholder="{% trans "Emails, separated by ','"%}" id="u-email" /><br />
|
||||
<input type="text" class="input" name="email" placeholder="{% trans "Emails, separated by ','"%}" title="{% trans "Emails, separated by ','"%}" id="u-email" /><br />
|
||||
<label for="u-extra-msg">{% trans "Message (optional):"%}</label><br />
|
||||
<textarea class="textarea" name="extra_msg" id="u-extra-msg"></textarea><br />
|
||||
<p class="error hide"></p>
|
||||
@@ -1720,11 +1720,11 @@
|
||||
</script>
|
||||
<script type="text/template" id="top-search-form-tmpl">
|
||||
<% if (search_repo_id) { %>
|
||||
<input type="text" class="search-input" name="q" placeholder="{% if search_wiki %}{% trans "Search files in this wiki" %}{% else %}{% trans "Search files in this library" %}{% endif %}" value="{{ keyword }}" /> <input type="hidden" name="search_repo" value="<%= search_repo_id %>" />
|
||||
<input type="text" class="search-input" name="q" placeholder="{% if search_wiki %}{% trans "Search files in this wiki" %}{% else %}{% trans "Search files in this library" %}{% endif %}" title="{% if search_wiki %}{% trans "Search files in this wiki" %}{% else %}{% trans "Search files in this library" %}{% endif %}" aria-label="{% if search_wiki %}{% trans "Search files in this wiki" %}{% else %}{% trans "Search files in this library" %}{% endif %}" value="{{ keyword }}" /> <input type="hidden" name="search_repo" value="<%= search_repo_id %>" />
|
||||
<% } else { %>
|
||||
<input type="text" class="search-input" name="q" placeholder="{% trans 'Search Files' %}" value="{{ keyword }}" />
|
||||
<input type="text" class="search-input" name="q" placeholder="{% trans "Search Files" %}" title="{% trans "Search Files" %}" aria-label="{% trans "Search Files" %}" value="{{ keyword }}" />
|
||||
<% } %>
|
||||
<!--span class="icon-caret-down" title="{% trans "advanced" %}"></span--><button type="submit" class="search-submit"><span class="icon-search"></span></button>
|
||||
<!--span class="icon-caret-down" title="{% trans "advanced" %}"></span--><button type="submit" class="search-submit" aria-label="{% trans "Submit" %}"><span class="icon-search"></span></button>
|
||||
</script>
|
||||
<script type="text/template" id="group-item-tmpl">
|
||||
<h4 class="group-name ellipsis"><a href="#group/<%= id %>/" title="<%- name %>" class="a normal"><%- name %></a></h4>
|
||||
@@ -2520,7 +2520,7 @@
|
||||
<form action="" method="post" class="msg-form">
|
||||
<img src="{% avatar_url request.user 64 %}" alt="" width="32" class="avatar-circle fleft" />
|
||||
<div class="msg-body">
|
||||
<textarea name="message" placeholder="{% trans "Add a comment..." %}" class="msg-input"></textarea>
|
||||
<textarea name="message" placeholder="{% trans "Add a comment..." %}" title="{% trans "Add a comment..." %}" aria-label="{% trans "Add a comment..." %}" class="msg-input"></textarea>
|
||||
<p class="error hide"></p>
|
||||
<button type="submit" class="submit msg-submit">{% trans "Submit" %}</button>
|
||||
</div>
|
||||
|
@@ -182,7 +182,7 @@
|
||||
<form action="" method="post" class="msg-form">
|
||||
<img src="{% avatar_url request.user 64 %}" alt="" width="32" class="avatar-circle fleft" />
|
||||
<div class="msg-body">
|
||||
<textarea name="message" placeholder="{% trans "Add a discussion..." %}" class="msg-input"></textarea>
|
||||
<textarea name="message" placeholder="{% trans "Add a discussion..." %}" title="{% trans "Add a discussion..." %}" aria-label="{% trans "Add a discussion..." %}" class="msg-input"></textarea>
|
||||
<button type="submit" class="submit msg-submit">{% trans "Submit" %}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
@@ -32,8 +32,8 @@ html, body, #wrapper { height:100%; }
|
||||
<div class="login-panel">
|
||||
<h1 class="login-panel-hd">{% trans "Log In" %}</h1>
|
||||
<form action="" method="post">{% csrf_token %}
|
||||
<input type="text" name="login" placeholder="{% trans "Email or Username" %}" value="" class="input name-input" /><br />
|
||||
<input type="password" name="password" placeholder="{% trans "Password" %}" value="" class="input passwd-input" autocomplete="off" />
|
||||
<input type="text" name="login" placeholder="{% trans "Email or Username" %}" aria-label="{% trans "Email or Username" %}" title="{% trans "Email or Username" %}" value="" class="input name-input" /><br />
|
||||
<input type="password" name="password" placeholder="{% trans "Password" %}" aria-label="{% trans "Password" %}" title="{% trans "Password" %}" value="" class="input passwd-input" autocomplete="off" />
|
||||
|
||||
{% if form.captcha %}
|
||||
<div class="ovhd">
|
||||
|
@@ -47,7 +47,7 @@
|
||||
|
||||
<form id="link-send-form" action="" method="post" class="hide">{% csrf_token %}
|
||||
<label for="link-send-input">{% trans "Send to:"%}</label><br />
|
||||
<input type="text" class="input" id="link-send-input" name="email" placeholder="{% trans "Emails, separated by ','"%}" /><br />
|
||||
<input type="text" class="input" id="link-send-input" name="email" placeholder="{% trans "Emails, separated by ','"%}" title="{% trans "Emails, separated by ','"%}" /><br />
|
||||
<input type="hidden" name="file_shared_link" value="{{ dir_shared_link }}" />
|
||||
<input type="hidden" name="file_shared_name" value="" />
|
||||
<input type="hidden" name="file_shared_type" value="" />
|
||||
|
@@ -1,12 +1,12 @@
|
||||
{% load i18n %}
|
||||
<form id="top-search-form" method="get" action="{% url 'search' %}" class="search-form fleft">
|
||||
{% if search_repo_id %}
|
||||
<input type="text" class="search-input" name="q" placeholder="{% if search_wiki %}{% trans "Search files in this wiki" %}{% else %}{% trans "Search files in this library" %}{% endif %}" value="{{ keyword }}" />
|
||||
<input type="text" class="search-input" name="q" placeholder="{% if search_wiki %}{% trans "Search files in this wiki" %}{% else %}{% trans "Search files in this library" %}{% endif %}" title="{% if search_wiki %}{% trans "Search files in this wiki" %}{% else %}{% trans "Search files in this library" %}{% endif %}" aria-label="{% if search_wiki %}{% trans "Search files in this wiki" %}{% else %}{% trans "Search files in this library" %}{% endif %}" value="{{ keyword }}" />
|
||||
<input type="hidden" name="search_repo" value="{{ search_repo_id }}" />
|
||||
{% else %}
|
||||
<input type="text" class="search-input" name="q" placeholder="{% trans 'Search Files' %}" value="{{ keyword }}" />
|
||||
<input type="text" class="search-input" name="q" placeholder="{% trans "Search Files" %}" title="{% trans "Search Files" %}" aria-label="{% trans "Search Files" %}" value="{{ keyword }}" />
|
||||
{% endif %}
|
||||
<!--span class="icon-caret-down" title="{% trans "advanced" %}"></span--><button type="submit" class="search-submit"><span class="icon-search"></span></button>
|
||||
<!--span class="icon-caret-down" title="{% trans "advanced" %}"></span--><button type="submit" class="search-submit" aria-label="{% trans "Submit" %}"><span class="icon-search"></span></button>
|
||||
</form>
|
||||
|
||||
<form id="advanced-search-form" method="get" action="{% url 'search' %}" class="search-form hide">
|
||||
@@ -69,7 +69,7 @@
|
||||
<span class="vam">{% trans "markdown" %}</span>
|
||||
</label>
|
||||
<br/>
|
||||
<input type="text" value="{{ input_fileexts }}" name="input_fexts" placeholder="{% trans "Input file extensions here, separate with ','" %}" class="fileext-input" />
|
||||
<input type="text" value="{{ input_fileexts }}" name="input_fexts" placeholder="{% trans "Input file extensions here, separate with ','" %}" title="{% trans "Input file extensions here, separate with ','" %}" aria-label="{% trans "Input file extensions here, separate with ','" %}" class="fileext-input" />
|
||||
<p class="error hide">{% trans "Please select at least one file type or input at least one file extension" %}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -127,7 +127,7 @@
|
||||
<form action="" method="post" class="msg-form">
|
||||
<img src="{% avatar_url request.user 64 %}" alt="" width="32" class="avatar-circle fleft" />
|
||||
<div class="msg-body">
|
||||
<textarea name="message" placeholder="{% trans "Add a comment..." %}" class="msg-input"></textarea>
|
||||
<textarea name="message" placeholder="{% trans "Add a comment..." %}" title="{% trans "Add a comment..." %}" aria-label="{% trans "Add a comment..." %}" class="msg-input"></textarea>
|
||||
<p class="error hide"></p>
|
||||
<button type="submit" class="submit msg-submit">{% trans "Submit" %}</button>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user