1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-10-22 11:43:33 +00:00

Improve UI

This commit is contained in:
Daniel Pan
2016-04-23 18:06:26 +08:00
parent c69aad81b9
commit ae00156cdb
2 changed files with 21 additions and 10 deletions

View File

@@ -869,6 +869,11 @@ textarea:-moz-placeholder {/* for FF */
font-size:14px; font-size:14px;
margin:5px 0 20px; margin:5px 0 20px;
} }
.new-narrow-panel .notice {
text-align: center;
margin-top:20px;
color:#666;
}
/**** wide panel ****/ /* e.g. repo decrypt page */ /**** wide panel ****/ /* e.g. repo decrypt page */
.wide-panel { .wide-panel {
width: 928px; width: 928px;
@@ -991,6 +996,10 @@ textarea:-moz-placeholder {/* for FF */
.op-confirm button { .op-confirm button {
margin-right:8px; margin-right:8px;
} }
/**** forms ****/
.field-feedback {
color:#666;
}
/**** simplemodal ****/ /**** simplemodal ****/
#basic-modal-content { #basic-modal-content {
display:none; display:none;

View File

@@ -2,16 +2,18 @@
{% load i18n %} {% load i18n %}
{% block main_panel %} {% block main_panel %}
<div class="wide-panel"> <div class="new-narrow-panel" role="main">
<p class="access-notice">{% trans "Please provide your email address if you want to continue." %}</p> <h2 class="hd">{% trans "Email verification" %}</h2>
<p class="notice">{% trans "Please provide your email address to continue." %}</p>
<form action="#" method="post" id="link-audit-form">{% csrf_token %} <form action="#" method="post" id="link-audit-form" class="con link-visit-verify">{% csrf_token %}
<label>{% trans "Email: "%}</label> <label for="email">{% trans "Email" %}</label>
<input type="text" name="email" value="{{email}}" /> <input id="email" type="text" class="input" name="email" value="{{email}}" />
<button id="code-btn">{% trans "Get code" %}</button><br/> <button id="code-btn">{% trans "Get code" %}</button><br/>
<p class="field-feedback"></p>
<lable>{% trans "Verify code:" %}</lable> <lable for="code">{% trans "Verification code" %}</lable>
<input type="text" name="code" value="{{code}}" /><br/> <input id="code" type="text" class="input" name="code" value="{{code}}" /><br/>
{% if err_msg %} {% if err_msg %}
<p class="error">{{ err_msg }}</p> <p class="error">{{ err_msg }}</p>
@@ -58,10 +60,10 @@ $('#code-btn').click(function() {
email: email email: email
}, },
success: function() { success: function() {
alert('successfully sent code'); $(".field-feedback").html('{% trans "Successfully sent verification code to this email." %}');
}, },
error: function(jqXHR, textStatus, errorThrown) { error: function(jqXHR, textStatus, errorThrown) {
alert($.parseJSON(jqXHR.responseText).error); $(".field-feedback").html($.parseJSON(jqXHR.responseText).error);
} }
}); });