mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-02 11:58:10 -05:00
43 lines
1.5 KiB
Text
43 lines
1.5 KiB
Text
|
extends /templates/core/modal-base-flat
|
||
|
|
||
|
block modal-header-content
|
||
|
.text-center
|
||
|
h3 Contact Our Classroom Team
|
||
|
|
||
|
block modal-body-content
|
||
|
p Send us a message and our classroom success team will be in touch to help find the best solution for your students' needs!
|
||
|
form
|
||
|
- var sending = view.state.get('sendingState') === 'sending';
|
||
|
- var values = view.state.get('formValues');
|
||
|
- var errors = view.state.get('formErrors');
|
||
|
|
||
|
.form-group(class=errors.email ? 'has-error' : '')
|
||
|
label.control-label(for="email" data-i18n="general.email")
|
||
|
+formErrors(errors.email)
|
||
|
input.form-control(name="email", type="email", value=values.email || '', tabindex=1, disabled=sending)
|
||
|
|
||
|
.form-group(class=errors.message ? 'has-error' : '')
|
||
|
label.control-label(for="message" data-i18n="general.message")
|
||
|
+formErrors(errors.message)
|
||
|
textarea.form-control(name="message", tabindex=1 disabled=sending)= values.message
|
||
|
|
||
|
if view.state.get('sendingState') === 'error'
|
||
|
.alert.alert-danger Could not send message.
|
||
|
|
||
|
if view.state.get('sendingState') === 'sent'
|
||
|
.alert.alert-success Message sent!
|
||
|
|
||
|
.text-right
|
||
|
- var sent = view.state.get('sendingState') === 'sent';
|
||
|
button#submit-btn.btn.btn-navy.btn-lg(type='submit' disabled=sending || sent) Submit
|
||
|
|
||
|
block modal-footer
|
||
|
|
||
|
mixin formErrors(errors)
|
||
|
if _.isString(errors)
|
||
|
- errors = [errors]
|
||
|
if _.size(errors)
|
||
|
.help-block
|
||
|
for error in errors
|
||
|
div= error
|