Commit e694b261 by Scott

Add $qa_content['success'] and use in email confirmation

parent 5a85c174
......@@ -87,10 +87,10 @@ $qa_content['title'] = qa_lang_html('users/confirm_title');
$qa_content['error'] = @$pageerror;
if ($useremailed) {
$qa_content['error'] = qa_lang_html('users/confirm_emailed'); // not an error, but display it prominently anyway
$qa_content['success'] = qa_lang_html('users/confirm_emailed');
} elseif ($userconfirmed) {
$qa_content['error'] = qa_lang_html('users/confirm_complete');
$qa_content['success'] = qa_lang_html('users/confirm_complete');
if (!isset($loginuserid)) {
$qa_content['suggest_next'] = strtr(
......
......@@ -729,6 +729,9 @@ class qa_html_theme_base
$this->output('</form>');
}
}
if (isset($this->content['success']))
$this->success($this->content['success']);
if (isset($this->content['error']))
$this->error($this->content['error']);
}
......@@ -787,6 +790,17 @@ class qa_html_theme_base
}
}
public function success($message)
{
if (strlen($message)) {
$this->output(
'<div class="qa-success">',
$message,
'</div>'
);
}
}
public function main_parts($content)
{
foreach ($content as $key => $part) {
......
......@@ -61,6 +61,10 @@ h2 {font-size:22px; color:#c659ab; padding-top:12px; clear:both;}
.qa-warning a {color:#990; text-decoration:underline;}
.qa-warning a:hover {color:#cc0;}
.qa-success {background: #d9fcde url(success-bg.png) repeat-x left top; border:2px solid #00cc1b; color: #00a113; font-size:18px; padding:.5em; margin:1em 0; }
.qa-success a {color: #009914; text-decoration:underline;}
.qa-success a:hover {color: #00ff22;}
/* Page sections */
.qa-header {position:relative;}
......
......@@ -61,6 +61,10 @@ h2 {font-size:16px; padding-top:12px; clear:both;}
.qa-warning a {color:#990; text-decoration:underline;}
.qa-warning a:hover {color:#cc0;}
.qa-success {background: #f0fff2; border:1px solid #00cc1b; color: #00ad17; font-size:16px; padding:.5em; margin-bottom:1em; font-weight:bold;}
.qa-success a {color: #008512; text-decoration:underline;}
.qa-success a:hover {color: #00ad17;}
/* Page sections */
.qa-header {padding:10px 20px 0 20px; border-bottom:2px solid #293d39;}
......
......@@ -921,7 +921,7 @@ div.header-banner {
background-position: 0 0;
}
.qa-error, .qa-warning {
.qa-error, .qa-warning, .qa-success {
font-size: 18px;
margin-bottom: 1em;
padding: 5px 15px;
......@@ -937,6 +937,11 @@ div.header-banner {
border: 1px solid #aa0;
color: #ffffd9;
}
.qa-success {
background: #6a3;
border: 1px solid #383;
color: #ded;
}
.qa-error a, .qa-warning a {
color: #fff;
......@@ -1371,10 +1376,12 @@ div.header-banner {
}
.qa-form-wide-ok {
color: #090;
background: #6AAA2B;
color: #fff;
font-size: 18px;
text-align: center;
padding: 6px;
border-radius: 3px;
}
.qa-form-wide-label {
......
......@@ -335,7 +335,7 @@ blockquote p {
margin: 0 10px 10px;
}
.qa-error, .qa-warning, .qa-notice {
.qa-error, .qa-warning, .qa-success, .qa-notice {
margin-bottom: 5px;
padding: 10px;
color: #fff;
......@@ -354,12 +354,16 @@ blockquote p {
position: relative;
z-index: 999;
}
.qa-warning {
background: #f1c40f;
position: relative;
z-index: 999;
}
.qa-success {
background: #27ae60;
position: relative;
z-index: 999;
}
.qa-notice {
margin-bottom: 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment