-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3441 from apinf/feature/0.55.0
Feature/0.55.0
- Loading branch information
Showing
70 changed files
with
1,240 additions
and
415 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ <h3> | |
Apinf | ||
</dt> | ||
<dd> | ||
0.54.0 | ||
0.55.0 | ||
</dd> | ||
<dt> | ||
API Umbrella | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
apinf_packages/apis/client/authorized_user/form/autoform.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* Copyright 2017 Apinf Oy | ||
This file is covered by the EUPL license. | ||
You may obtain a copy of the licence at | ||
https://joinup.ec.europa.eu/community/eupl/og_page/european-union-public-licence-eupl-v11 */ | ||
|
||
// Meteor contributed packages imports | ||
import { AutoForm } from 'meteor/aldeed:autoform'; | ||
import { TAPi18n } from 'meteor/tap:i18n'; | ||
import { sAlert } from 'meteor/juliancwirko:s-alert'; | ||
|
||
AutoForm.hooks({ | ||
authorizedUserForm: { | ||
onSuccess () { | ||
// Get success message translation | ||
const message = TAPi18n.__('authorizedUserForm_success_message'); | ||
|
||
// Alert user of success | ||
sAlert.success(message); | ||
}, | ||
onError (formType, error) { | ||
// Get error type string from error object | ||
const errorType = error.error; | ||
|
||
if (errorType === 'user-not-registered') { | ||
// Get error message translation | ||
const message = TAPi18n.__('authorizedUserForm_errorText_userNotRegistered'); | ||
|
||
// Display error | ||
sAlert.error(message, { timeout: 'none' }); | ||
} | ||
|
||
if (errorType === 'user-already-exist') { | ||
// Get error message translation | ||
const message = TAPi18n.__('authorizedUserForm_errorText_alreadyAuthorized'); | ||
|
||
// Display error | ||
sAlert.error(message, { timeout: 'none' }); | ||
} | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.