Update contributor profiles
* Adds a new page for updating profiles * Refactors the add-contributor component to allow for updating existing contributors * Adds input labels to the contributor form and improves placeholders * Adds event handlers for all contract contributor changes and uses them for updating the UI refs #122
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import Component from '@ember/component';
|
||||
import { and, notEmpty } from '@ember/object/computed';
|
||||
import { inject as service } from '@ember/service';
|
||||
import { isPresent } from '@ember/utils';
|
||||
|
||||
export default Component.extend({
|
||||
|
||||
@@ -26,6 +27,12 @@ export default Component.extend({
|
||||
|
||||
init () {
|
||||
this._super(...arguments);
|
||||
this.setDefaultAttributes();
|
||||
this.reset();
|
||||
},
|
||||
|
||||
setDefaultAttributes () {
|
||||
if (isPresent(this.attributes)) { return; }
|
||||
|
||||
this.set('attributes', {
|
||||
account: null,
|
||||
@@ -37,8 +44,6 @@ export default Component.extend({
|
||||
gitea_username: null,
|
||||
wiki_username: null
|
||||
});
|
||||
|
||||
this.reset();
|
||||
},
|
||||
|
||||
reset: function() {
|
||||
|
||||
Reference in New Issue
Block a user