Sha256: db60ca877674312a1453da2488b1527a2cfd3c620623d7a433dd0cb6f22b220a

Contents?: true

Size: 1.25 KB

Versions: 3

Compression:

Stored size: 1.25 KB

Contents

@Ants ||= {}

Ants.adminsConfig = ->
  showWithParent: true

  arrayStore: new RailsArrayStore({
    resource:    'admin'
    path:        '/admin/admins'
    sortBy:      'name'
    searchable:  true
  })

  formSchema:
    name:
      type:        'string'
      required:    true
      label:       """Name <small>— to update or add avatar, please register on
                      <a href='http://gravatar.com' target='_blank'>Gravatar</a>
                      using same email address</small>"""
      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
      onInitialize: (input) ->
        if input.object
          input.$el.removeClass 'input-required'
          input.config.disabled = true
          input._add_disabled()

    password:
      type:     'password'
      required: true
      onInitialize: (input) ->
        if input.object
          input.$el.removeClass 'input-required'
          input.$label.html 'Change Password'
          input.config.placeholder = 'Type new password here to update the current one'
          input._add_placeholder()

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ants-0.2.2 app/assets/javascripts/chr/admins.coffee
ants-0.2.1 app/assets/javascripts/chr/admins.coffee
ants-0.2.0 app/assets/javascripts/chr/admins.coffee