diff options
author | Michael Foiani <mfoiani2019@communiyschoolnaples.org> | 2018-08-02 01:21:58 -0400 |
---|---|---|
committer | Michael Foiani <mfoiani2019@communiyschoolnaples.org> | 2018-08-02 01:21:58 -0400 |
commit | 5845a05a46b177fc26350d3c2a30f728c4bf4483 (patch) | |
tree | 25ee4b6e8177293083a07a266937e6d99fd3aa11 /src/components/mao-account.js | |
parent | cefd077b56a246fab0ae65de948a3c470f469798 (diff) |
Added divison field to accounts. Will implement in the future.
Diffstat (limited to 'src/components/mao-account.js')
-rw-r--r-- | src/components/mao-account.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/components/mao-account.js b/src/components/mao-account.js index 72eb8b8..7a654fd 100644 --- a/src/components/mao-account.js +++ b/src/components/mao-account.js @@ -131,6 +131,9 @@ class MaoAccount extends connect(store)(PageViewElement) { <paper-input type="password" label="password" id="createPasswordField"> </paper-input> + + <paper-input label="division" id="createDivisionField"> + </paper-input> </div> <div class="card-actions"> @@ -169,7 +172,7 @@ class MaoAccount extends connect(store)(PageViewElement) { + "@communityschoolnaples.org"; const password = passwordElement.value; - store.dispatch(signIn(email,password)); + store.dispatch(signIn(email,password,null)); emailElement.value = ""; passwordElement.value = ""; @@ -198,6 +201,7 @@ class MaoAccount extends connect(store)(PageViewElement) { makeAccount() { var emailElement = this.shadowRoot.getElementById('createEmailField'); var passwordElement = this.shadowRoot.getElementById('createPasswordField'); + var divisionElement = this.shadowRoot.getElementById('createDivisionField'); if( emailElement.value.includes('2019') || emailElement.value.includes('2020') @@ -206,14 +210,16 @@ class MaoAccount extends connect(store)(PageViewElement) { const email = emailElement.value + "@communityschoolnaples.org"; const password = passwordElement.value; + const division = divisionElement.value; - store.dispatch(createAccount(email,password)); + store.dispatch(createAccount(email,password,division)); } else { alert('Please use a validated email.'); } emailElement.value = ""; passwordElement.value = ""; + divisionElement.value = ""; } } |