mirror of
https://github.com/haiwen/seahub.git
synced 2025-10-21 19:00:12 +00:00
Improve UI
This commit is contained in:
@@ -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;
|
||||||
|
@@ -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>
|
||||||
@@ -32,7 +34,7 @@ $('#code-btn').click(function() {
|
|||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
var originalText = this.innerHTML; // Remember the original text content
|
var originalText = this.innerHTML; // Remember the original text content
|
||||||
var seconds = 60;
|
var seconds = 60;
|
||||||
|
|
||||||
$this.prop('disabled', true).addClass('btn-disabled');
|
$this.prop('disabled', true).addClass('btn-disabled');
|
||||||
$this.text(originalText + '(' + seconds + 's)');
|
$this.text(originalText + '(' + seconds + 's)');
|
||||||
// do a set interval, using an interval of 1000 milliseconds
|
// do a set interval, using an interval of 1000 milliseconds
|
||||||
@@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user