aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authornanalelfe <nargiza.nosirova@mail.utoronto.ca>2016-07-27 09:58:01 +0000
committernanalelfe <nargiza.nosirova@mail.utoronto.ca>2016-07-27 09:58:01 +0000
commite0c52738c6495490ce6c5f8fff0d9ad14a6a944f (patch)
tree61ef58698d17d2aeb4d5f457acf8d4b08e39ff01 /views
parent197e17a7bcbb5459897b7f334a790706c064c31c (diff)
Fixed so that cannot submit empty solution. Changed to textarea to type in solution.
Diffstat (limited to 'views')
-rw-r--r--views/add_solutions.hbs7
-rw-r--r--views/layouts/layout.hbs2
-rw-r--r--views/user_profile_alt.hbs24
3 files changed, 19 insertions, 14 deletions
diff --git a/views/add_solutions.hbs b/views/add_solutions.hbs
index 2865a88..fe90408 100644
--- a/views/add_solutions.hbs
+++ b/views/add_solutions.hbs
@@ -3,10 +3,15 @@
<div class="row" id="solutions-main">
<div class="col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3">
+ {{# if messages.error }}
+ <section class="alert alert-danger custom-Alert">
+ <h4>{{ messages.error }}</h4>
+ </section>
+ {{/if}}
<h3><i class="fa fa-wpforms" aria-hidden="true"></i> Add Solution </h3>
<form action="/user/submit_solution/{{examID}}/{{qID}}" method="post">
<div class="form-group">
- <input type="text" class="form-control" placeholder="Enter Solution" name="solution">
+ <textarea class="form-control" placeholder="Enter solution here..." rows="5" name="solution"></textarea>
</div>
<input type="hidden" name="_csrf" value="{{ csrfToken }}">
<button class="btn btn-primary">Submit</button>
diff --git a/views/layouts/layout.hbs b/views/layouts/layout.hbs
index aecff1d..8ffbdb5 100644
--- a/views/layouts/layout.hbs
+++ b/views/layouts/layout.hbs
@@ -45,7 +45,7 @@
{{/if}}
{{{ body }}}
- {{# if noHeader}}
+ {{# if noFooter}}
{{else}}
{{> footer }}
{{/if}}
diff --git a/views/user_profile_alt.hbs b/views/user_profile_alt.hbs
index cf657db..a193062 100644
--- a/views/user_profile_alt.hbs
+++ b/views/user_profile_alt.hbs
@@ -44,6 +44,18 @@
class="img-circle img-responsive">
</div> -->
<!-- User Details -->
+ {{# if messages.success }}
+ <section class="alert alert-success">
+ <!-- Change those to banners later -->
+ <h3>{{ messages.success }}</h3>
+ </section>
+ {{ else }}
+ {{# if messages.error }}
+ <section class="alert alert-danger">
+ <h3>{{ messages.error }}</h3>
+ </section>
+ {{/if}}
+ {{/if}}
<div>
<table class="table table-user-information">
<tbody>
@@ -157,18 +169,6 @@
</div>
-->
<div class="row" id="profile-send-message">
- {{# if messages.success }}
- <section class="alert alert-success">
- <!-- Change those to banners later -->
- <h3>{{ messages.success }}</h3>
- </section>
- {{ else }}
- {{# if messages.error }}
- <section class="alert alert-danger">
- <h3>{{ messages.error }}</h3>
- </section>
- {{/if}}
- {{/if}}
<h3>Send Message</h3>
<div class="col-xs-offset-1 col-sm-offset-3 col-xs-10 col-sm-6">