diff options
| author | Michael Foiani <mfoiani2019@communiyschoolnaples.org> | 2018-08-03 16:48:12 -0400 |
|---|---|---|
| committer | Michael Foiani <mfoiani2019@communiyschoolnaples.org> | 2018-08-03 16:48:12 -0400 |
| commit | 0b99dd4f1dde513cf142f308c6c29af60cb689e1 (patch) | |
| tree | 5dd94d5c06565eb19801cc6b3585b7a893df884f /src/components/mao-account.js | |
| parent | 37bad7137e3f64913705566f904938f98c4c88ef (diff) | |
Made changes to some forms and also fixed a small bug with registry element.
Diffstat (limited to 'src/components/mao-account.js')
| -rw-r--r-- | src/components/mao-account.js | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/src/components/mao-account.js b/src/components/mao-account.js index e4a206e..d6d3e59 100644 --- a/src/components/mao-account.js +++ b/src/components/mao-account.js @@ -132,8 +132,12 @@ class MaoAccount extends connect(store)(PageViewElement) { <paper-input type="password" label="password" id="createPasswordField"> </paper-input> - <paper-input label="division" id="createDivisionField"> - </paper-input> + <select id="createDivisonField"> + <option value="">--Divison--</option> + <option value="Mu">Mu</option> + <option value="Alpha">Alpha</option> + <option value="Theta">Theta</option> + </select> </div> <div class="card-actions"> @@ -201,25 +205,31 @@ 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'); + var divisonElement = this.shadowRoot.getElementById('createDivisonField'); - if( emailElement.value.includes('2019') || - emailElement.value.includes('2020') + if( emailElement.value.includes('2022') || + emailElement.value.includes('2021') || + emailElement.value.includes('2020') || + emailElement.value.includes('2019') ) { - const email = emailElement.value - + "@communityschoolnaples.org"; - const password = passwordElement.value; - const division = divisionElement.value; - - store.dispatch(createAccount(email,password,division)); + if(divisonElement.value == "") { + alert('Plase choose your divison'); + } else { + const email = emailElement.value + + "@communityschoolnaples.org"; + const password = passwordElement.value; + const divison = divisonElement.value; + + store.dispatch(createAccount(email,password,divison)); + } } else { alert('Please use a validated email.'); } emailElement.value = ""; passwordElement.value = ""; - divisionElement.value = ""; + divisonElement.value = ""; } } |
