mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-147] Add input mask to Text Widget on Form (#1885)
* ADF-147 create directive to apply input mask * ADF-147 - created directive for calculate input mask * ADF-147 added input mask for text element
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { WidgetComponent } from './../widget.component';
|
||||
|
||||
@Component({
|
||||
@@ -23,5 +23,15 @@ import { WidgetComponent } from './../widget.component';
|
||||
templateUrl: './text.widget.html',
|
||||
styleUrls: ['./text.widget.css']
|
||||
})
|
||||
export class TextWidget extends WidgetComponent {
|
||||
export class TextWidget extends WidgetComponent implements OnInit {
|
||||
|
||||
private mask;
|
||||
private isMaskReversed;
|
||||
|
||||
ngOnInit() {
|
||||
if (this.field.params && this.field.params['inputMask']) {
|
||||
this.mask = this.field.params['inputMask'];
|
||||
this.isMaskReversed = this.field.params['inputMaskReversed'] ? this.field.params['inputMaskReversed'] : false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user