|
@@ -1,13 +1,13 @@
|
|
|
class App.EmailAddress extends App.Model
|
|
|
- @configure 'EmailAddress', 'realname', 'email', 'channel_id', 'note', 'active', 'updated_at'
|
|
|
+ @configure 'EmailAddress', 'name', 'email', 'channel_id', 'note', 'active', 'updated_at'
|
|
|
@extend Spine.Model.Ajax
|
|
|
@url: @apiPath + '/email_addresses'
|
|
|
|
|
|
displayName: ->
|
|
|
- if @realname
|
|
|
+ if @name
|
|
|
# Do not use App.Utils.buildEmailAddress here because we don't build an email address and the
|
|
|
# quoting would confuse sorting in the GUI.
|
|
|
- return "#{@realname} <#{@email}>"
|
|
|
+ return "#{@name} <#{@email}>"
|
|
|
@email
|
|
|
|
|
|
@filterChannel: (options, type, params) ->
|
|
@@ -29,7 +29,7 @@ class App.EmailAddress extends App.Model
|
|
|
)
|
|
|
|
|
|
@configure_attributes = [
|
|
|
- { name: 'realname', display: __('Display name'), tag: 'input', type: 'text', limit: 250, null: false },
|
|
|
+ { name: 'name', display: __('Display name'), tag: 'input', type: 'text', limit: 250, null: false },
|
|
|
{ name: 'email', display: __('Email'), tag: 'input', type: 'email', limit: 250, null: false },
|
|
|
{ name: 'channel_id', display: __('Channel'), tag: 'select', multiple: false, null: true, relation: 'Channel', nulloption: true, filter: @filterChannel, do_not_log: true },
|
|
|
{ name: 'note', display: __('Note'), tag: 'textarea', note: __('Notes are visible to agents only, never to customers.'), limit: 250, null: true },
|
|
@@ -37,5 +37,5 @@ class App.EmailAddress extends App.Model
|
|
|
{ name: 'active', display: __('Active'), tag: 'active', readonly: 1 },
|
|
|
]
|
|
|
@configure_overview = [
|
|
|
- 'realname', 'email'
|
|
|
+ 'name', 'email'
|
|
|
]
|