From f68302dad9aa5df28c83f24f8c7a260e647f89fe Mon Sep 17 00:00:00 2001 From: Benoit Alessandroni <benoit@happy-dev.fr> Date: Sun, 14 Jul 2019 19:03:08 +0200 Subject: [PATCH] Adding proper calls to the proper routes --- src/includes/entrepreneur/create.pug | 28 +++++------ src/includes/mentor/create.pug | 74 ++++++++++++++++++---------- src/includes/splash.pug | 2 +- 3 files changed, 64 insertions(+), 40 deletions(-) diff --git a/src/includes/entrepreneur/create.pug b/src/includes/entrepreneur/create.pug index aa34b6f1..8f40f7ea 100644 --- a/src/includes/entrepreneur/create.pug +++ b/src/includes/entrepreneur/create.pug @@ -2,23 +2,23 @@ h2 Create an entrepreneur account sib-form( - data-src=`${endpoints.users}` - fields="username, last_name, first_name, entrepreneur_profile.organisation,\ - email, password, password_confirmation" + data-src=`${endpoints.entrepreneurs}` + fields="user.username, user.last_name, user.first_name, organisation,\ + user.email, user.password, user.password_confirmation" - range-entrepreneur_profile.organisation=`${endpoints.organisations}` + range-organisation=`${endpoints.organisations}` - label-first_name="Surname" - label-last_name="Name" - label-username="Username" - label-email="Email" - label-entrepreneur_profile.organisation="Organisation *" - label-password="Password" - label-password_confirmation="Password confirmation" + label-user.first_name="Surname" + label-user.last_name="Name" + label-user.username="Username" + label-user.email="Email" + label-organisation="Organisation *" + label-user.password="Password" + label-user.password_confirmation="Password confirmation" - class-entrepreneur_profile.organisation='form-label is-dark' - multiple-entrepreneur_profile.organisation='sib-multiple-select' - widget-entrepreneur_profile.organisation='sib-form-auto-completion' + class-organisation='form-label is-dark' + multiple-organisation='sib-multiple-select' + widget-organisation='sib-form-auto-completion' submit-button="CREATE AN ACCOUNT" ) diff --git a/src/includes/mentor/create.pug b/src/includes/mentor/create.pug index ba27033e..568c7188 100644 --- a/src/includes/mentor/create.pug +++ b/src/includes/mentor/create.pug @@ -1,9 +1,17 @@ -h2 Create a mentor account - sib-widget(name='cs-section_header') template h2 ${label} +sib-widget(name='cs-form-password') + template + label + div ${label} + input( + type='password' + value="${value}" + name="${name}" + ) + sib-widget(name='cs-section_introduction') template div @@ -11,14 +19,18 @@ sib-widget(name='cs-section_introduction') p Informations will appear on your profile to inform entrepreneurs about your skills and activities. We will also use those information to address specific resources for validation. sib-form( - data-src=`${endpoints.users}` - fields="account_information(header_account, username, last_name, first_name, mentor_profile.organisation,\ - email, mentor_profile.phone, mentor_profile.language,\ - password, password_confirmation, account.picture),\ - about_you(header_about_you, mentor_profile.headline, mentor_profile.city, mentor_profile.country,\ - mentor_profile.biography, mentor_profile.skills),\ - social_media(header_social_media, mentor_profile.linkedin, mentor_profile.twitter)" + data-src=`${endpoints.mentors}` + fields="account_information(header_account, user.username, user.last_name, user.first_name, organisation,\ + user.email, phone, language,\ + user.password, user.password_confirmation, account.picture),\ + about_you(header_about_you, headline, city, country,\ + biography, skills),\ + social_media(header_social_media, linkedin, twitter)" + + range-organisation=`${endpoints.organisations}` + range-language=`${endpoints.languages}` + label-header_account="Create a mentor account" label-header_about_you="About you" label-header_social_media="Social medias" @@ -27,24 +39,36 @@ sib-form( widget-header_account="cs-section_header" widget-header_about_you="cs-section_introduction" - label-first_name="Surname" - label-last_name="Name" - label-email="Email" - label-mentor_profile.organisation="Organisation" - label-mentor_profile.phone="Phone number" - label-password="Password" - label-password_confirmation="Password confirmation" - label-mentor_profile.language="Language" + label-user.username="Username" + label-user.first_name="Surname" + label-user.last_name="Name" + label-user.email="Email" + label-organisation="Organisation" + label-phone="Phone number" + label-user.password="Password" + label-user.password_confirmation="Password confirmation" + label-language="Language" label-account.picture="Photo" - label-mentor_profile.headline="Headline or current position" - label-mentor_profile.city="City" - label-mentor_profile.country="Country" - label-mentor_profile.biography="Tell us more about your activities" - label-mentor_profile.skills="What skills can you share with our entrepreneurs ?" - label-mentor_profile.linkedin="Linkedin" - label-mentor_profile.twitter="Twitter" + label-headline="Headline or current position" + label-city="City" + label-country="Country" + label-biography="Tell us more about your activities" + label-skills="What skills can you share with our entrepreneurs ?" + label-linkedin="Linkedin" + label-twitter="Twitter" + + widget-skills="sib-form-textarea" + widget-biography="sib-form-textarea" + widget-user.password_confirmation="cs-form-password" + widget-user.password="cs-form-password" + + class-organisation='form-label is-dark' + multiple-organisation='sib-multiple-select' + widget-organisation='sib-form-auto-completion' + class-language='form-label is-dark' + multiple-language='sib-multiple-select' + widget-language='sib-form-auto-completion' submit-button="CREATE AN ACCOUNT" - widget-username="sib-form-hidden" ) diff --git a/src/includes/splash.pug b/src/includes/splash.pug index caa93d28..8c90634d 100644 --- a/src/includes/splash.pug +++ b/src/includes/splash.pug @@ -2,7 +2,7 @@ sib-router sib-route(name='mentor-login') sib-route(name='entrepreneur-login') -h2 Welcome to our international index of resources for cooperative mentors and entrepreneurs +h2 Welcome to your international index of resources for cooperative mentors and entrepreneurs sib-link(next='mentor-login') div I am a mentor -- GitLab