mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Fix name file
This commit is contained in:
@@ -12,6 +12,6 @@
|
||||
</label>
|
||||
</p>
|
||||
</div>
|
||||
<alfresco-login (executeOutcome)="validateForm($event)" [providers]="providers"
|
||||
<alfresco-login (executeSubmit)="validateForm($event)" [providers]="providers"
|
||||
(onSuccess)="onLogin($event)"
|
||||
(onError)="onError($event)" #alfrescologin></alfresco-login>
|
||||
|
@@ -180,7 +180,7 @@ Alternatively you can bind to your component properties and provide values dynam
|
||||
#### Controlling form submit execution behaviour
|
||||
|
||||
If absolutely needed it is possible taking full control over form
|
||||
submit execution by means of `executeOutcome` event.
|
||||
submit execution by means of `executeSubmit` event.
|
||||
This event is fired on form submit.
|
||||
|
||||
You can prevent default behaviour by calling `event.preventDefault()`.
|
||||
@@ -190,7 +190,8 @@ Alternatively you may want just running additional code without suppressing defa
|
||||
|
||||
**MyCustomLogin.component.html**
|
||||
```html
|
||||
<alfresco-login (executeOutcome)="validateForm($event)" #alfrescologin></alfresco-login>
|
||||
<alfresco-login (executeSubmit)="validateForm($event)"
|
||||
#alfrescologin></alfresco-login>
|
||||
```
|
||||
|
||||
**MyCustomLogin.component.ts**
|
||||
|
@@ -23,7 +23,7 @@ import {
|
||||
AlfrescoAuthenticationService,
|
||||
AlfrescoSettingsService
|
||||
} from 'ng2-alfresco-core';
|
||||
import { FormOutcomeEvent } from '../models/form-outcome-event.model';
|
||||
import { FormSubmitEvent } from '../models/form-submit-event.model';
|
||||
|
||||
declare let componentHandler: any;
|
||||
declare let __moduleName: string;
|
||||
@@ -59,7 +59,7 @@ export class AlfrescoLoginComponent implements OnInit {
|
||||
onError = new EventEmitter();
|
||||
|
||||
@Output()
|
||||
executeOutcome: EventEmitter<FormOutcomeEvent> = new EventEmitter<FormOutcomeEvent>();
|
||||
executeSubmit: EventEmitter<FormSubmitEvent> = new EventEmitter<FormSubmitEvent>();
|
||||
|
||||
form: ControlGroup;
|
||||
error: boolean = false;
|
||||
@@ -109,8 +109,8 @@ export class AlfrescoLoginComponent implements OnInit {
|
||||
|
||||
this.disableError();
|
||||
|
||||
let args = new FormOutcomeEvent(this.form);
|
||||
this.executeOutcome.emit(args);
|
||||
let args = new FormSubmitEvent(this.form);
|
||||
this.executeSubmit.emit(args);
|
||||
|
||||
if (args.defaultPrevented) {
|
||||
return false;
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export class FormOutcomeEvent {
|
||||
export class FormSubmitEvent {
|
||||
|
||||
private _values: any;
|
||||
private _defaultPrevented: boolean = false;
|
Reference in New Issue
Block a user