Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Allow dojos to have a facebook #1091

Merged

Conversation

Wardormeur
Copy link
Contributor

@Wardormeur Wardormeur added the pr label Feb 14, 2017
<div class="col-lg-8">
<input type="text" class="form-control" ng-model="dojo.facebook"
cd-input-prefix="https://facebook.com/"
name="dojoFacebook" id="dojoTwitter" placeholder="{@i18n key="e.g. @CoderDojo"/}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Twitter/Facebook. Also, example should be a Facebook URL, since that's what we're looking for.

lib/dojos.js Outdated
@@ -27,6 +27,9 @@ var joiValidator = {
twitter: function () {
return Joi.string().allow('');
},
facebook: function () {
return Joi.string().regex(/^https:\/\/facebook.com\//).allow('');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/^https?:\/\/facebook\.com\// lrn2regex 😛

lib/dojos.js Outdated
@@ -406,6 +410,7 @@ exports.register = function (server, options, next) {
expectedAttendees: Joi.number().allow(null),
website: joiValidator.optionalUri(),
twitter: Joi.alternatives().try(joiValidator.twitter(), Joi.string().valid(null).valid('')),
facebook: Joi.alternatives().try(joiValidator.facebook(), Joi.string().valid(null).valid('')),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've already allowed '' in the facebook validator, so probably don't need .valid('') here.

cd-input-prefix="https://facebook.com/"
name="dojoFacebook" id="dojoTwitter" placeholder="{@i18n key="e.g. @CoderDojo"/}"
cd-input-prefix="https://www.facebook.com/"
name="dojoFacebook" id="dojoFacebook" placeholder="{@i18n key="e.g. @CoderDojo"/}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still haven't fixed the placeholder

@Wardormeur Wardormeur force-pushed the bugfix/1029-add-facebook-dojos-page branch from d995be1 to ebdb314 Compare February 15, 2017 11:04
@DanielBrierton DanielBrierton merged commit 98deff2 into CoderDojo:master Feb 17, 2017
@DanielBrierton DanielBrierton removed the pr label Feb 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants