mirror of https://github.com/Squidex/squidex.git
17 changed files with 98 additions and 44 deletions
@ -0,0 +1,13 @@ |
|||||
|
<div [formGroup]="triggerForm" class="form-horizontal"> |
||||
|
<div class="form-group"> |
||||
|
<label for="condition">Limit</label> |
||||
|
|
||||
|
<sqx-control-errors for="condition" [submitted]="triggerFormSubmitted"></sqx-control-errors> |
||||
|
|
||||
|
<input type="number" class="form-control" id="limit" formControlName="limit" /> |
||||
|
|
||||
|
<small class="form-text text-muted"> |
||||
|
The monthly api calls to trigger. |
||||
|
</small> |
||||
|
</div> |
||||
|
</div> |
||||
@ -0,0 +1,6 @@ |
|||||
|
@import '_vars'; |
||||
|
@import '_mixins'; |
||||
|
|
||||
|
textarea { |
||||
|
height: 100px; |
||||
|
} |
||||
@ -0,0 +1,30 @@ |
|||||
|
/* |
||||
|
* Squidex Headless CMS |
||||
|
* |
||||
|
* @license |
||||
|
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. |
||||
|
*/ |
||||
|
|
||||
|
import { Component, Input, OnInit } from '@angular/core'; |
||||
|
import { FormControl, FormGroup } from '@angular/forms'; |
||||
|
|
||||
|
@Component({ |
||||
|
selector: 'sqx-usage-trigger', |
||||
|
styleUrls: ['./usage-trigger.component.scss'], |
||||
|
templateUrl: './usage-trigger.component.html' |
||||
|
}) |
||||
|
export class UsageTriggerComponent implements OnInit { |
||||
|
@Input() |
||||
|
public trigger: any; |
||||
|
|
||||
|
@Input() |
||||
|
public triggerForm: FormGroup; |
||||
|
|
||||
|
@Input() |
||||
|
public triggerFormSubmitted = false; |
||||
|
|
||||
|
public ngOnInit() { |
||||
|
this.triggerForm.setControl('limit', |
||||
|
new FormControl(this.trigger.limit || 20000)); |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue