Commit 1da5af53 by Brian Talbot

Studio: revises styling/message copy for authorship rights request error

parent 3d49a461
...@@ -159,6 +159,7 @@ body.dashboard { ...@@ -159,6 +159,7 @@ body.dashboard {
} }
// specific - request button // specific - request button
// BT: should we abstract these states out for all buttons like this
.action-request { .action-request {
position: relative; position: relative;
overflow: hidden; overflow: hidden;
...@@ -173,6 +174,7 @@ body.dashboard { ...@@ -173,6 +174,7 @@ body.dashboard {
opacity: 0.0; opacity: 0.0;
} }
// state: submitting
&.is-submitting { &.is-submitting {
padding-left: ($baseline*2); padding-left: ($baseline*2);
...@@ -182,6 +184,19 @@ body.dashboard { ...@@ -182,6 +184,19 @@ body.dashboard {
opacity: 1.0; opacity: 1.0;
} }
} }
// state: has an error
&.has-error {
padding-left: ($baseline*2);
background: $red;
border-color: $red-d1;
.icon-cog {
left: ($baseline*0.75);
visibility: visible;
opacity: 1.0;
}
}
} }
} }
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
}; };
var showError = function () { var showError = function () {
$('#request-coursecreator-submit').toggleClass('has-error').find('.label').text('Sorry, there was error with your request');
$('#request-coursecreator-submit').find('.icon-cog').toggleClass('icon-spin');
}; };
$('#request-coursecreator').ajaxForm({error: showError, success: reloadPage}); $('#request-coursecreator').ajaxForm({error: showError, success: reloadPage});
...@@ -172,11 +173,6 @@ ...@@ -172,11 +173,6 @@
<h4 class="title">${_('Your Course Creator Request Status:')}</h4> <h4 class="title">${_('Your Course Creator Request Status:')}</h4>
<form id="request-coursecreator" action="${request_course_creator_url}" method="post" enctype="multipart/form-data"> <form id="request-coursecreator" action="${request_course_creator_url}" method="post" enctype="multipart/form-data">
<div id="request-coursecreator-error" name="request-coursecreator-error" class="message message-status message-status error">
<p>${_('There was a problem submitting your request')}</p>
</div>
<input type="hidden" name="csrfmiddlewaretoken" value="${csrf}"> <input type="hidden" name="csrfmiddlewaretoken" value="${csrf}">
<div class="form-actions"> <div class="form-actions">
<button type="submit" id="request-coursecreator-submit" name="request-coursecreator-submit" class="action-primary action-request"><i class="icon-cog icon-inline icon-spin"></i> <span class="label">${_('Request the Ability to Create Courses')}</span></button> <button type="submit" id="request-coursecreator-submit" name="request-coursecreator-submit" class="action-primary action-request"><i class="icon-cog icon-inline icon-spin"></i> <span class="label">${_('Request the Ability to Create Courses')}</span></button>
......
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