text: //---------------------------------------------------------------------
  // crm.supplier application
  //---------------------------------------------------------------------
  // Copyright (C) 2007-2016 The NOC Project
  // See LICENSE for details
  //---------------------------------------------------------------------
  console.debug("Defining NOC.crm.supplier.Application");
  
  Ext.define("NOC.crm.supplier.Application", {
      extend: "NOC.core.ModelApplication",
      requires: [
          "NOC.core.TagsField",
          "NOC.core.StateField",
          "NOC.crm.supplier.Model",
          "NOC.crm.supplierprofile.LookupField",
          "NOC.main.remotesystem.LookupField",
          "NOC.project.project.LookupField"
      ],
      model: "NOC.crm.supplier.Model",
      search: true,
      rowClassField: "row_class",
  
      initComponent: function() {
          var me = this;
          Ext.apply(me, {
              columns: [
                  {
                      text: __("Name"),
                      dataIndex: "name",
                      width: 200
                  },
                  {
                      text: __("Profile"),
                      dataIndex: "profile",
                      width: 200,
                      renderer: NOC.render.Lookup("profile")
                  },
                  {
                      text: __("State"),
                      dataIndex: "state",
                      width: 200,
                      renderer: NOC.render.Lookup("state")
                  },
                  {
                      text: __("Tags"),
                      dataIndex: "tags",
                      width: 150,
                      render: NOC.render.Tags
                  }
              ],
  
              fields: [
                  {
                      name: "name",
                      xtype: "textfield",
                      fieldLabel: __("Name"),
                      allowBlank: false,
                      uiStyle: "medium"
                  },
                  {
                      name: "profile",
                      xtype: "crm.supplierprofile.LookupField",
                      fieldLabel: __("Profile"),
                      allowBlank: false
                  },
                  {
                      name: "state",
                      xtype: "statefield",
                      fieldLabel: __("State"),
                      allowBlank: true
                  },
                  {
                      name: "description",
                      xtype: "textarea",
                      fieldLabel: __("Description"),
                      allowBlank: true,
                      uiStyle: "expand"
                  },
                  {
                      name: "project",
                      xtype: "project.project.LookupField",
                      fieldLabel: __("Project"),
                      allowBlank: true
                  },
                  {
                      xtype: "fieldset",
                      layout: "hbox",
                      title: __("Integration"),
                      defaults: {
                          padding: 4,
                          labelAlign: "right"
                      },
                      items: [
                          {
                              name: "remote_system",
                              xtype: "main.remotesystem.LookupField",
                              fieldLabel: __("Remote System"),
                              allowBlank: true
                          },
                          {
                              name: "remote_id",
                              xtype: "textfield",
                              fieldLabel: __("Remote ID"),
                              allowBlank: true,
                              uiStyle: "medium"
                          },
                          {
                              name: "bi_id",
                              xtype: "displayfield",
                              fieldLabel: __("BI ID"),
                              allowBlank: true,
                              uiStyle: "medium"
                          }
                      ]
                  },
                  {
                      name: "tags",
                      xtype: "tagsfield",
                      fieldLabel: __("Tags"),
                      allowBlank: true
                  }
              ]
          });
          me.callParent();
      }
  });
  