From 52937a0587becbb0dadd2e6ad2121b6e90bc30ca Mon Sep 17 00:00:00 2001 From: ankushdharkar Date: Sun, 24 Jan 2021 11:35:36 -0800 Subject: [PATCH] Github id should be changed during signup #14 --- app/components/.gitkeep | 0 app/components/form-input.hbs | 1 + app/controllers/.gitkeep | 0 app/controllers/signup.js | 33 ++++++++++++--------------------- app/templates/application.hbs | 2 +- app/templates/signup.hbs | 2 ++ package-lock.json | 6 ------ 7 files changed, 16 insertions(+), 28 deletions(-) delete mode 100644 app/components/.gitkeep delete mode 100644 app/controllers/.gitkeep diff --git a/app/components/.gitkeep b/app/components/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/app/components/form-input.hbs b/app/components/form-input.hbs index 9641b51..ffd48af 100644 --- a/app/components/form-input.hbs +++ b/app/components/form-input.hbs @@ -4,6 +4,7 @@ @id={{@id}} @type={{@type}} @value={{@value}} + @placeholder="" @class={{if @showError 'input errorBorder' 'input'}} {{on 'input' (fn this.inputFieldChanged)}} /> diff --git a/app/controllers/.gitkeep b/app/controllers/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/app/controllers/signup.js b/app/controllers/signup.js index e2cace0..89616d2 100644 --- a/app/controllers/signup.js +++ b/app/controllers/signup.js @@ -18,7 +18,6 @@ export default class SignupController extends Controller { yoe: '', company_name: '', designation: '', - github_id: '', linkedin_id: '', twitter_id: '', website: '' @@ -33,7 +32,6 @@ export default class SignupController extends Controller { yoe: false, company_name: false, designation: false, - github_id: false, linkedin_id: false, twitter_id: false, website: false @@ -58,7 +56,7 @@ export default class SignupController extends Controller { }, { id: 'username', - label: 'Choose a username', + label: 'Username for Real Dev Squad', type: 'text', errorMessage: 'Username is required', required: true, @@ -85,7 +83,7 @@ export default class SignupController extends Controller { }, { id: 'yoe', - label: 'yoe', + label: 'Years of Experience', type: 'number', errorMessage: 'Number of years of experience is required', required: true, @@ -93,7 +91,7 @@ export default class SignupController extends Controller { }, { id: 'company_name', - label: 'Company Name / College Name ', + label: 'Company Name / College Name', type: 'text', errorMessage: '', required: false, @@ -101,31 +99,23 @@ export default class SignupController extends Controller { }, { id: 'designation', - label: 'Designation ', + label: 'Designation', type: 'text', errorMessage: '', required: false, showError: false, }, - { - id: 'github_id', - label: 'Github_id ', - type: 'text', - errorMessage: 'GitHub username is required', - required: true, - showError: false, - }, { id: 'linkedin_id', - label: 'linkedin_id ', + label: 'LinkedIn ID (Not the full URL)', type: 'text', - errorMessage: 'linkedIn username is required', + errorMessage: 'LinkedIn username is required', required: true, showError: false, }, { id: 'twitter_id', - label: 'twitter_id ', + label: 'Twitter username (Not the full URL)', type: 'text', errorMessage: 'Twitter handle is required', required: true, @@ -133,7 +123,7 @@ export default class SignupController extends Controller { }, { id: 'website', - label: 'Website ', + label: 'Website (Optional)', type: 'text', errorMessage: '', required: false, @@ -211,11 +201,12 @@ export default class SignupController extends Controller { const data = await response.json(); const { statusCode } = data; if (statusCode === 204) { - return window.open('https://www.realdevsquad.com/goto', '_self'); + window.open('https://www.realdevsquad.com/goto', '_self'); + } else { + alert('Something went wrong'); } - alert('Something went wrong'); } catch (error) { - console.log('Error : ', error); + console.error('Error : ', error); } } } diff --git a/app/templates/application.hbs b/app/templates/application.hbs index 840d620..41f1649 100644 --- a/app/templates/application.hbs +++ b/app/templates/application.hbs @@ -1,4 +1,4 @@ -{{page-title "WebsiteMy"}} +{{page-title "My"}}
{{outlet}}
diff --git a/app/templates/signup.hbs b/app/templates/signup.hbs index c76ee90..ec09180 100644 --- a/app/templates/signup.hbs +++ b/app/templates/signup.hbs @@ -1,3 +1,5 @@ +{{page-title "Sign Up"}} +

{{this.title}}

{{#each this.fields as |field|}} diff --git a/package-lock.json b/package-lock.json index a57f80b..7f9f265 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3590,12 +3590,6 @@ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true }, - "abortcontroller-polyfill": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.1.tgz", - "integrity": "sha512-yml9NiDEH4M4p0G4AcPkg8AAa4mF3nfYF28VQxaokpO67j9H7gWgmsVWJ/f1Rn+PzsnDYvzJzWIQzCqDKRvWlA==", - "dev": true - }, "accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",