[required]="field.isRequired()"
[entries]="field.linkedValues"
[asyncDataSource]="field.linkedValuesSource"
- [startId]="record[field.name]()"
+ [selectedId]="record[field.name]()"
(onChange)="record[field.name]($event ? $event.id : null)">
</eg-combobox>
</ng-container>
</form>
</div>
<div class="modal-footer">
+ <button type="button" class="btn btn-outline-dark"
+ *ngFor="let action of actions" [disabled]="action.disabled"
+ (click)="action.actionClick.emit(action.key)">
+ {{action.label}}
+ </button>
<ng-container *ngIf="isDialog()">
<button type="button" class="btn btn-success" *ngIf="mode == 'view'"
(click)="close()" i18n>Close</button>
import {NgbModal} from '@ng-bootstrap/ng-bootstrap';
import {ComboboxEntry} from '@eg/share/combobox/combobox.component';
import {TranslateComponent} from '@eg/share/translate/translate.component';
+import {FmRecordEditorActionComponent} from './fm-editor-action.component';
interface CustomFieldTemplate {
return this._record;
}
+ actions: FmRecordEditorActionComponent[] = [];
+
initDone: boolean;
// Comma-separated list of field names defining the order in which
import {StringModule} from '@eg/share/string/string.module';
import {TranslateModule} from '@eg/share/translate/translate.module';
import {FmRecordEditorComponent} from './fm-editor.component';
+import {FmRecordEditorActionComponent} from './fm-editor-action.component';
@NgModule({
declarations: [
- FmRecordEditorComponent
+ FmRecordEditorComponent,
+ FmRecordEditorActionComponent
],
imports: [
EgCommonModule,
CommonWidgetsModule
],
exports: [
- FmRecordEditorComponent
+ FmRecordEditorComponent,
+ FmRecordEditorActionComponent
],
providers: [
]