Browse Source

fix frontend profile update

tags/v0.1.6
Jonathan Cobb 5 years ago
parent
commit
c27ddcf46b
4 changed files with 24 additions and 1 deletions
  1. +5
    -0
      bubble-server/src/main/java/bubble/resources/account/AccountsResource.java
  2. +12
    -0
      bubble-server/src/main/resources/message_templates/server/en_US/post_auth/ResourceMessages.properties
  3. +6
    -0
      bubble-server/src/main/resources/message_templates/server/en_US/pre_auth/ResourceMessages.properties
  4. +1
    -1
      bubble-web

+ 5
- 0
bubble-server/src/main/java/bubble/resources/account/AccountsResource.java View File

@@ -113,6 +113,11 @@ public class AccountsResource {
} else {
c.account.update(request);
}
// check name collision
final Account byName = accountDAO.findByName(c.account.getName());
if (byName != null && !byName.getUuid().equals(c.account.getUuid())) {
return invalid("err.name.registered");
}
return ok(accountDAO.update(c.account));
}



+ 12
- 0
bubble-server/src/main/resources/message_templates/server/en_US/post_auth/ResourceMessages.properties View File

@@ -16,6 +16,18 @@ label_menu_networks_icon=fa fa-cloud
label_menu_logout=Log out
label_menu_logout_icon=fa fa-sign-out-alt

# Profile fields
field_label_url=URL
field_label_bio=Bio
field_label_administrator=Administrator
field_label_suspended=Suspended
field_label_auto_update_policy=Auto-Update Policy
field_label_auto_update_drivers=Automatic Updates for App Drivers
field_label_auto_update_apps=Automatic Updates for Existing Apps
field_label_auto_update_app_data=Automatic Updates for App Data for Existing Apps
field_label_auto_update_new_drivers_and_apps=Automatic Updates for New Drivers and New Apps
button_label_update_profile=Update

# Networks table
loading_networks=Loading bubbles...
table_title_networks=Bubbles


+ 6
- 0
bubble-server/src/main/resources/message_templates/server/en_US/pre_auth/ResourceMessages.properties View File

@@ -2,6 +2,12 @@
# most of these are referenced on the frontend
msg.global.title=Bubble

# Truth values
message_true=True
message_false=False
message_null=null
message_undefined=undefined

err.name.required=Name is required
err.name.tooShort=Name must be at least 4 characters
err.name.tooLong=Name cannot be longer than 100 characters


+ 1
- 1
bubble-web

@@ -1 +1 @@
Subproject commit ad0d29e8937e3ac6b319cae4905bfe66e0df966a
Subproject commit a47aad65e5b5649f84ce0f3e40c165c4ae7dd243

Loading…
Cancel
Save