From 3fc42b1ea8b5ada252796e8ba43fc776b996347f Mon Sep 17 00:00:00 2001 From: Ahmad Abdolsaheb Date: Fri, 22 Mar 2019 11:02:00 +0300 Subject: [PATCH] fix: add url validation for form --- client/src/components/settings/Certification.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/client/src/components/settings/Certification.js b/client/src/components/settings/Certification.js index ac47f8ab28..4c27c41feb 100644 --- a/client/src/components/settings/Certification.js +++ b/client/src/components/settings/Certification.js @@ -232,7 +232,6 @@ class CertificationSettings extends Component { ); renderProjectsFor = (certName, isCert) => { - console.log(isCert); const { username, isHonest, createFlashMessage, verifyCert } = this.props; const { superBlock } = first(projectMap[certName]); const certLocation = `/certification/${username}/${superBlock}`; @@ -304,6 +303,14 @@ class CertificationSettings extends Component { } }); + const options = challengeTitles.reduce( + (options, current) => { + options.types[current] = 'url'; + return options; + }, + { types: {} } + ); + const fullForm = filledforms === challengeTitles.length; const createClickHandler = superBlock => e => { @@ -338,6 +345,7 @@ class CertificationSettings extends Component { initialValues={{ ...initialObject }} + options={options} submit={this.handleSubmit} /> {isCertClaimed ? (