From ae2c2c4765bdd8d529840fb3e17fae7454ab2dde Mon Sep 17 00:00:00 2001 From: jinder1s Date: Thu, 16 Apr 2020 15:09:51 -0400 Subject: [PATCH] Course Content boilerplate blurb (and link to discussions) PROD-1475 --- .../static/support/jsx/errors_list.jsx | 4 +- .../static/support/jsx/logged_in_user.jsx | 165 +++++++++++------- .../support/jsx/single_support_form.jsx | 92 +++++++--- 3 files changed, 175 insertions(+), 86 deletions(-) diff --git a/lms/djangoapps/support/static/support/jsx/errors_list.jsx b/lms/djangoapps/support/static/support/jsx/errors_list.jsx index cf54911a21..cc91ed45e6 100644 --- a/lms/djangoapps/support/static/support/jsx/errors_list.jsx +++ b/lms/djangoapps/support/static/support/jsx/errors_list.jsx @@ -14,8 +14,8 @@ class ShowErrors extends React.Component {
{gettext('Please fix the following errors:')}
diff --git a/lms/djangoapps/support/static/support/jsx/logged_in_user.jsx b/lms/djangoapps/support/static/support/jsx/logged_in_user.jsx index aa7be4d7aa..ab88d3c943 100644 --- a/lms/djangoapps/support/static/support/jsx/logged_in_user.jsx +++ b/lms/djangoapps/support/static/support/jsx/logged_in_user.jsx @@ -2,29 +2,34 @@ import React from 'react'; import PropTypes from 'prop-types'; - +import { Button, StatusAlert } from '@edx/paragon'; import StringUtils from 'edx-ui-toolkit/js/utils/string-utils'; -import FileUpload from './file_upload'; -function LoggedInUser({ userInformation, setErrorState, zendeskApiHost, submitForm }) { +function LoggedInUser({ userInformation, onChangeCallback, submitForm, showWarning, showDiscussionButton, reDirectUser }) { let courseElement; + let detailElement; + let discussionElement = ''; if (userInformation.enrollments) { courseElement = (

- {gettext('For inquiries regarding assignments, grades, or structure of a specific course, please post in the discussion forums for that course directly.')} + {gettext('For inquiries regarding assignments, grades, or structure of a specific course, please post in the discussion forums for that course directly.')}

- {userInformation.enrollments.map(enrollment => - (), - )} + (), + )}
); } else { @@ -33,11 +38,9 @@ function LoggedInUser({ userInformation, setErrorState, zendeskApiHost, submitFo ); } - - let topicElement; - topicElement = (
- - @@ -55,10 +58,68 @@ function LoggedInUser({ userInformation, setErrorState, zendeskApiHost, submitFo
); + if (showDiscussionButton) { + discussionElement = ( +
+
+
+
+ ); + } + if (showWarning) { + detailElement = ( +
+
+
+
+ +
+
+
+ { discussionElement } +
+ ); + } else { + detailElement = ( +
+
+
+
+ +

{gettext('the more quickly and helpfully we can respond!')}

+