Since config.copy_tag_type uses a natural key, the egFmRecordEditor
dialog needs to allow the user to set it when creating a new
type.
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Josh Stompro <stomproj@larl.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
<label for="rec-{{field.name}}">{{field.label}}</label>
</div>
<div class="col-md-9">
- <span ng-if="field.datatype == 'id'">{{rec[field.name]()}}</span>
+ <span ng-if="field.datatype == 'id' && !id_is_editable">{{rec[field.name]()}}</span>
+ <input ng-if="field.datatype == 'id' && id_is_editable"
+ ng-readonly="field.readonly"
+ ng-required="field.is_required()"
+ ng-model="rec[field.name]"
+ ng-model-options="{ getterSetter : true }">
+ </input>
<input ng-if="field.datatype == 'text'"
ng-readonly="field.readonly"
ng-required="field.is_required()"
$scope.record_label = egCore.idl.classes[$scope.idlClass].label;
$scope.rec_orgs = {};
$scope.rec_org_values = {};
+ $scope.id_is_editable = false;
if ($scope.mode == 'update') {
egCore.pcrud.retrieve($scope.idlClass, $scope.recordId).then(function(r) {
$scope.fields = get_field_list();
});
} else {
+ if (!('pkey_sequence' in egCore.idl.classes[$scope.idlClass])) {
+ $scope.id_is_editable = true;
+ }
$scope.rec = new egCore.idl[$scope.idlClass]();
$scope.fields = get_field_list();
}