Form clears only when check is clicked, fixed display issues

This commit is contained in:
Kenneth Jao 2016-08-12 17:35:29 -04:00
parent 32324957ca
commit 92dc520924
3 changed files with 48 additions and 34 deletions

View File

@ -20,6 +20,7 @@
font-weight: 400; font-weight: 400;
margin: 0; margin: 0;
margin-bottom: 1%; margin-bottom: 1%;
margin-right: 10%;
} }
.profHea { .profHea {
@ -301,15 +302,22 @@
padding-top: 1%; padding-top: 1%;
} }
#formContainer {
margin-left: 5% !important;
margin-right: 5% !important;
margin-bottom: 0 !important;
position: relative;
}
#create div { #create div {
margin: 2%; margin: 3% 6% 5% 6%;
margin-left: 11%;
margin-bottom: 5%;
display: inline-block; display: inline-block;
} }
.creInput { .creInput {
font-size: 120%; font-size: 120%;
width: 100%;
padding: 3%; padding: 3%;
} }

View File

@ -91,6 +91,7 @@
{{#if profClassTab "creClass"}} {{#if profClassTab "creClass"}}
<div id="creRules"><p>Insert description and rules of create a class --Will style later--</p></div> <div id="creRules"><p>Insert description and rules of create a class --Will style later--</p></div>
<form id="create"> <form id="create">
<div id="formContainer">
<div> <div>
<p class="profTitle">School:</p> <p class="profTitle">School:</p>
{{> inputAutocomplete settings=schoolcomplete class="form-control creInput" type="text" name="school" placeholder="Example: International Academy" }} {{> inputAutocomplete settings=schoolcomplete class="form-control creInput" type="text" name="school" placeholder="Example: International Academy" }}
@ -124,7 +125,8 @@
<p class="profOptionText">Other</p> <p class="profOptionText">Other</p>
</div> </div>
</div> </div>
<h3 id="creSubmit" style="margin-left:{{submitMargin}}">Submit Request</h3> </div>
<h3 id="creSubmit">Submit Request</h3>
</form> </form>
{{/if}} {{/if}}
</div> </div>

View File

@ -384,6 +384,10 @@ Template.profile.events({
'click .fa-check-circle-o' () { 'click .fa-check-circle-o' () {
sendData(Session.get("confirm")); sendData(Session.get("confirm"));
closeDivFade(document.getElementsByClassName("overlay")[0]); closeDivFade(document.getElementsByClassName("overlay")[0]);
if(Session.get("confirm") === "createClass") {
var form = document.getElementById("create");
for(var i = 0; i < form.length; i++) form[i].value = "";
}
Session.set("serverData", null); Session.set("serverData", null);
Session.set("confirm", null); Session.set("confirm", null);
}, },