Skip to content

Commit

Permalink
Add network links to rename user view
Browse files Browse the repository at this point in the history
  • Loading branch information
zachhuff386 committed Oct 22, 2015
1 parent ac84627 commit 6adf2cd
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion www/views/modalRenameUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ define([
var email = this.$('.email input').val();
var emailReg = /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;

var networkLink;
var networkLinks = [];
var networkLinksTemp = this.$('.network-links input').val().split(',');
for (var i = 0; i < networkLinksTemp.length; i++) {
networkLink = $.trim(networkLinksTemp[i]);
if (networkLink) {
networkLinks.push(networkLink);
}
}

if (!name) {
this.setAlert('danger', 'Name can not be empty.', '.form-group.name');
return;
Expand All @@ -35,7 +45,8 @@ define([
this.model.save({
name: name,
email: email,
disabled: null
disabled: null,
network_links: networkLinks
}, {
success: function() {
this.close(true);
Expand Down

0 comments on commit 6adf2cd

Please sign in to comment.