Commit 0e61000a by Brian Talbot

adding styling and markup for submission-based errors

parent e8ebf79b
...@@ -105,7 +105,14 @@ ...@@ -105,7 +105,14 @@
</ol> </ol>
</fieldset> </fieldset>
<div class="peer-assessment__actions"> <div class="peer-assessment__actions has--error">
<div class="message message--error message--error-server">
<h3 class="message__title">We could not submit your assessment</h3>
<div class="message__content">
<p>There was a problem communicating with the server. Please try again.</p>
</div>
</div>
<ul class="list list--actions"> <ul class="list list--actions">
<li class="list--actions__item"> <li class="list--actions__item">
<button type="submit" id="peer-assessment--001__assessment__submit" class="action action--submit is--disabled"> <button type="submit" id="peer-assessment--001__assessment__submit" class="action action--submit is--disabled">
......
...@@ -51,7 +51,14 @@ ...@@ -51,7 +51,14 @@
</form> </form>
</div> </div>
<div class="step__actions"> <div class="step__actions has--error">
<div class="message message--error message--error-server">
<h3 class="message__title">We could not submit your response</h3>
<div class="message__content">
<p>There was a problem communicating with the server. Please try again.</p>
</div>
</div>
<ul class="list list--actions"> <ul class="list list--actions">
<li class="list--actions__item"> <li class="list--actions__item">
<a aria-role="button" href="#" id="step--response__submit" class="action action--submit step--response__submit is--disabled"> <a aria-role="button" href="#" id="step--response__submit" class="action action--submit step--response__submit is--disabled">
......
...@@ -75,7 +75,13 @@ ...@@ -75,7 +75,13 @@
</ol> </ol>
</fieldset> </fieldset>
<div class="self-assessment__actions"> <div class="self-assessment__actions has--error">
<div class="message message--error message--error-server">
<h3 class="message__title">We could not submit your assessment</h3>
<div class="message__content">
<p>There was a problem communicating with the server. Please try again.</p>
</div>
</div>
<ul class="list list--actions"> <ul class="list list--actions">
<li class="list--actions__item"> <li class="list--actions__item">
<button type="submit" id="self-assessment--001__assessment__submit" class="action action--submit is--disabled"> <button type="submit" id="self-assessment--001__assessment__submit" class="action action--submit is--disabled">
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -210,6 +210,10 @@ ...@@ -210,6 +210,10 @@
// step actions // step actions
.step__actions { .step__actions {
@include transition(background-color $tmg-f1 ease-in-out 0s);
border-radius: ($baseline-v/5);
padding: ($baseline-v/2) ($baseline-h/2);
background: transparent;
text-align: center; text-align: center;
@include media($bp-ds) { @include media($bp-ds) {
...@@ -232,6 +236,58 @@ ...@@ -232,6 +236,58 @@
@extend %btn--primary; @extend %btn--primary;
@extend %action-4; @extend %action-4;
} }
// STATE: has error
&.has--error {
@include row();
background: tint($color-error, 90%);
.message {
display: block;
margin-bottom: ($baseline-v/2);
text-align: left;
@include media($bp-ds) {
@include span-columns(3 of 6);
margin-bottom: 0;
}
@include media($bp-dm) {
@include span-columns(6 of 12);
margin-bottom: 0;
}
@include media($bp-dl) {
@include span-columns(6 of 12);
margin-bottom: 0;
}
@include media($bp-dx) {
@include span-columns(6 of 12);
margin-bottom: 0;
}
}
.list--actions {
display: block;
@include media($bp-ds) {
@include span-columns(3 of 6);
}
@include media($bp-dm) {
@include span-columns(6 of 12);
}
@include media($bp-dl) {
@include span-columns(6 of 12);
}
@include media($bp-dx) {
@include span-columns(6 of 12);
}
}
}
} }
// STATE: step is loading // STATE: step is loading
...@@ -363,10 +419,25 @@ ...@@ -363,10 +419,25 @@
// -------------------- // --------------------
.message { .message {
.message__title {
@extend %hd-6;
}
// CASE: has actions .message__content {
&.has-actions { @extend %copy-4;
}
}
// TYPE: error
.message--error {
.message__title {
color: $color-error;
}
.message__content {
color: tint($color-error, 33%);
} }
} }
......
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
%copy-5 { %copy-5 {
@include font-size(13); @include font-size(13);
@include lh(12); @include lh(13);
font-family: $f-copy; font-family: $f-copy;
} }
......
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