Skip to content

Commit

Permalink
#1307 Prevent updating the custom field reference
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed May 5, 2020
1 parent 583b528 commit dda3af8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,11 @@
};

self.onNamechanged = function(form) {
if (!self.customField.displayName) {
if (self.customField.id || !self.customField.displayName) {
return;
}

var name = s.trim(s.slugify(self.customField.displayName));
//name = name.charAt(0).toLowerCase() + name.slice(1);

self.customField.name = name;

Expand Down
1 change: 1 addition & 0 deletions frontend/app/views/partials/admin/custom-field-dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ <h3 class="modal-title">{{$vm.customField.id ? 'Update' : 'Add'}} custom field</
ng-model="$vm.customField.name"
ng-keyup="$vm.clearUniqueNameError(fieldsForm)"
ng-pattern="$vm.config.namePattern"
ng-readonly="!!$vm.customField.id"
required>
<p class="help-block" ng-show="fieldsForm.name.$error.unique">There is already a field with this name. It should be unique.</p>
<p class="help-block" ng-show="fieldsForm.name.$error.required && fieldsForm.name.$dirty">This field is required.</p>
Expand Down

0 comments on commit dda3af8

Please sign in to comment.