app/assets/javascripts/ants/admin_users.coffee in ants-0.3.3 vs app/assets/javascripts/ants/admin_users.coffee in ants-0.3.4

- old
+ new

@@ -1,7 +1,7 @@ class @AntsAdminUsers - constructor: (title='Admins', apiPath='/admin') -> + constructor: (title='Administrators', apiPath='/admin') -> config = title: title showWithParent: true arrayStore: new RailsArrayStore({ @@ -10,44 +10,54 @@ sortBy: 'name' searchable: true }) formSchema: - name: - type: 'string' - required: true - label: "Name" - placeholder: 'Full name' - onInitialize: (input) -> - if input.object - input.$el.removeClass 'input-required' - input.config.disabled = true - input._add_disabled() + details_panel: + type: 'group' + groupClass: 'group-panel' + title: 'Profile' + inputs: + name: + type: 'string' + required: true + label: "Name" + placeholder: 'Full name' + onInitialize: (input) -> + if input.object + input.$el.removeClass 'input-required' + input.config.disabled = true + input._add_disabled() - email: - type: 'string' - required: true - placeholder: 'Email' + email: + type: 'string' + required: true + placeholder: 'Email' - onInitialize: (input) -> - if input.object - input.$el.removeClass 'input-required' - input.config.disabled = true - input._add_disabled() + onInitialize: (input) -> + if input.object + input.$el.removeClass 'input-required' + input.config.disabled = true + input._add_disabled() - input.$actions =$ "<span class='input-actions'></span>" - input.$avatarBtn =$ "<a href='https://en.gravatar.com/' target='_blank'>Update avatar</a>" - input.$label.append input.$actions - input.$actions.append input.$avatarBtn + input.$actions =$ "<span class='input-actions'></span>" + input.$avatarBtn =$ "<a href='https://en.gravatar.com/' target='_blank'>Update avatar</a>" + input.$label.append input.$actions + input.$actions.append input.$avatarBtn - password: - type: 'password' - required: true - placeholder: 'Password' - onInitialize: (input) -> - if input.object - input.$el.removeClass 'input-required' - input.$label.html 'Change Password' - input.config.placeholder = 'Type new password & hit Save' - input._add_placeholder() + password_panel: + type: 'group' + groupClass: 'group-panel' + title: 'Password' + inputs: + password: + type: 'password' + required: true + placeholder: 'Password' + onInitialize: (input) -> + if input.object + input.$el.removeClass 'input-required' + input.$label.html 'Change password' + input.config.placeholder = 'Enter new password here, then hit "Save"' + input._add_placeholder() return config