Git Product home page Git Product logo

ember-lenddo's Introduction

Ember-lenddo

This addon allows you to add the lenddo button as a component for your ember-cli application. This addon implements a simple wrapper around the create button code script found Here:

Installation

  • git clone this repository
  • npm install
  • bower install

Add the following config to your environment.js files:

/* environment.js*/
ENV['lenddo'] = {
  partnerScriptId: '<The partnerScriptId that you get from the partners dashboard>',
};

If you are using ember-cli-content-security-policy, be sure to add the necessary domains as well, see below for an example:

ENV['contentSecurityPolicy'] = {
...
  'script-src':  "'self' 'unsafe-inline' 'unsafe-eval' authorize.partner-service.link partnerevents.lenddo.com",
  'connect-src': "'self' partnerevents.lenddo.com authorize.partner-service.link",
  'img-src':     "'self' data: authorize.partner-service.link",
  'style-src':   "'self' authorize.partner-service.link",
  };

Usage

Inside a handlebars template, simply include the lenddo-button component:

{{ lenddo-button cientId=clientId verificationFields=verificationFields }}

There are various options that you can pass:

Option Default Description
tooltip Text displayed when hovering over the button.
name blue_get_verified Type of Lenddo button to be used. Possible options are: fb_button, blue_button, blue_get_verified, blue_green_button.
fb_redirect false etermines button behavior when clicked. Set to true to proceed directly to the Facebook login page; false to redirect to the Authorize landing page. Default is false.
text Verify with Verifi.Me Caption shown in the button.
mode popup Form submission behavior. Determines whether the Authorize process opens in a popup window (default) or redirects from the same page.

Note: Refer to the Lenddo documentation for more details on how the various values work as this is beyond the scope of this document.

The verificationFields should look something like:

verificationFields: {
  firstName: null,
  middleName: null,
  lastName: null,
  birthDate: null,
  email: null,
  employer: null,
  mobileNumber: null,
  university: null,
},

refer to https://partners.lenddo.com/create_button_code for details.

Actions

You can hook onto the onClick action if you want to be notified if the Lenddo button was clicked.

{{ lenddo-button cientId=clientId verificationFields=verificationFields onClick="someActionThatNeedsToBeCalled"}}

Running Tests

  • npm test (Runs ember try:testall to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://www.ember-cli.com/.

ember-lenddo's People

Contributors

jedld avatar ember-tomster avatar

Stargazers

Howard Lince III avatar

Watchers

Howard Lince III avatar James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.