From 07db2613d759ff34dfa99ef8fcd368253885d3bd Mon Sep 17 00:00:00 2001 From: tasawernawaz Date: Tue, 19 Sep 2017 19:29:52 +0500 Subject: [PATCH] add single support form for contact us, html and css only LEARNER-2580 --- lms/djangoapps/support/urls.py | 3 + lms/djangoapps/support/views/contact_us.py | 16 ++ lms/static/sass/partials/base/_variables.scss | 3 +- lms/static/sass/views/_support.scss | 105 ++++++++++++ lms/templates/support/contact_us.html | 157 ++++++++++++++++++ 5 files changed, 282 insertions(+), 2 deletions(-) create mode 100644 lms/djangoapps/support/views/contact_us.py create mode 100644 lms/templates/support/contact_us.html diff --git a/lms/djangoapps/support/urls.py b/lms/djangoapps/support/urls.py index 50ebe6021c..95ba01040c 100644 --- a/lms/djangoapps/support/urls.py +++ b/lms/djangoapps/support/urls.py @@ -5,12 +5,15 @@ from django.conf.urls import patterns, url from support import views +from lms.djangoapps.support.views.contact_us import ContactUsView + urlpatterns = patterns( '', url(r'^$', views.index, name="index"), url(r'^certificates/?$', views.CertificatesSupportView.as_view(), name="certificates"), url(r'^refund/?$', views.RefundSupportView.as_view(), name="refund"), url(r'^enrollment/?$', views.EnrollmentSupportView.as_view(), name="enrollment"), + url(r'^contact_us/?$', ContactUsView.as_view(), name="contact_us"), url( r'^enrollment/(?P[\w.@+-]+)?$', views.EnrollmentSupportListView.as_view(), diff --git a/lms/djangoapps/support/views/contact_us.py b/lms/djangoapps/support/views/contact_us.py new file mode 100644 index 0000000000..7e2c4fb533 --- /dev/null +++ b/lms/djangoapps/support/views/contact_us.py @@ -0,0 +1,16 @@ +""" +Signle support contact view +""" +from django.views.generic import View + +from edxmako.shortcuts import render_to_response + + +#TODO https://openedx.atlassian.net/browse/LEARNER-2296 +class ContactUsView(View): + """ + View for viewing and submitting contact us form. + """ + + def get(self, request): + return render_to_response("support/contact_us.html") diff --git a/lms/static/sass/partials/base/_variables.scss b/lms/static/sass/partials/base/_variables.scss index ecff6d7c64..ba72516e19 100644 --- a/lms/static/sass/partials/base/_variables.scss +++ b/lms/static/sass/partials/base/_variables.scss @@ -375,8 +375,7 @@ $font-semibold: 600 !default; $font-bold: 700 !default; $m-base-font-size: em(15) !default; - - +$support-form-base-font-size: 16px; // ---------------------------- // #DEPTH // ---------------------------- diff --git a/lms/static/sass/views/_support.scss b/lms/static/sass/views/_support.scss index 64744c70b5..3041fbe7fd 100644 --- a/lms/static/sass/views/_support.scss +++ b/lms/static/sass/views/_support.scss @@ -132,3 +132,108 @@ text-shadow: none; } } + +.contact-us-wrapper { + min-width: auto; + + .form-group { + font-family: inherit; + } + + h2 { + font-size: $support-form-base-font-size + 8; + font-weight: bold; + } + + p { + font-size:$support-form-base-font-size + 4; + font-weight:$font-regular; + } + + label { + font-family: inherit; + font-size: $support-form-base-font-size + 2; + font-style: normal; + font-weight: $font-regular; + } + + .help-button { + margin-bottom: $baseline; + width: $baseline * 8; + height: $baseline * 2; + font-weight: $font-regular; + font-size: $support-form-base-font-size + 2; + border:1px solid $blue; + border-radius:3px; + color:$blue; + + &:hover, + &:focus + { + color: $blue; + background-color: $mediumGrey !important; + } + } + + .label-course { + margin-bottom: $baseline - 5; + } + + .message-desc { + color:$dark-gray1; + font-size: $support-form-base-font-size - 2; + margin-bottom:$baseline - 16; + } + + .select-course { + font-size: $support-form-base-font-size; + height: $baseline * 2; + margin-bottom: $baseline; + } + + .progress { + padding: 0; + margin-top: $baseline - 10; + + .progress-bar { + background-color: $blue; + width: 25%; + } + } + + .btn-primary { + background-color: $blue; + width: 100%; + height: $baseline * 2; + font-size: $support-form-base-font-size + 2; + + &:hover, + &:focus + { + background-image: none; + background-color: $m-blue-d6; + border-color: $m-blue-d6; + } + } + + .file-loading, .file-name { + font-size: $support-form-base-font-size + 2; + } + + .file-action { + @include float(right); + font-size: $support-form-base-font-size + 2; + margin-bottom: $baseline - 10; + } + + .btn-signin { + width: $baseline * 8; + margin-bottom: ($baseline * 2) + 10; + } + + @media only screen and (min-width: 768px) { + .row { + max-width: $baseline * 25; + } + } +} diff --git a/lms/templates/support/contact_us.html b/lms/templates/support/contact_us.html new file mode 100644 index 0000000000..6e267c8de8 --- /dev/null +++ b/lms/templates/support/contact_us.html @@ -0,0 +1,157 @@ +<%page expression_filter="h"/> + +<%! +from django.utils.translation import ugettext as _ +from django.utils.html import escape +%> + +<%inherit file="../main.html"/> + +<%block name="title"> + + Contact US + + + +<%block name="head_extra"> + + + +<%block name="body"> + +
+ +
+
+

${_("Contact Us")}

+
+
+ +
+
+

${_("Your question may have already been answered.")}

+
+
+ + + + + % if not user.is_authenticated(): +
+
+

${_("Sign in for a faster response")}

+
+
+ + +
+
+ +
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + +
+
+
+ + % else: + + + +
+
+

${_("What can we help you with, iananderson21?")}

+
+
+
+ +
+
+
+ + +
+
+
+ + % endif + +
+
+
+ +

${_("The more you tell us, themore quickly and helpfully we can respond!")}

+ +
+
+
+ +
+
+
+ + +
+
+
+ +
+
+

${_("1 file uploaded:")}

+
+
+ +
+
+ my_image1.png + ${_("Remove file")} +
+
+ +
+
+ my_image2.png + ${_("Cancel upload")} + +
+
+
+ +
+
+ +
+
+ +
+
+ +
+