/*
 Copyright 2009-2015 Luc Saffre
 License: BSD (see file COPYING for details)
*/

// lino.js --- generated Fri Dec 22 14:57:01 2017 by Lino Amici 17.10.0 for Anonymous.
Ext.BLANK_IMAGE_URL = '/static/ext-3.3.1/resources/images/default/s.gif';
LANGUAGE_CHOICES = [ [ "en", "English" ], [ "fr", "French" ] ];
MEDIA_URL = "/media/";

// hack to add a toCamel function, inspired by
// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/
String.prototype.toCamel = function(){
  //~ return this.replace(/(\-[a-z])/g, function($1){return $1.toUpperCase().replace('-','');});
  //~ return this;
  return this.replace(/([A-Z])([A-Z]+)/g, function(match,p1,p2,offset,string){
      //~ console.log("20131005 got ",arguments);
      return p1 + p2.toLowerCase();});
};


// 20151126 hack to modify Ext.EventObjectImpl.isSpecialKey() which
// returned false for Ctrl-S when called from a keyup handler (namely
// ComboBox.onLoad)

Ext.EventObjectImpl.prototype.isSpecialKey = function(){
    // same as original except for one line
    var k = this.normalizeKey(this.keyCode);
    // return (this.type == 'keypress' && this.ctrlKey) ||
    return (this.ctrlKey) ||
        this.isNavKeyPress() ||
        (k == this.BACKSPACE) || 
        (k >= 16 && k <= 20) || 
        (k >= 44 && k <= 46);   
};





/* MonthPickerPlugin: thanks to keypoint @ sencha forum
   http://www.sencha.com/forum/showthread.php?74002-3.x-Ext.ux.MonthMenu&p=356860#post356860
*/
Ext.namespace('Ext.ux'); 

Ext.ux.MonthPickerPlugin = function() { 
    var picker; 
    var oldDateDefaults; 

    this.init = function(pk) { 
        picker = pk; 
        picker.onTriggerClick = picker.onTriggerClick.createSequence(onClick); 
        picker.getValue = picker.getValue.createInterceptor(setDefaultMonthDay).createSequence(restoreDefaultMonthDay); 
        picker.beforeBlur = picker.beforeBlur.createInterceptor(setDefaultMonthDay).createSequence(restoreDefaultMonthDay); 
    }; 

    function setDefaultMonthDay() { 
        oldDateDefaults = Date.defaults.d; 
        Date.defaults.d = 1; 
        return true; 
    } 

    function restoreDefaultMonthDay(ret) { 
        Date.defaults.d = oldDateDefaults; 
        return ret; 
    } 

    function onClick(e, el, opt) { 
        var p = picker.menu.picker; 
        p.activeDate = p.activeDate.getFirstDateOfMonth(); 
        if (p.value) { 
            p.value = p.value.getFirstDateOfMonth(); 
        } 

        p.showMonthPicker(); 
         
        if (!p.disabled) { 
            p.monthPicker.stopFx(); 
            p.monthPicker.show(); 

            p.mun(p.monthPicker, 'click', p.onMonthClick, p); 
            p.mun(p.monthPicker, 'dblclick', p.onMonthDblClick, p); 
            p.onMonthClick = p.onMonthClick.createSequence(pickerClick); 
            p.onMonthDblClick = p.onMonthDblClick.createSequence(pickerDblclick); 
            p.mon(p.monthPicker, 'click', p.onMonthClick, p); 
            p.mon(p.monthPicker, 'dblclick', p.onMonthDblClick, p); 
        } 
    } 

    function pickerClick(e, t) { 
        var el = new Ext.Element(t); 
        if (el.is('button.x-date-mp-cancel')) { 
            picker.menu.hide(); 
        } else if(el.is('button.x-date-mp-ok')) { 
            var p = picker.menu.picker; 
            p.setValue(p.activeDate); 
            p.fireEvent('select', p, p.value); 
        } 
    } 

    function pickerDblclick(e, t) { 
        var el = new Ext.Element(t); 
        if (el.parent() 
            && (el.parent().is('td.x-date-mp-month') 
            || el.parent().is('td.x-date-mp-year'))) { 

            var p = picker.menu.picker; 
            p.setValue(p.activeDate); 
            p.fireEvent('select', p, p.value); 
        } 
    } 
}; 

Ext.preg('monthPickerPlugin', Ext.ux.MonthPickerPlugin);  


/**
JC Watsons solution (adapted to ExtJS 3.3.1 by LS) is elegant and simple:
`A "fix" for unchecked checkbox submission  behaviour
<http://www.sencha.com/forum/showthread.php?28449>`_

Added special handling for checkbox inputs. 
ExtJS defines disabled checkboxes `readonly`, not `disabled` as for other inputs.

*/
Ext.lib.Ajax.serializeForm = function(form) {
    // console.log('20170731 linolib.js serializeForm', form);
    var fElements = form.elements || (document.forms[form] || Ext.getDom(form)).elements, 
        hasSubmit = false, 
        encoder = encodeURIComponent, 
        name, 
        data = '', 
        type, 
        hasValue;

    Ext.each(fElements, function(element){
        name = element.name;
        type = element.type;

        if (!element.disabled && name && !(type == 'checkbox' && element.readonly)) {
            if (/select-(one|multiple)/i.test(type)) {
                Ext.each(element.options, function(opt){
                    if (opt.selected) {
                        hasValue = opt.hasAttribute ? opt.hasAttribute('value') : opt.getAttributeNode('value').specified;
                        data += String.format("{0}={1}&", encoder(name), encoder(hasValue ? opt.value : opt.text));
                    }
                });
            } else if (!(/file|undefined|reset|button/i.test(type))) {
                //~ if (!(/radio|checkbox/i.test(type) && !element.checked) && !(type == 'submit' && hasSubmit)) {
                if (!(type == 'submit' && hasSubmit)) {
                    if (type == 'checkbox') {
                        //~ console.log('20111001',element,'data += ',encoder(name) + '=' + (element.checked ? 'on' : 'off') + '&');
                        data += encoder(name) + '=' + (element.checked ? 'on' : 'off') + '&';
                    } else {
                        //~ console.log('20111001',element,'data += ',encoder(name) + '=' + encoder(element.value) + '&');
                        data += encoder(name) + '=' + encoder(element.value) + '&';
                    }
                    hasSubmit = /submit/i.test(type);
                }
            }
        //~ } else {
            //~ console.log(name,type,element.readonly);
        }
    });
    return data.substr(0, data.length - 1);
};



/*
Set a long timeout of fifteen minutes. 
See /blog/2012/0307
*/
Ext.Ajax.timeout = 15 * 60 * 1000; 

/*
 * Thanks to 
 * `huuze <http://stackoverflow.com/users/10040/huuuze>`_ for the question
 * and to 
 * `chrisv <http://stackoverflow.com/users/683808/chrisv>`_
 * for the answer on
 * http://stackoverflow.com/questions/3764589/how-do-i-include-django-1-2s-csrf-token-in-a-javascript-generated-html-form/5485616#5485616
 * 
 * */
 
Ext.Ajax.on('beforerequest', function (conn, options) {
   if (!(/^http:.*/.test(options.url) || /^https:.*/.test(options.url))) {
     if (typeof(options.headers) == "undefined") {
       options.headers = {'X-CSRFToken': Ext.util.Cookies.get('csrftoken')};
     } else {
       options.headers.extend({'X-CSRFToken': Ext.util.Cookies.get('csrftoken')});
     }                        
   }
}, this);


/* This probably worked, but was not used in real world.
My fix for the "Cannot set QuickTips dismissDelay to 0" bug,
see http://www.sencha.com/forum/showthread.php?183515 

*/
// Ext.override(Ext.QuickTip,{
//   showAt : function(xy){
//         var t = this.activeTarget;
//         // console.log("20171024 QuickTip.showAt",this.title,this.dismissDelay,t.dismissDelay);
//         if(t){
//             if(!this.rendered){
//                 this.render(Ext.getBody());
//                 this.activeTarget = t;
//             }
//             if(t.width){
//                 this.setWidth(t.width);
//                 this.body.setWidth(this.adjustBodyWidth(t.width - this.getFrameWidth()));
//                 this.measureWidth = false;
//             } else{
//                 this.measureWidth = true;
//             }
//             this.setTitle(t.title || '');
//             this.body.update(t.text);
//             this.autoHide = t.autoHide;
//             // bugfix by Luc 20120226
//             if (t.dismissDelay != undefined) this.dismissDelay = t.dismissDelay;
//             //~ this.dismissDelay = t.dismissDelay || this.dismissDelay;
//             if(this.lastCls){
//                 this.el.removeClass(this.lastCls);
//                 delete this.lastCls;
//             }
//             if(t.cls){
//                 this.el.addClass(t.cls);
//                 this.lastCls = t.cls;
//             }
//             if(this.anchor){
//                 this.constrainPosition = false;
//             }else if(t.align){ 
//                 xy = this.el.getAlignToXY(t.el, t.align);
//                 this.constrainPosition = false;
//             }else{
//                 this.constrainPosition = true;
//             }
//         }
//         Ext.QuickTip.superclass.showAt.call(this, xy);
//     }
// });

/*
Another hack. See /docs/blog/2012/0228
*/
Ext.Element.addMethods(
    function() {
        var VISIBILITY      = "visibility",
            DISPLAY         = "display",
            HIDDEN          = "hidden",
            NONE            = "none",
            XMASKED         = "x-masked",
            XMASKEDRELATIVE = "x-masked-relative",
            data            = Ext.Element.data;

        return {
            
            mask : function(msg, msgCls) {
                var me  = this,
                    dom = me.dom,
                    dh  = Ext.DomHelper,
                    EXTELMASKMSG = "ext-el-mask-msg",
                    el,
                    mask;
                // removed the following lines. See /docs/blog/2012/0228
                //~ if (!(/^body/i.test(dom.tagName) && me.getStyle('position') == 'static')) {
                    //~ console.log(20120228,dom.tagName,me);
                    //~ me.addClass(XMASKEDRELATIVE); 
                //~ }
                if (el = data(dom, 'maskMsg')) {
                    el.remove();
                }
                if (el = data(dom, 'mask')) {
                    el.remove();
                }

                mask = dh.append(dom, {cls : "ext-el-mask"}, true);
                data(dom, 'mask', mask);

                me.addClass(XMASKED);
                mask.setDisplayed(true);
                
                if (typeof msg == 'string') {
                    var mm = dh.append(dom, {cls : EXTELMASKMSG, cn:{tag:'div'}}, true);
                    data(dom, 'maskMsg', mm);
                    mm.dom.className = msgCls ? EXTELMASKMSG + " " + msgCls : EXTELMASKMSG;
                    mm.dom.firstChild.innerHTML = msg;
                    mm.setDisplayed(true);
                    mm.center(me);
                }
                
                
                if (Ext.isIE && !(Ext.isIE7 && Ext.isStrict) && me.getStyle('height') == 'auto') {
                    mask.setSize(undefined, me.getHeight());
                }
                
                return mask;
            }

            
        };
    }()
);



Ext.namespace('Lino');
    
    

//~ Lino.subst_user_field = new Ext.form.ComboBox({});
//~ Lino.subst_user = null;
Lino.insert_subst_user = function(p){
    //~ console.log('20120714 insert_subst_user',Lino.subst_user,p);
    //~ if (Lino.subst_user_field.getValue()) {
    if (p.su) return;
    if (Lino.subst_user) {
        //~ p.su = Lino.subst_user_field.getValue();
        p.su = Lino.subst_user;
    //~ } else {
        //~ delete p.su;
    }
    //~ console.log('20120714 insert_subst_user -->',Lino.subst_user,p);
}

// Lino.login_window = null;



Lino.set_subst_user = function(id, name) {
    //~ console.log(20130723,'Lino.set_subst_user',id,name,Lino.current_window,Lino.viewport);
    Lino.subst_user = id;
    if (Lino.current_window) 
        Lino.current_window.main_item.set_base_param("su",id);
    if (Lino.viewport) 
        Lino.permalink_handler(Lino.current_window)();
}



//~ Lino.select_subst_user = function(cmp,rec,value){
    //~ Lino.subst_user=value;
    //~ console.log(20120713,rec);
//~ }
    
Lino.current_window = null;
Lino.window_history = Array();
    
Lino.chars2width = function(cols) {  return cols * 9; }
Lino.rows2height = function(cols) {  return cols * 20; }
Lino.perc2width = function(perc) {  
    // var w = Math.max(document.documentElement.clientWidth, window.innerWidth);
    // console.log("20151226", document, window, w);
    var w = Lino.viewport.getWidth();
    return w * perc / 100; 
}



Lino.MainPanel = {
  is_home_page: false
  ,auto_apply_params: true
  ,setting_param_values : false
  ,config_containing_window : function(wincfg) { }
  ,init_containing_window : function(win) { }
  ,is_loading : function() { 
      if (!this.rendered) return true;
      //~ return (Ext.select('.x-loading-msg').elements.length > 0);
      return true; 
    } 
  ,do_when_clean : function(auto_save,todo) { todo() }
  ,get_master_params : function() {
    var p = {}
    p['mt'] = this.content_type; 
    rec = this.get_current_record()
    if (rec) {
      if (rec.phantom) {
          p['mk'] = undefined; 
      }else{
          p['mk'] = rec.id; 
      }
    } else {
      p['mk'] = undefined;
    }
    //~ console.log('get_master_params returns',p,'using record',rec);
    return p;
  }
  ,get_permalink : function() {
    var p = Ext.apply({}, this.get_base_params());
    delete p.fmt;
    Ext.apply(p, this.get_permalink_params());
    
    if (this.toggle_params_panel_btn) {
        p.sp = this.toggle_params_panel_btn.pressed;
        //~ if (this.toggle_params_panel_btn.pressed == this.params_panel_hidden) {
          //~ p.sp = true;
        //~ }
    }
    
    //~ Lino.insert_subst_user(p);
     //~ p.fmt = 'html';
    //~ console.log('get_permalink',p,this.get_permalink_params());
    if (this.is_home_page)
        //~ var url = '';
        var url = '/';
    else 
        var url = this.get_permalink_url();
    if (p.su == null) 
        delete p.su;
    if (Ext.urlEncode(p)) url = url + "?" + Ext.urlEncode(p);
    return url;
  }
  ,get_record_url : function(record_id) {
      var url = '/api' + this.ls_url
      //~ var url = this.containing_window.config.url_data; // ls_url;
      url += '/' + (record_id === undefined ? this.default_record_id : String(record_id));
      //~ if (record_id !== undefined) url += '/' + String(record_id);
      //~ url += '/' + String(record_id);
      return url;
  }
  ,get_permalink_url : function() {
      return '/api' + this.ls_url;
  }
  ,get_permalink_params : function() {
      //~ return {an:'grid'};
      var p = {};
      if (this.action_name)
          p.an = this.action_name;
      this.add_param_values(p,false)
      return p;
  }
  /*

  Lino.MainPanel.set_status() : the status can have the following keys:

  - param_values : values of parameter fields
  - field_values : values of action parameter fields
  - base_params
  - record_id
  - active_tab
  - data_record
  - show_params_panel
  - current_page

   */
  ,set_status : function(status, requesting_panel) {}
  ,get_status : function() { return {}}
  ,refresh : function() {}
  ,get_base_params : function() {  // Lino.MainPanel
    var p = {};
    Lino.insert_subst_user(p);
    return p;
  }
  ,add_params_panel : function (tbar) {
      if (this.params_panel) {
        //~  20130923b
        //~ this.params_panel.autoHeight = true; // 20130924
        var t = this;
        var update = function() {
            var p = t.params_panel;
            //~ console.log("update", p.getSize().height,p.forceLayout,p.autoHeight);
            var w = t.get_containing_window();
            Lino.do_when_visible(w, function() {
                //~ p.doLayout(true); // doLayout(shallow, force)
                w.doLayout(true); // doLayout(shallow, force)
                //~ t.params_panel.on('afterlayout',update,t,{single:true});
            });
        };
        Lino.do_when_visible(this.params_panel, update);
        this.params_panel.on('show',update);
        this.params_panel.on('hide',update);
        //~ this.params_panel.on('bodyresize',update);
        this.params_panel.on('afterlayout',update);
        //~ this.params_panel.on('afterlayout',update,this,{single:true});
        //~ this.params_panel.on('bodyresize',update,this,{single:true});
        //~ this.params_panel.on('resize',update,this,{single:true});
        //~ this.params_panel.on('render',update,this,{single:true});
        
        // this.params_panel.on('render',
        //~ this.params_panel.on('afterlayout',update,this,{single:true,delay:200});
        //~ this.params_panel.on('bodyresize',update,this,{single:true,delay:200});
        this.toggle_params_panel_btn = new Ext.Button({ scope:this, 
          //~ text: "$_("[parameters]")", // gear
          iconCls: 'x-tbar-database_gear',
          tooltip:"Show or hide the table parameters panel",
          enableToggle: true,
          //~ pressed: ! this.params_panel.hidden,
          pressed: ! this.params_panel_hidden,
          toggleHandler: function(btn,state) { 
            //~ console.log("20120210 add_params_panel",state,this.params_panel);
            if (state) {
                this.params_panel.show();
            } else {
                this.params_panel.hide();
            }
            //~ this.params_panel.on('afterlayout',update,this,{single:true});
            //~ t.get_containing_window().doLayout();
            //~ this.params_panel.on('afterlayout',function() {
                //~ console.log("20130918 afterlayout");
                //~ t.get_containing_window().doLayout(); // doLayout(shallow, force)
            //~ },this,{single:true});
          }
        }); 
        tbar = tbar.concat([this.toggle_params_panel_btn]);

        if (this.auto_apply_params) {
            var refresh = function() {
                if (!t.setting_param_values) {
                    t._force_dirty = true; 
                    t.refresh();
                }
            }
            Ext.each(this.params_panel.fields,function(f) {
              //~ f.on('valid',function() {t.refresh()});
              if (f instanceof Ext.form.Checkbox) {
                  f.on('check',refresh);
              } else if (f instanceof Ext.DatePicker) {
                  f.on('select',refresh);
              } else if (f instanceof Ext.form.TriggerField) {
                  f.on('select',refresh);
                  //~ f.on('change',refresh);
                  //~ f.on('valid',refresh);
              } else {
                  if (! f.on) 
                      console.log("20121010 no method 'on'",f);
                  else
                      f.on('change',refresh);
                }
              });
        }
      }
      return tbar;
  }
  ,add_param_values : function (p,force_dirty) {
    if (this.params_panel) {
      /* 
      * 20120918 add param_values to the request string 
      * *only if the params_form is dirty*.
      * Otherwise Actor.default_params() would never be used.
      *
      * 20121023 But IntegClients.params_default has non-empty default values. 
      * Users must have the possibility to make them empty.
      * 
      * 20130605 : added `force_dirty` parameter because Checkbox fields don't 
      * mark their form as dirty when check is fired.
      * 
      * 20130721 : `force_dirty` not as a parameter but as 
      * `this._force_dirty` because
      * 
      * 20130915 : both _force_dirty and force_dirty parameter are needed.
      * 
      */
      if (force_dirty || this._force_dirty || this.params_panel.form.isDirty()) {
      //~ if (this._force_dirty || this.params_panel.form.isDirty()) {
        p.pv = this.get_param_values();
        //~ console.log("20130923 form is dirty (",force_dirty,this._force_dirty,this.params_panel.form.isDirty(),")");
        //~ console.log("20130923 form is dirty",p);
      }else{
        //~ console.log("20130923 form not dirty:",this.params_panel.form);
        if (this.status_param_values) 
          p.pv = Lino.fields2array(
            this.params_panel.fields,this.status_param_values);
      }
      //~ if (!this.params_panel.form.isDirty()) return;
      //~ p.pv = this.get_param_values();
      //~ console.log("20120203 add_param_values added pv",p.pv,"to",p);
    }
  },
  get_param_values : function() { // similar to get_field_values()
      return Lino.fields2array(this.params_panel.fields);
  },
  set_param_values : function(pv) {
    if (this.params_panel) {
      //~ console.log('20120203 MainPanel.set_param_values', pv);
      this.status_param_values = pv;
      //~ this.params_panel.form.suspendEvents(false);
      this.setting_param_values = true;
      if (pv) { 
          this.params_panel.form.my_loadRecord(pv);
      } else { 
        this.params_panel.form.reset(); 
      }
      this.setting_param_values = false;
      this._force_dirty = false; 
      //~ this.params_panel.form.resumeEvents();
    }
  }
};




Lino.Viewport = Ext.extend(Ext.Viewport, Lino.MainPanel);
Lino.Viewport = Ext.extend(Lino.Viewport, {
  layout : "fit"
  ,is_home_page : true
  ,initComponent : function(){
    Lino.Viewport.superclass.initComponent.call(this);
    this.on('render',function(){
      this.loadMask = new Ext.LoadMask(this.el,{msg:"Please wait..."});
      //~ console.log("20121118 Lino.viewport.loadMask",this.loadMask);
    },this);
  }
  ,refresh : function() {
      var caller = this;
      // console.log("20140829 Lino.Viewport.refresh()");
      if (caller.loadMask) caller.loadMask.show();
      var success = function(response) {
        if (caller.loadMask) caller.loadMask.hide();
        if (response.responseText) {
          var result = Ext.decode(response.responseText);
          //~ console.log('Lino.do_action()',action.name,'result is',result);
          if (result.html) {
              var cmp = Ext.getCmp('dashboard');
              // cmp.removeAll(true);  // 20140829
              cmp.update(result.html, true);
          }
          if (result.message) {
              if (result.alert) {
                  //~ Ext.MessageBox.alert('Alert',result.alert_msg);
                  Ext.MessageBox.alert('Alert',result.message);
              } else {
                  Lino.notify(result.message);
              }
          }
          
          if (result.notify_msg) Lino.notify(result.notify_msg);
          if (result.js_code) { 
            var jsr = result.js_code(caller);
            //~ console.log('Lino.do_action()',action,'returned from js_code in',result);
          };
        }
      };
      var action = {
        url : '/api/main_html',
        waitMsg: "Please wait...",
        failure: Lino.ajax_error_handler(caller),
        success: success,
        method: 'GET',
        params: {}
      };
      Lino.insert_subst_user(action.params);
      Ext.Ajax.request(action);
    
  }
});




Lino.open_window = function(win, st, requesting_panel) {
  // console.log("20140831 Lino.open_window()", win, win.el.getBox());
  var cw = Lino.current_window;
  if (cw) {
    // console.log("20140829 Lino.open_window() save current status",
    //             cw.main_item.get_status());
    Lino.window_history.push({
      window:cw,
      status:cw.main_item.get_status()
    });
  }
  Lino.current_window = win;
  //~ if (st.su) 
      //~ Lino.subst_user_field.setValue(st.su);
  win.main_item.set_status(st, requesting_panel);
  // win.toFront();
  win.show();
};

Lino.load_url = function(url) {
    //~ foo.bar.baz = 2; 
    //~ console.log("20121120 Lino.load_url()");
    //~ Lino.body_loadMask.show();
    Lino.viewport.loadMask.show();
    //~ location.replace(url);
    document.location = url;
}

Lino.close_window = function(status_update, norestore) {
  // norestore is used when called by handle_action_result() who 
  // will call set_status itself later
  var cw = Lino.current_window;
  var ww = Lino.window_history.pop();
  var retval = cw.main_item.requesting_panel;
  // console.log(
  //     "20150514 Lino.close_window() going to close", cw.title,
  //     "previous is", ww, 
  //     "norestore is", norestore,
  //     "retval is", retval);
  if (ww) {
    //~ if (status_update) Ext.apply(ww.status,status_update);
    if(!norestore) {
        if (status_update) status_update(ww);
        ww.window.main_item.set_status(ww.status , cw.id);
    }
    Lino.current_window = ww.window;
  } else {
      Lino.current_window = null;
      // new since 20140829:
      if(!norestore) { Lino.viewport.refresh(); }
  }
  if (cw) cw.hide_really();
  return retval;
};

Lino.kill_current_window = function() {
  // console.log("20140418 Lino.kill_current_window()");
  var cw = Lino.current_window;
  Lino.current_window = null;
  if (cw) cw.hide_really();
};

Lino.reload = function() {
    // First close all windows to ensure all changes are saved
    Lino.close_all_windows();

    // Then reload current view
    var url =  "/"

    var p = {};
    Lino.insert_subst_user(p)
    if (Ext.urlEncode(p))
        url = url + "?" + Ext.urlEncode(p);

    Lino.load_url(url);
}

Lino.handle_home_button = function() {
  if (Lino.window_history.length == 0)
      Lino.reload();
  else
      Lino.close_all_windows();
}

Lino.close_all_windows = function() {
    while (Lino.window_history.length > 0) {
        Lino.close_window();
    }
}

Lino.calling_window = function() {
    if (Lino.window_history.length) 
        return Lino.window_history[Lino.window_history.length-1];
}

//~ Lino.WindowAction = function(mainItemClass,windowConfig,mainConfig,ppf) {
Lino.WindowAction = function(windowConfig,main_item_fn) {
    //~ if(!mainConfig) mainConfig = {};
    //~ mainConfig.is_main_window = true;
    this.windowConfig = windowConfig;
    this.main_item_fn = main_item_fn;
    //~ if (ppf) mainConfig.params_panel.fields = ppf;
    //~ this.mainConfig = mainConfig;
    //~ this.mainItemClass = mainItemClass;
};

Lino.WindowAction = Ext.extend(Lino.WindowAction,{
    window : null,
    //~ mainItemClass: null,
    get_window : function() {
      //~ if(mainConfig) Ext.apply(this.mainConfig,mainConfig);
      // if (this.window == null || this.window.isDestroyed)  { // 20140829
      // if (this.window == null || this.window.getBox().width == 0)  { // 20140829
      if (this.window == null)  {
      // if (true)  {
          //~ this.windowConfig.main_item = new this.mainItemClass(this.mainConfig);
          this.windowConfig.main_item = this.main_item_fn();
          this.window = new Lino.Window(this.windowConfig);
      }
      return this.window;
    },
    run : function(requesting_panel, status) {
      // console.log('20140829 window_action.run()', this)
      Lino.open_window(this.get_window(), status, requesting_panel);
    }
  
});


Lino.PanelMixin = {
  get_containing_window : function (){
      if (this.containing_window) return this.containing_window;
      return this.containing_panel.get_containing_window();
  }
  ,set_window_title : function(title) {
    //~ this.setTitle(title);
    var cw = this.get_containing_window();

    //~ if (cw) {
    //~ if (cw && cw.closable) {
    if (cw && !cw.main_item.hide_window_title) {
      //~ console.log('20111202 set_window_title(',title,') for',this.containing_window);
      //~ if (! this.containing_window.rendered) console.log("WARNING: not rendered!");
      cw.setTitle(title);
    //~ } else {
      //~ document.title = title;
    }
    //~ else console.log('20111202 not set_window_title(',title,') for',this);
  }
  
};


// Lino.status_bar = new Ext.ux.StatusBar({defaultText:'Lino version 17.10.1.'});






/* 
  Originally copied from Ext JS Library 3.3.1
  Modifications by Luc Saffre : 
  - rendering of phantom records
  - fire afteredit event
  - react on dblclcik, not on single click

 */
Lino.CheckColumn = Ext.extend(Ext.grid.Column, {

    processEvent : function(name, e, grid, rowIndex, colIndex){
        //~ console.log('20110713 Lino.CheckColumn.processEvent',name)
        if (name == 'click') {
        //~ if (name == 'mousedown') {
        //~ if (name == 'dblclick') {
            return this.toggleValue(grid, rowIndex, colIndex);
        } else {
            return Ext.grid.ActionColumn.superclass.processEvent.apply(this, arguments);
        }
    },
    
    toggleValue : function (grid,rowIndex,colIndex) {
        var record = grid.store.getAt(rowIndex);
        var dataIndex = grid.colModel.getDataIndex(colIndex);
        // 20120514
        //~ if(record.data.disabled_fields && record.data.disabled_fields[dataIndex]) {
          //~ Lino.notify("This field is disabled");
          //~ return false;
        //~ }
      
        //~ if (dataIndex in record.data['disabled_fields']) {
            //~ Lino.notify("This field is disabled.");
            //~ return false;
        //~ }
        var startValue = record.data[dataIndex];
        var value = !startValue;
        //~ record.set(this.dataIndex, value);
        var e = {
            grid: grid,
            record: record,
            field: dataIndex,
            originalValue: startValue,
            value: value,
            row: rowIndex,
            column: colIndex,
            cancel: false
        };
        if(grid.fireEvent("beforeedit", e) !== false && !e.cancel){
        //~ if(grid.fireEvent("validateedit", e) !== false && !e.cancel){
            record.set(dataIndex, value);
            delete e.cancel;
            grid.fireEvent("afteredit", e);
        }
        return false; // Cancel event propagation
    },

    renderer : function(v, p, record){
        if (record.phantom) return '';
        p.css += ' x-grid3-check-col-td'; 
        return String.format('<div class="x-grid3-check-col{0}">&#160;</div>', v ? '-on' : '');
    }

    // Deprecate use as a plugin. Remove in 4.0
    // init: Ext.emptyFn
});

// register ptype. Deprecate. Remove in 4.0
// Ext.preg('checkcolumn', Lino.CheckColumn);

// backwards compat. Remove in 4.0
// Ext.grid.CheckColumn = Lino.CheckColumn;

// register Column xtype
Ext.grid.Column.types.checkcolumn = Lino.CheckColumn;


/* 20110725 : 
Lino.on_tab_activate is necessary 
in contacts.Person.2.dtl 
(but don't ask me why...)
*/
Lino.on_tab_activate = function(item) {
  //~ console.log('activate',item); 
  if (item.rendered && item.doLayout) item.doLayout();
  //~ if (item.rendered) item.doLayout();
}

Lino.TimeField = Ext.extend(Ext.form.TimeField,{
  format: 'H:i',
  altFormats: 'g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H|gi a|hi a|giA|hiA|gi A|hi A|Hi|g.ia|g.iA|g.i a|g.i A|h.i|g.i|H.i',
  increment: 15
  });
Lino.DateField = Ext.extend(Ext.form.DateField,{
  //~ boxMinWidth: Lino.chars2width(15), // 20131005 changed from 11 to 15
  format: 'd.m.Y',
  altFormats: 'd/m/Y|Y-m-d'
  });
Lino.DatePickerField = Ext.extend(Ext.DatePicker,{
  //~ boxMinWidth: Lino.chars2width(11),
  format: 'd.m.Y',
  //~ altFormats: 'd/m/Y|Y-m-d'
  formatDate : function(date){
      //~ console.log("20121203 formatDate",this.name,date);
      return Ext.isDate(date) ? date.dateFormat(this.format) : date;
  }
  });
Lino.DateTimeField = Ext.extend(Ext.ux.form.DateTime,{
  dateFormat: 'd.m.Y',
  timeFormat: 'H:i'
  //~ ,hiddenFormat: 'd.m.Y H:i'
  });
Lino.URLField = Ext.extend(Ext.form.TriggerField,{
  triggerClass : 'x-form-search-trigger',
  //~ triggerClass : 'x-form-world-trigger',
  vtype: 'url',
  onTriggerClick : function() {
    //~ console.log('Lino.URLField.onTriggerClick',this.value)
    //~ document.location = this.value;
    window.open(this.getValue(),'_blank');
  }
});
Lino.IncompleteDateField = Ext.extend(Ext.form.TextField,{
  //~ regex: /^-?\d+-[01]\d-[0123]\d$/,
  //~ regex: /^[0123]\d\.[01]\d\.-?\d+$/,
  maxLength: 10,
  boxMinWidth: Lino.chars2width(10),
  regex: /^[0123]?\d\.[01]?\d\.-?\d+$/,
  regexText: 'Enter a date in format YYYY-MM-DD (use zeroes for unknown parts).'
  });


//~ Lino.make_dropzone = function(cmp) {
    //~ cmp.on('render', function(ct, position){
      //~ ct.el.on({
        //~ dragenter:function(event){
          //~ event.browserEvent.dataTransfer.dropEffect = 'move';
          //~ return true;
        //~ }
        //~ ,dragover:function(event){
          //~ event.browserEvent.dataTransfer.dropEffect = 'move';
          //~ event.stopEvent();
          //~ return true;
        //~ }
        //~ ,drop:{
          //~ scope:this
          //~ ,fn:function(event){
            //~ event.stopEvent();
            //~ console.log(20110516);
            //~ var files = event.browserEvent.dataTransfer.files;
            //~ if(files === undefined){
              //~ return true;
            //~ }
            //~ var len = files.length;
            //~ while(--len >= 0){
              //~ console.log(files[len]);
              //~ // this.processDragAndDropFileUpload(files[len]);
            //~ }
          //~ }
        //~ }
      //~ });
    //~ });
//~ };

//~ Lino.FileUploadField = Ext.ux.form.FileUploadField;

Lino.FileUploadField = Ext.extend(Ext.ux.form.FileUploadField,{
    unused_onRender : function(ct, position){
      Lino.FileUploadField.superclass.onRender.call(this, ct, position);
      this.el.on({
        dragenter:function(event){
          event.browserEvent.dataTransfer.dropEffect = 'move';
          return true;
        }
        ,dragover:function(event){
          event.browserEvent.dataTransfer.dropEffect = 'move';
          event.stopEvent();
          return true;
        }
        ,drop:{
          scope:this
          ,fn:function(event){
            event.stopEvent();
            //~ console.log(20110516);
            var files = event.browserEvent.dataTransfer.files;
            if(files === undefined){
              return true;
            }
            var len = files.length;
            while(--len >= 0){
              console.log(files[len]);
              //~ this.processDragAndDropFileUpload(files[len]);
            }
          }
        }
      });
    }
});

Lino.FileField = Ext.extend(Ext.form.TriggerField,{
  triggerClass : 'x-form-search-trigger',
  editable: false,
  onTriggerClick : function() {
    //~ console.log('Lino.URLField.onTriggerClick',this.value)
    //~ document.location = this.value;
    if (this.getValue()) window.open(MEDIA_URL + '/'+this.getValue(),'_blank');
  }
});

Lino.file_field_handler = function(panel,config) {
  if (panel.action_name == 'insert') {
      panel.has_file_upload = true;


      // config.value = '<br/><br/>';

      var f = new Lino.FileUploadField(config);
      //~ Lino.make_dropzone(f);
      return f;
      //~ return new Ext.ux.form.FileUploadField(config);
      //~ return new Lino.FileField(config);
      
  } else {
      //~ return new Lino.URLField(config);
      return new Lino.FileField(config);
  }
}

Lino.VBorderPanel = Ext.extend(Ext.Panel,{
    constructor : function(config) {
      config.layout = 'border';
      delete config.layoutConfig;
      Lino.VBorderPanel.superclass.constructor.call(this,config);
      for(var i=0; i < this.items.length;i++) {
        var item = this.items.get(i);
        if (this.isVertical(item) && item.collapsible) {
          item.on('collapse',this.onBodyResize,this);
          item.on('expand',this.onBodyResize,this);
        }
      }
    },
    isVertical : function(item) {
       return (item.region == 'north' || item.region == 'south' || item.region == 'center');
    },
    onBodyResize: function(w, h){
        //~ console.log('VBorderPanel.onBodyResize',this.title)
      if (this.isVisible()) { // to avoid "Uncaught TypeError: Cannot call method 'getHeight' of undefined."
        var sumflex = 0;
        var availableHeight = this.getInnerHeight();
        var me = this;
        this.items.each(function(item){
          if (me.isVertical(item)) {
              if (item.collapsed || item.flex == 0 || item.flex === undefined) {
                  if (item.rendered) availableHeight -= item.getHeight();
              } else {
                  sumflex += item.flex;
              }
          } 
          
        });
        //~ for(var i=0; i < this.items.length;i++) {
          //~ var item = this.items.get(i);
          //~ // if (this.isVertical(item) && item.getResizeEl()) {
          //~ if (this.isVertical(item)) {
              //~ if (item.collapsed || item.flex == 0 || item.flex === undefined) {
                  //~ // item.syncSize()
                  //~ // item.doLayout()
                  //~ // if (item.region == "north") console.log('region north',item.getHeight(),item.id, item);
                  //~ // if (item.getHeight() == 0) console.log(20100921,'both flex and getHeight() are 0!');
                  //~ availableHeight -= item.getHeight();
              //~ } else {
                  //~ sumflex += item.flex;
                  //~ // console.log(item.flex);
              //~ }
          //~ } 
          //~ // else console.log('non-vertical item in VBoderPanel:',item)
        //~ }
        var hunit = availableHeight / sumflex;
        //~ console.log('sumflex=',sumflex,'hunit=',hunit, 'availableHeight=',availableHeight);
        for(var i=0; i < this.items.length;i++) {
          var item = this.items.get(i);
          if (this.isVertical(item)) {
              if (item.flex != 0 && ! item.collapsed) {
                  item.setHeight(hunit * item.flex);
                  //~ console.log(item.region,' : height set to',item.getHeight());
              }
          }
          //~ else console.log('non-vertical item in VBoderPanel:',item)
        }
      }
      Lino.VBorderPanel.superclass.onBodyResize.call(this, w, h);
    }
});


/*
  modifications to the standard behaviour of a CellSelectionModel:
  
*/
Ext.override(Ext.grid.CellSelectionModel, {
//~ var dummy = {

    handleKeyDown : function(e){
        /* removed because F2 wouldn't pass
        if(!e.isNavKeyPress()){
            return;
        }
        */
        //~ console.log('handleKeyDown',e)
        var k = e.getKey(),
            g = this.grid,
            s = this.selection,
            sm = this,
            walk = function(row, col, step){
                return g.walkCells(
                    row,
                    col,
                    step,
                    g.isEditor && g.editing ? sm.acceptsNav : sm.isSelectable, 
                    sm
                );
            },
            cell, newCell, r, c, ae;

        switch(k){
            case e.ESC:
            case e.PAGE_UP:
            case e.PAGE_DOWN:
                break;
            default:
                // e.stopEvent(); // removed because Browser keys like Alt-Home, Ctrl-R wouldn't work
                break;
        }

        if(!s){
            cell = walk(0, 0, 1); 
            if(cell){
                this.select(cell[0], cell[1]);
            }
            return;
        }

        cell = s.cell;
        r = cell[0];    
        c = cell[1];    
        
        switch(k){
            case e.TAB:
                if(e.shiftKey){
                    newCell = walk(r, c - 1, -1);
                }else{
                    newCell = walk(r, c + 1, 1);
                }
                break;
            case e.HOME:
                if (! (g.isEditor && g.editing)) {
                  if (!e.hasModifier()){
                      newCell = [r, 0];
                      //~ console.log('home',newCell);
                      break;
                  }else if(e.ctrlKey){
                      var t = g.getTopToolbar();
                      var activePage = Math.ceil((t.cursor + t.pageSize) / t.pageSize);
                      if (activePage > 1) {
                          e.stopEvent();
                          t.moveFirst();
                          return;
                      }
                      newCell = [0, c];
                      break;
                  }
                }
            case e.END:
                if (! (g.isEditor && g.editing)) {
                  c = g.colModel.getColumnCount()-1;
                  if (!e.hasModifier()) {
                      newCell = [r, c];
                      //~ console.log('end',newCell);
                      break;
                  }else if(e.ctrlKey){
                      var t = g.getTopToolbar();
                      var d = t.getPageData();
                      if (d.activePage < d.pages) {
                          e.stopEvent();
                          var self = this;
                          t.on('change',function(tb,pageData) {
                              var r = g.store.getCount()-2;
                              self.select(r, c);
                              //~ console.log('change',r,c);
                          },this,{single:true});
                          t.moveLast();
                          return;
                      } else {
                          newCell = [g.store.getCount()-1, c];
                          //~ console.log('ctrl-end',newCell);
                          break;
                      }
                  }
                }
            case e.DOWN:
                newCell = walk(r + 1, c, 1);
                break;
            case e.UP:
                newCell = walk(r - 1, c, -1);
                break;
            case e.RIGHT:
                newCell = walk(r, c + 1, 1);
                break;
            case e.LEFT:
                newCell = walk(r, c - 1, -1);
                break;
            case e.F2:
                if (!e.hasModifier()) {
                    if (g.isEditor && !g.editing) {
                        g.startEditing(r, c);
                        e.stopEvent();
                        return;
                    }
                    break;
                }
            case e.INSERT:
                if (!e.hasModifier()) {
                    if (g.ls_insert_handler && !g.editing) {
                        e.stopEvent();
                        Lino.show_insert(g);
                        return;
                    }
                    break;
                }
            // case e.DELETE:
            //     if (!e.hasModifier()) {
            //         if (!g.editing) {
            //             e.stopEvent();
            //             Lino.delete_selected(g);
            //             return;
            //         }
            //         break;
            //     }

            case e.ENTER:
                e.stopEvent();
                g.onCellDblClick(r,c);
                break;

            default:
                g.handle_key_event(e);
                
        }
        

        if(newCell){
          e.stopEvent();
          r = newCell[0];
          c = newCell[1];
          this.select(r, c); 
          if(g.isEditor && g.editing){ 
            ae = g.activeEditor;
            if(ae && ae.field.triggerBlur){
                ae.field.triggerBlur();
            }
            g.startEditing(r, c);
          }
        //~ } else if (g.isEditor && !g.editing && e.charCode) {
        //~ // } else if (!e.isSpecialKey() && g.isEditor && !g.editing) {
            //~ g.set_start_value(String.fromCharCode(e.charCode));
            //~ // g.set_start_value(String.fromCharCode(k));
            //~ // g.set_start_value(e.charCode);
            //~ g.startEditing(r, c);
            //~ // e.stopEvent();
            //~ return;
        // } else {
          // console.log('20120513',e,g);
        }
        
    }


//~ };
});

 

function PseudoConsole() {
    this.log = function() {};
};
if (typeof(console) == 'undefined') console = new PseudoConsole();

Lino.notify = function(msg) {
  if (msg == undefined) msg = ''; else console.log(msg);
  
    if (msg == undefined) return;
    // Lino.alert(msg);
  
};

Lino.alert = function(msg) {
  Ext.MessageBox.alert('Notify',msg);
};


//~ Lino.show_about = function() {
  //~ new Ext.Window({
    //~ width: 400, height: 400,
    //~ title: "About",
    //~ html: '<a href="http://www.extjs.com" target="_blank">ExtJS</a> version ' + Ext.version
  //~ }).show();
//~ };

function obj2str(o) {
  if (typeof o != 'object') return String(o);
  var s = '';
  for (var p in o) {
    s += p + ': ' + obj2str(o[p]) + '\n';
  }
  return s;
}

Lino.on_store_exception = function (store,type,action,options,response,arg) {
  //~ throw response;
  console.log("on_store_exception: store=",store,
    "type=",type,
    "action=",action,
    "options=",options,
    "response=",response,
    "arg=",arg);
    if (arg != undefined && arg) { console.log(arg.stack)};
    var msg = "There was a problem with the database connection.";
    if (response.responseText)
        msg += '<br/>' + response.responseText
    msg += '<br/>' + "If the error persists, try reloading the browser page."
    Ext.Msg.alert("Database problem", msg );
    
};

//~ Lino.on_submit_success = function(form, action) {
   //~ Lino.notify(action.result.message);
   //~ this.close();
//~ };

Lino.on_submit_failure = function(form, action) {
    //~ Lino.notify();
  // action may be undefined
    switch (action.failureType) {
        case Ext.form.Action.CLIENT_INVALID:
            Ext.Msg.alert('Client-side failure', 'Form fields may not be submitted with invalid values');
            break;
        case Ext.form.Action.CONNECT_FAILURE:
            Ext.Msg.alert('Connection failure', 'Ajax communication failed');
            break;
        case Ext.form.Action.SERVER_INVALID:
            Ext.Msg.alert('Server-side failure', action.result.message);
   }
};



/*
Lino.save_wc_handler = function(ww) {
  return function(event,toolEl,panel,tc) {
    var pos = panel.getPosition();
    var size = panel.getSize();
    wc = ww.get_window_config();
    Ext.applyIf(wc,{ 
      x:pos[0],y:pos[1],height:size.height,width:size.width,
      maximized:panel.maximized});
    Lino.do_action(ww,{url:'/window_configs/'+ww.config.permalink_name,params:wc,method:'POST'});
  }
};

*/

Lino.show_in_own_window_button = function(handler) {
  return {
    qtip: "Show this panel in own window", 
    id: "up",
    handler: function(event,toolEl,panel, tc) {
      //~ console.log('20111206 report_window_button',panel,handler);
      handler.run(null,{base_params:panel.containing_panel.get_master_params()});
    }
  }
}

Lino.action_handler = function (panel, on_success, on_confirm) {
  return function (response) {
      if (!panel) { 
          if (Lino.current_window) 
              panel = Lino.current_window.main_item;
          else panel = Lino.viewport;
      }
      
    if (panel.loadMask) panel.loadMask.hide(); // 20120211
    if (!response.responseText) return ;
    var result = Ext.decode(response.responseText);
    Lino.handle_action_result(panel, result, on_success, on_confirm);
  }
};

Lino.handle_action_result = function (panel, result, on_success, on_confirm) {

    // console.log('20150514 Lino.handle_action_result()', result);
    
    // if (panel instanceof Lino.GridPanel) {
    //     gridmode = true;
    // } else {
    //     gridmode = false;
    // }

    //~ if (result.goto_record) {
        //~ var js = "Lino." + result.goto_record[0] + '.detail.run';
        //~ var h = eval(js);
        //~ h(panel,{record_id:result.goto_record[1]});
    //~ }
    
    if (result.goto_url) {
        document.location = result.goto_url;
        if (result.close_window) Lino.close_window();
        return;
    }
    
    if (result.xcallback) {
        //~ var config = {title:"Confirmation"};
        var config = {title:result.xcallback.title};
        //~ config.buttons = Ext.MessageBox.YESNOCANCEL;
        //~ config.buttons = Ext.MessageBox.YESNO;
        var p = {};
        Lino.insert_subst_user(p);
        config.buttons = result.xcallback.buttons;
        config.msg = result.message;
        config.fn = function(buttonId, text, opt) {
          panel.loadMask.show(); 
          //~ Lino.insert_subst_user(p);
          Ext.Ajax.request({
            method: 'GET',
            url: '/callbacks/'
                  + result.xcallback.id + '/' + buttonId,
            params: p,
            failure: Lino.ajax_error_handler(panel),
            success: Lino.action_handler(panel, on_success, on_confirm)
          });
        }
        Ext.MessageBox.show(config);
        return;
    }

    // `record_id` and/or `data_record` both mean "display the detail
    // of this record". 
    
    if(result.detail_handler_name) {
        // TODO: make sure that result.detail_handler_name is secure
        var detail_handler = eval("Lino." + result.detail_handler_name);
    }
    var ns = {};  // new status
    if (result.close_window) {
        
        // Subsequent processing expects that `panel` is "the current
        // panel". But if we close the window, `panel` must point
        // to the previous window. Note the case of an insert window
        // that has been invoked by double-clicking on the phantom row
        // of a slave table in a detail window. In that case we want
        // `panel` to become the grid panel of the slave table who
        // called the insert window, not the master's detail form
        // panel.  When the insert window has been called by an action
        // link (e.g. generated using ar.insert_button), then
        // Lino.close_window can return `undefined`.

        if(result.record_id || result.data_record) {
            var ww = Lino.calling_window();
            if (ww && ww.window.main_item instanceof Lino.FormPanel) {
                if (ww.window.main_item.ls_detail_handler == detail_handler) {
                    ns.record_id = result.record_id;
                    ns.data_record = result.data_record;
                    // console.log("20150514 use new status.");
                }
            }
        }

        panel = Lino.close_window(
            function(ww) { Ext.apply(ww.status, ns) }); 
        if (!panel) 
            // console.log("20150514 close_window returned no panel.");
            if (Lino.current_window)
                panel = Lino.current_window.main_item;

    }

    if(result.record_id || result.data_record) {
        if (! (ns.record_id || ns.data_record)) {
          // no close_window, so we must update record data in current
          // panel (if it is the detail_handler for this record) or
          // open the detail handler.
          var st = {
              record_id: result.record_id,
              data_record: result.data_record
          };
          if (result.active_tab) st.active_tab = result.active_tab;
          if (panel instanceof Lino.FormPanel 
              && panel.ls_detail_handler == detail_handler) 
            {
              // console.log("20150514 use panel.set_status().");
              panel.set_status(st);
          } else {
              // console.log("20150514 run detail_handler.");
              if (panel.ls_detail_handler == detail_handler){st.base_params = panel.get_base_params();}
              detail_handler.run(null, st);
          }

          // if (panel instanceof Lino.FormPanel 
          //     && panel.ls_url == result.actor_url) {
          //     // console.log("20140506 case 2 it's a FormPanel:", panel);
          //     panel.set_status({
          //         record_id: result.record_id,
          //         data_record: result.data_record});
          // } else if (panel.ls_detail_handler 
          //            && panel.ls_url == result.actor_url) {
          //     // console.log("20140506 case 4");
          //     panel.ls_detail_handler.run(null, {
          //         record_id: result.record_id,
          //         data_record: result.data_record,
          //         base_params: panel.get_base_params()});
          // } else {
          //     result.refresh_all = true;
          //     console.log("20140604 case 6", result.actor_url);
          // }
        }
    }

    // `eval_js` must get handled after `close_window` because it
    // might ask to open a new window (and we don't want to close that
    // new window).  It must execute *before* any MessageBox,
    // otherwise the box would get hidden by a window that opens
    // afterwards.

    if (result.eval_js) {
        //~ console.log(20120618,result.eval_js);
        eval(result.eval_js);
    }
    
    if (on_success && result.success) {
        // console.log("20140430 handle_action_result calls on_success", 
        //             on_success);
        on_success(result);
    }
    
    if (result.info_message) {
        console.log(result.info_message);
    }
    
    if (result.warning_message) {
        if (!result.alert) result.alert = "Warning";
        Ext.MessageBox.alert(result.alert, result.warning_message);
    }
    
    if (result.message) {
        //~ if (result.alert && ! gridmode) {
        if (result.alert) { // 20120628b 
            //~ Ext.MessageBox.alert('Alert',result.alert_msg);
            if (result.alert === true) result.alert = "Alert";
            Ext.MessageBox.alert(result.alert, result.message);
        } else {
            Lino.notify(result.message);
        }
    }

    if(result.record_deleted && panel.ls_detail_handler == detail_handler) {
        panel.after_delete();
    }
    
    if (result.refresh_all) {
        var cw = Lino.current_window;
        // var cw = panel.get_containing_window();
        if (cw) {
            // console.log("20140917 refresh_all calls refresh on", cw.main_item);
            cw.main_item.refresh();
        } else { Lino.viewport.refresh(); }
        // else console.log("20140917 cannot refresh_all because ",
        //                  "there is no current_window");
    } else {
        if (result.refresh) {
            // console.log("20140917 Gonna call panel.refresh()", panel);
            panel.refresh();
        }
    }if (result.open_url) {
        //~ console.log(20111126,result.open_url);
        //~ if (!result.message)
            //~ Lino.notify('Open new window <a href="'+result.open_url+'" target="_blank">'+result.open_url+'</a>');
        window.open(result.open_url,'foo',"");
        //~ document.location = result.open_url;
    }
};

// obsolete but still used for deleting records.
Lino.do_action = function(caller,action) { 
  action.success = function(response) {
    if (caller.loadMask) caller.loadMask.hide();
    //~ console.log('Lino.do_action()',action,'action success',response);
    if (action.after_success) {
        //~ console.log('Lino.do_action() calling after_success');
        action.after_success();
    }
    if (response.responseText) {
      var result = Ext.decode(response.responseText);
      //~ console.log('Lino.do_action()',action.name,'result is',result);
      if (result.message) {
          if (result.alert) {
              //~ Ext.MessageBox.alert('Alert',result.alert_msg);
              Ext.MessageBox.alert('Alert',result.message);
          } else {
              Lino.notify(result.message);
          }
      }
      
      //~ if (result.alert_msg) Ext.MessageBox.alert('Alert',result.alert_msg);
      //~ if (result.message) Lino.notify(result.message);
      if (result.notify_msg) Lino.notify(result.notify_msg);
      if (result.js_code) { 
        //~ console.log('Lino.do_action()',action,'gonna call js_code in',result);
        var jsr = result.js_code(caller);
        //~ console.log('Lino.do_action()',action,'returned from js_code in',result);
        if (action.after_js_code) {
          //~ console.log('Lino.do_action()',action,'gonna call after_js_code');
          action.after_js_code(jsr);
          //~ console.log('Lino.do_action()',action,'returned from after_js_code');
        //~ } else {
          //~ console.log('Lino.do_action()',action,' : after_js_code is false');
        }
      };
    }
  };
  Ext.applyIf(action,{
    waitMsg: "Please wait...",
    failure: Lino.ajax_error_handler(caller),
    params: {}
  });
  //~ action.params.su = Lino.subst_user;
  Lino.insert_subst_user(action.params);
  
  Ext.Ajax.request(action);
};

//~ Lino.gup = function( name )
//~ {
  //~ // Thanks to http://www.netlobo.com/url_query_string_javascript.html
  //~ name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  //~ var regexS = "[\\?&]"+name+"=([^&#]*)";
  //~ var regex = new RegExp( regexS );
  //~ var results = regex.exec( window.location.href );
  //~ if( results == null )
    //~ return "";
  //~ else
    //~ return results[1];
//~ };

//~ Lino.refresh_handler = function (ww) {
  //~ return function() { 
      //~ console.log('refresh',ww);
      //~ ww.main_item.doLayout(false,true);
      //~ ww.main_item.syncSize();
  //~ }
//~ };

//~ Lino.tools_close_handler = function (ww) {
  //~ return function() { 
      //~ ww.close();
  //~ }
//~ };
Lino.permalink_handler = function (ww) {
  return function() { 
    //~ document.location = ww.main_item.get_permalink();
    //~ console.log('20130723 Lino.permalink_handler',ww);
    
    /* Uncaught TypeError: Cannot read property 'main_item' of null  */
    if (ww) {
        var url = ww.main_item.get_permalink();
    } else {
        var url = Lino.viewport.get_permalink();
    }
    Lino.load_url(url);
  }
};
//~ Lino.run_permalink = function() {
  //~ var plink = Lino.gup('permalink');
  //~ if(plink) { eval('Lino.'+plink); }
//~ }


Lino.ajax_error_handler = function(panel) {
  return function(response,options) {
    console.log('Ajax failure:', response, options);
    if (panel.loadMask) panel.loadMask.hide();
    if (response.responseText) {
      var lines = response.responseText.split('\n');
      if (lines.length > 10) {
          line = lines.splice(5, lines.length-10, "(...)");
      }
      //~ console.log(20131005, response.statusText.toCamel());
      Ext.MessageBox.alert(
        response.statusText.toCamel(),
        lines.join('<br/>')
        //~ response.responseText.replace(/\n/g,'<br/>'))
      )
    } else {
      Ext.MessageBox.alert('Action failed',
        'Lino server did not respond to Ajax request');
    }
  }
}
// Ext.Ajax.on('requestexception',Lino.ajax_error_handler)
 


Ext.QuickTips.init();

/* setting QuickTips dismissDelay to 0 */
// Apply a set of config properties to the singleton
//~ Ext.apply(Ext.QuickTips.getQuickTip(), {
//~ Ext.apply(Ext.ToolTip, {
    //~ dismissDelay: 0
    //~ autoHide: false,
    //~ closable: true,
    //~ maxWidth: 200,
    //~ minWidth: 100,
    //~ showDelay: 50      // Show 50ms after entering target
    //~ ,trackMouse: true
//~ });


// Ext.apply(Ext.QuickTips.getQuickTip(), {
//     dismissDelay: 500,
//     showDelay: 20      // Show 10ms after entering target
// });
  
Lino.quicktip_renderer = function(title, body) {
  return function(c) {
    //~ if (c instanceof Ext.Panel) var t = c.bwrap; else // 20130129
      if (c instanceof Ext.Panel) {
          var t = c.header;
      } else if (c instanceof Ext.Button) {
          var t = c.btnEl;
      } else  {
          var t = c.getEl();
      }
    // console.log(20171024, c, t, body);
    //~ t.dismissDelay = 0;
    Ext.QuickTips.register({
      target: t,
      //~ cls: 'lino-quicktip-classical',
      dismissDelay: 10000,
      //~ autoHide: false,
      showDelay: 30,      // Show X ms after entering target
      //~ title: title,
      text: body
    });
  }
};


  
Lino.help_text_editor = function() {
  //~ var bp = {
      //~ mk:this.content_type,
      //~ mt:1
    //~ };
    //~ console.log(20120202,bp);
  //~ Lino.lino.ContentTypes.detail({},{base_params:bp});
  //~ Lino.lino.ContentTypes.detail.run(null,{record_id:this.content_type});
  Lino.lino.ContentTypes.detail.run(null,{record_id:this.content_type});
}

// Path to the blank image should point to a valid location on your server
//~ Ext.BLANK_IMAGE_URL = MEDIA_URL + '/extjs/resources/images/default/s.gif'; 


// used as Ext.grid.Column.renderer for id columns in order to hide the special id value -99999
Lino.id_renderer = function(value, metaData, record, rowIndex, colIndex, store) {
  //~ if (record.phantom) return '';
  return value;
}

Lino.raw_renderer = function(value, metaData, record, rowIndex, colIndex, store) {
  return value;
}

Lino.text_renderer = function(value, metaData, record, rowIndex, colIndex, store) {
  //~ return "not implemented"; 
  return value;
}

Lino.NullNumberColumn = Ext.extend(Ext.grid.Column, {
    align : 'right', 
    format : '0,000.00/i', 
    renderer : function(value, metaData, record, rowIndex, colIndex, store) {
        // if( colIndex == 3)
        //     console.log(20130128,"NullNumberColumn.renderer",value);
        if (value === null) return '';
        return Ext.util.Format.number(value, this.format);
    }
});


Lino.link_button = function(url) {
    // return '<a href="' + url + '"><img src="/media/lino/extjs/images/xsite/link.png" alt="link_button"></a>'
    return '<a href="' + url + '" style="text-decoration:none;">&#10138;</a>'
}

Lino.fk_renderer = function(fkname,handlername) {
  //~ console.log('Lino.fk_renderer handler=',handler);
  return function(value, metaData, record, rowIndex, colIndex, store) {
    //~ console.log('Lino.fk_renderer',fkname,rowIndex,colIndex,record,metaData,store);
    //~ if (record.phantom) return '';
    if (value) {
        return Lino.link_button('javascript:'+handlername + '.run(null,{record_id:\'' + String(record.data[fkname]) + '\'})")') + value;
        // until 20140822 (clickable foreign keys):
        // var s = '<a href="javascript:' ;
        // s += handlername + '.run(null,{record_id:\'' + String(record.data[fkname]) + '\'})">';
        // s += value + '</a>';
        // return s
    }
    return '';
  }
};

Lino.lfk_renderer = function(panel,fkname) {
  //~ console.log('Lino.fk_renderer handler=',handler);
  var handlername = 'console.log';
  return function(value, metaData, record, rowIndex, colIndex, store) {
    //~ console.log('Lino.fk_renderer',fkname,rowIndex,colIndex,record,metaData,store);
    if (record.phantom) return '';
    if (value) {
        var s = '<a href="javascript:' ;
        s += handlername + '({},{record_id:\'' + String(record.data[fkname]) + '\'})">';
        s += value + '</a>';
        //~ console.log('Lino.fk_renderer',value,'-->',s);
        return s
    }
    return '';
  }
};

//~ Lino.gfk_renderer = function() {
  //~ return function(value, metaData, record, rowIndex, colIndex, store) {
    //~ if (record.phantom) return '';
    //~ console.log('Lino.gfk_renderer',value,colIndex,record,metaData,store);
    //~ return value;
  //~ }
//~ };


Lino.build_buttons = function(panel,actions) {
  //~ console.log("20121006 Lino.build_buttons",actions);
  if (actions) {
    var buttons = Array(actions.length);
    var cmenu = Array(actions.length);
    var keyhandlers = {};
    for (var i=0; i < actions.length; i++) { 
      var a = actions[i];
      if (a.menu) a.menu = Lino.build_buttons(panel,a.menu).bbar;
      buttons[i] = a;
      cmenu[i] = {
            text : a.menu_item_text,
            iconCls : a.iconCls,
            menu : a.menu,
            itemId : a.itemId
          };
      if (a.panel_btn_handler) {
          var h = a.panel_btn_handler.createCallback(panel);
          if (a.auto_save == true) {
              h = panel.do_when_clean.createDelegate(panel,[true,h]);
          } else if (a.auto_save == null) {
              h = panel.do_when_clean.createDelegate(panel,[false,h]);
          } else if (a.auto_save == false) {
              // h = h;
          } else {
              console.log("20120703 unhandled auto_save value",a)
          }
          buttons[i].handler = h;
          cmenu[i].handler = h;
          if (a.keycode) {
              keyhandlers[a.keycode] = h;
          }
          //~ if (buttons[i].xtype == 'splitbutton') {
              //~ cmenu[i].menu = a.menu;
          //~ } else {
              //~ cmenu[i].handler = h;
          //~ }
      } else {
          console.log("action without panel_btn_handler",a)
          // cmenu[i].handler = a.handler;
      }
    }
    return {
        bbar:buttons, 
        cmenu:new Ext.menu.Menu(cmenu),
        keyhandlers: keyhandlers
    };
  }
}

Lino.do_when_visible = function(cmp,todo) {
  //~ if (cmp.el && cmp.el.dom) 
  if (cmp.isVisible()) { 
    // 'visible' means 'rendered and not hidden'
    //~ console.log(cmp.title,'-> cmp is visible now');
    todo(); 
  //~ } else {
      //~ cmp.on('resize',todo,cmp,{single:true});
  //~ }
  //~ if (false) { // 20120213
  } else { 
    //~ console.log('Lino.do_when_visible() must defer because not isVisible()',todo,cmp);
    if (cmp.rendered) {
      //~ console.log(cmp,'-> cmp is rendered but not visible: and now?');
      //~ console.log(cmp.title,'-> cmp is rendered but not visible: try again in a moment...');
      //~ var fn = function() {Lino.do_when_visible(cmp,todo)};
      //~ fn.defer(100);
      
      Lino.do_when_visible.defer(50,this,[cmp,todo]);
      //~ Lino.do_when_visible.defer(100,this,[cmp,todo]);
      
    } else {
      //~ console.log(cmp.title,'-> after render');
      cmp.on('afterrender',todo,cmp,{single:true});
    }
  }
  
};    

/*
*/
Lino.do_on_current_record = function(panel, fn, phantom_fn) {
  // console.log('20140930 do_on_current_record', arguments);
  var rec = panel.get_current_record();
  if (rec == undefined) {
    Lino.notify("There's no selected record.");
    return;
  }
  // 20120307 A VirtualTable with a Detail (lino.Models) has only "phantom" records.
  if (rec.phantom) {
    //~ if (!panel.editable) { console.log("20120312 not editable:",panel)}
    if (phantom_fn) {
      phantom_fn(panel);
    } else {
      Lino.notify("Action not available on phantom record.");
    }
    return;
  }
  return fn(rec);
};


Lino.call_ajax_action = function(
    panel, method, url, p, actionName, step, on_confirm, on_success) {
  p.an = actionName;
  if (!panel || !panel.isVisible()) {
  //~ if (true) { // 20131026 : workflow_actions of a newly created record detail executed but did't refresh the screen because their requesting panel was the insert (not the detail) formpanel.
      if (Lino.current_window) 
          panel = Lino.current_window.main_item;
      else panel = Lino.viewport;
  }
  // console.log("20150130 a", p.pv);
  // Ext.apply(p, panel.get_base_params());
  // console.log("20150130 b", p.pv);

  if (panel.get_selected && p.sr === undefined) {
      var selected_recs = panel.get_selected();
      //~ console.log("20130831",selected_recs);
      var rs = Array(selected_recs.length);
      for(var i=0; i < selected_recs.length;i++) {
          rs[i] = selected_recs[i].id;
      };
      p.sr = rs;
  }
  
  // console.log("20170731 Lino.call_ajax_action", Ext.Ajax, p, actionName, step);
  
  if (panel.loadMask) panel.loadMask.show(); 
    
  // Ext.Ajax.params = {}; 
  Ext.Ajax.request({
    method: method
    ,url: url
    ,params: p
    ,success: Lino.action_handler(panel, on_success, on_confirm)
    ,failure: Lino.ajax_error_handler(panel)
  });
};




Lino.row_action_handler = function(actionName, hm, pp) {
  var fn = function(panel, btn, step) {
      var p = {};
      // console.log('20150514 row_action_handler');
      if (pp) { p = pp(panel); if (! p) return; }
      
      if (!panel || panel.get_current_record == undefined) { // AFTER_20130725
        // console.log('20140930 row_action_handler 2', panel);
        panel = Ext.getCmp(panel);
        if (panel == undefined) {
          console.log("20160410 Invalid panel spec.", actionName, hm, pp);
          Lino.notify("Invalid panel spec.");
          return;
        }
      }
      
      Lino.do_on_current_record(panel, function(rec) {
          //~ console.log(panel);
          panel.add_param_values(p, true);
          Ext.apply(p, panel.get_base_params());
          Lino.call_ajax_action(
              panel, hm, panel.get_record_url(rec.id), 
              p, actionName, step, fn);
      });
  };
  return fn;
};

Lino.list_action_handler = function(ls_url,actionName,hm,pp) {
  var url = '/api' + ls_url
  var fn = function(panel,btn,step) {
      var p = {};
      //~ console.log("20121210 Lino.list_action_handler",arguments);
      if (pp) { p = pp(panel);  if (! p) return; }
      if (panel) { // may be undefined when called e.g. from quicklink
          panel.add_param_values(p, true);
          Ext.apply(p, panel.get_base_params());
      }
      Lino.call_ajax_action(panel, hm,url, p, actionName, step, fn);
  };
  return fn;
};

Lino.param_action_handler = function(window_action) { // 20121012
  var fn = function(panel,btn,step) {
    Lino.do_on_current_record(panel,function(rec) {
      window_action.run(panel.getId(),{}); 
    });
  };
  return fn;
};


Lino.run_row_action = function(
    requesting_panel, is_on_main_actor, url, meth, pk,
    actionName, params, preprocessor) {
  //~ var panel = action.get_window().main_item;
  // console.log("20140930 Lino.run_row_action", params);
  url = '/api' + url  + '/' + pk;
  var panel = Ext.getCmp(requesting_panel);
  // var params = {}
  // if (init_params) Ext.apply(params, init_params);
  if (!params) params = {};
  if (preprocessor) {
      var p = preprocessor(); 
      Ext.apply(params, p);
  }
  if (panel && is_on_main_actor) {
      Ext.apply(params, panel.get_base_params())
  }else {
     params.sr = pk
  }
  Lino.insert_subst_user(params);

  var fn = function(panel, btn, step) {
    Lino.call_ajax_action(panel, meth, url, params, actionName, step, fn);
  }
  fn(panel, null, null);
}


Lino.show_detail = function(panel, btn) {
  Lino.do_on_current_record(panel, 
    function(rec) {
      //~ panel.loadMask.show();
      Lino.run_detail_handler(panel, rec.id);
    },
    Lino.show_insert
  );
};

Lino.run_detail_handler = function(panel,pk) {
  var bp = panel.get_base_params();
  panel.add_param_values(bp); // 20120918
  var status = {
    record_id:pk,
    base_params:bp
  }
  //~ console.log("20120918 Lino.show_detail",status);
  panel.ls_detail_handler.run(null,status);
}

Lino.show_fk_detail = function(combo,detail_action,insert_action) {
    //~ console.log("Lino.show_fk_detail",combo,handler);
    pk = combo.getValue();
    if (pk) {
        detail_action.run(null,{record_id: pk})
      } else {
        insert_action.run(null);
        //~ Lino.notify("Cannot show detail for empty foreign key.");
      }
};

Lino.show_insert = function(panel,btn) {
  var bp = panel.get_base_params();
  //~ console.log('20120125 Lino.show_insert',bp)
  //~ panel.ls_insert_handler.run(null,{record_id:-99999,base_params:bp});
  panel.ls_insert_handler.run(panel.getId(),{base_params:bp});
};



if (Ext.ux.grid !== undefined) {
    Lino.GridFilters = Ext.extend(Ext.ux.grid.GridFilters,{
      encode:true,
      local:false
    });
} else {
    Lino.GridFilters = function() {}; // dummy
    Ext.override(Lino.GridFilters,{
      init : function() {}
    });
};



Lino.FieldBoxMixin = {
  before_init : function(config,params) {
    if (params) Ext.apply(config,params);
    var actions = Lino.build_buttons(this, config.ls_bbar_actions);
    if (actions) config.bbar = actions.bbar;
  },
  //~ constructor : function(ww,config,params){
    //~ this.containing_window = ww;
    //~ if (params) Ext.apply(config,params);
    //~ var actions = Lino.build_buttons(this,config.ls_bbar_actions);
    //~ if (actions) config.bbar = actions.bbar;
    //~ Lino.FieldBoxMixin.superclass.constructor.call(this, config);
  //~ },
  do_when_clean : function(auto_save,todo) { todo() },
  //~ format_data : function(html) { return '<div class="htmlText">' + html + '</div>' },
  format_data : function(html) { return html },
  get_base_params : function() {
    // needed for insert action
    var p = Ext.apply({}, this.base_params);
    Lino.insert_subst_user(p);
    return p;
  },
  set_base_params : function(p) {
    this.base_params = Ext.apply({},p);
    //~ if (p.param_values) this.set_param_values(p.param_values);  
  },
  clear_base_params : function() {
      this.base_params = {};
      Lino.insert_subst_user(this.base_params);
  },
  set_base_param : function(k,v) {
    this.base_params[k] = v;
  }
};

Ext.override(Ext.form.HtmlEditor, {
    fixKeys : function(){
        if(Ext.isIE){
            return function(e){
                var k = e.getKey(),
                    doc = this.getDoc(),
                        r;
                if(k == e.TAB){
                    e.stopEvent();
                    r = doc.selection.createRange();
                    if(r){
                        r.collapse(true);
                        r.pasteHTML('&nbsp;&nbsp;&nbsp;&nbsp;');
                        this.deferFocus();
                    }
                }else if(k == e.ENTER){
                    r = doc.selection.createRange();
                    if(r){
                        var target = r.parentElement();
                        if(!target || target.tagName.toLowerCase() != 'li'){
                            e.stopEvent();
                            r.pasteHTML('<br />');
                            r.collapse(false);
                            r.select();
                        }
                    }
                }
            };
        }else if(Ext.isOpera){
            return function(e){
                var k = e.getKey();
                if(k == e.TAB){
                    e.stopEvent();
                    this.win.focus();
                    this.execCmd('InsertHTML','&nbsp;&nbsp;&nbsp;&nbsp;');
                    this.deferFocus();
                }
            };
        }else if(Ext.isWebKit){
            // HKC : this is probably our most used case.
            return function(e){
                var k = e.getKey();
                if(k == e.TAB){
                    e.stopEvent();
                    this.execCmd('InsertText','\t');
                    this.deferFocus();
                }else if(k == e.ENTER){
                    e.stopEvent();
                    this.execCmd('InsertHtml','<br /><br />');
                    this.deferFocus();
                }
             //   HKC
               else if (k == e.S && e.ctrlKey){
                    e.stopEvent();
                    e.preventDefault();
                    //this.getWin.fireEvent('keyup');
                    // this.fireKey(e);
                    console.log('HTMLEditor is saving...');
                }
             };
        }
    }(),
    // bubbleEvents : ['keypress']
    // initComponent : function() {
    //     Ext.form.HtmlEditor.superclass.initComponent.call(this);
    //     this.addEvents('submit');
    // },
    // submit : function (event) {
    //     console.log("rrrrr");
    // },
    // initEditor : function() {
    //     Ext.form.HtmlEditor.superclass.initEditor.call(this);
    //     if (Ext.isGecko) {
    //         Ext.EventManager.on(this, 'keypress', this.fireSubmit, this);
    //     }
    //     if (Ext.isIE || Ext.isWebKit || Ext.isOpera) {
    //         Ext.EventManager.on(this, 'keydown', this.fireSubmit,
    //             this);
    //     }
    // },
    fireSubmit : function(e) {
        console.log("fireSubmit ...");
    }
});


Lino.HtmlBoxPanel = Ext.extend(Ext.Panel, Lino.PanelMixin);
Lino.HtmlBoxPanel = Ext.extend(Lino.HtmlBoxPanel, Lino.FieldBoxMixin);
Lino.HtmlBoxPanel = Ext.extend(Lino.HtmlBoxPanel, {
  disabled_in_insert_window : true,
  constructor : function(config,params) {
    this.before_init(config,params);
    Lino.HtmlBoxPanel.superclass.constructor.call(this, config);
  },
  //~ constructor : function(ww,config,params){
    //~ this.ww = ww;
    //~ if (params) Ext.apply(config,params);
    //~ var actions = Lino.build_buttons(this,config.ls_bbar_actions);
    //~ if (actions) config.bbar = actions.bbar;
    //~ Lino.FieldBoxMixin.constructor.call(this, ww,config,params);
  //~ },
  //~ constructor : function(ww,config,params){
    //~ this.ww = ww;
    //~ if (params) Ext.apply(config,params);
    //~ var actions = Lino.build_buttons(this,config.ls_bbar_actions);
    //~ if (actions) config.bbar = actions.bbar;
    //~ Lino.FieldBoxMixin.superclass.constructor.call(this, config);
  //~ },
  //~ disable : function() { var tb = this.getBottomToolbar(); if(tb) tb.disable()},
  //~ enable : function() { var tb = this.getBottomToolbar(); if(tb) tb.enable()},
  onRender : function(ct, position){
    Lino.HtmlBoxPanel.superclass.onRender.call(this, ct, position);
    //~ console.log(20111125,this.containing_window);
    if (this.containing_panel) {
      this.containing_panel.on('enable',this.enable,this);
      this.containing_panel.on('disable',this.disable,this);
    }
    this.el.on({
      dragenter:function(event){
        event.browserEvent.dataTransfer.dropEffect = 'move';
        return true;
      }
      ,dragover:function(event){
        event.browserEvent.dataTransfer.dropEffect = 'move';
        event.stopEvent();
        return true;
      }
      ,drop:{
        scope:this
        ,fn:function(event){
          event.stopEvent();
          //~ console.log(20110516);
          var files = event.browserEvent.dataTransfer.files;
          if(files === undefined){
            return true;
          }
          var len = files.length;
          while(--len >= 0){
            console.log(files[len]);
            //~ this.processDragAndDropFileUpload(files[len]);
          }
          Lino.show_insert(this);
        }
      }
    });
  },
  refresh : function(unused) { 
      // this.containing_panel.refresh();
      this.refresh_with_after();
  },
  /* HtmlBoxPanel */
  refresh_with_after : function(after) {
      // var todo = this.containing_panel.refresh();
      var box = this.items.get(0);
      var todo = function() {
        if (this.disabled) { return; }
        this.set_base_params(this.containing_panel.get_master_params());

        var el = box.getEl();
        if (el) {
            var record = this.containing_panel.get_current_record();
            var newcontent = record ? 
                this.format_data(record.data[this.name]) : '';
            // console.log('20140917 HtmlBox.refresh()',
            //             this.name, record.data.LinksByHuman);
            el.update(newcontent, true);
        // } else {
        //     console.log('20140502 cannot HtmlBox.refresh()',this.name);
        }
      };

      Lino.do_when_visible(box, todo.createDelegate(this));
  }
});
//~ Ext.override(Lino.HtmlBoxPanel,Lino.FieldBoxMixin);


Lino.ActionFormPanel = Ext.extend(Ext.form.FormPanel,Lino.MainPanel);
Lino.ActionFormPanel = Ext.extend(Lino.ActionFormPanel, Lino.PanelMixin);
Lino.ActionFormPanel = Ext.extend(Lino.ActionFormPanel, Lino.FieldBoxMixin);
Lino.ActionFormPanel = Ext.extend(Lino.ActionFormPanel, {
  //~ layout:'fit'
  //~ ,autoHeight: true
  //~ ,frame: true
  window_title : "Action Parameters",
  constructor : function(config){
    config.buttons = [
        {text: 'OK', handler: this.on_ok, scope: this},
        {text: 'Cancel', handler: this.on_cancel, scope: this}
    ];
    Lino.ActionFormPanel.superclass.constructor.call(this, config);
  }
  //~ ,initComponent : function(){
    //~ Lino.ActionFormPanel.superclass.initComponent.call(this);
  //~ }
  ,on_cancel : function() { 
    this.get_containing_window().close();
  }
  ,on_ok : function() { 
    var panel = this.requesting_panel;
    // var panel = this.get_containing_window().main_item;
    // console.log("20131004 on_ok",this,panel,arguments);
    var actionName = this.action_name;
    var pk = this.record_id || this.default_record_id;
    if (pk == undefined && this.base_params) { pk = this.base_params.mk; }
    if (pk == undefined && panel) {
        pk = panel.get_current_record().id;
    }
    if (pk == undefined) {
        // 20170101 VerifyUser action
        pk = '-99998';
        // Lino.alert("Sorry, dialog action without base_params.mk");
        // return;
    }
    var self = this;
    // function on_success() { self.get_containing_window().close(); };
    // see 20131004 and 20140430
    var url = '/api';

    // 20150119 : The OK button on AgentsByClient.create_visit went to
    // /api/pcsw/Clients/ instead of /api/pcsw/Coachings/
    // if (panel) 
    //     url += panel.ls_url;
    // else 
    //     url += this.ls_url;

    if (this.ls_url) 
        url += this.ls_url;
    else 
        url += panel.ls_url;
    url += '/' + pk;
    // wrap into function to prepare possible recursive call
    var fn = function(panel, btn, step) {
      var p = {};
      self.add_field_values(p)
      if (panel) Ext.apply(p, panel.get_base_params());
      delete p.pv;
      // console.log("20150130", p.pv);

      Lino.call_ajax_action(
          panel, 'GET', url, p, actionName, step, fn); //  , on_success);
    }
    fn(panel, null, null);
    
    
  }
  /* ActionFormPanel*/
  ,set_status : function(status, rp){
    this.requesting_panel = Ext.getCmp(rp);
    //~ console.log('20120918 ActionFormPanel.set_status()',status,rp,this.requesting_panel);
    this.clear_base_params();
    if (status == undefined) status = {};
    //~ if (status.param_values) 
    this.set_field_values(status.field_values);
    if (status.base_params) this.set_base_params(status.base_params);
    this.record_id = status.record_id;
  }
  
  ,before_row_edit : function(record) {}
  ,add_field_values : function (p) { // similar to add_param_values()
      /* LS 20160517 : Until now Lino tested whether the form is
       dirty, and if not, submitted only the values which had been set
       by set_status. But now status_field_values can be empty because
       Action.keep_user_values is True. In that case we must submit
       the current values even if the form is not dirty.  I don't
       remember why we had this feature of not submitting unmodified
       field values, so I remove this feature for now. */
      p.fv = this.get_field_values();
      // if (this.form.isDirty()) {
      //   p.fv = this.get_field_values();
      // }else{
      //   // console.log("20160517 add_param_values not dirty, status_field_values",
      //   //             this.status_field_values);
      //   if (this.status_field_values) 
      //     p.fv = Lino.fields2array(
      //         this.fields, this.status_field_values);
      // }
      //~ console.log("20120203 add_param_values added pv",pv,"to",p);
  }
  ,get_field_values : function() {
      return Lino.fields2array(this.fields);
  }
  ,set_field_values : function(pv) {
      // console.log('20160516 MainPanel.set_param_values', pv);
      // if Action.keep_user_values, we receive an empty dict ({})
      this.status_field_values = pv;
      if (pv) {
          this.form.my_loadRecord(pv);
          var record = { data: pv };
          this.before_row_edit(record);
      } else {
          this.form.reset(); 
          this.before_row_edit();
      }
  }
  ,config_containing_window : function(wincfg) { 
      wincfg.title = this.window_title;
      wincfg.keys = [
        { key: Ext.EventObject.ENTER, fn: this.on_ok, scope: this }
      ];
      
      if (!wincfg.defaultButton) this.getForm().items.each(function(f){
          if(f.isFormField){ 
              wincfg.defaultButton = f;
              return false;
          }
      });

  }
});

    
Lino.fields2array = function(fields, values) {
    // console.log('20160517 fields2array gonna loop on', fields, values);
    var pv = Array(fields.length);
    for(var i=0; i < fields.length;i++) {
        var f = fields[i]
        if (values) 
          var v = values[f.name];
        else 
          var v = f.getValue();
        if (f.formatDate) {
            pv[i] = f.formatDate(v); 
        } else {
            pv[i] = v; // f.getValue(); 
        }
    }
    // console.log('20160517 fields2array returns', pv);
    return pv;
}


Lino.FormPanel = Ext.extend(Ext.form.FormPanel,Lino.MainPanel);
Lino.FormPanel = Ext.extend(Lino.FormPanel,Lino.PanelMixin);
Lino.FormPanel = Ext.extend(Lino.FormPanel,{
  params_panel_hidden : false,
  save_action_name : null, 
  //~ base_params : {},
  //~ trackResetOnLoad : true,
  //~ query_params : {},
  //~ 20110119b quick_search_text : '',
  constructor : function(config,params){
    if (params) Ext.apply(config,params);
    this.base_params = {};
    //~ ww.config.base_params.query = ''; // 20111018
    //~ console.log(config);
    //~ console.log('FormPanel.constructor() 1',config)
    //~ Ext.applyIf(config,{base_params:{}});
    //~ console.log('FormPanel.constructor() 2',config)
      
    config.trackResetOnLoad = true;
  
    Lino.FormPanel.superclass.constructor.call(this, config);

    //~ this.set_base_param('$URL_PARAM_FILTER',null); // 20111018
    //~ this.set_base_param('$URL_PARAM_FILTER',''); // 20111018
      
  },
  initComponent : function(){
    
    this.containing_panel = this;

    //~ console.log("20111201 containing_window",this.containing_window,this);
    var actions = Lino.build_buttons(this, this.ls_bbar_actions);
    if (actions) {
        this.bbar = actions.bbar;
        // console.log("20160829 tooltip", actions.bbar);
    //~ } else {
        //~ this.bbar = [];
    }
    //~ Ext.apply(config,Lino.build_buttons(this,config.ls_bbar_actions));
    //~ config.bbar = Lino.build_buttons(this,config.ls_bbar_actions);
    //~ var config = this;
    
    //~ if (this.containing_window instanceof Lino.DetailWrapper) {
    
    //~ console.log('20120121 initComponent', this.action_name);
    //~ if (this.action_name == 'detail' | this.action_name == 'show') {
    //~ if (this.action_name != 'insert') {
    if (! this.hide_top_toolbar) {
      this.tbar = [];
      // 20111015    
      if (! this.hide_navigator) {
        this.record_selector = new Lino.RemoteComboFieldElement({
          store: new Lino.ComplexRemoteComboStore({
            //~ baseParams: this.containing_window.config.base_params,
            baseParams: this.get_base_params(),
            //~ value: this.containing_window.config.base_params.query,
            proxy: new Ext.data.HttpProxy({
              url: '/choices' + this.ls_url,
              method:'GET'
            })
          }),
          pageSize:25,
          listeners: { 
            scope:this, 
            select:function(combo,record,index) {
              //~ console.log('jumpto_select',arguments);
              this.goto_record_id(record.id);
            }
          },
          emptyText: "Go to record"
        })
        this.tbar = this.tbar.concat([this.record_selector]);
        
        this.tbar = this.tbar.concat([
          this.first = new Ext.Toolbar.Button({
              tooltip:"First",disabled:true,
              handler:this.moveFirst,scope:this,iconCls:'x-tbar-page-first'}),
          this.prev = new Ext.Toolbar.Button({
              tooltip:"Previous",disabled:true,
              handler:this.movePrev,scope:this,iconCls:'x-tbar-page-prev'}),
          this.next = new Ext.Toolbar.Button({
              tooltip:"Next",disabled:true,
              handler:this.moveNext,scope:this,iconCls:'x-tbar-page-next'}),
          this.last = new Ext.Toolbar.Button({
              tooltip:"Last",disabled:true,
              handler:this.moveLast,scope:this,iconCls:'x-tbar-page-last'})
        ]);
      }
      this.tbar = this.add_params_panel(this.tbar);
      
      this.tbar = this.tbar.concat([
        {
            handler:function(){ this.do_when_clean(
                false, this.refresh.createDelegate(this)) },
          iconCls: 'x-tbar-loading',
          tooltip:"Reload current record",
          scope:this}
      ]);
          
      if (this.bbar) { // since 20121016
        if (this.tbar) {
            this.tbar = this.tbar.concat(['-']) ;
        } else {
          this.tbar = [];
        }
        this.tbar = this.tbar.concat(this.bbar) ;
        this.bbar = undefined;
      }
    
      this.tbar = this.tbar.concat([
          '->',
          this.displayItem = new Ext.Toolbar.TextItem({})
      ]);
          
    }
    //~ if (this.content_type && this.action_name != 'insert') {
      //~ this.bbar = this.bbar.concat([
        //~ '->',
        //~ { text: "[$_('Help Text Editor')]",
          //~ handler: Lino.help_text_editor,
          //~ qtip: "$_('Edit help texts for fields on this model.')",
          //~ scope: this}
      //~ ])
    //~ }
    //~ this.before_row_edit = config.before_row_edit.createDelegate(this);
      
    //~ if (this.master_panel) {
        //~ this.set_base_params(this.master_panel.get_master_params());
    //~ }
      
    Lino.FormPanel.superclass.initComponent.call(this);

    // this.on('show',
    //         function(){ this.init_focus();}, 
    //         this);
    
    this.on('render',function(){
      this.loadMask = new Ext.LoadMask(this.bwrap,{msg:"Please wait..."});
    },this);
    
    
    if (this.action_name == 'insert') {
      this.cascade(function(cmp){
        if (cmp.disabled_in_insert_window) {
            // console.log('20110613 disabled_in_insert_window', cmp);
            //~ cmp.disable();
            cmp.hide();
        }
      });
      
    }
    
  },
  
  unused_init_focus : function(){ 
    // set focus to the first field
    console.log("20140205 Lino.FormPanel.init_focus");
    // Lino.FormPanel.superclass.focus.call(this);
    this.getForm().items.each(function(f){
        if(f.isFormField && f.rendered){ 
            f.focus();
            console.log("20140205 focus", f);
            return false;
        }
    });
  },

  /* FormPanel */
  get_status : function(){
      var st = {
        base_params: this.get_base_params(),
        // data_record : this.get_current_record()
      }
      var rec = this.get_current_record();
      if (rec) st.record_id = rec.id;
      // 20140917 : get_status must not store the whole data_record
      // because that would prevent the form to actually reload
      // when set_status is called after a child window closed.
      
      var tp = this.items.get(0);
      if (tp instanceof Ext.TabPanel) {
        st.active_tab = tp.getActiveTab();
      }
      st.param_values = this.status_param_values;
      return st;
  },

  /* FormPanel */
  set_status : function(status, rp){
    this.requesting_panel = Ext.getCmp(rp);
    // console.log('20140917 FormPanel.set_status()', status);
    this.clear_base_params();
    if (status == undefined) status = {};
    //~ if (status.param_values) 
    this.set_param_values(status.param_values);
    if (status.base_params) this.set_base_params(status.base_params);
    var tp = this.items.get(0);
    if (tp instanceof Ext.TabPanel) {
      if (status.active_tab) {
        //~ console.log('20111201 active_tab',this.active_tab,this.items.get(0));
        //~ tp.activeTab = status.active_tab;
        tp.setActiveTab(status.active_tab);
        //~ this.main_item.items.get(0).activate(status.active_tab);
      } else {
        if (! status.data_record) {  // 20141206
            tp.setActiveTab(0);
        }
      }
    }
    
    if (status.data_record) {
      /* defer because set_window_title() didn't work otherwise */
      // 20140421 removed defer for bughunting to simplify side effects
      // this.set_current_record.createDelegate(
      //     this, [status.data_record]).defer(100);
      this.set_current_record(status.data_record);
      //~ return;
    } else {
        var record_id = status.record_id || this.default_record_id;
        if (record_id != undefined) { 
          /* possible values include 0 and null, 0 being a valid record id, 
          null the equivalent of undefined
          */
          this.load_record_id(record_id);
        } else {
            this.set_current_record(undefined);
        }
    }
    // this.init_focus()
  }
  ,get_base_params : function() {  /* FormPanel */
    // needed for insert_action
    var p = Ext.apply({}, this.base_params);
    Lino.insert_subst_user(p);
    return p;
  }
  ,set_base_params : function(p) {
    //~ this.base_params = Ext.apply({},this.base_params); // make sure it is an instance variable
    delete p['query'] // 20120725
    Ext.apply(this.base_params,p);
    if (this.record_selector) {
        var store = this.record_selector.getStore();
        for (k in p) store.setBaseParam(k,p[k]);
        delete this.record_selector.lastQuery;
        //~ console.log("20120725 record_selector.setBaseParam",p)
    }
  }
  ,clear_base_params : function() {
      this.base_params = {};
      Lino.insert_subst_user(this.base_params);
  }
  ,set_base_param : function(k,v) {
    this.base_params[k] = v;
  }
  ,after_delete : function() {
    if (this.current_record.navinfo.next)
      this.moveNext();
    else if (this.current_record.navinfo.prev)
      this.movePrev();
    else 
      this.abandon();
  }
  ,moveFirst : function() {this.goto_record_id(
      this.current_record.navinfo.first)}
  ,movePrev : function() {this.goto_record_id(
      this.current_record.navinfo.prev)}
  ,moveNext : function() {this.goto_record_id(
      this.current_record.navinfo.next)}
  ,moveLast : function() {this.goto_record_id(
      this.current_record.navinfo.last)}
  
  ,refresh : function(unused) { 
      this.refresh_with_after();
  }
  /* FormPanel */
  ,refresh_with_after : function(after) { 
    // console.log('20140917 Lino.FormPanel.refresh_with_after()',this);
    if (this.current_record) {
        this.load_record_id(this.current_record.id, after);
    } else {
        this.set_current_record(undefined, after);
    }
  }
  
  ,do_when_clean : function(auto_save, todo) {
    var this_ = this;
    if (this.form.isDirty()) {
        // console.log('20140421 do_when_clean : form is dirty')
        if (auto_save) {
            this_.save(todo);
        } else {
          //~ console.log('20111217 do_when_clean() form is dirty',this.form);
          var config = {title:"Confirmation"};
          config.buttons = Ext.MessageBox.YESNOCANCEL;
          config.msg = "Save changes to current record ?";
          config.fn = function(buttonId,text,opt) {
            //~ console.log('do_when_clean',buttonId)
            if (buttonId == "yes") {
                //~ Lino.submit_detail(this_,undefined,todo);
                //~ this_.containing_window.save(todo);
                this_.save(todo);
            } else if (buttonId == "no") { 
              todo();
            }
          }
          Ext.MessageBox.show(config);
        }
    }else{
      // console.log('20140421 do_when_clean : now!')
      todo();
    }
  }
  
  ,goto_record_id : function(record_id) {
    // console.log('20140917 Lino.FormPanel.goto_record_id()',record_id);
    //~ var this_ = this;
    //~ this.do_when_clean(function() { this_.load_record_id(record_id) }
    this.do_when_clean(
        true, this.load_record_id.createDelegate(this, [record_id]));
  }
  
  ,load_record_id : function(record_id, after) {
    var this_ = this;
    var p = Ext.apply({}, this.get_base_params());
    if (this.action_name)
        p.an = this.action_name;
    p.rp = this.getId();
    p.fmt = 'json';
    this.add_param_values(p);
    if (this.loadMask) this.loadMask.show();
    Ext.Ajax.request({ 
      waitMsg: 'Loading record...',
      method: 'GET',
      params: p,
      scope: this,
      url: this.get_record_url(record_id),
      success: function(response) {   
        // todo: convert to Lino.action_handler.... but result 
        if (this.loadMask) this.loadMask.hide();
        if (response.responseText) {
          var rec = Ext.decode(response.responseText);
          // console.log('20150905 load_record_id success', rec);
          this.set_param_values(rec.param_values);
          this.set_current_record(rec, after);
        }
      },
      failure: Lino.ajax_error_handler(this)
    });
  }

  ,abandon : function () {
    Ext.MessageBox.alert('Note',
      "No more records to display. Detail window has been closed.");
    Lino.close_window();
  }
  
  ,set_current_record : function(record, after) {
    // console.log('20160825 set_current_record', record);
    if (this.record_selector) {
        this.record_selector.clearValue();
        // e.g. InsertWrapper FormPanel doesn't have a record_selector
    }
    this.current_record = record;
    if (record && record.data) {
      this.enable();
      this.form.my_loadRecord(record.data);
      this.set_window_title(record.title);
      //~ this.getBottomToolbar().enable();
      var da = record.data.disabled_fields;
      if (da) {
          //~ console.log('20120528 disabled_fields =',da,this.getBottomToolbar());
          //~ 20121016 this.getBottomToolbar().items.each(function(item,index,length){
          if(this.hide_top_toolbar) {
              var tb = this.getBottomToolbar();
          } else {
              var tb = this.getTopToolbar();
          }
          if (tb) tb.items.each(function(item,index,length){
              //~ console.log('20120528 ',item.itemId,'-->',da[item.itemId]);
              if (da[item.itemId]) item.disable(); else item.enable();
          });
      };
      if (this.disable_editing | record.data.disable_editing) {
          //~ console.log("20120202 disable_editing",record.title);
          this.form.items.each(function(cmp){
            if (!cmp.always_enabled) cmp.disable();
          },this);
      } else {
          this.form.items.each(function(cmp){
            //~ console.log("20120202",cmp);
            if (record.data.disabled_fields[cmp.name]) cmp.disable();
            else cmp.enable();
          },this);
        
          //~ if (record.data.disabled_fields) {
              //~ for (i = 0; i < record.data.disabled_fields.length; i++) {
                  //~ var flds = this.find('name',record.data.disabled_fields[i]);
                  //~ if (flds.length == 1) { 
                    //~ flds[0].disable(); 
                  //~ }
              //~ }
          //~ }
      };
      if (this.first) {
        if (record.navinfo  && ! this.hide_navigator) {
          this.first.setDisabled(!record.navinfo.first);
          this.prev.setDisabled(!record.navinfo.prev);
          this.next.setDisabled(!record.navinfo.next);
          this.last.setDisabled(!record.navinfo.last);
          this.displayItem.setText(record.navinfo.message);
        } else {
          this.first.setDisabled(true);
          this.prev.setDisabled(true);
          this.next.setDisabled(true);
          this.last.setDisabled(true);
        }
      }
    } else {
      if (this.form.rendered) 
        this.form.reset(); /* FileUploadField would fail when resetting a non-rendered form */
      //~ this.disable();
      //~ this.getBottomToolbar().disable();
      this.form.items.each(function(cmp){
        cmp.disable();
      },this);
      this.set_window_title(this.empty_title);
      //~ this.containing_window.window.setTitle(this.empty_title);
      if (!this.hide_navigator) {
        this.first.disable();
        this.prev.disable();
        this.next.disable();
        this.last.disable();
      }
    }
    // console.log('20140917 gonna call before_row_edit', record);
        var current_focus_fields = false;
        for (var i = 0; i < this.form.items.items.length;i++) {
            if (this.form.items.items[i].hasFocus) current_focus_fields = i;
        }
    this.before_row_edit(record);
        if (current_focus_fields != false){
            this.form.items.items[current_focus_fields].focus();
        }
    // console.log('20140917 gonna call after', after);
    if (after) after();
  },
  
  /* FormPanel */
  before_row_edit : function(record) {},
  search_change : function(field,oldValue,newValue) {
    //~ console.log('search_change',field.getValue(),oldValue,newValue)
    this.set_base_param('query',field.getValue()); 
    this.refresh();
  },
  
  get_selected : function() { return [ this.current_record ] },
  get_current_record : function() {  
    //~ console.log(20100714,this.current_record);
    return this.current_record 
  },
  
  get_permalink_url : function() {
      var rec = this.get_current_record();
      if (rec && ! rec.phantom && rec.id != -99998)
          return '/api' 
              + this.ls_url + '/' + rec.id;
      return '/api' + this.ls_url;
    
  },
  add_param_tab : function(p) {
    var main = this.items.get(0);
    if (main.activeTab) {
      var tab = main.items.indexOf(main.activeTab);
      // console.log('20150130 main.activeTab', tab, main.activeTab);
      if (tab) p.tab = tab;
    // } else {
    //   console.log('20150130 no main.activeTab');
    }
  },
  get_permalink_params : function() {
    var p = {};
    //~ var p = {an:'detail'};
    if (this.action_name)
        p.an = this.action_name;
    this.add_param_tab(p)
    this.add_param_values(p)
    return p;
  }
  
  ,validate_form : function() {  // not used. see actions.ValidateForm
      // var ov = {};
      // this.form.items.each(function(f){
      //     ov[f.name] = f.originalValue
      // });

      // console.log('20140509 FormPanel.validate_form', ov);
      // var after = function() { 
      //     this.form.items.each(function(f){
      //         f.originalValue = ov[f.name];
      //     });
      // }
      // this.save2(null, 'validate', after);
      this.save2(null, 'validate');
  }

  /* Lino.FormPanel */
  ,save : function(after) {
    var action_name = this.save_action_name;
    if (!action_name) 
        action_name = this.action_name;
    // console.log('20140503 FormPanel.save', action_name);
    this.save2(after, action_name);
  }

  ,save2 : function(after, action_name) {
    var rec = this.get_current_record();
    if (!rec) { 
        Lino.notify("Sorry, no current record."); 
        return; 
    }
    var panel = this;
    if (this.has_file_upload) this.form.fileUpload = true;
    this.loadMask.show();
    var p = {};
    Ext.apply(p, this.get_base_params());
    p.rp = this.getId();
    p.an = action_name;
    this.add_param_tab(p)
    // console.log('20150216 FormPanel.save()', rec, this.form);
    var submit_config = {
        params: p, 
        scope: this,
        success: function(form, action) {
          this.loadMask.hide();
          Lino.notify(action.result.message);
          Lino.handle_action_result(this, action.result, after);
        },
        failure: function(form,action) { 
          this.loadMask.hide();
          Lino.on_submit_failure(form, action);
        },
        clientValidation: true
    };
    if (rec.phantom) {  // it's a new record
      Ext.apply(submit_config, {
        url: '/api' + this.ls_url,
        method: 'POST'
      });
      // panel.refresh();
      // temporarily disabled. See 20151002
    } else {  // submit on existing row
      Ext.apply(submit_config, {
        url: '/api' 
              + this.ls_url + '/' + rec.id,
        method: 'PUT'
      })
    }
    this.form.submit(submit_config);
  }
  
  ,on_cancel : function() { 
    this.get_containing_window().close();
  }
  ,on_ok : function() { 
      // console.log("20140424");
      // this.save(null, true, this.save_action_name);
      this.save();
  }
  ,config_containing_window : function(wincfg) { 

      // Note that defaultButton means: which component should receive
      // focus when Window is focussed.  If no defaultButton set,
      // specify the first form field.

      if (!wincfg.defaultButton) this.getForm().items.each(function(f){
          if(f.isFormField){ 
              wincfg.defaultButton = f;
              // console.log("20140205 defaultButton", f);
              return false;
          }
      });

      wincfg.keys = [];

      wincfg.keys.push({
          key: Ext.EventObject.ESCAPE, 
          handler: this.on_cancel, scope:this });
      wincfg.keys.push({
          key: 's', ctrl: true, 
             stopEvent: true, handler: this.on_ok, scope:this });
  }

});



Lino.getRowClass = function(record, rowIndex, rowParams, store) {
    //~ console.log(20130816,record);
    //~ return 'x-grid3-row-green';
    //~ return record.data.row_class + ' auto-height';
    return record.data.row_class;
  //~ if (true) {
      //~ return 'x-grid3-row-red';
  //~ }
  //~ if (record.phantom) {
    //~ console.log(20101009,record);
    //~ rowParams.bodyStyle = "color:red;background-color:blue";
    //~ return 'lino-phantom-row';
    //~ }
  //~ console.log('20101009 not a phantom:',record);
  //~ return '';
}

//~ FOO = 0;



Lino.GridStore = Ext.extend(Ext.data.ArrayStore,{ 
  autoLoad: false
  ,load: function(options) {
    //~ foo.bar = baz; // 20120213
    if (!options) options = {};
    if (!options.params) options.params = {};
    options.params.fmt = 'json';
    options.params.rp = this.grid_panel.getId();
    Lino.insert_subst_user(options.params); // since 20121016
      
    var start = this.grid_panel.start_at_bottom ? -1 : 0;
    if (this.grid_panel.hide_top_toolbar) {
        //~ console.log("20120206 GridStore.load() toolbar is hidden");
        options.params.start = start;
        if (this.grid_panel.preview_limit) {
          options.params.limit = this.grid_panel.preview_limit;
        }
    } else {
        var ps = this.grid_panel.calculatePageSize();
        if (!ps) {
          // console.log("GridStore.load() failed to calculate pagesize");
          return false;
        } 
        options.params.limit = ps;
      
        this.grid_panel.getTopToolbar().pageSize =  ps;
        if (options.params.start == undefined)
            // if (start != -1) 
            //     start = this.grid_panel.getTopToolbar().cursor
            options.params.start = start;
      
        // console.log("20141108 GridStore.load() ", options.params);
    }
      
    this.grid_panel.add_param_values(options.params);
    //~ Lino.insert_subst_user(options.params);
    //~ console.log("20120814 GridStore.load()",options.params,this.baseParams);
    return Lino.GridStore.superclass.load.call(this, options);
  }
  // ,insert : function(index, records) {
  //   return Ext.data.Store.prototype.insert.call(this, index, records)
    // return Lino.GridStore.superclass.insert.call(this, index, records);
  // }
});

Lino.get_current_grid_config = function(panel) {
    return panel.get_current_grid_config();
}


// Like the default value for GridView.cellTpl but adds a class "lino-auto-height"
Lino.auto_height_cell_template = new Ext.Template(
'<td class="x-grid3-col x-grid3-cell x-grid3-td-{id} {css}" style="{style}" tabIndex="0" {cellAttr}>',
    '<div class="lino-auto-height x-grid3-cell-inner x-grid3-col-{id}" unselectable="on" {attr}>{value}</div>',
'</td>'
);

Lino.GridPanel = Ext.extend(Ext.grid.EditorGridPanel, Lino.MainPanel);
Lino.GridPanel = Ext.extend(Lino.GridPanel, Lino.PanelMixin);
Lino.GridPanel = Ext.extend(Lino.GridPanel, {
  quick_search_text : '',
  start_at_bottom : false,
  is_searching : false,
  disabled_in_insert_window : true,
  clicksToEdit:2,
  enableColLock: false,
  autoHeight: false,
  params_panel_hidden : false,
  preview_limit : undefined, 
  // fake_row_content: '<br>',
  row_height: 1,
  //~ loadMask: true,
  //~ viewConfig: {
          //~ getRowClass: Lino.getRowClass,
          //~ emptyText:"$_('No data to display.')"
        //~ },
        
        
  loadMask: {msg:"Please wait..."},
  
  constructor : function(config){

    config.plugins = [new Lino.GridFilters()];
    
    
    Lino.GridPanel.superclass.constructor.call(this,config);
    
    //~ if (this.containing_window) {
        //~ console.log("20111206 install refresh");
        //~ this.containing_window.on('show',this.refresh,this);
    //~ }
    
  },
  
  init_containing_window : function(win) { 
    //~ console.log("20111206 install refresh");
    //~ win.on('show',this.refresh,this);
  }

  ,handle_key_event : function(e) {
    // console.log("20140514 handle_key_event", e, this.keyhandlers);
    var h = this.keyhandlers[e.keyCode];
    if (h) {
        h(this);
        e.stopEvent();
    }
  }
  
  ,initComponent : function(){
    
    /* 
    Problem 20111206:
    When a GridPanel is the main item of the window, then it doesn't 
    have it's own header but uses the window's header bar.
    We must do this in initComponent because e.g. in beforerender 
    it's already to late: a header element has been created because 
    there was a title.
    But Lino.Window adds itself as `this.containing_window` 
    only after the GridPanel has been initialized.
    Workaround is to generate a line "params.containing_window = true;" 
    in the handler function.
    */ 
    if (this.is_main_window) {
        //~ console.log(20111206, 'delete title',this.title,'from',this);
        this.tools = undefined;  
        this.title = undefined;  /* simply deleting it 
          isn't enough because that would only 
          unhide the title defined in some base class. */
    } 
    //~ else console.log(20111206, 'dont delete title',this.title,'from',this);
    
    /* e.g. when slave gridwindow called from a permalink */
    //~ if (this.base_params) Ext.apply(bp,this.base_params);  
    
    var proxy = new Ext.data.HttpProxy({ 
      // 20120814 
      url: '/api' + this.ls_url
      ,method: "GET"
      //~ ,url: ADMIN_URL + '/restful' + this.ls_url
      //~ ,restful: true 
      //~ ,listeners: {load:on_proxy_load} 
      //~ ,listeners: {write:on_proxy_write} 
    });
    //~ config.store = new Ext.data.JsonStore({ 
    //~ this.store = new Ext.data.ArrayStore({ 
    this.store = new Lino.GridStore({ 
      grid_panel: this
      ,listeners: { exception: Lino.on_store_exception }
      ,remoteSort: true
      ,totalProperty: "count"
      ,root: "rows"
      //~ ,id: "id" 
      ,proxy: proxy
      //~ autoLoad: this.containing_window ? true : false
      ,idIndex: this.pk_index
      //~ ,baseParams: bp
      ,fields: this.ls_store_fields
      ,idProperty: this.ls_id_property 
      // 20120814
      //~ ,writer : new Ext.data.JsonWriter({
        //~ writeAllFields: false
        //~ ,listful: true
      //~ })
      //~ ,restful : true
    });
      
    //~ console.log('config.pk_index',config.pk_index,config.store),
    delete this.ls_store_fields;
      
    var this_ = this;
    //~ var grid = this;
    this.store.on('load', function() {
        //~ console.log('20120814 GridStore.on(load)',this_.store);
        this_.set_param_values(this_.store.reader.arrayData.param_values);
        //~ this_.set_status(this_.store.reader.arrayData.status);
        //~ 20120918
        this.getView().getRowClass = Lino.getRowClass;
        
        if (this_.store.reader.arrayData.no_data_text) {
            //~ this.viewConfig.emptyText = this_.store.reader.arrayData.no_data_text;
            this.getView().emptyText = this_.store.reader.arrayData.no_data_text;
            this.getView().refresh();
        }
        if (this_.containing_window)
            this_.set_window_title(this_.store.reader.arrayData.title);
            //~ this_.containing_window.setTitle(this_.store.reader.arrayData.title);
        if (!this.is_searching) { // disabled 20121025: quick_search_field may not lose focus
          this.is_searching = false;
          if (this_.selModel.getSelectedCell){
              if (this_.getStore().getCount()) // there may be no data
                  this_.selModel.select(0,0); 
          } else {
              this_.selModel.selectFirstRow();
              this_.getView().focusEl.focus();
          }
        } 
        //~ else console.log("is_searching -> no focussing");
        //~ var t = this.getTopToolbar();
        //~ var activePage = Math.ceil((t.cursor + t.pageSize) / t.pageSize);
        //~ this.quick_search_field.focus(); // 20121024
      }, this
    );
    var actions = Lino.build_buttons(this, this.ls_bbar_actions);
    //~ Ext.apply(config,Lino.build_buttons(this,config.ls_bbar_actions));
    //~ config.bbar, this.cmenu = Lino.build_buttons(this,config.ls_bbar_actions);
    //~ this.cmenu = new Ext.menu.Menu({items: config.bbar});
    delete this.ls_bbar_actions
    if (actions) {
        this.cmenu = actions.cmenu;
        this.keyhandlers = actions.keyhandlers;
    }
    
    if (!this.hide_top_toolbar) {  
      var tbar = [ 
        this.quick_search_field = new Ext.form.TextField({ 
          //~ fieldLabel: "Search"
          listeners: { 
            scope:this_
            //~ ,change:this_.search_change
            
            ,render: Lino.quicktip_renderer("Quick Search","Enter a text to use as quick search filter")
            
            //~ ,keypress: this.search_keypress 
            ,blur: function() { this.is_searching = false}
          }
          ,validator:function(value) { return this_.search_validate(value) }
          //~ ,tooltip: "Enter a quick search text, then press TAB"
          //~ value: text
          //~ scope:this, 
          //~ ,enableKeyEvents: true
          //~ listeners: { keypress: this.search_keypress }, 
          //~ id: "seachString" 
      })];
      tbar = this.add_params_panel(tbar);
      var menu = [];
      var set_gc = function(index) {
        return function() {
          //~ console.log('set_gc() 20100812');
          this.getColumnModel().setConfig(
              this.apply_grid_config(index,this.ls_grid_configs,this.ls_columns));
        }
      }
      for (var i = 0; i < this.ls_grid_configs.length;i++) {
        var gc = this.ls_grid_configs[i];
        menu.push({text:gc.label,handler:set_gc(i),scope:this})
      }
      if(menu.length > 1) {
        tbar = tbar.concat([
          { text:"View",
            menu: menu,
            tooltip:"Select another view of this report"
          }
        ]);
      }
      
      if (actions) {
        tbar = tbar.concat(actions.bbar);
          //~ this.bbar = actions.bbar;
      }
      
      this.tbar = new Ext.PagingToolbar({ 
        store: this.store, 
        prependButtons: true, 
        //~ pageSize: this.page_length, 
        pageSize: 1, 
        displayInfo: true, 
        beforePageText: "Page",
        afterPageText: "of {0}",
        displayMsg: "Displaying {0} - {1} of {2}",
        firstText: "First page",
        lastText: "Last page",
        prevText: "Previous page",
        nextText: "Next page",
        items: tbar
      });
    }
      
    if (this.cell_edit) {
      this.selModel = new Ext.grid.CellSelectionModel()
      this.get_selected = function() {
        //~ console.log(this.getSelectionModel().selection);
        if (this.selModel.selection)
            return [ this.selModel.selection.record ];
        return [this.store.getAt(0)];
      };
      this.get_current_record = function() { 
        if (this.getSelectionModel().selection) 
          return this.selModel.selection.record;
        return this.store.getAt(0);
      };
    } else { 
      this.selModel = new Ext.grid.RowSelectionModel() 
      this.get_selected = function() {
        var sels = this.selModel.getSelections();
        if (sels.length == 0) sels = [this.store.getAt(0)];
        return sels
      };
      this.get_current_record = function() { 
        var rec = this.selModel.getSelected();
        if (rec == undefined) rec = this.store.getAt(0);
        return rec
      };
    };
    this.columns  = this.apply_grid_config(this.gc_name,this.ls_grid_configs,this.ls_columns);
    
    Lino.GridPanel.superclass.initComponent.call(this);
    
    this.on('resize', function(){
      //~ console.log("20120213 resize",arguments)
      this.refresh();
      },this);
    this.on('viewready', function(){
      //~ console.log("20120213 resize",arguments);
      this.view_is_ready = true;
      this.refresh(); // removed 20130911
      },this);
    this.on('afteredit', this.on_afteredit); // 20120814
    this.on('beforeedit', this.on_beforeedit);
    this.on('beforeedit',function(e) { this.before_row_edit(e.record)},this);
    if (this.cell_edit) {
        this.on('cellcontextmenu', Lino.cell_context_menu, this);
    } else {
        this.on('rowcontextmenu', Lino.row_context_menu, this);
    }
    //~ this.on('contextmenu', Lino.grid_context_menu, this);
    
    delete this.cell_edit;
    
  },
  
  //~ onResize : function(){
      //~ console.log("20120206 GridPanel.onResize",arguments);
      //~ Lino.GridPanel.superclass.onResize.apply(this, arguments);
      //~ this.refresh();
  //~ },
  
  
  get_status : function(){
    var st = { base_params : this.get_base_params()};
    if (!this.hide_top_toolbar) {
        // #866
        if (this.getStore().lastOptions != undefined && this.getStore().lastOptions.params != undefined){
            st.current_page = Math.round(this.getStore().lastOptions.params.start / this.getStore().lastOptions.params.limit ) + 1 ;
        }
    }
    st.param_values = this.status_param_values;
    //~ console.log("20120213 GridPanel.get_status",st);
    return st;
  },
  
  /* 
  Lino.GridPanel.set_status() 
  */
  set_status : function(status, rp){
    this.requesting_panel = Ext.getCmp(rp);
    // console.log("20140527 GridPanel.set_status", status);
    this.clear_base_params();
    if (status == undefined) status = {base_params:{}};
    this.set_param_values(status.param_values);
    if (status.base_params) { 
      this.set_base_params(status.base_params);
    }
    if (status.show_params_panel != undefined) {
        if (this.toggle_params_panel_btn) {
            //~ this.toggle_params_panel_btn.toggle(status.show_params_panel=='true');
            this.toggle_params_panel_btn.toggle(status.show_params_panel);
        }
    }
    if (!this.hide_top_toolbar) {
      //~ console.log("20120213 GridPanel.getTopToolbar().changePage",
          //~ status.current_page || 1);
      this.getTopToolbar().changePage(status.current_page || 1);
    }
    //~ this.fireEvent('resize');
    //~ this.refresh.defer(100,this); 
    //~ this.onResize.defer(100,this); 
    //~ this.refresh(); 
    //~ this.doLayout(); 
    //~ this.onResize(); 
    //~ this.store.load();
  },
  
  refresh : function(unused) { 
    this.refresh_with_after();
  },
  /* GridPanel */
  refresh_with_after : function(after) { 
    // console.log('20140504 Lino.GridPanel.refresh '+ this.store.proxy.url);
    //~ var bp = { fmt:'json' }
    if (! this.view_is_ready) return;
    
    if (this.containing_panel) {
        //~ Ext.apply(p,this.master_panel.get_master_params());
        //~ Ext.apply(options.params,this.containing_panel.get_master_params());
        this.set_base_params(this.containing_panel.get_master_params());
        // 20130911
        if (!this.store.baseParams.mk) {  
            return;
        }
    }
    
    //~ console.log('20130911 Lino.GridPanel.refresh_with_after',this.containing_panel.get_master_params());
    
    var options = {};
    if (after) {
        options.callback = function(r,options,success) {if(success) after()}
    }
      
    //~ if (!this.rendered) {
        //~ console.log("20120206 GridPanel.refresh() must wait until rendered",options);
        //~ this.grid_panel.on('render',this.load.createDelegate(this,options))
        //~ return;
    //~ }
    // Ticket 802
    if (this.store.lastOptions != undefined){
        var params = {};
        params.limit = this.store.lastOptions.params.limit;
        params.start = this.store.lastOptions.params.start;
        options.params = params;
    }
    this.store.load(options);
  },
  
  /* pageSize depends on grid height (Trying to remove scrollbar)
  Thanks to 
  - Christophe Badoit on http://www.sencha.com/forum/showthread.php?82647
  - http://www.sencha.com/forum/archive/index.php/t-37231.html
  */
  calculatePageSize : function(second_attempt) {
    //~ if (!this.rendered) { 
    if (!this.view_is_ready) { 
      //~ console.log('Cannot calculatePageSize() : not rendered');
      return false; }
    //~ if (!this.isVisible()) { 
      //~ console.log('calculatePageSize : not visible');
      //~ return false; }
      
    //~ console.log('getFrameHeight() is',this.getFrameHeight());
    //~ console.log('getView().scroller.getHeight() is',this.getView().scroller.getHeight());
    //~ console.log('mainBody.getHeight() is',this.getView().mainBody.getHeight());
    //~ console.log('getInnerHeight() is',this.getInnerHeight());
    //~ console.log('getHeight() is',this.getHeight());
    //~ console.log('el.getHeight() is',this.getEl().getHeight());
    //~ console.log('getGridEl().getHeight() is',this.getGridEl().getHeight());
    //~ console.log('getOuterSize().height is',this.getOuterSize().height);
    //~ console.log('getBox().height is',this.getBox().height);
    //~ console.log('getResizeEl.getHeight() is',this.getResizeEl().getHeight());
    //~ console.log('getLayoutTarget().getHeight() is',this.getLayoutTarget().getHeight());
      
    // var rowHeight = this.row_height * 11; experimental value 11
    // same as in ext_renderer.py that's not enough because it is the
    // height of one text line. But here we need the outer height of a
    // grid row containing that many text lines.

    var row_content = '&nbsp;'
    for (var i = 0; i < this.row_height;i++) {
        row_content += '<br>';
    }

    var Element = Ext.Element;
    var gv = this.view;
    var fakeBody = new Element(Element.fly(gv.scroller).child('div.x-grid3-body'));
    var rowTemplate = gv.templates.row;
    var cellTemplate = gv.templates.cell;
    var tstyle  = 'width:' + gv.getGridInnerWidth() + 'px;';
    // console.log("20160615", this.fake_row_content);
    var cells = cellTemplate.apply({value:row_content});
    var markup = rowTemplate.apply({
            tstyle: tstyle,
            cols  : 1,
            cells : cells,
            alt   : ''
        });        
    fakeBody.dom.innerHTML = gv.templates.body.apply({rows: markup});
    var row = fakeBody.dom.childNodes[0];
    var rowHeight = Ext.get(row).getHeight();

    //~ console.log('rowHeight is ',rowHeight,this,caller);
    //~ this.getView().syncScroll();
    //~ this.getView().initTemplates();
    var height = this.getView().scroller.getHeight();

    //~ console.log('getView().scroller.getHeight() is',this.getView().scroller.getHeight());
    //~ console.log('getInnerHeight() - getFrameHeight() is',
      //~ this.getInnerHeight(), '-',
      //~ this.getFrameHeight(), '=',
      //~ this.getInnerHeight() - this.getFrameHeight());
    //~ var height = this.getView().mainBody.getHeight();
    //~ var height = this.getView().mainWrap.getHeight();
    //~ var height = this.getView().resizeMarker.getHeight();
    //~ this.syncSize();
    //~ var height = this.getInnerHeight() - this.getFrameHeight();
    //~ var height = this.getHeight() - this.getFrameHeight();
    height -= Ext.getScrollBarWidth(); // leave room for a possible horizontal scrollbar... 
    //~ height -= this.getView().scrollOffset;
    var ps = Math.floor(height / rowHeight);
    //~ console.log('20130816 calculatePageSize():',height,'/',rowHeight,'->',ps);
    ps -= 1; // leave room for a possible phantom row
    //~ return (ps > 1 ? ps : false);
    if (ps > 1) return ps;
    //~ console.log('calculatePageSize() found less than 1 row:',height,'/',rowHeight,'->',ps);
    //~ foo.bar = baz; // 20120213
    return 5; // preview_limit
    //~ if (second_attempt) {
        //~ console.log('calculatePageSize() abandons after second attempt:',
          //~ height,'/',rowHeight,'->',ps);
      //~ return 5;
    //~ }
    //~ return this.calculatePageSize.defer(500,this,[true]);
  },
  
  onCellDblClick : function(grid, row, col){
      //~ console.log("20120307 onCellDblClick",this,grid, row, col);
      if (this.ls_detail_handler) {
          //~ Lino.notify('show detail');
          Lino.show_detail(this);
          return false;
      }else{
        //~ console.log('startEditing');
        this.startEditing(row,col);
      }
  },
  get_base_params : function() {  /* Lino.GridPanel */
    var p = Ext.apply({}, this.store.baseParams);
    Lino.insert_subst_user(p);
    // if (this.quick_search_field)
    //     if (this.quick_search_field.getValue())
    //         p.query = this.quick_search_field.getValue();
    return p;
  },
  set_base_params : function(p) {
    // console.log('20130911 GridPanel.set_base_params',p)
    for (k in p) this.store.setBaseParam(k,p[k]);
    //~ this.store.baseParams = p;
    if (this.quick_search_field)
      this.quick_search_field.setValue(p.query || "");
    //~ if (p.param_values) 
        //~ this.set_param_values(p.param_values);  
  },
  clear_base_params : function() {
      this.store.baseParams = {};
      Lino.insert_subst_user(this.store.baseParams);
  },
  set_base_param : function(k,v) {
    this.store.setBaseParam(k,v);
  },
  
  //~ get_permalink_params : function() {
    //~ var p = {};
    //~ return p;
  //~ },
  
  before_row_edit : function(record) {},
    
  //~ search_keypress : function(){
    //~ console.log("2012124 search_keypress",arguments);
  //~ },
  search_validate : function(value) {
      if (value == this.quick_search_text) return true;

      /**
      *  Cancel the previous request when do a new load request.
      *  Prevents Ajax race conditions. Ticket #2136
      **/
      var c = this.store.proxy.getConnection();
      c.abort(c.transId);

      
    this.is_searching = true;
    //~ console.log('search_validate',value)
    this.quick_search_text = value;
    this.set_base_param('query',value); 
    //~ this.getTopToolbar().changePage(1);
    this.getTopToolbar().moveFirst();
    //~ this.refresh();
    return true;
  },
  
  search_change : function(field,oldValue,newValue) {
    //~ console.log('search_change',field.getValue(),oldValue,newValue)
    this.set_base_param('query',field.getValue()); 
    this.getTopToolbar().moveFirst();
    //~ this.refresh();
  },
  
  apply_grid_config : function(index,grid_configs,rpt_columns) {
    //~ var rpt_columns = this.ls_columns;
    var gc = grid_configs[index];    
    //~ console.log('apply_grid_config() 20100812',name,gc);
    this.gc_name = index;
    if (gc == undefined) {
      return rpt_columns;
      //~ config.columns = config.ls_columns;
      //~ return;
    } 
    //~ delete config.ls_filters
    
    //~ console.log(20100805,config.ls_columns);
    var columns = Array(gc.columns.length);
    for (var j = 0; j < rpt_columns.length;j++) {
      var col = rpt_columns[j];
      for (var i = 0; i < gc.columns.length; i++) {
        if (col.dataIndex == gc.ci[i]) {
          col.width = gc.cw[i];
          col.hidden = gc.ch[i];
          columns[i] = col;
          break;
        }
      }
    }
    
    //~ var columns = Array(rpt_columns.length);
    //~ for (var i = 0; i < rpt_columns.length; i++) {
      //~ columns[i] = rpt_columns[gc.columns[i]];
      //~ columns[i].width = gc.widths[i];
    //~ }
    
    //~ if (gc.hidden_cols) {
      //~ for (var i = 0; i < gc.hidden_cols.length; i++) {
        //~ var hc = gc.hidden_cols[i];
        //~ for (var j = 0; j < columns.length;j++) {
          //~ var col = columns[j];
          //~ if (col.dataIndex == hc) {
            //~ col.hidden = true;
            //~ break
          //~ }
        //~ }
      //~ }
    //~ }
    if (gc.filters) {
      //~ console.log(20100811,'config.ls_filters',config.ls_filters);
      //~ console.log(20100811,'config.ls_grid_config.filters',config.ls_grid_config.filters);
      for (var i = 0; i < gc.filters.length; i++) {
        var fv = gc.filters[i];
        for (var j = 0; j < columns.length;j++) {
          var col = columns[j];
          if (col.dataIndex == fv.field) {
            //~ console.log(20100811, f,' == ',fv);
            if (fv.type == 'string') {
              col.filter.value = fv.value;
              //~ if (fv.comparison !== undefined) f.comparison = fv.comparison;
            } else {
              //~ console.log(20100811, fv);
              col.filter.value = {};
              col.filter.value[fv.comparison] = fv.value;
            }
            break;
          }
        };
      }
    }
    
    return columns;
    //~ config.columns = cols;
    //~ delete config.ls_columns
  },
  
  get_current_grid_config : function () {
    var cm = this.getColumnModel();
    var widths = Array(cm.config.length);
    var hiddens = Array(cm.config.length);
    //~ var hiddens = Array(cm.config.length);
    var columns = Array(cm.config.length);
    //~ var columns = Array(cm.config.length);
    //~ var hidden_cols = [];
    //~ var filters = this.filters.getFilterValues();
    var p = this.filters.buildQuery(this.filters.getFilterData())
    for (var i = 0; i < cm.config.length; i++) {
      var col = cm.config[i];
      columns[i] = col.dataIndex;
      //~ hiddens[i] = col.hidden;
      widths[i] = col.width;
      hiddens[i] = col.hidden;
      //~ if (col.hidden) hidden_cols.push(col.dataIndex);
    }
    //~ p['hidden_cols'] = hidden_cols;
    p.cw = widths;
    p.ch = hiddens;
    p.ci = columns;
    //~ p['widths'] = widths;
    //~ p['hiddens'] = hiddens;
    //~ p['columns'] = columns;
    p['name'] = this.gc_name;
    //~ var gc = this.ls_grid_configs[this.gc_name];
    //~ if (gc !== undefined) 
        //~ p['label'] = gc.label
    //~ console.log('20100810 save_grid_config',p);
    return p;
  },
  
  unused_manage_grid_configs : function() {
    var data = [];
    for (k in this.ls_grid_configs) {
      var v = this.ls_grid_configs[k];
      var i = [k,String(v.columns),String(v.hidden_cols),String(v.filters)];
      data.push(i)
    }
    if (this.ls_grid_configs[this.gc_name] == undefined) {
      var v = this.get_current_grid_config();
      var i = [k,String(v.columns),String(v.hidden_cols),String(v.filters)];
      data.push(i);
    }
    //~ console.log(20100811, data);
    var main = new Ext.grid.GridPanel({
      store: new Ext.data.ArrayStore({
        idIndex:0,
        fields:['name','columns','hidden_cols','filters'],
        autoDestroy:true,
        data: data}),
      //~ autoHeight:true,
      selModel: new Ext.grid.RowSelectionModel(),
      listeners: { 
        rowdblclick: function(grid,rowIndex,e) {
          console.log('row doubleclicked',grid, rowIndex,e);
        },
        rowclick: function(grid,rowIndex,e) {
          console.log('row clicked',grid, rowIndex,e);
        }
      },
      columns: [ 
        {dataIndex:'name',header:'Name'}, 
        {dataIndex:'columns',header:'columns'}, 
        {dataIndex:'hidden_cols',header:'hidden columns'}, 
        {dataIndex:'filters',header:'filters'} 
      ]
    });
    var win = new Ext.Window({title:'GridConfigs Manager',layout:'fit',items:main,height:200});
    win.show();
  },
  
  unused_edit_grid_config : function(name) {
    gc = this.ls_grid_configs[name];
    var win = new Ext.Window({
      title:'Edit Grid Config',layout:'vbox', 
      //~ layoutConfig:'stretch'
      items:[
        {xtype:'text', value: gc.name},
        {xtype:'text', value: gc.columns},
        {xtype:'text', value: gc.hidden_cols},
        {xtype:'text', value: gc.filters}
      ]
    });
    win.show();
  },
  
  unused_save_grid_config : function () {
    //~ console.log('TODO: save_grid_config',this);
    //~ p.column_widths = Ext.pluck(this.colModel.columns,'width');
    var a = { 
      params:this.get_current_grid_config(), 
      method:'PUT',
      url:'/grid_config' + this.ls_url,
      success: Lino.action_handler(this),
      scope: this,
      failure: Lino.ajax_error_handler(this)
    };
    this.loadMask.show(); // 20120211
    Ext.Ajax.request(a);
    //~ Lino.do_action(this,a);
  },
  
  on_beforeedit : function(e) {
    //~ console.log('20130128 GridPanel.on_beforeedit()',e,e.record.data.disable_editing);
    if(this.disable_editing | e.record.data.disable_editing) {
      e.cancel = true;
      Lino.notify("This record is disabled");
      return;
    }
    if(e.record.data.disabled_fields && e.record.data.disabled_fields[e.field]) {
      e.cancel = true;
      Lino.notify("This field is disabled");
      return;
    }
    //~ if (e.record.data.disabled_fields) {
      //~ for (i in e.record.data.disabled_fields) {
        //~ if(e.record.data.disabled_fields[i] == e.field) {
          //~ e.cancel = true;
          //~ Lino.notify(String.format('Field "{0}" is disabled for this record',e.field));
          //~ return
        //~ }
      //~ }
    //~ }
  },
  save_grid_data : function() {
      //~ console.log("20120814 save_grid_data");
      this.getStore().commitChanges();
  },
  on_afteredit : function(e) {
    /*
    e.grid - The grid that fired the event
    e.record - The record being edited
    e.field - The field name being edited
    e.value - The value being set
    e.originalValue - The original value for the field, before the edit.
    e.row - The grid row index
    e.column - The grid column index
    */
    var p = {};
    // console.log('20140403 afteredit: ',e.record);
    //~ console.log('20101130 value: ',e.value);
    //~ var p = e.record.getChanges();
    //~ console.log('20101130 getChanges: ',e.record.getChanges());
    //~ this.before_row_edit(e.record);

    for(k in e.record.getChanges()) {
        var v = e.record.get(k);
    //~ for(k in e.record.modified) {
        //~ console.log('20101130',k,'=',v);
        //~ var cm = e.grid.getColumnModel();
        //~ var di = cm.getDataIndex(k);
        var f = e.record.fields.get(k);
        //~ console.log('20101130 f = ',f);
        //~ var v = e.record.get(di);
        if (f.type.type == 'date') {
            p[k] = Ext.util.Format.date(v, f.dateFormat);
        }else{
            p[k] = v;
            var v = e.record.get(k+'Hidden');
            if (v !== undefined) {
              p[k+'Hidden'] = v;
            }
        }
    }
    // add value used by ForeignKeyStoreField CHOICES_HIDDEN_SUFFIX
    // not sure whether this is still needed:
    p[e.field+'Hidden'] = e.value;
    //~ p.su = Lino.subst_user;
    Lino.insert_subst_user(p);
    // this one is needed so that this field can serve as choice context:
    e.record.data[e.field+'Hidden'] = e.value;
    // p[pk] = e.record.data[pk];
    // console.log("grid_afteredit:",e.field,'=',e.value);
    Ext.apply(p, this.get_base_params()); // needed for POST, ignored for PUT
    //~ Ext.apply(p,this.containing_window.config.base_params);
    //~ 20121109 p['$constants.URL_PARAM_ACTION_NAME'] = 'grid';
    var self = this;
    var req = {
        params:p,
        waitMsg: 'Saving your data...',
        success: Lino.action_handler( this, function(result) {
          // console.log("20140728 afteredit.success got ", result);
          //~ if (result.data_record) {
          if (result.refresh_all) {
              var cw = self.get_containing_window();
              if (cw) {
                  cw.main_item.refresh();
              }
              else console.log("20120123 cannot refresh_all",self);
          } else if (result.rows) {
              //~ self.getStore().loadData(result,true);
              var r = self.getStore().reader.readRecords(result);
              if (e.record.phantom) {
                  // console.log("20140728 gonna call Store.insert()", self.getStore(), e.row, r.records);
                  self.getStore().insert(e.row, r.records);
              }else{
                  // console.log("20140728 afteredit.success doUpdate", r.records[0]);
                  self.getStore().doUpdate(r.records[0]);
              }
              self.getStore().rejectChanges(); 
              /* 
              get rid of the red triangles without saving the record again
              */
              //~ self.getStore().commitChanges(); // get rid of the red triangles
          } else {
              self.getStore().commitChanges(); // get rid of the red triangles
              self.getStore().reload();        // reload our datastore.
          }
          }),
        scope: this,
        failure: Lino.ajax_error_handler(this)
    };
    if (e.record.phantom) {
      req.params.an = 'grid_post'; // CreateRow.action_name
      Ext.apply(req,{
        method: 'POST',
        url: '/api' + this.ls_url
      });
    } else {
      req.params.an = 'grid_put'; // SaveRow.action_name
      Ext.apply(req,{
        method: 'PUT',
        url: '/api' + this.ls_url + '/' + e.record.id
      });
    }
    //~ console.log('20110406 on_afteredit',req);
    this.loadMask.show(); // 20120211
    Ext.Ajax.request(req);
  },

  afterRender : function() {
    Lino.GridPanel.superclass.afterRender.call(this);
    // this.getView().mainBody.focus();
    // console.log(20100114,this.getView().getRows());
    // if (this.getView().getRows().length > 0) {
    //  this.getView().focusRow(1);
    // }
    //~ this.my_load_mask = new Ext.LoadMask(this.getEl(), {
        //~ msg:'$_("Please wait...")',
        //~ store:this.store});
      
    var tbar = this.getTopToolbar();
    // tbar.on('change',function() {this.getView().focusRow(1);},this);
    // tbar.on('change',function() {this.getSelectionModel().selectFirstRow();this.getView().mainBody.focus();},this);
    // tbar.on('change',function() {this.getView().mainBody.focus();},this);
    // tbar.on('change',function() {this.getView().focusRow(1);},this);
    this.nav = new Ext.KeyNav(this.getEl(),{
      pageUp: function() {tbar.movePrevious(); },
      pageDown: function() {tbar.moveNext(); },
      home: function() {tbar.moveFirst(); },
      end: function() {tbar.moveLast(); },
      scope: this
    });

  },
  after_delete : function() {
    //~ console.log('Lino.GridPanel.after_delete');
    this.refresh();
  },
  add_row_listener : function(fn,scope) {
    this.getSelectionModel().addListener('rowselect',fn,scope);
  },
  postEditValue : function(value, originalValue, r, field){
    value = Lino.GridPanel.superclass.postEditValue.call(this,value,originalValue,r,field);
    //~ console.log('GridPanel.postEdit()',value, originalValue, r, field);
    return value;
  },
  
  set_start_value : function(v) {
      this.start_value = v;
  },
  preEditValue : function(r, field){
      if (this.start_value) {
        var v = this.start_value;
        delete this.start_value;
        this.activeEditor.selectOnFocus = false;
        return v;
      }
      var value = r.data[field];
      return this.autoEncode && Ext.isString(value) ? Ext.util.Format.htmlDecode(value) : value;
  },
  
  on_master_changed : function() {
    //~ if (! this.enabled) return;
    //~ cmp = this;
    //~ console.log('20130911 Lino.GridPanel.on_master_changed()',this.title,this.rendered);
    if (! this.rendered) return; // 20120213
    var todo = function() {
      if (this.disabled) return;
      //~ if (this.disabled) return;
      //~ if (this.enabled) {
          //~ var src = caller.config.url_data + "/" + record.id + ".jpg"
          //~ console.log(20111125, this.containing_window);
          //~ for (k in p) this.getStore().setBaseParam(k,p[k]);
          //~ console.log('Lino.GridPanel.on_master_changed()',this.title,p);
          this.refresh();
          //~ this.set_base_params(this.master_panel.get_master_params());
          //~ this.getStore().load(); 
      //~ }
    };
    Lino.do_when_visible(this,todo.createDelegate(this));
  },
  load_record_id : function(record_id,after) {
      Lino.run_detail_handler(this,record_id)
  }
  
});
  

//~ Lino.MainPanelMixin = {
  //~ tbar_items : function() {
      //~ return ;
  //~ }
//~ };

//~ Ext.override(Lino.GridPanel,Lino.MainPanelMixin);
//~ Ext.override(Lino.FormPanel,Lino.MainPanelMixin);

//~ Lino.grid_context_menu = function(e) {
  //~ console.log('contextmenu',arguments);
//~ }

Lino.row_context_menu = function(grid,row,col,e) {
  console.log('20130927 rowcontextmenu',grid,row,col,e,grid.store.reader.arrayData.rows[row]);
}

Lino.cell_context_menu = function(grid,row,col,e) {
  //~ console.log('20120531 cellcontextmenu',grid,row,col,e,grid.store.reader.arrayData.rows[row]);
  e.stopEvent();
  //~ grid.getView().focusCell(row,col);
  grid.getSelectionModel().select(row,col);
  //~ console.log(grid.store.getAt(row));
  //~ grid.getView().focusRow(row);
  //~ return;
  if(!grid.cmenu.el){grid.cmenu.render(); }
  //~ if(e.record.data.disabled_fields) {

  if (grid.disabled_fields_index) {
      var da = grid.store.reader.arrayData.rows[row][grid.disabled_fields_index];
      if (da) {
          this.cmenu.cascade(function(item){ 
            //~ console.log(20120531, item.itemId, da[item.itemId]);
            if (da[item.itemId]) item.disable(); else item.enable();
          });
      }
  };
  
  var xy = e.getXY();
  xy[1] -= grid.cmenu.el.getHeight();
  grid.cmenu.showAt(xy);
}


Lino.chooser_handler = function(combo,name) {
  return function(cmp, newValue, oldValue) {
    //~ console.log('Lino.chooser_handler()',cmp,oldValue,newValue);
    combo.setContextValue(name, newValue);
  }
};



Lino.ComboBox = Ext.extend(Ext.form.ComboBox,{
  forceSelection: "yes but select on tab",
  // forceSelection: true,
  triggerAction: 'all',
  minListWidth:280, // 20131022
  autoSelect: false,
  selectOnFocus: true, // select any existing text in the field immediately on focus.
  submitValue: true,
  displayField: 'text', // 'text', 
  valueField: 'value', // 'value',
  
  //~ initComponent : Ext.form.ComboBox.prototype.initComponent.createSequence(function() {
  initComponent : function(){
      this.contextParams = {};
      //~ Ext.form.ComboBox.initComponent(this);
      Lino.ComboBox.superclass.initComponent.call(this);
  },
  setValue : function(v, record_data){
      /*
      Based on feature request developed in http://extjs.net/forum/showthread.php?t=75751
      */
      /* `record_data` is used to get the text corresponding to this value */
      //~ if(this.name == 'city') 
      //~ console.log('20120203', this.name,'.setValue(', v ,') this=', this,'record_data=',record_data);
      var text = v;
      if(this.valueField){
        if(v == null || v == '') { 
            //~ if (this.name == 'birth_country') 
                //~ console.log(this.name,'.setValue',v,'no lookup needed, value is empty');
            //~ v = undefined;
            v = '';
            //~ text = '';
        } else if (Ext.isDefined(record_data)) {
          text = record_data[this.name];
          //~ if (this.name == 'birth_country') 
            //~ console.log(this.name,'.setValue',v,'got text ',text,' from record ',record);
        } else {
          // if(this.mode == 'remote' && !Ext.isDefined(this.store.totalLength)){
          if(this.mode == 'remote' && ( this.lastQuery === null || (!Ext.isDefined(this.store.totalLength)))){
              //~ if (this.name == 'birth_country') console.log(this.name,'.setValue',v,'store not yet loaded');
              this.store.on('load', this.setValue.createDelegate(this, arguments), null, {single: true});
              if(this.store.lastOptions === null || this.lastQuery === null){
                  var params;
                  if(this.valueParam){
                      params = {};
                      params[this.valueParam] = v;
                  }else{
                      var q = this.allQuery;
                      this.lastQuery = q;
                      this.store.setBaseParam(this.queryParam, q);
                      params = this.getParams(q);
                  }
                  //~ if (this.name == 'birth_country') 
                    //~ console.log(this.name,'.setValue',v,' : call load() with params ',params);
                  this.store.load({params: params});
              //~ }else{
                  //~ if (this.name == 'birth_country') 
                    //~ console.log(this.name,'.setValue',v,' : but store is loading',this.store.lastOptions);
              }
              return;
          //~ }else{
              //~ if (this.name == 'birth_country') 
                //~ console.log(this.name,'.setValue',v,' : store is loaded, lastQuery is "',this.lastQuery,'"');
          }
          var r = this.findRecord(this.valueField, v);
          if(r){
              text = r.data[this.displayField];
          }else if(this.valueNotFoundText !== undefined){
              text = this.valueNotFoundText;
          }
        }
      }
      this.lastSelectionText = text;
      //~ this.lastSelectionText = v;
      if(this.hiddenField){
          //~ this.hiddenField.originalValue = v;
          this.hiddenField.value = v;
      }
      Ext.form.ComboBox.superclass.setValue.call(this, text);
      this.value = v; // needed for grid.afteredit
  },
  
  getParams : function(q){
    // p = Ext.form.ComboBox.superclass.getParams.call(this, q);
    // causes "Ext.form.ComboBox.superclass.getParams is undefined"
    var p = {};
    if(this.pageSize){
        p['start'] = 0;
        p['limit'] = this.pageSize;
    }
    // now my code:
    if(this.contextParams) Ext.apply(p, this.contextParams);
    return p;
  },
  setContextValue : function(name,value) {
    //~ console.log('setContextValue',this,this.name,':',name,'=',value);
    //~ if (this.contextValues === undefined) {
        //~ this.contextValues = Array(); // this.contextParams.length);
    //~ }
    if (this.contextParams[name] != value) {
      //~ console.log('setContextValue 1',this.contextParams);
      this.contextParams[name] = value;
      this.lastQuery = null;
      //~ console.log('setContextValue 2',this.contextParams);
    }
  }
});

Lino.ChoicesFieldElement = Ext.extend(Lino.ComboBox,{
  mode: 'local'
});


Lino.SimpleRemoteComboStore = Ext.extend(Ext.data.JsonStore,{
  // forceSelection: true,  20140206 why was this here?
  constructor: function(config){
      Lino.SimpleRemoteComboStore.superclass.constructor.call(this, Ext.apply(config, {
          totalProperty: 'count',
          root: 'rows',
          id: 'value', // 'value'
          fields: ['value' ], 
          listeners: { exception: Lino.on_store_exception }
      }));
  }
});

Lino.ComplexRemoteComboStore = Ext.extend(Ext.data.JsonStore,{
  constructor: function(config){
      Lino.ComplexRemoteComboStore.superclass.constructor.call(this, Ext.apply(config, {
          totalProperty: 'count',
          root: 'rows',
          id: 'value', // constants.CHOICES_VALUE_FIELD
          fields: ['value','text'], // constants.CHOICES_VALUE_FIELD, // constants.CHOICES_TEXT_FIELD
          listeners: { exception: Lino.on_store_exception }
      }));
  }
});

Lino.RemoteComboFieldElement = Ext.extend(Lino.ComboBox,{
  mode: 'remote',
  //~ forceSelection:false,
  minChars: 2, // default 4 is too much
  queryDelay: 300, // default 500 is maybe slow
  queryParam: 'query', 
  //~ typeAhead: true,
  //~ selectOnFocus: true, // select any existing text in the field immediately on focus.
  resizable: true
  ,initList : function() {
      Lino.RemoteComboFieldElement.superclass.initList.call(this);
      if (this.pageTb) {
          
          var me = this;
          this.pageTb.on("beforechange", function(toolbar, o){
              if(me.contextParams)
                  Ext.apply(o, me.contextParams);
          });
          
          //~ 
          //~ var btn = ls_buttons
          //~ this.pageTb.items = this.pageTb.items.concat([btn]);
          //~ console.log("20131022 pageTb.items is", this.pageTb.items)
      }
  }
});

/*
Thanks to Animal for posting the basic idea:
http://www.sencha.com/forum/showthread.php?15842-2.0-SOLVED-Combobox-twintrigger-clear&p=76130&viewfull=1#post76130

*/
Lino.TwinCombo = Ext.extend(Lino.RemoteComboFieldElement,{
    trigger2Class : 'x-form-search-trigger',
    //~ trigger2Class : 'x-tbar-detail',
    initComponent : function() {
        //~ Lino.TwinCombo.superclass.initComponent.call(this);
        Lino.ComboBox.prototype.initComponent.call(this);
        Ext.form.TwinTriggerField.prototype.initComponent.call(this);
    },
    onTrigger2Click : function() {
        //~ console.log('onTrigger2Click',this,arguments);
    }
  });
//~ Lino.TwinCombo.prototype.initComponent = Ext.form.TwinTriggerField.prototype.initComponent;
Lino.TwinCombo.prototype.getTrigger = Ext.form.TwinTriggerField.prototype.getTrigger;
Lino.TwinCombo.prototype.getOuterSize = Ext.form.TwinTriggerField.prototype.getOuterSize;
Lino.TwinCombo.prototype.initTrigger = Ext.form.TwinTriggerField.prototype.initTrigger;
Lino.TwinCombo.prototype.onTrigger1Click = Ext.form.ComboBox.prototype.onTriggerClick;
//~ Lino.TwinCombo.prototype.onTrigger2Click = function() {
    //~ console.log('onTrigger2Click',arguments);
//~ };



Lino.SimpleRemoteComboFieldElement = Ext.extend(Lino.RemoteComboFieldElement,{
  displayField: 'value', 
  valueField: null,
  forceSelection: false
});




Lino.Window = Ext.extend(Ext.Window,{
  //~ layout: "fit", 
  closeAction : 'hide',
  renderTo: 'main_area', 
  constrain: true,
  maximized: true,
  draggable: false,
  width: 700,
  height: 500,
  maximizable: false,
  constructor : function (config) {
    if (config.main_item.params_panel) {
        config.layout = 'border';
        config.main_item.region = 'center';
        config.main_item.params_panel.region = 'north';
        //~ config.main_item.params_panel.autoHeight = false; // 20130924
        config.main_item.params_panel.hidden = config.main_item.params_panel_hidden;
        config.items = [config.main_item.params_panel, config.main_item];
        //~ 20130923b
    } else {
        config.layout = 'fit';
        config.items = config.main_item;
    }
    this.main_item = config.main_item; 

    if (typeof config.width == "string" && config.width.slice(-1) == "%") {
        config.width = Lino.perc2width(parseInt(config.width.slice(0, -1)));
    }
    
    delete config.main_item;
    //~ delete config.params_item;
    
    //~ this.main_item = config.items.get(0);
    this.main_item.containing_window = this;
    
    //~ console.log('20120110 Lino.Window.constructor() 1');
    //~ if (Lino.current_window) { // all windows except the top are closable
    if (this.main_item.hide_window_title) { 
      config.closable = false;
      config.frame = false;
      config.shadow = false;
      //~ config.border = true;
      //~ config.title = undefined;
      //~ config.tools = null;
      delete config.title;
      delete config.tools;
    } else {
      config.title = this.main_item.empty_title;
      config.closable = true;
      config.tools = [ 
        { qtip: 'permalink', handler: Lino.permalink_handler(this), id: "pin" }
      ];
      if (this.main_item.content_type && this.main_item.action_name != 'insert') {
        config.tools = [ {
          handler: Lino.help_text_editor,
          qtip: "Edit help texts for fields on this model.",
          scope: this.main_item,
          id: "gear"
        }].concat(config.tools);
      }
        
    //~ { qtip: '', handler: Lino.save_wc_handler(this), id: "save" }, 
    //~ { qtip: this.config.qtip, handler: Lino.save_wc_handler(this), id: "save" }, 
    //~ { qtip: 'Call doLayout() on main Container.', handler: Lino.refresh_handler(this), id: "refresh" },
    //~ if (this.main_item.params_panel) {
        //~ config.tools = config.tools.concat([ 
          //~ { qtip: 'Show/hide parameter panel', handler: this.toggle_params_panel, id: "gear", scope:this } 
        //~ ]);
    //~ }
    //~ if (config.closable !== false) {
      // if undefined, will take default behaviour
      //~ config.tools = config.tools.concat([ 
        //~ { qtip: 'close', handler: this.hide, id: "close", scope:this } 
      //~ ]);
    }
    
    this.main_item.config_containing_window(config);
    
    // console.log('20150514 Lino.Window.constructor() 2');
    Lino.Window.superclass.constructor.call(this, config);
    
    //~ console.log('20120110 Lino.Window.constructor() 3');
    
  },
  initComponent : function() {
    this.main_item.init_containing_window(this);
    Lino.Window.superclass.initComponent.call(this);
  
  },
  hide : function() { 
      this.main_item.do_when_clean(false,function() { 
        Lino.close_window(); });
  },
  hide_really : function() { 
    Lino.Window.superclass.hide.call(this);
  },
  onRender : function(ct, position){
    // console.log('20140829 Lino.Window.onRender() 1');
    Lino.Window.superclass.onRender.call(this, ct, position);
    var main_area = Ext.getCmp('main_area')
    //~ console.log('20120110 Lino.Window.onRender() 2');
  
    this.on('show', function(win) {
        // console.log('20140829 Lino.Window.on(show) : add resize handler');
        main_area.on('resize', win.onWindowResize, win);
    });
    this.on('hide', function(win) {
        // console.log('20140829 Lino.Window.on(hide) : remove resize handler');
        main_area.un('resize', win.onWindowResize, win);
    });
    // console.log('20140829 Lino.Window.onRender() 3');
  }
});


Ext.override(Ext.form.BasicForm,{
    my_loadRecord : function(record_data){
    //~ loadRecord : function(record){
        /* Same as ExtJS's loadRecord() (setValues()), except that we
        forward also the record_data to field.setValue(). This second
        parameter is used by Lino.Combobox.
        */
        //~ console.log('20120918 my_loadRecord', record_data)
        if(Ext.isArray(record_data)){ 
            for(var i = 0, len = record_data.length; i < len; i++){
                var v = record_data[i];
                var f = this.findField(v.id);
                if(f){
                    f.setValue(v.value, record_data);
                    if(this.trackResetOnLoad){
                        f.originalValue = f.getValue();
                    }
                }
            }
        }else{ 
            var field, id;
            for(id in record_data){
                if(!Ext.isFunction(record_data[id]) && (field = this.findField(id))){
                    field.setValue(record_data[id], record_data);
                    if(this.trackResetOnLoad){
                        field.originalValue = field.getValue();
                        //~ if (field.hiddenField) {
                          //~ field.hiddenField.originalValue = field.hiddenField.value;
                        //~ }
                    }
                }
            }
        }
        return this;
    }
});




function initializeFooBarDropZone(cmp) {
    //~ console.log('initializeFooBarDropZone',cmp);
    cmp.dropTarget = new Ext.dd.DropTarget(cmp.bwrap, {
      //~ ddGroup     : 'gridDDGroup',
      notifyEnter : function(ddSource, e, data) {
        console.log('notifyEnter',ddSource,e,data);
        //Add some flare to invite drop.
        cmp.body.stopFx();
        cmp.body.highlight();
      },
      notifyDrop  : function(ddSource, e, data){
        console.log('notifyDrop',ddSource,e,data);
        // Reference the record (single selection) for readability
        //~ var selectedRecord = ddSource.dragData.selections[0];


        // Load the record into the form
        //~ formPanel.getForm().my_loadRecord(selectedRecord);


        // Delete record from the grid.  not really required.
        //~ ddSource.grid.store.remove(selectedRecord);

        return(true);
      }
    })
}



Lino.show_mti_child = function(fieldname,detail_handler) {
  //~ console.log('show_mti_child',this);
  //~ console.log('show_mti_child',panel.find("main_area"));
  rec = Lino.current_window.main_item.get_current_record();
  //~ rec = panel.get_current_record();
  if (rec) {
    //~ console.log('show_mti_child',Lino.current_window,rec);
    if (rec.phantom) {
      Lino.notify('Not allowed on phantom record.');
    }else if (rec.data[fieldname]) {
      //~ console.log('show_mti_child',rec.id);
      //~ detail_handler(Lino.current_window.main_item,{},{record_id:rec.id});
      detail_handler.run(null,{record_id:rec.id});
      //~ window.open(urlroot + '/' + rec.id);
      //~ document.location = urlroot + '/' + rec.id;
      //~ window.open(urlroot + '/' + rec.id,'_blank');
    } else {
      Lino.alert("Cannot show MTI child if checkbox is off.");
    }
  } else {
    Lino.notify('No current record.');
  }
};


/*
captureEvents utility by Aaron Conran
<http://www.sencha.com/learn/grid-faq/>

Ext.onReady(function(){
    var grid = new Ext.grid.GridPanel({
        ... 
    });
    captureEvents(grid);
});
*/
function captureEvents(observable) {
    Ext.util.Observable.capture(
        observable,
        function(eventName) {
            console.info(eventName);
        },
        this
    );		
}

// settings.SITE.get_plugin_snippets()




// from lino_xl.lib.extensible (media_name=extensible-1.0.1):snippets/extensible.js

/*
  This is the `extensible.js` snippet. 
  Used in lino.modlib.extensible.App.site_js_snippets
*/

/*
Mappings towards lino.modlib.extensible.models.PanelCalendars
*/
// Sset SS = Ssite.modules.extensible.PanelCalendars.get_handle(Sui).store
Ext.ensible.cal.CalendarMappings = {
    CalendarId:   {name:'ID',       mapping: 'id', type: 'int'},
    Title:        {name:'CalTitle', mapping: 'summary', type: 'string'},
    Description:  {name:'Desc',     mapping: 'description', type: 'string'},
    ColorId:      {name:'Color',    mapping: 'color', type: 'int'},
    IsHidden:     {name:'Hidden',   mapping: 'is_hidden', type: 'boolean'},    
};
Ext.ensible.cal.CalendarRecord.reconfigure();  


/*
Mappings towards lino.modlib.extensible.models.PanelEvents 
*/
// Sset SS = Ssite.modules.extensible.PanelEvents.get_handle(Sui).store
Ext.ensible.cal.EventMappings = {
    EventId:     {name: 'ID',        mapping: 'id', type:'int'},
    CalendarId:  {name: 'CalID',     mapping: 'calendarHidden', type: 'int'},
    Title:       {name: 'EvtTitle',  mapping: 'summary'},
    StartDate:   {name: 'StartDt',   mapping: 'start_dt', 
      type: 'date', 
      dateFormat: "Y-m-d\TH:i:s" },
    EndDate:     {name: 'EndDt',     mapping: 'end_dt', 
      type: 'date', 
      dateFormat: "Y-m-d\TH:i:s"},
    RRule:       {name: 'RecurRule', mapping: 'rsetHidden'},
    Location:    {name: 'Location',  mapping: 'placeHidden'},
    Notes:       {name: 'Desc',      mapping: 'description'},
    Url:         {name: 'LinkUrl',   mapping: 'url'},
    IsAllDay:    {name: 'AllDay',    mapping: 'all_day', type: 'boolean'},
    Reminder:    {name: 'Reminder',  mapping: 'reminder'}
    
};
Ext.ensible.cal.EventRecord.reconfigure();


//~ Lino.on_eventclick = 
    
Lino.on_editdetails = 

Lino.format_time = function(dt) {
    return dt.getHours() + ':' + dt.getMinutes();
}
    
Lino.on_eventdelete = function() {
  //~ console.log("Lino.on_eventdelete",arguments);
};

Lino.on_eventadd  = function(cp,rec,el) {
  //~ console.log("Lino.on_eventadd ",arguments);
  return false;
}
    
Lino.on_eventresize  = function(cp,rec,el) {
  //~ console.log("Lino.on_eventresize ",arguments);
  //~ Lino.cal.Events.insert(cp);
  //~ return false;
}
    
Lino.on_eventupdate  = function(cp,rec,el) {
  //~ console.log("Lino.on_eventupdate",arguments);
  //~ Lino.cal.Events.insert(cp);
  //~ return false;
}
    

//~ Lino.eventStore = new Ext.ensible.cal.EventStore({ 
//~ Lino.eventStore = new Ext.data.ArrayStore({ 
Lino.unused_eventStore = new Ext.data.JsonStore({ 
  listeners: { exception: Lino.on_store_exception }
  ,url: '/restful/extensible/PanelEvents'
  ,restful : true
  ,proxy: new Ext.data.HttpProxy({ 
      url: '/restful/extensible/PanelEvents', 
      disableCaching: false // no need for cache busting when loading via Ajax
      //~ disableCaching:true,
  })
  ,fields: Ext.ensible.cal.EventRecord.prototype.fields.getRange()
  ,totalProperty: "count"
  ,root: "rows"
  ,idProperty: Ext.ensible.cal.EventMappings.EventId.mapping
  ,writer : new Ext.data.JsonWriter({
    writeAllFields: false
  })
  ,load: function(options) {
    //~ foo.bar = baz; // 20120213
      if (!options) options = {};
      if (!options.params) options.params = {};
      //~ options.params.$constants.URL_PARAM_TEAM_VIEW = Lino.calendar_app.team_view_button.pressed;
      
      var view = this.cal_panel.getActiveView();
      var bounds = view.getViewBounds();
      //~ var p = {sd:'05.02.2012',ed:'11.02.2012'};
      //~ var p = {};
      options.params[view.dateParamStart] = bounds.start.format(view.dateParamFormat);
      options.params[view.dateParamEnd] = bounds.end.format(view.dateParamFormat);
      Lino.insert_subst_user(options.params);
      //~ Ext.apply(options.params,p)
      //~ console.log('20120710 eventStore.load()',this.baseParams,options);
    
    return Ext.data.JsonStore.prototype.load.call(this,options);
  }
});


Lino.CalendarCfg = {
    dateParamFormat: 'd.m.Y',
    dateParamStart:'sd',
    dateParamEnd:'ed'
};
//~ 20120704 Lino.CalendarPanel = Ext.extend(Ext.ensible.cal.CalendarPanel,Lino.MainPanel);
//~ Lino.CalendarPanel = Ext.extend(Lino.CalendarPanel,{
Ext.override(Ext.ensible.cal.CalendarPanel,Lino.MainPanel);
Ext.override(Ext.ensible.cal.CalendarPanel,{
  //~ empty_title : "\$ui.get_actor('cal.Panel').report.label",
  empty_title : "Calendar"
  ,activeItem: 1 // 0: day, 1: week
  ,ls_url: '/extensible/CalendarPanel'
  //~ ,disableCaching:true
  //~ ,eventStore: Lino.eventStore
  //~ ,calendarStore: Lino.calendarStore
  //~ ,initComponent : function(){
    //~ Ext.ensible.cal.CalendarPanel.superclass.initComponent.call(this);
    //~ this.eventStore.on('load',function(){
      //~ console.log("20130808",Lino.eventStore);
      //~ if (this.eventStore.reader.jsonData) {
        //~ console.log("20130808 b",this.eventStore.reader.jsonData.title);
        //~ this.set_window_title(this.eventStore.reader.jsonData.title);
      //~ }
    //~ },this);
  //~ }
  ,listeners: { 
    editdetails: function(cp,rec,el) {
      //~ console.log("Lino.on_editdetails",arguments);
      if (rec.data.ID)
          Lino.extensible.PanelEvents.detail.run(null,{
              record_id:rec.data.ID,
              base_params:this.app_instance.event_store.baseParams});
      return false;
    }
    ,eventclick: function(cp,rec,el) {
      //~ console.log("Lino.on_eventclick",arguments);
      //~ Lino.cal.Events.detail_action.run({record_id:rec.data.ID});
      Lino.extensible.PanelEvents.detail.run(null,{
            record_id:rec.data.ID,
                base_params:this.app_instance.event_store.baseParams});
      return false;
    }
    //~ ,eventadd: Lino.on_eventadd
    //~ ,eventdelete: Lino.on_eventdelete
    //~ ,eventresize: Lino.on_eventresize
    ,afterrender : function(config) {
      // console.log("20140402 CalendarPanel.afterrender");
      this.app_instance.calendar_store.cal_panel = this;
      // 20140402 this.app_instance.calendar_store.load();
      //~ console.log("20120704 afterrender calls eventStore.load()",p);
      this.app_instance.event_store.cal_panel = this;
      //~ Lino.eventStore.load({params:p});
      //~ 20130905 removed: this.app_instance.event_store.load();
      //~ Lino.CalendarPanel.superclass.constructor.call(this, config);
      //~ console.log(20120118, config,this);
    }
    }
  ,enableEditDetails: false
  //~ ,monthViewCfg: Lino.CalendarCfg
  //~ ,weekViewCfg: Lino.CalendarCfg
  //~ ,multiDayViewCfg: Lino.CalendarCfg
  //~ ,multiWeekViewCfg: Lino.CalendarCfg
  //~ ,dayViewCfg: Lino.CalendarCfg
  //~ ,initComponent : function() {
    //~ // this.on('eventadd',Lino.on_eventadd);
    //~ Lino.CalendarPanel.superclass.initComponent.call(this);
  //~ }
});




Lino.CalendarAppPanel = Ext.extend(Ext.Panel,Lino.MainPanel);
Lino.CalendarAppPanel = Ext.extend(Lino.CalendarAppPanel,Lino.PanelMixin);
Lino.CalendarAppPanel = Ext.extend(Lino.CalendarAppPanel,{
  app_instance : null
  //~ empty_title : "\$ui.get_actor('cal.Panel').report.label",
  ,empty_title : "Calendar"
  ,ls_url: '/extensible/CalendarPanel'
  ,set_status : function(status,rp) { 
      // console.log('20140402 CalendarAppPanel.set_status()', status);
      this.requesting_panel = Ext.getCmp(rp);
      this.clear_base_params();
      if (status == undefined) status = {};
      //~ if (status.param_values) 
      //~ this.set_field_values(status.field_values);
      if (status.base_params) this.set_base_params(status.base_params);
      this.refresh();
      }
  ,refresh : function() {
      //~ this.app_instance.event_store.reload(); 20130905
      this.app_instance.calendar_store.load();  // added 20140402
      this.app_instance.event_store.load();
  }
  ,layout: 'fit'
  ,get_base_params : function() {
    // console.log('20140402 getbase_params has', this.base_params);
    var p = Ext.apply({}, this.base_params);
    Lino.insert_subst_user(p);
    // console.log('20140402 getbase_params returns', p);
    return p;
  }
  ,set_base_params : function(p) {
    this.base_params = Ext.apply(this.app_instance.event_store.baseParams,p);
    this.app_instance.event_store.baseParams = this.base_params;
    // console.log('20140402 this.base_params is', this.base_params);
  }
  ,clear_base_params : function() {
      this.base_params = {};
      Lino.insert_subst_user(this.base_params);
  }
  ,set_base_param : function(k,v) {
      if (!this.base_params) this.base_params = {};
      this.base_params[k] = v;
  }
});

Lino.CalendarApp = function() { return {
  team_view_button : null 
  ,get_main_panel : function() {
      var cap = null;
      this.event_store = new Ext.data.JsonStore({ 
          listeners: { exception: Lino.on_store_exception }
          ,url: '/restful/extensible/PanelEvents'
          ,restful : true
          ,proxy: new Ext.data.HttpProxy({ 
              url: '/restful/extensible/PanelEvents', 
              disableCaching: false // no need for cache busting when loading via Ajax
              //~ disableCaching:true,
          })
          ,fields: Ext.ensible.cal.EventRecord.prototype.fields.getRange()
          ,totalProperty: "count"
          ,root: "rows"
          ,idProperty: Ext.ensible.cal.EventMappings.EventId.mapping
          ,writer : new Ext.data.JsonWriter({
            writeAllFields: false
          })
          ,load: function(options) {
            //~ foo.bar = baz; // 20120213
              if (!options) options = {};
              if (!options.params) options.params = {};
              //~ options.params.$constants.URL_PARAM_TEAM_VIEW = Lino.calendar_app.team_view_button.pressed;
              
              var view = this.cal_panel.getActiveView();
              var bounds = view.getViewBounds();
              //~ var p = {sd:'05.02.2012',ed:'11.02.2012'};
              //~ var p = {};
              options.params[view.dateParamStart] = bounds.start.format(view.dateParamFormat);
              options.params[view.dateParamEnd] = bounds.end.format(view.dateParamFormat);
              Lino.insert_subst_user(options.params);
              Ext.apply(options.params, cap.get_base_params());
              //~ this.cal_panel.base_params.su.toString();
              //~ if (this.cal_panel) {
                  // Ext.apply(options.params,this.cal_panel.base_params);
              //~ }
              //~ Ext.apply(options.params,p)
              //~ console.log('20130905 eventStore.load()',this.cal_panel,this.baseParams,options.params);
            
            return Ext.data.JsonStore.prototype.load.call(this,options);
          }
      });

      //~ Lino.calendarStore
      this.calendar_store = new Ext.data.JsonStore({ 
          listeners: { exception: Lino.on_store_exception }
          ,restful : true
          ,proxy: new Ext.data.HttpProxy({ 
              url: '/restful/extensible/PanelCalendars?fmt=json', 
              disableCaching: false // no need for cache busting when loading via Ajax
              //~ restful : true
              //~ method: "GET"
          })
          //~ ,autoLoad: true
          //~ ,remoteSort: true
          //~ ,baseParams: bp
          ,totalProperty: "count"
          ,root: "rows"
          ,fields: Ext.ensible.cal.CalendarRecord.prototype.fields.getRange()
          ,idProperty: Ext.ensible.cal.CalendarMappings.CalendarId.mapping
          //~ ,idIndex: Ext.ensible.cal.CalendarMappings.CalendarId.mapping
          ,load: function(options) {
              // new since 20140402 add substitute user when calling
              // calendars
              if (!options) options = {};
              if (!options.params) options.params = {};
              // Lino.insert_subst_user(options.params);
              Ext.apply(options.params, cap.get_base_params());
              // console.log("20140402 calendar_store.load", options.params, 
              //             this.cal_panel, cap.get_base_params());
            return Ext.data.JsonStore.prototype.load.call(this,options);
          }
      });
      
      cap = new Lino.CalendarAppPanel({ 
          app_instance: this, 
          items : 
        //~ [{
          //~ id: 'app-header',
          //~ region: 'north',
          //~ height: 35,
          //~ border: false,
          // contentEl: 'app-header-content'
        //~ },
      {
          id: 'app-center',
          title: '...', // will be updated to the current view's date range
          region: 'center',
          layout: 'border',
          listeners: {
              'afterrender': function(){
                  Ext.getCmp('app-center').header.addClass('app-center-header');
              }
          },
          items: [{
              id:'app-west',
              region: 'west',
              width: 176,
              border: false,
              items: [{
                  xtype: 'datepicker',
                  id: 'app-nav-picker',
                  cls: 'ext-cal-nav-picker',
                  listeners: {
                      'select': {
                          fn: function(dp, dt){
                              // console.log("20131017",dp);
                              //~ Lino.calendarPanel.setStartDate(dt);
                              //~ cap.setStartDate(dt);
                              Ext.getCmp('app-calendar').setStartDate(dt);
                          },
                          //~ scope: this
                      }
                  }
              //~ },{ 
                //~ layout:'fit',
                //~ items: [
                  //~ new Ext.form.Checkbox({
                    //~ boxLabel:"$_('Team view')",
                    //~ hideLabel:true
                    //~ listeners: { click: }
                  //~ })
                //~ ]
              //~ },{ 
                //~ layout:'form',
                //~ items: [
                  //~ this.team_view_button = new Ext.Button({
                    //~ text:"Team view",
                    //~ enableToggle:true,
                    //~ pressed:false,
                    //~ toggleHandler: function(btn,state) { 
                      //~ // console.log('20120716 teamView.toggle()');
                      //~ this.event_store.setBaseParam('tv',state);
                      //~ this.event_store.load();
                      //~ // console.log("team view",state);
                    //~ }
                  //~ })
                //~ ]
              },{
                  xtype: 'extensible.calendarlist',
                  store: this.calendar_store,
                  border: false,
                  width: 175
              }]
          },{
              xtype: 'extensible.calendarpanel', // Ext.ensible.cal.CalendarPanel
              eventStore: this.event_store,
              app_instance: this,
              calendarStore: this.calendar_store,
              border: false,
              id:'app-calendar',
              region: 'center',
              //~ activeItem: 3, // month view
              
              // Any generic view options that should be applied to all sub views:
              viewConfig: {
                  // Lino.CalendarCfg
                  dateParamFormat: 'd.m.Y',
                  dateParamStart:'sd',
                  dateParamEnd:'ed',
                
                  //enableFx: false,
                  //ddIncrement: 10, //only applies to DayView and subclasses, but convenient to put it here
                  viewStartHour: 8, // 8
                  viewEndHour: 18 // 18
                  //minEventDisplayMinutes: 15
              },
              
              // View options specific to a certain view (if the same options exist in viewConfig
              // they will be overridden by the view-specific config):
              monthViewCfg: {
                  showHeader: true,
                  showWeekLinks: true,
                  showWeekNumbers: true,
                  eventBodyMarkup: ['{Title}',
                    //~ '<tpl if="url">',
                        //~ '<a href="{url}">XX</a>',
                    //~ '</tpl>',
                    '<tpl if="_isReminder">',
                        '<i class="ext-cal-ic ext-cal-ic-rem">&#160;</i>',
                    '</tpl>',
                    '<tpl if="_isRecurring">',
                        '<i class="ext-cal-ic ext-cal-ic-rcr">&#160;</i>',
                    '</tpl>',
                    '<tpl if="spanLeft">',
                        '<i class="ext-cal-spl">&#160;</i>',
                    '</tpl>',
                    '<tpl if="spanRight">',
                        '<i class="ext-cal-spr">&#160;</i>',
                    '</tpl>'
                ].join('')
              },
              
              multiWeekViewCfg: {
                  //weekCount: 3
              },
              
              // Some optional CalendarPanel configs to experiment with:
              //readOnly: true,
              //showDayView: false,
              //showMultiDayView: true,
              //showWeekView: false,
              //showMultiWeekView: false,
              //showMonthView: false,
              //showNavBar: false,
              //showTodayText: false,
              //showTime: false,
              //editModal: true,
              //enableEditDetails: false,
              //title: 'My Calendar', // the header of the calendar, could be a subtitle for the app
              
              // Once this component inits it will set a reference to itself as an application
              // member property for easy reference in other functions within App.
              //~ initComponent: function() {
                  //~ Lino.calendarPanel = this;
                  //~ this.constructor.prototype.initComponent.apply(this, arguments);
              //~ },
              
              listeners: {
                  //~ 'eventclick': {
                      //~ fn: function(vw, rec, el){
                          //~ this.clearMsg();
                      //~ },
                      //~ scope: this
                  //~ },
                  'eventover': function(vw, rec, el){
                      //console.log('Entered evt rec='+rec.data[Ext.ensible.cal.EventMappings.Title.name]', view='+ vw.id +', el='+el.id);
                  },
                  'eventout': function(vw, rec, el){
                      //console.log('Leaving evt rec='+rec.data[Ext.ensible.cal.EventMappings.Title.name]+', view='+ vw.id +', el='+el.id);
                  },
                  'eventadd': {
                      fn: function(cp, rec){
                          this.showMsg('Event '+ rec.data[Ext.ensible.cal.EventMappings.Title.name] +' was added');
                      },
                      scope: this
                  },
                  'eventupdate': {
                      fn: function(cp, rec){
                          this.showMsg('Event '+ rec.data[Ext.ensible.cal.EventMappings.Title.name] +' was updated');
                      },
                      scope: this
                  },
                  'eventdelete': {
                      fn: function(cp, rec){
                          //this.eventStore.remove(rec);
                          this.showMsg('Event '+ rec.data[Ext.ensible.cal.EventMappings.Title.name] +' was deleted');
                      },
                      scope: this
                  },
                  'eventcancel': {
                      fn: function(cp, rec){
                          // edit canceled
                      },
                      scope: this
                  },
                  'viewchange': {
                      fn: function(p, vw, dateInfo){
                          if(this.editWin){
                              this.editWin.hide();
                          };
                          if(dateInfo !== null){
                              // will be null when switching to the event edit form so ignore
                              Ext.getCmp('app-nav-picker').setValue(dateInfo.activeDate);
                              this.updateTitle(dateInfo.viewStart, dateInfo.viewEnd);
                          }
                          
                      },
                      scope: this
                  },
                  'dayclick': {
                      fn: function(vw, dt, ad, el){
                          this.clearMsg();
                      },
                      scope: this
                  },
                  'rangeselect': {
                      fn: function(vw, dates, onComplete){
                          this.clearMsg();
                      },
                      scope: this
                  },
                  'eventmove': {
                      fn: function(vw, rec){
                          rec.commit();
                          var time = rec.data[Ext.ensible.cal.EventMappings.IsAllDay.name] ? '' : ' \\a\\t g:i a';
                          this.showMsg('Event '+ rec.data[Ext.ensible.cal.EventMappings.Title.name] +' was moved to '+
                              rec.data[Ext.ensible.cal.EventMappings.StartDate.name].format('F jS'+time));
                      },
                      scope: this
                  },
                  'eventresize': {
                      fn: function(vw, rec){
                          rec.commit();
                          this.showMsg('Event '+ rec.data[Ext.ensible.cal.EventMappings.Title.name] +' was updated');
                      },
                      scope: this
                  },
                  'eventdelete': {
                      fn: function(win, rec){
                          this.event_store.remove(rec);
                          this.showMsg('Event '+ rec.data[Ext.ensible.cal.EventMappings.Title.name] +' was deleted');
                      },
                      scope: this
                  },
                  'initdrag': {
                      fn: function(vw){
                          if(this.editWin && this.editWin.isVisible()){
                              this.editWin.hide();
                          }
                      },
                      scope: this
                  }
              }
          }]
        }
        //~ ]
        
      });
      
      this.event_store.on('load',function(){
        //~ console.log("20130905 on event_store load",this.event_store.reader.jsonData);
        if (this.event_store.reader.jsonData) {
          //~ console.log("20130808 b",this.event_store.reader.jsonData.title);
          //~ console.log("20130808 c",this);
          cap.set_window_title(this.event_store.reader.jsonData.title);
        }
      },this);
      
      //~ cap.app_instance = this;
      return cap;
      
  }
  ,updateTitle: function(startDt, endDt){
      var p = Ext.getCmp('app-center');
      
      if(startDt.clearTime().getTime() == endDt.clearTime().getTime()){
          p.setTitle(startDt.format('F j, Y'));
      }
      else if(startDt.getFullYear() == endDt.getFullYear()){
          if(startDt.getMonth() == endDt.getMonth()){
              p.setTitle(startDt.format('F j') + ' - ' + endDt.format('j, Y'));
          }
          else{
              p.setTitle(startDt.format('F j') + ' - ' + endDt.format('F j, Y'));
          }
      }
      else{
          p.setTitle(startDt.format('F j, Y') + ' - ' + endDt.format('F j, Y'));
      }
  }
  // This is an application-specific way to communicate CalendarPanel event messages back to the user.
  // This could be replaced with a function to do "toast" style messages, growl messages, etc. This will
  // vary based on application requirements, which is why it's not baked into the CalendarPanel.
  ,showMsg: function(msg){
      Lino.notify(msg);
      //~ Ext.fly('app-msg').update(msg).removeClass('x-hidden');
  }
  
  ,clearMsg: function(){
      Lino.notify('');
      //~ Ext.fly('app-msg').update('').addClass('x-hidden');
  }
}
};


// from lino.modlib.tinymce (media_name=tinymce-3.5.11):tinymce/tinymce.js

/* Copyright 2009-2015 Luc Saffre */


Lino.edit_tinymce_text = function(panel, tinymce_options) {
  // edit the text in own window.
  // `panel` is the RichTextPanel
  // console.log(20150520, panel);
  //~ var rec = panel.get_current_record();
  var rec = panel.containing_panel.get_current_record();
  var value = rec ? rec.data[panel.editor.name] : '';
  var saving = false;
  var todo_after_save = false;
  var discard_changes = false;
  
  
  function save() {
    if (saving) {alert('tried to save again'); return; }
    var url = panel.containing_panel.get_record_url(rec.id);
    var params = Ext.apply({}, panel.containing_panel.get_base_params());
    params[panel.editor.name] = editor.getValue();
    //~ params.su = Lino.subst_user;
    //~ Lino.insert_subst_user(params);

    // 20150325 http://trac.lino-framework.org/ticket/131
    var action_name = panel.containing_panel.save_action_name;
    if (!action_name) 
        action_name = panel.containing_panel.action_name;
    params.an = action_name;

    var a = { 
      params: params, 
      method: 'PUT',
      url: url,
      failure: function() {
          //~ if (editor.ed.getContainer()) 
          editor.ed.setProgressState(0);
          todo_after_save = false;
          saving = false;
          console.log('tinymce.save() failed. sorry.',arguments);
        },
      success: function() {
        saving = false;
        //~ if (editor.ed.getContainer()) 
        editor.ed.setProgressState(0);
        rec.data[panel.editor.name] = editor.getValue();
        if(todo_after_save) {
            var fn = todo_after_save;
            todo_after_save = false;
            fn();
        }
        //~ panel.containing_window.set_current_record(rec);
        panel.refresh();
      }
    };
    //~ if (editor.ed.getContainer()) 
    editor.ed.setProgressState(1); // Show progress
    saving = true;
    //~ console.log(a);
    Ext.Ajax.request(a);
  };
  function save_callback() {
      save();
      //~ save(function(){editor.ed.setDirty(false);})
      /* return true have the save button disabled.  
      That's not perfect because the PUT is asynchronous 
      and the response is not yet known.
      */
      return true;
  }
  //~ var actions = [
    //~ {text:"Save",handler:save}
  //~ ]; 
  //~ console.log(20110610,panel.editor.disabled);
  var settings = {};
  Ext.apply(settings,{
        readonly: panel.editor.disabled,
        //~ language: "de",
        plugins : "save,emotions,spellchecker,advhr,insertdatetime,preview,table,searchreplace,template", 
        // Theme options - button# indicated the row# only
        theme_advanced_buttons1 : "save,cancel,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,fontselect,fontsizeselect,formatselect,|,search,replace",
        theme_advanced_buttons2 : "cut,copy,paste,template,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,|,code,preview,|,forecolor,backcolor",
        theme_advanced_buttons3 : "insertdate,inserttime,|,spellchecker,advhr,,removeformat,|,sub,sup,|,charmap,emotions,|,tablecontrols",
        theme_advanced_resizing : false,
        convert_urls : false,
        save_onsavecallback : save_callback,
        save_enablewhendirty : true
        //~ save_oncancelcallback: on_cancel
  });
  Ext.apply(settings, tinymce_options);
  var editor = new Ext.ux.TinyMCE({
      value : value,
      tinymceSettings: settings
    });
  var win = new Ext.Window({
    title: rec.title, 
    //~ bbar: actions,
    layout: 'fit',
    items: editor,
    width: 500, 
    height: 400,
    minWidth: 100,
    minHeight: 100,
    modal: true,
    resizable: true,
    maximizable: true,
    //~ maximized: true,
    //~ closeAction: "close"
    closeAction: "hide"
    //~ hideMode: "offsets",
    //~ constrainHeader: true,
    //~ bodyStyle: 'padding: 10px'
  });

  //~ win.on('beforeclose',function() {
  win.on('beforehide',function() {
    if (todo_after_save) return false;
    if (discard_changes) return true;
    if (editor.isDirty()) {
        //~ var ok = false;
        //~ var allowClose = true;
        var config = {title:"Confirmation"};
        config.buttons = Ext.MessageBox.YESNOCANCEL;
        config.msg = "Save changes to text ?";
        config.modal = true;
        config.fn = function(buttonId,text,opt) {
          //~ console.log('do_when_clean',buttonId)
          if (buttonId == "yes") {
              /* we cancel this close, but save()'s onSuccess will call again.*/
              //~ allowClose = false;
              todo_after_save = function(){win.hide();}
              editor.ed.execCommand('mceSave');
              //~ editor.ed.save(function(){win.close();});
          } else if (buttonId == "no") { 
              discard_changes = true;
              win.hide()
          //~ } else if (buttonId == "cancel") { 
            //~ ok = true;
              //~ allowClose = false;
          //~ } else { 
            //~ console.log('unknwon buttonId:',buttonId);
          }
        }
        Ext.MessageBox.show(config);
        return false;
        //~ return allowClose;
    }
  });
  win.show();
}


Lino.RichTextPanel = Ext.extend(Ext.Panel,Lino.PanelMixin);
Lino.RichTextPanel = Ext.extend(Lino.RichTextPanel,Lino.FieldBoxMixin);
Lino.RichTextPanel = Ext.extend(Lino.RichTextPanel,{
    
  //~ initComponent : function(){
    //~ Lino.RichTextPanel.superclass.initComponent.call(this);
  //~ },
  constructor : function(config, params) {
      // console.log('20150520a Lino.RichTextPanel.initComponent', this);
    //~ var url = TEMPLATES_URL + config.ls_url + "/" + String(rec.id) + "/" + config.name;
    //~ var url = TEMPLATES_URL + config.ls_url + "/" + config.name;
    var t = this;
    var tinymce_options = {
        theme : "advanced",
        content_css: '/static/extjs/lino.css,/static/tinymce_content.css',

        theme_advanced_font_sizes : "12px,13px,14px,16px,18px,20px,24px",
        font_size_style_values : "12px,13px,14px,16px,18px,20px,24px",
        language: 'en',
        //~ template_external_list_url : url,
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
        template_popup_width : 500,
        template_popup_height : 400,
        template_replace_values : { 
            data_field : function(element){ 
                //~ console.log(20110722,fieldName,t.containing_window.get_current_record()); 
                var fieldName = element.innerHTML;
                element.innerHTML = t.containing_panel.get_current_record().data[fieldName];
            } 
        }
      };
      
    var editorConfig = {
      tinymceSettings: {
        plugins : "noneditable,template", 
        // Theme options - button# indicated the row# only
        theme_advanced_buttons1 : "bold,italic,underline,|,justifyleft,justifycenter,justifyright,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,removeformat,template",
        theme_advanced_buttons2 : "",
        theme_advanced_buttons3 : "", // ,|,sub,sup,|,charmap",      
        theme_advanced_resizing : false
        //~ save_onsavecallback : save_callback,
        //~ save_enablewhendirty : true
        //~ save_oncancelcallback: on_cancel
        
    }};
    Ext.apply(editorConfig.tinymceSettings, tinymce_options);
    //~ editorConfig.name = config.action_name;
    editorConfig.name = config.name;
    delete config.name;
    //~ config.title = config.label;
    //~ delete config.label;
    this.before_init(config,params);
    
    // console.log('20150520b Lino.RichTextPanel.initComponent', this);

    this.editor = new Ext.ux.TinyMCE(editorConfig);
    var t = this;
    function save_cmd() { 
        // console.log("20150902 save_cmd()", arguments);            
        var cw = t.get_containing_window();
        if (cw) {
            cw.main_item.save();
        }
    }
    this.editor.withEd(function(){
        if (!t.editor.ed.addShortcut(
            'ctrl+s', 'Save the content', save_cmd)) {
            console.log("20150902 addShortcut() failed");            
        };
        // t.editor.ed.onKeyDown.add(function(ed, e) {
        //     if (e.keyCode == 13 && e.ctrlKey) {
        //         save_cmd(); 
        //         return tinymce.dom.Event.cancel(e); 
        //         // e.preventDefault();
        //         // http://stackoverflow.com/questions/18971284/event-preventdefault-vs-return-false-no-jquery
        //     }
        // });
    });
    config.tools = [{
                      qtip: "Edit text in own window", 
                      id: "up",
                      handler: function(){
                        if(t.editor.isDirty()) {
                            var record = t.containing_panel.get_current_record();
                            record.data[t.editor.name] = t.editor.getValue();
                        }
                        Lino.edit_tinymce_text(t, tinymce_options)
                      }
                    }];
    
    config.items = this.editor;
    config.layout = "fit";
    // console.log('20150520c Lino.RichTextPanel.initComponent', this);
    Lino.RichTextPanel.superclass.constructor.call(this, config);
    // console.log('20150520d Lino.RichTextPanel.initComponent', this);
  },
  getValue : function(v) {
      return this.editor.getValue(v);
  },
  refresh : function(unused) { 
      this.refresh_with_after();
  },
  /* RichTextPanel */
  refresh_with_after : function(after) {
    // when called from the dashboard:    
    if (!this.containing_panel.get_current_record) { return; }
    var record = this.containing_panel.get_current_record();
    // console.log('20140504 RichTextPanel.refresh()',
    //             this.title,record.title, record);
    var todo = function() {
      if (record) {
        var url = '/tinymce/templates' 
              + this.containing_panel.ls_url + "/" 
              + String(record.id) + "/" + this.editor.name;
        // console.log('20150415 RichTextPanel.refresh()',url);
        if (this.editor.ed)
            this.editor.ed.settings.template_external_list_url = url;
            // else {console.log("20150415 no editor")}
        this.set_base_params(this.containing_panel.get_master_params());
        //~ var v = record ? this.format_data(record.data[this.editor.name]) : ''
        var v = this.format_data(record.data[this.editor.name])
        this.editor.setValue(v);
      } else {
        this.editor.setValue('(no data)');
      }
    };
    Lino.do_when_visible(this,todo.createDelegate(this));
  }
});
//~ Ext.override(Lino.RichTextPanel,Lino.FieldBoxMixin);


// from lino.modlib.comments:comments/comments.js

function toggle_visibility(id) {
   var e = document.getElementById(id);
   if(e.style.display == 'block'|| (e.style.display != 'block' && e.style.display != 'none'))
      e.style.display = 'none';
   else
      e.style.display = 'block';
}
Lino.main_menu = [ { "menu": { "items": [ { "handler": function() {Lino.about.About.show.run(null,{ "record_id": -99998 })}, "listeners": { "render": Lino.quicktip_renderer("Foo","Show information about this site.") }, "text": "About" } ] }, "text": "Site" }, { "handler": function() {Lino.handle_home_button()}, "text": "Home" } ];
Ext.namespace('Lino.countries.Countries')
Ext.namespace('Lino.countries.Places')
Ext.namespace('Lino.system.SiteConfigs')
Ext.namespace('Lino.contacts.Partners')
Ext.namespace('Lino.contacts.Persons')
Ext.namespace('Lino.contacts.CompanyTypes')
Ext.namespace('Lino.contacts.Companies')
Ext.namespace('Lino.contacts.RoleTypes')
Ext.namespace('Lino.contacts.Roles')
Ext.namespace('Lino.gfks.ContentTypes')
Ext.namespace('Lino.gfks.HelpTexts')
Ext.namespace('Lino.checkdata.Problems')
Ext.namespace('Lino.checkdata.AllProblems')
Ext.namespace('Lino.checkdata.MyProblems')
Ext.namespace('Lino.cal.RemoteCalendars')
Ext.namespace('Lino.cal.Rooms')
Ext.namespace('Lino.cal.AllRooms')
Ext.namespace('Lino.cal.Priorities')
Ext.namespace('Lino.cal.Calendars')
Ext.namespace('Lino.cal.Subscriptions')
Ext.namespace('Lino.cal.Tasks')
Ext.namespace('Lino.cal.MyTasks')
Ext.namespace('Lino.cal.GuestRoles')
Ext.namespace('Lino.cal.Guests')
Ext.namespace('Lino.cal.AllGuests')
Ext.namespace('Lino.cal.MyPresences')
Ext.namespace('Lino.cal.MyPendingPresences')
Ext.namespace('Lino.cal.MyGuests')
Ext.namespace('Lino.cal.EventTypes')
Ext.namespace('Lino.cal.RecurrentEvents')
Ext.namespace('Lino.cal.Events')
Ext.namespace('Lino.cal.AllEntries')
Ext.namespace('Lino.cal.PublicEntries')
Ext.namespace('Lino.cal.EntriesByDay')
Ext.namespace('Lino.cal.OneEvent')
Ext.namespace('Lino.cal.MyEntries')
Ext.namespace('Lino.cal.MyEntriesToday')
Ext.namespace('Lino.cal.MyAssignedEvents')
Ext.namespace('Lino.cal.OverdueAppointments')
Ext.namespace('Lino.cal.MyOverdueAppointments')
Ext.namespace('Lino.cal.MyUnconfirmedAppointments')
Ext.namespace('Lino.cal.EventPolicies')
Ext.namespace('Lino.extensible.PanelCalendars')
Ext.namespace('Lino.extensible.PanelEvents')
Ext.namespace('Lino.addresses.Addresses')
Ext.namespace('Lino.phones.ContactDetails')
Ext.namespace('Lino.households.Types')
Ext.namespace('Lino.households.Households')
Ext.namespace('Lino.households.Members')
Ext.namespace('Lino.humanlinks.Links')
Ext.namespace('Lino.topics.TopicGroups')
Ext.namespace('Lino.topics.Topics')
Ext.namespace('Lino.topics.AllTopics')
Ext.namespace('Lino.topics.Interests')
Ext.namespace('Lino.topics.AllInterests')
Ext.namespace('Lino.lists.ListTypes')
Ext.namespace('Lino.lists.Lists')
Ext.namespace('Lino.lists.Members')
Ext.namespace('Lino.lists.AllMembers')
Ext.namespace('Lino.blogs.EntryTypes')
Ext.namespace('Lino.blogs.Entries')
Ext.namespace('Lino.blogs.MyEntries')
Ext.namespace('Lino.blogs.AllEntries')
Ext.namespace('Lino.blogs.LatestEntries')
Ext.namespace('Lino.uploads.UploadTypes')
Ext.namespace('Lino.uploads.Uploads')
Ext.namespace('Lino.uploads.AllUploads')
Ext.namespace('Lino.uploads.MyUploads')
Ext.namespace('Lino.uploads.AreaUploads')
Ext.namespace('Lino.excerpts.ExcerptTypes')
Ext.namespace('Lino.excerpts.Excerpts')
Ext.namespace('Lino.excerpts.AllExcerpts')
Ext.namespace('Lino.excerpts.MyExcerpts')
Ext.namespace('Lino.tinymce.TextFieldTemplates')
Ext.namespace('Lino.tinymce.MyTextFieldTemplates')
Ext.namespace('Lino.comments.CommentTypes')
Ext.namespace('Lino.comments.Comments')
Ext.namespace('Lino.comments.MyComments')
Ext.namespace('Lino.comments.CommentsByX')
Ext.namespace('Lino.comments.AllComments')
Ext.namespace('Lino.comments.RecentComments')
Ext.namespace('Lino.dashboard.Widgets')
Ext.namespace('Lino.dashboard.AllWidgets')
Ext.namespace('Lino.users.Users')
Ext.namespace('Lino.users.AllUsers')
Ext.namespace('Lino.users.UsersOverview')
Ext.namespace('Lino.users.MySettings')
Ext.namespace('Lino.users.Authorities')
Ext.namespace('Lino.users.OtherUsers')
Ext.namespace('Lino.users.Register')
Ext.namespace('Lino.users.NewUsers')
Ext.namespace('Lino.sessions.SessionTable')
Ext.namespace('Lino.countries.PlacesByPlace')
Ext.namespace('Lino.countries.PlacesByCountry')
Ext.namespace('Lino.contacts.PartnersByCity')
Ext.namespace('Lino.contacts.PartnersByCountry')
Ext.namespace('Lino.contacts.RolesByCompany')
Ext.namespace('Lino.contacts.RolesByPerson')
Ext.namespace('Lino.contacts.CompaniesByCompany')
Ext.namespace('Lino.checkdata.ProblemsByChecker')
Ext.namespace('Lino.cal.SubscriptionsByUser')
Ext.namespace('Lino.cal.SubscriptionsByCalendar')
Ext.namespace('Lino.cal.TasksByUser')
Ext.namespace('Lino.cal.GuestsByEvent')
Ext.namespace('Lino.cal.GuestsByRole')
Ext.namespace('Lino.cal.GuestsByPartner')
Ext.namespace('Lino.cal.EntriesByType')
Ext.namespace('Lino.cal.ConflictingEvents')
Ext.namespace('Lino.cal.EntriesByRoom')
Ext.namespace('Lino.addresses.AddressesByPartner')
Ext.namespace('Lino.addresses.AddressesByCity')
Ext.namespace('Lino.phones.ContactDetailsByPartner')
Ext.namespace('Lino.households.HouseholdsByType')
Ext.namespace('Lino.households.MembersByHousehold')
Ext.namespace('Lino.households.SiblingsByPerson')
Ext.namespace('Lino.households.MembersByPerson')
Ext.namespace('Lino.humanlinks.LinksByHuman')
Ext.namespace('Lino.topics.TopicsByGroup')
Ext.namespace('Lino.topics.InterestsByPartner')
Ext.namespace('Lino.topics.InterestsByTopic')
Ext.namespace('Lino.lists.MembersByList')
Ext.namespace('Lino.lists.MembersByPartner')
Ext.namespace('Lino.blogs.EntriesByType')
Ext.namespace('Lino.uploads.UploadsByType')
Ext.namespace('Lino.excerpts.ExcerptsByType')
Ext.namespace('Lino.comments.CommentsByType')
Ext.namespace('Lino.dashboard.WidgetsByUser')
Ext.namespace('Lino.users.AuthoritiesGiven')
Ext.namespace('Lino.users.AuthoritiesTaken')
Ext.namespace('Lino.uploads.UploadsByController')
Ext.namespace('Lino.comments.CommentsByRFC')
Ext.namespace('Lino.cal.TasksByController')
Ext.namespace('Lino.checkdata.ProblemsByOwner')
Ext.namespace('Lino.cal.EntriesByController')
Ext.namespace('Lino.topics.InterestsByController')
Ext.namespace('Lino.gfks.HelpTextsByModel')
Ext.namespace('Lino.excerpts.ExcerptsByOwner')
Ext.namespace('Lino.blogs.EntriesByController')
Ext.namespace('Lino.about.SiteSearch')
Ext.namespace('Lino.about.Models')
Ext.namespace('Lino.about.FieldsByModel')
Ext.namespace('Lino.about.Inspector')
Ext.namespace('Lino.about.SourceFiles')
Ext.namespace('Lino.gfks.BrokenGFKs')
Ext.namespace('Lino.gfks.BrokenGFKsByModel')
Ext.namespace('Lino.about.About')
Ext.namespace('Lino.extensible.CalendarPanel')
Ext.namespace('Lino.checkdata.Checkers')
Ext.namespace('Lino.cal.DurationUnits')
Ext.namespace('Lino.uploads.UploadAreas')
Ext.namespace('Lino.cal.TaskStates')
Ext.namespace('Lino.addresses.DataSources')
Ext.namespace('Lino.cal.Weekdays')
Ext.namespace('Lino.households.MemberDependencies')
Ext.namespace('Lino.excerpts.Shortcuts')
Ext.namespace('Lino.system.PeriodEvents')
Ext.namespace('Lino.cal.Recurrencies')
Ext.namespace('Lino.system.Genders')
Ext.namespace('Lino.uploads.Shortcuts')
Ext.namespace('Lino.cal.EventEvents')
Ext.namespace('Lino.households.MemberRoles')
Ext.namespace('Lino.cal.GuestStates')
Ext.namespace('Lino.addresses.AddressTypes')
Ext.namespace('Lino.phones.ContactDetailTypes')
Ext.namespace('Lino.printing.BuildMethods')
Ext.namespace('Lino.cal.EntryStates')
Ext.namespace('Lino.humanlinks.LinkTypes')
Ext.namespace('Lino.cal.AccessClasses')
Ext.namespace('Lino.system.YesNo')
Ext.namespace('Lino.users.UserTypes')
Ext.namespace('Lino.contacts.PartnerEvents')
Ext.namespace('Lino.countries.PlaceTypes')
Ext.namespace('Lino.users.UserStates')

// ChoiceLists: 
Lino.checkdata.Checkers = [ [ "printing.CachedPrintableChecker", "Check for missing target files" ], [ "countries.PlaceChecker", "Check data of geographical places." ], [ "cal.EventGuestChecker", "Entries without participants" ], [ "cal.ConflictingEventsChecker", "Check for conflicting calendar entries" ], [ "cal.ObsoleteEventTypeChecker", "Obsolete event type of generated entries" ], [ "cal.LongEntryChecker", "Too long-lasting calendar entries" ], [ "addresses.AddressOwnerChecker", "Check for missing or non-primary address records" ], [ "phones.ContactDetailsOwnerChecker", "Check for mismatches between contact details and owner" ] ];
Lino.cal.DurationUnits = [ [ "s", "seconds" ], [ "m", "minutes" ], [ "h", "hours" ], [ "D", "days" ], [ "W", "weeks" ], [ "M", "months" ], [ "Y", "years" ] ];
Lino.uploads.UploadAreas = [ [ "90", "Uploads" ] ];
Lino.cal.TaskStates = [ [ "10", "To do" ], [ "15", "Important" ], [ "20", "Started" ], [ "30", "Done" ], [ "50", "Cancelled" ] ];
Lino.addresses.DataSources = [ [ "01", "Manually entered" ], [ "02", "Read from eID" ] ];
Lino.cal.Weekdays = [ [ "1", "Monday" ], [ "2", "Tuesday" ], [ "3", "Wednesday" ], [ "4", "Thursday" ], [ "5", "Friday" ], [ "6", "Saturday" ], [ "7", "Sunday" ] ];
Lino.households.MemberDependencies = [ [ "01", "At full charge" ], [ "02", "Not at charge" ], [ "03", "At shared charge" ] ];
Lino.excerpts.Shortcuts = [  ];
Lino.system.PeriodEvents = [ [ "10", "Starts" ], [ "20", "Is active" ], [ "30", "Ends" ] ];
Lino.cal.Recurrencies = [ [ "O", "once" ], [ "D", "daily" ], [ "W", "weekly" ], [ "M", "monthly" ], [ "Y", "yearly" ], [ "P", "per weekday" ], [ "E", "Relative to Easter" ] ];
Lino.system.Genders = [ [ "M", "Male" ], [ "F", "Female" ] ];
Lino.uploads.Shortcuts = [  ];
Lino.cal.EventEvents = [ [ "10", "Stable" ], [ "20", "Unstable" ] ];
Lino.households.MemberRoles = [ [ "01", "Head of household" ], [ "02", "Spouse" ], [ "03", "Partner" ], [ "04", "Cohabitant" ], [ "05", "Child" ], [ "06", "Relative" ], [ "07", "Adopted child" ], [ "10", "Other" ] ];
Lino.cal.GuestStates = [ [ "10", "Invited" ], [ "40", "Present" ], [ "50", "Absent" ], [ "60", "Excused" ] ];
Lino.addresses.AddressTypes = [ [ "01", "Official address" ], [ "02", "Unverified address" ], [ "03", "Declared address" ], [ "04", "Reference address" ], [ "98", "Obsolete" ], [ "99", "Other" ] ];
Lino.phones.ContactDetailTypes = [ [ "010", "E-Mail" ], [ "020", "Mobile" ], [ "030", "Phone" ], [ "040", "Website" ], [ "050", "Fax" ], [ "090", "Other" ] ];
Lino.printing.BuildMethods = [ [ "latex", "LatexBuildMethod" ], [ "pisa", "PisaBuildMethod" ], [ "rtf", "RtfBuildMethod" ], [ "xml", "XmlBuildMethod" ], [ "weasy2html", "WeasyHtmlBuildMethod" ], [ "weasy2pdf", "WeasyPdfBuildMethod" ] ];
Lino.cal.EntryStates = [ [ "10", "Suggested" ], [ "20", "Draft" ], [ "50", "Took place" ], [ "70", "Cancelled" ] ];
Lino.humanlinks.LinkTypes = [ [ "01", "Father (Mother)" ], [ "02", "Adoptive father (Adoptive mother)" ], [ "03", "Grandfather (Grandmother)" ], [ "05", "Husband (Wife)" ], [ "06", "Friend (Friend)" ], [ "07", "Partner (Partner)" ], [ "08", "Stepfather (Stepmother)" ], [ "09", "Foster father (Foster mother)" ], [ "10", "Brother (Sister)" ], [ "11", "Cousin (Cousin)" ], [ "12", "Uncle (Aunt)" ], [ "80", "Relative (Relative)" ], [ "90", "Other (Other)" ] ];
Lino.cal.AccessClasses = [ [ "10", "Private" ], [ "20", "Show busy" ], [ "30", "Public" ] ];
Lino.system.YesNo = [ [ "y", "Yes" ], [ "n", "No" ] ];
Lino.users.UserTypes = [ [ "000", "000 (Anonymous)" ], [ "100", "100 (User)" ], [ "200", "200 (Collector)" ], [ "300", "300 (Project manager)" ], [ "800", "800 (Staff)" ], [ "900", "900 (Administrator)" ] ];
Lino.contacts.PartnerEvents = [  ];
Lino.countries.PlaceTypes = [ [ "10", "Member State" ], [ "11", "Division" ], [ "12", "Region" ], [ "13", "Community" ], [ "14", "Territory" ], [ "20", "County" ], [ "21", "Province" ], [ "22", "Shire" ], [ "23", "Subregion" ], [ "24", "Department" ], [ "25", "Arrondissement" ], [ "26", "Prefecture" ], [ "27", "District" ], [ "28", "Sector" ], [ "50", "City" ], [ "51", "Town" ], [ "52", "Municipality" ], [ "54", "Parish" ], [ "55", "Township" ], [ "56", "Quarter" ], [ "61", "Borough" ], [ "62", "Small borough" ], [ "70", "Village" ] ];
Lino.users.UserStates = [ [ "10", "New" ], [ "20", "Active" ], [ "30", "Inactive" ] ];

Lino.cal.Tasks.ParamsPanel = Ext.extend(Ext.form.FormPanel, {
  autoScroll: false,
  border: false,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  layout: 'form',
  autoHeight: true,
  initComponent : function() {
    var start_date1 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Date from</span>", "listeners": { "render": Lino.quicktip_renderer("Date from","(cal.Tasks.start_date) Start of observed date range") }, "name": "start_date", "selectOnFocus": true, "value": null });
    var end_date2 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">until</span>", "listeners": { "render": Lino.quicktip_renderer("until","(cal.Tasks.end_date) End of observed date range") }, "name": "end_date", "selectOnFocus": true, "value": null });
    var user3 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Managed by</span>", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Managed by","(cal.Tasks.user) Only rows managed by this user.") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Tasks/user" }) }) });
    var state4 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">State</span>", "forceSelection": true, "hiddenName": "stateHidden", "listeners": { "render": Lino.quicktip_renderer("State","(cal.Tasks.state) Only rows having this state.") }, "name": "state", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.cal.TaskStates) });
    var main_1_panel5 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 22, "items": start_date1, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 22, "items": end_date2, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 34, "items": user3, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 20, "items": state4, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 99, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    this.items = [ main_1_panel5 ];
    this.fields = [ start_date1, end_date2, user3, state4 ];
    Lino.cal.Tasks.ParamsPanel.superclass.initComponent.call(this);
  }
});


Lino.tinymce.TextFieldTemplates.ParamsPanel = Ext.extend(Ext.form.FormPanel, {
  autoScroll: false,
  border: false,
  labelWidth: 63,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  layout: 'form',
  autoHeight: true,
  initComponent : function() {
    var user11 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "Author", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Author","(tinymce.TextFieldTemplates.user) ") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/tinymce/TextFieldTemplates/user" }) }), "value": null });
    this.items = [ { "autoHeight": true, "items": user11, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ user11 ];
    Lino.tinymce.TextFieldTemplates.ParamsPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.OneEvent.ParamsPanel = Ext.extend(Ext.form.FormPanel, {
  autoScroll: false,
  autoHeight: true,
  border: false,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  layout: 'form',
  autoHeight: true,
  initComponent : function() {
    var start_date14 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Date from</span>", "listeners": { "render": Lino.quicktip_renderer("Date from","(cal.OneEvent.start_date) Start of observed date range") }, "name": "start_date", "selectOnFocus": true, "value": null });
    var end_date15 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">until</span>", "listeners": { "render": Lino.quicktip_renderer("until","(cal.OneEvent.end_date) End of observed date range") }, "name": "end_date", "selectOnFocus": true, "value": null });
    var observed_event16 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Observed event", "forceSelection": true, "hiddenName": "observed_eventHidden", "listeners": { "render": Lino.quicktip_renderer("Observed event","(cal.OneEvent.observed_event) ") }, "name": "observed_event", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.cal.EventEvents) });
    var state17 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">State</span>", "forceSelection": true, "hiddenName": "stateHidden", "listeners": { "render": Lino.quicktip_renderer("State","(cal.OneEvent.state) Only rows having this state.") }, "name": "state", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.cal.EntryStates) });
    var main_1_panel18 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 26, "items": start_date14, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 26, "items": end_date15, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 22, "items": observed_event16, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 26, "items": state17, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 135, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var user23 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Managed by</span>", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Managed by","(cal.OneEvent.user) Only rows managed by this user.") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/OneEvent/user" }) }) });
    var assigned_to24 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Assigned to</span>", "hiddenName": "assigned_toHidden", "listeners": { "render": Lino.quicktip_renderer("Assigned to","(cal.OneEvent.assigned_to) Only events assigned to this user.") }, "name": "assigned_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/OneEvent/assigned_to" }) }) });
    var event_type25 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Calendar entry type...", "fieldLabel": "Calendar entry type", "hiddenName": "event_typeHidden", "listeners": { "render": Lino.quicktip_renderer("Calendar entry type","(cal.OneEvent.event_type) ") }, "name": "event_type", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.cal.EventTypes.detail,Lino.cal.EventTypes.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/OneEvent/event_type" }) }) });
    var room26 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Room...", "fieldLabel": "Room", "hiddenName": "roomHidden", "listeners": { "render": Lino.quicktip_renderer("Room","(cal.OneEvent.room) ") }, "name": "room", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.cal.Rooms.detail,Lino.cal.Rooms.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/OneEvent/room" }) }) });
    var show_appointments27 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Appointments</span>", "forceSelection": true, "hiddenName": "show_appointmentsHidden", "listeners": { "render": Lino.quicktip_renderer("Appointments","(cal.OneEvent.show_appointments) Whether only appointments should be\nshown.  \"Yes\" means only appointments, \"No\"\nmeans no appointments and leaving it to blank shows both types\nof events.") }, "name": "show_appointments", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.system.YesNo) });
    var main_2_panel28 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 21, "items": user23, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 21, "items": assigned_to24, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 21, "items": event_type25, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 21, "items": room26, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 15, "items": show_appointments27, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 180, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    this.items = [ main_1_panel18, main_2_panel28 ];
    this.fields = [ start_date14, end_date15, observed_event16, state17, user23, assigned_to24, event_type25, room26, show_appointments27 ];
    Lino.cal.OneEvent.ParamsPanel.superclass.initComponent.call(this);
  }
});


Lino.about.Inspector.ParamsPanel = Ext.extend(Ext.form.FormPanel, {
  autoHeight: true,
  frame: true,
  layoutConfig: { "align": "stretchmax" },
  hideCheckBoxLabels: true,
  autoScroll: false,
  labelWidth: 153,
  border: false,
  bodyBorder: false,
  labelAlign: "top",
  layout: 'hbox',
  autoHeight: true,
  initComponent : function() {
    var inspected35 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Inspected object", "listeners": { "render": Lino.quicktip_renderer("Inspected object","(about.Inspector.inspected) ") }, "maxLength": 100, "name": "inspected", "selectOnFocus": true });
    var show_callables36 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "show callables", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("show callables","(about.Inspector.show_callables) ") }, "name": "show_callables", "selectOnFocus": true });
    this.items = [ { "autoHeight": true, "flex": 67, "items": inspected35, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 32, "items": show_callables36, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ inspected35, show_callables36 ];
    Lino.about.Inspector.ParamsPanel.superclass.initComponent.call(this);
  }
});


Lino.phones.ContactDetails.ParamsPanel = Ext.extend(Ext.form.FormPanel, {
  autoHeight: true,
  frame: true,
  layoutConfig: { "align": "stretchmax" },
  hideCheckBoxLabels: true,
  autoScroll: false,
  labelWidth: 180,
  border: false,
  bodyBorder: false,
  labelAlign: "top",
  layout: 'hbox',
  autoHeight: true,
  initComponent : function() {
    var partner40 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Partner...", "fieldLabel": "Partner", "hiddenName": "partnerHidden", "listeners": { "render": Lino.quicktip_renderer("Partner","(phones.ContactDetails.partner) ") }, "name": "partner", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Partners.detail,Lino.contacts.Partners.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/phones/ContactDetails/partner" }) }), "value": null });
    var detail_type41 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Contact detail type", "forceSelection": true, "hiddenName": "detail_typeHidden", "listeners": { "render": Lino.quicktip_renderer("Contact detail type","(phones.ContactDetails.detail_type) ") }, "name": "detail_type", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.phones.ContactDetailTypes), "value": null });
    this.items = [ { "autoHeight": true, "flex": 66, "items": partner40, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 33, "items": detail_type41, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ partner40, detail_type41 ];
    Lino.phones.ContactDetails.ParamsPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.RecurrentEvents.ParamsPanel = Ext.extend(Ext.form.FormPanel, {
  autoScroll: false,
  border: false,
  labelWidth: 63,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  layout: 'form',
  autoHeight: true,
  initComponent : function() {
    var user45 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "Author", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Author","(cal.RecurrentEvents.user) ") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/RecurrentEvents/user" }) }), "value": null });
    this.items = [ { "autoHeight": true, "items": user45, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ user45 ];
    Lino.cal.RecurrentEvents.ParamsPanel.superclass.initComponent.call(this);
  }
});


Lino.contacts.Persons.ParamsPanel = Ext.extend(Ext.form.FormPanel, {
  autoHeight: true,
  frame: true,
  layoutConfig: { "align": "stretchmax" },
  hideCheckBoxLabels: true,
  autoScroll: false,
  labelWidth: 135,
  border: false,
  bodyBorder: false,
  labelAlign: "top",
  layout: 'hbox',
  autoHeight: true,
  initComponent : function() {
    var observed_event48 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Observed event</span>", "listeners": { "render": Lino.quicktip_renderer("Observed event","(contacts.Persons.observed_event) Extended filter criteria") }, "maxLength": 50, "name": "observed_event", "selectOnFocus": true });
    var start_date49 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Date from</span>", "listeners": { "render": Lino.quicktip_renderer("Date from","(contacts.Persons.start_date) Start of observed date range") }, "name": "start_date", "selectOnFocus": true, "value": null });
    var end_date50 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">until</span>", "listeners": { "render": Lino.quicktip_renderer("until","(contacts.Persons.end_date) End of observed date range") }, "name": "end_date", "selectOnFocus": true, "value": null });
    var company51 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Organization...", "fieldLabel": "Organization", "hiddenName": "companyHidden", "listeners": { "render": Lino.quicktip_renderer("Organization","(contacts.Persons.company) ") }, "name": "company", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Companies.detail,Lino.contacts.Companies.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/contacts/Persons/company" }) }) });
    var function52 = new Lino.RemoteComboFieldElement({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Function...", "fieldLabel": "Function", "hiddenName": "functionHidden", "listeners": { "render": Lino.quicktip_renderer("Function","(contacts.Persons.function) ") }, "name": "function", "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/contacts/Persons/function" }) }) });
    var topic53 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Topic...", "fieldLabel": "Topic", "hiddenName": "topicHidden", "listeners": { "render": Lino.quicktip_renderer("Topic","(contacts.Persons.topic) ") }, "name": "topic", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.topics.Topics.detail,Lino.topics.Topics.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/contacts/Persons/topic" }) }) });
    this.items = [ { "autoHeight": true, "flex": 19, "items": observed_event48, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 12, "items": start_date49, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 12, "items": end_date50, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 18, "items": company51, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 18, "items": function52, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 18, "items": topic53, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ observed_event48, start_date49, end_date50, company51, function52, topic53 ];
    Lino.contacts.Persons.ParamsPanel.superclass.initComponent.call(this);
  }
});


Lino.households.Members.ParamsPanel = Ext.extend(Ext.form.FormPanel, {
  autoHeight: true,
  frame: true,
  layoutConfig: { "align": "stretchmax" },
  hideCheckBoxLabels: true,
  autoScroll: false,
  labelWidth: 108,
  border: false,
  bodyBorder: false,
  labelAlign: "top",
  layout: 'hbox',
  autoHeight: true,
  initComponent : function() {
    var end_date61 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">until</span>", "listeners": { "render": Lino.quicktip_renderer("until","(households.Members.end_date) End date of observed period") }, "name": "end_date", "selectOnFocus": true, "value": null });
    var gender62 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Gender</span>", "forceSelection": true, "hiddenName": "genderHidden", "listeners": { "render": Lino.quicktip_renderer("Gender","(households.Members.gender) The sex of this person (male or female).") }, "name": "gender", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.system.Genders), "value": null });
    var start_date63 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Period from</span>", "listeners": { "render": Lino.quicktip_renderer("Period from","(households.Members.start_date) Start date of observed period") }, "name": "start_date", "selectOnFocus": true, "value": null });
    var aged_to64 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Aged to</span>", "listeners": { "render": Lino.quicktip_renderer("Aged to","(households.Members.aged_to) Select only persons aged at most the given number of years.") }, "name": "aged_to", "selectOnFocus": true });
    var aged_from65 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Aged from</span>", "listeners": { "render": Lino.quicktip_renderer("Aged from","(households.Members.aged_from) Select only persons aged at least the given number of years.") }, "name": "aged_from", "selectOnFocus": true });
    this.items = [ { "autoHeight": true, "flex": 28, "items": end_date61, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 20, "items": gender62, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 28, "items": start_date63, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 11, "items": aged_to64, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 11, "items": aged_from65, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ end_date61, gender62, start_date63, aged_to64, aged_from65 ];
    Lino.households.Members.ParamsPanel.superclass.initComponent.call(this);
  }
});


Lino.checkdata.Problems.ParamsPanel = Ext.extend(Ext.form.FormPanel, {
  autoHeight: true,
  frame: true,
  layoutConfig: { "align": "stretchmax" },
  hideCheckBoxLabels: true,
  autoScroll: false,
  labelWidth: 108,
  border: false,
  bodyBorder: false,
  labelAlign: "top",
  layout: 'hbox',
  autoHeight: true,
  initComponent : function() {
    var user72 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Responsible</span>", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Responsible","(checkdata.Problems.user) The user reponsible\nfor fixing this problem.") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/checkdata/Problems/user" }) }), "value": null });
    var checker73 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Checker</span>", "forceSelection": true, "hiddenName": "checkerHidden", "listeners": { "render": Lino.quicktip_renderer("Checker","(checkdata.Problems.checker) The Checker which reported\nthis problem.") }, "name": "checker", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.checkdata.Checkers), "value": null });
    this.items = [ { "autoHeight": true, "flex": 50, "items": user72, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": checker73, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ user72, checker73 ];
    Lino.checkdata.Problems.ParamsPanel.superclass.initComponent.call(this);
  }
});


Lino.uploads.Uploads.ParamsPanel = Ext.extend(Ext.form.FormPanel, {
  autoHeight: true,
  frame: true,
  layoutConfig: { "align": "stretchmax" },
  hideCheckBoxLabels: true,
  autoScroll: false,
  labelWidth: 108,
  border: false,
  bodyBorder: false,
  labelAlign: "top",
  layout: 'hbox',
  autoHeight: true,
  initComponent : function() {
    var start_date77 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Date from</span>", "listeners": { "render": Lino.quicktip_renderer("Date from","(uploads.Uploads.start_date) Start of observed date range") }, "name": "start_date", "selectOnFocus": true, "value": null });
    var end_date78 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">until</span>", "listeners": { "render": Lino.quicktip_renderer("until","(uploads.Uploads.end_date) End of observed date range") }, "name": "end_date", "selectOnFocus": true, "value": null });
    var user79 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "Uploaded by", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Uploaded by","(uploads.Uploads.user) ") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/uploads/Uploads/user" }) }), "value": null });
    var upload_type80 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Upload Type...", "fieldLabel": "Upload Type", "hiddenName": "upload_typeHidden", "listeners": { "render": Lino.quicktip_renderer("Upload Type","(uploads.Uploads.upload_type) ") }, "name": "upload_type", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.uploads.UploadTypes.detail,Lino.uploads.UploadTypes.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/uploads/Uploads/upload_type" }) }) });
    this.items = [ { "autoHeight": true, "flex": 19, "items": start_date77, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 19, "items": end_date78, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 30, "items": user79, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 30, "items": upload_type80, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ start_date77, end_date78, user79, upload_type80 ];
    Lino.uploads.Uploads.ParamsPanel.superclass.initComponent.call(this);
  }
});


Lino.comments.Comments.ParamsPanel = Ext.extend(Ext.form.FormPanel, {
  autoScroll: false,
  border: false,
  labelWidth: 63,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  layout: 'form',
  autoHeight: true,
  initComponent : function() {
    var user86 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "disabled": true, "emptyText": "Select a User...", "fieldLabel": "Author", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Author","(comments.Comments.user) ") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "store": new Lino.ComplexRemoteComboStore({  }), "value": null });
    this.items = [ { "autoHeight": true, "items": user86, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ user86 ];
    Lino.comments.Comments.ParamsPanel.superclass.initComponent.call(this);
  }
});


Lino.users.Authorities.ParamsPanel = Ext.extend(Ext.form.FormPanel, {
  autoScroll: false,
  border: false,
  labelWidth: 63,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  layout: 'form',
  autoHeight: true,
  initComponent : function() {
    var user89 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Author</span>", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Author","(users.Authorities.user) The user who gives the right of representation. author of this\nauthority") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/users/Authorities/user" }) }), "value": null });
    this.items = [ { "autoHeight": true, "items": user89, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ user89 ];
    Lino.users.Authorities.ParamsPanel.superclass.initComponent.call(this);
  }
});


Lino.contacts.Partners.ParamsPanel = Ext.extend(Ext.form.FormPanel, {
  autoHeight: true,
  frame: true,
  layoutConfig: { "align": "stretchmax" },
  hideCheckBoxLabels: true,
  autoScroll: false,
  labelWidth: 135,
  border: false,
  bodyBorder: false,
  labelAlign: "top",
  layout: 'hbox',
  autoHeight: true,
  initComponent : function() {
    var function92 = new Lino.RemoteComboFieldElement({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Function...", "fieldLabel": "Function", "hiddenName": "functionHidden", "listeners": { "render": Lino.quicktip_renderer("Function","(contacts.Partners.function) ") }, "name": "function", "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/contacts/Partners/function" }) }) });
    var end_date93 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">until</span>", "listeners": { "render": Lino.quicktip_renderer("until","(contacts.Partners.end_date) End of observed date range") }, "name": "end_date", "selectOnFocus": true, "value": null });
    var gender94 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Gender</span>", "forceSelection": true, "hiddenName": "genderHidden", "listeners": { "render": Lino.quicktip_renderer("Gender","(contacts.Partners.gender) The sex of this person (male or female).") }, "name": "gender", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.system.Genders), "value": null });
    var company95 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Organization...", "fieldLabel": "Organization", "hiddenName": "companyHidden", "listeners": { "render": Lino.quicktip_renderer("Organization","(contacts.Partners.company) ") }, "name": "company", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Companies.detail,Lino.contacts.Companies.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/contacts/Partners/company" }) }) });
    var observed_event96 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Observed event</span>", "listeners": { "render": Lino.quicktip_renderer("Observed event","(contacts.Partners.observed_event) Extended filter criteria") }, "maxLength": 50, "name": "observed_event", "selectOnFocus": true });
    var aged_from97 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Aged from</span>", "listeners": { "render": Lino.quicktip_renderer("Aged from","(contacts.Partners.aged_from) Select only persons aged at least the given number of years.") }, "name": "aged_from", "selectOnFocus": true });
    var topic98 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Topic...", "fieldLabel": "Topic", "hiddenName": "topicHidden", "listeners": { "render": Lino.quicktip_renderer("Topic","(contacts.Partners.topic) ") }, "name": "topic", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.topics.Topics.detail,Lino.topics.Topics.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/contacts/Partners/topic" }) }) });
    var start_date99 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Date from</span>", "listeners": { "render": Lino.quicktip_renderer("Date from","(contacts.Partners.start_date) Start of observed date range") }, "name": "start_date", "selectOnFocus": true, "value": null });
    var aged_to100 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Aged to</span>", "listeners": { "render": Lino.quicktip_renderer("Aged to","(contacts.Partners.aged_to) Select only persons aged at most the given number of years.") }, "name": "aged_to", "selectOnFocus": true });
    this.items = [ { "autoHeight": true, "flex": 15, "items": function92, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 10, "items": end_date93, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 7, "items": gender94, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 15, "items": company95, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 16, "items": observed_event96, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 3, "items": aged_from97, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 15, "items": topic98, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 10, "items": start_date99, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 3, "items": aged_to100, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ function92, end_date93, gender94, company95, observed_event96, aged_from97, topic98, start_date99, aged_to100 ];
    Lino.contacts.Partners.ParamsPanel.superclass.initComponent.call(this);
  }
});


Lino.users.Users.ParamsPanel = Ext.extend(Ext.form.FormPanel, {
  autoHeight: true,
  frame: true,
  layoutConfig: { "align": "stretchmax" },
  hideCheckBoxLabels: true,
  autoScroll: false,
  labelWidth: 135,
  border: false,
  bodyBorder: false,
  labelAlign: "top",
  layout: 'hbox',
  autoHeight: true,
  initComponent : function() {
    var function111 = new Lino.RemoteComboFieldElement({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Function...", "fieldLabel": "Function", "hiddenName": "functionHidden", "listeners": { "render": Lino.quicktip_renderer("Function","(users.Users.function) ") }, "name": "function", "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/users/Users/function" }) }) });
    var gender112 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Gender</span>", "forceSelection": true, "hiddenName": "genderHidden", "listeners": { "render": Lino.quicktip_renderer("Gender","(users.Users.gender) The sex of this person (male or female).") }, "name": "gender", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.system.Genders), "value": null });
    var company113 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Organization...", "fieldLabel": "Organization", "hiddenName": "companyHidden", "listeners": { "render": Lino.quicktip_renderer("Organization","(users.Users.company) ") }, "name": "company", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Companies.detail,Lino.contacts.Companies.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/users/Users/company" }) }) });
    var observed_event114 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Observed event</span>", "listeners": { "render": Lino.quicktip_renderer("Observed event","(users.Users.observed_event) Extended filter criteria") }, "maxLength": 50, "name": "observed_event", "selectOnFocus": true });
    var user_type115 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "User type", "forceSelection": true, "hiddenName": "user_typeHidden", "listeners": { "render": Lino.quicktip_renderer("User type","(users.Users.user_type) ") }, "name": "user_type", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.users.UserTypes) });
    var aged_from116 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Aged from</span>", "listeners": { "render": Lino.quicktip_renderer("Aged from","(users.Users.aged_from) Select only persons aged at least the given number of years.") }, "name": "aged_from", "selectOnFocus": true });
    var topic117 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Topic...", "fieldLabel": "Topic", "hiddenName": "topicHidden", "listeners": { "render": Lino.quicktip_renderer("Topic","(users.Users.topic) ") }, "name": "topic", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.topics.Topics.detail,Lino.topics.Topics.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/users/Users/topic" }) }) });
    var user_state118 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "User state", "forceSelection": true, "hiddenName": "user_stateHidden", "listeners": { "render": Lino.quicktip_renderer("User state","(users.Users.user_state) ") }, "name": "user_state", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.users.UserStates) });
    var aged_to119 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Aged to</span>", "listeners": { "render": Lino.quicktip_renderer("Aged to","(users.Users.aged_to) Select only persons aged at most the given number of years.") }, "name": "aged_to", "selectOnFocus": true });
    this.items = [ { "autoHeight": true, "flex": 14, "items": function111, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 6, "items": gender112, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 14, "items": company113, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 15, "items": observed_event114, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 17, "items": user_type115, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 3, "items": aged_from116, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 14, "items": topic117, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 8, "items": user_state118, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 3, "items": aged_to119, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ function111, gender112, company113, observed_event114, user_type115, aged_from116, topic117, user_state118, aged_to119 ];
    Lino.users.Users.ParamsPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.Guests.ParamsPanel = Ext.extend(Ext.form.FormPanel, {
  autoScroll: false,
  autoHeight: true,
  border: false,
  labelWidth: 63,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  layout: 'form',
  autoHeight: true,
  initComponent : function() {
    var start_date130 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Date from</span>", "listeners": { "render": Lino.quicktip_renderer("Date from","(cal.Guests.start_date) Start of observed date range") }, "name": "start_date", "selectOnFocus": true, "value": null });
    var end_date131 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">until</span>", "listeners": { "render": Lino.quicktip_renderer("until","(cal.Guests.end_date) End of observed date range") }, "name": "end_date", "selectOnFocus": true, "value": null });
    var user132 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Responsible user</span>", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Responsible user","(cal.Guests.user) Only rows managed by this user.") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Guests/user" }) }) });
    var event_state133 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Event state</span>", "forceSelection": true, "hiddenName": "event_stateHidden", "listeners": { "render": Lino.quicktip_renderer("Event state","(cal.Guests.event_state) Only rows having this event state.") }, "name": "event_state", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.cal.EntryStates) });
    var guest_state134 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Guest state</span>", "forceSelection": true, "hiddenName": "guest_stateHidden", "listeners": { "render": Lino.quicktip_renderer("Guest state","(cal.Guests.guest_state) Only rows having this guest state.") }, "name": "guest_state", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.cal.GuestStates) });
    var main_1_panel135 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 18, "items": start_date130, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 18, "items": end_date131, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 28, "items": user132, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 18, "items": event_state133, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 14, "items": guest_state134, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var partner141 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Person...", "fieldLabel": "Person", "hiddenName": "partnerHidden", "listeners": { "render": Lino.quicktip_renderer("Person","(cal.Guests.partner) ") }, "name": "partner", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Persons.detail,Lino.contacts.Persons.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Guests/partner" }) }) });
    this.items = [ main_1_panel135, { "anchor": "-20", "autoHeight": true, "items": partner141, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ start_date130, end_date131, user132, event_state133, guest_state134, partner141 ];
    Lino.cal.Guests.ParamsPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.Subscriptions.ParamsPanel = Ext.extend(Ext.form.FormPanel, {
  autoScroll: false,
  border: false,
  labelWidth: 63,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  layout: 'form',
  autoHeight: true,
  initComponent : function() {
    var user144 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "Author", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Author","(cal.Subscriptions.user) ") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Subscriptions/user" }) }), "value": null });
    this.items = [ { "autoHeight": true, "items": user144, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ user144 ];
    Lino.cal.Subscriptions.ParamsPanel.superclass.initComponent.call(this);
  }
});


Lino.dashboard.Widgets.ParamsPanel = Ext.extend(Ext.form.FormPanel, {
  autoScroll: false,
  border: false,
  labelWidth: 63,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  layout: 'form',
  autoHeight: true,
  initComponent : function() {
    var user147 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "Author", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Author","(dashboard.Widgets.user) ") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/dashboard/Widgets/user" }) }), "value": null });
    this.items = [ { "autoHeight": true, "items": user147, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ user147 ];
    Lino.dashboard.Widgets.ParamsPanel.superclass.initComponent.call(this);
  }
});


Lino.blogs.Entries.ParamsPanel = Ext.extend(Ext.form.FormPanel, {
  autoScroll: false,
  border: false,
  labelWidth: 63,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  layout: 'form',
  autoHeight: true,
  initComponent : function() {
    var user150 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "Author", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Author","(blogs.Entries.user) ") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/blogs/Entries/user" }) }), "value": null });
    this.items = [ { "autoHeight": true, "items": user150, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ user150 ];
    Lino.blogs.Entries.ParamsPanel.superclass.initComponent.call(this);
  }
});


Lino.excerpts.Excerpts.ParamsPanel = Ext.extend(Ext.form.FormPanel, {
  autoScroll: false,
  autoHeight: true,
  border: false,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  layout: 'form',
  autoHeight: true,
  initComponent : function() {
    var start_date153 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Date from</span>", "listeners": { "render": Lino.quicktip_renderer("Date from","(excerpts.Excerpts.start_date) Start of observed date range") }, "name": "start_date", "selectOnFocus": true, "value": null });
    var end_date154 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">until</span>", "listeners": { "render": Lino.quicktip_renderer("until","(excerpts.Excerpts.end_date) End of observed date range") }, "name": "end_date", "selectOnFocus": true, "value": null });
    var pcertifying155 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Certifying excerpts", "forceSelection": true, "hiddenName": "pcertifyingHidden", "listeners": { "render": Lino.quicktip_renderer("Certifying excerpts","(excerpts.Excerpts.pcertifying) ") }, "name": "pcertifying", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.system.YesNo) });
    var main_1_panel156 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 31, "items": start_date153, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 31, "items": end_date154, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 36, "items": pcertifying155, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 180, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var user160 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "Author", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Author","(excerpts.Excerpts.user) ") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/excerpts/Excerpts/user" }) }), "value": null });
    var excerpt_type161 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Excerpt Type...", "fieldLabel": "Excerpt Type", "hiddenName": "excerpt_typeHidden", "listeners": { "render": Lino.quicktip_renderer("Excerpt Type","(excerpts.Excerpts.excerpt_type) ") }, "name": "excerpt_type", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.excerpts.ExcerptTypes.detail,Lino.excerpts.ExcerptTypes.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/excerpts/Excerpts/excerpt_type" }) }) });
    var main_2_panel162 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": user160, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": excerpt_type161, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 117, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    this.items = [ main_1_panel156, main_2_panel162 ];
    this.fields = [ start_date153, end_date154, pcertifying155, user160, excerpt_type161 ];
    Lino.excerpts.Excerpts.ParamsPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.Events.ParamsPanel = Ext.extend(Ext.form.FormPanel, {
  autoScroll: false,
  autoHeight: true,
  border: false,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  layout: 'form',
  autoHeight: true,
  initComponent : function() {
    var start_date166 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Date from</span>", "listeners": { "render": Lino.quicktip_renderer("Date from","(cal.Events.start_date) Start of observed date range") }, "name": "start_date", "selectOnFocus": true, "value": null });
    var end_date167 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">until</span>", "listeners": { "render": Lino.quicktip_renderer("until","(cal.Events.end_date) End of observed date range") }, "name": "end_date", "selectOnFocus": true, "value": null });
    var observed_event168 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Observed event", "forceSelection": true, "hiddenName": "observed_eventHidden", "listeners": { "render": Lino.quicktip_renderer("Observed event","(cal.Events.observed_event) ") }, "name": "observed_event", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.cal.EventEvents) });
    var state169 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">State</span>", "forceSelection": true, "hiddenName": "stateHidden", "listeners": { "render": Lino.quicktip_renderer("State","(cal.Events.state) Only rows having this state.") }, "name": "state", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.cal.EntryStates) });
    var main_1_panel170 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 26, "items": start_date166, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 26, "items": end_date167, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 22, "items": observed_event168, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 26, "items": state169, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 135, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var user175 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Managed by</span>", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Managed by","(cal.Events.user) Only rows managed by this user.") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Events/user" }) }) });
    var assigned_to176 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Assigned to</span>", "hiddenName": "assigned_toHidden", "listeners": { "render": Lino.quicktip_renderer("Assigned to","(cal.Events.assigned_to) Only events assigned to this user.") }, "name": "assigned_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Events/assigned_to" }) }) });
    var event_type177 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Calendar entry type...", "fieldLabel": "Calendar entry type", "hiddenName": "event_typeHidden", "listeners": { "render": Lino.quicktip_renderer("Calendar entry type","(cal.Events.event_type) ") }, "name": "event_type", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.cal.EventTypes.detail,Lino.cal.EventTypes.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Events/event_type" }) }) });
    var room178 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Room...", "fieldLabel": "Room", "hiddenName": "roomHidden", "listeners": { "render": Lino.quicktip_renderer("Room","(cal.Events.room) ") }, "name": "room", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.cal.Rooms.detail,Lino.cal.Rooms.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Events/room" }) }) });
    var show_appointments179 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Appointments</span>", "forceSelection": true, "hiddenName": "show_appointmentsHidden", "listeners": { "render": Lino.quicktip_renderer("Appointments","(cal.Events.show_appointments) Whether only appointments should be\nshown.  \"Yes\" means only appointments, \"No\"\nmeans no appointments and leaving it to blank shows both types\nof events.") }, "name": "show_appointments", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.system.YesNo) });
    var main_2_panel180 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 21, "items": user175, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 21, "items": assigned_to176, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 21, "items": event_type177, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 21, "items": room178, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 15, "items": show_appointments179, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 180, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    this.items = [ main_1_panel170, main_2_panel180 ];
    this.fields = [ start_date166, end_date167, observed_event168, state169, user175, assigned_to176, event_type177, room178, show_appointments179 ];
    Lino.cal.Events.ParamsPanel.superclass.initComponent.call(this);
  }
});


Lino.uploads.UploadTypes.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/uploads/UploadTypes",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to395 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Upload Type...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.uploads.UploadTypes.detail,Lino.uploads.UploadTypes.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/uploads/UploadTypes/merge_row/merge_to" }) }) });
    this.reason396 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to395, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason396, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to395, this.reason396 ];
    Lino.uploads.UploadTypes.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.users.Authorities.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/users/Authorities",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to467 = new Lino.RemoteComboFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Authority...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/users/Authorities/merge_row/merge_to" }) }) });
    this.reason468 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to467, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason468, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to467, this.reason468 ];
    Lino.users.Authorities.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.GuestRoles.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/cal/GuestRoles",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to288 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Guest Role...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.cal.GuestRoles.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/cal/GuestRoles/merge_row/merge_to" }) }) });
    this.reason289 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to288, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason289, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to288, this.reason289 ];
    Lino.cal.GuestRoles.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.users.Users.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/users/Users",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to435 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/users/Users/merge_row/merge_to" }) }) });
    this.addresses_Address436 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Addresses", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Addresses","(Merge.addresses_Address) ") }, "name": "addresses_Address", "selectOnFocus": true });
    this.phones_ContactDetail437 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Contact details", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Contact details","(Merge.phones_ContactDetail) ") }, "name": "phones_ContactDetail", "selectOnFocus": true });
    var keep_volatiles_panel438 = new Ext.form.FieldSet({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "bodyBorder": true, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": this.addresses_Address436, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": this.phones_ContactDetail437, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 144, "layout": "hbox", "layoutConfig": { "align": "stretchmax" }, "title": "Also reassign volatile related objects" });
    this.reason441 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to435, "labelAlign": "top", "layout": "form", "xtype": "panel" }, keep_volatiles_panel438, { "anchor": "-20", "autoHeight": true, "items": this.reason441, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to435, this.addresses_Address436, this.phones_ContactDetail437, this.reason441 ];
    Lino.users.Users.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.users.NewUsers.send_welcome_email_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 135,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'send_welcome_email',
  ls_url: "/users/NewUsers",
  window_title: "Welcome mail",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.email472 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "e-mail address", "listeners": { "render": Lino.quicktip_renderer("e-mail address","(Welcome mail.email) ") }, "maxLength": 254, "name": "email", "selectOnFocus": true });
    this.subject473 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Subject", "listeners": { "render": Lino.quicktip_renderer("Subject","(Welcome mail.subject) ") }, "maxLength": 250, "name": "subject", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.email472, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.subject473, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.email472, this.subject473 ];
    Lino.users.NewUsers.send_welcome_email_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.contacts.CompanyTypes.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/contacts/CompanyTypes",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to226 = new Lino.RemoteComboFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Organization type...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/contacts/CompanyTypes/merge_row/merge_to" }) }) });
    this.reason227 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to226, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason227, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to226, this.reason227 ];
    Lino.contacts.CompanyTypes.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.topics.TopicGroups.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/topics/TopicGroups",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to355 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Topic group...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.topics.TopicGroups.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/topics/TopicGroups/merge_row/merge_to" }) }) });
    this.reason356 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to355, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason356, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to355, this.reason356 ];
    Lino.topics.TopicGroups.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.Tasks.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/cal/Tasks",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to283 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Task...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.cal.Tasks.detail,Lino.cal.Tasks.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/cal/Tasks/merge_row/merge_to" }) }) });
    this.reason284 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to283, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason284, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to283, this.reason284 ];
    Lino.cal.Tasks.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.Priorities.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/cal/Priorities",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to268 = new Lino.RemoteComboFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Priority...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/cal/Priorities/merge_row/merge_to" }) }) });
    this.reason269 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to268, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason269, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to268, this.reason269 ];
    Lino.cal.Priorities.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.households.Households.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/households/Households",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to335 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Household...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.households.Households.detail,Lino.households.Households.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/households/Households/merge_row/merge_to" }) }) });
    this.households_Member336 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Household Members", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Household Members","(Merge.households_Member) ") }, "name": "households_Member", "selectOnFocus": true });
    this.phones_ContactDetail337 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Contact details", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Contact details","(Merge.phones_ContactDetail) ") }, "name": "phones_ContactDetail", "selectOnFocus": true });
    var keep_volatiles_panel338 = new Ext.form.FieldSet({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "bodyBorder": true, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": this.households_Member336, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": this.phones_ContactDetail337, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 162, "layout": "hbox", "layoutConfig": { "align": "stretchmax" }, "title": "Also reassign volatile related objects" });
    this.reason341 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to335, "labelAlign": "top", "layout": "form", "xtype": "panel" }, keep_volatiles_panel338, { "anchor": "-20", "autoHeight": true, "items": this.reason341, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to335, this.households_Member336, this.phones_ContactDetail337, this.reason341 ];
    Lino.households.Households.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.contacts.Partners.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 351,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/contacts/Partners",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to202 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Partner...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Partners.detail,Lino.contacts.Partners.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/contacts/Partners/merge_row/merge_to" }) }) });
    this.phones_ContactDetail203 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Also reassign volatile related objects", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Contact details","(Merge.phones_ContactDetail) ") }, "name": "phones_ContactDetail", "selectOnFocus": true });
    this.reason204 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to202, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.phones_ContactDetail203, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason204, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to202, this.phones_ContactDetail203, this.reason204 ];
    Lino.contacts.Partners.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.lists.ListTypes.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/lists/ListTypes",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to370 = new Lino.RemoteComboFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a List Type...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/lists/ListTypes/merge_row/merge_to" }) }) });
    this.reason371 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to370, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason371, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to370, this.reason371 ];
    Lino.lists.ListTypes.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.system.SiteConfigs.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/system/SiteConfigs",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to197 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Site configuration...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.system.SiteConfigs.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/system/SiteConfigs/merge_row/merge_to" }) }) });
    this.reason198 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to197, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason198, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to197, this.reason198 ];
    Lino.system.SiteConfigs.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.contacts.Persons.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/contacts/Persons",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to209 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Person...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Persons.detail,Lino.contacts.Persons.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/contacts/Persons/merge_row/merge_to" }) }) });
    this.addresses_Address210 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Addresses", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Addresses","(Merge.addresses_Address) ") }, "name": "addresses_Address", "selectOnFocus": true });
    this.phones_ContactDetail211 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Contact details", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Contact details","(Merge.phones_ContactDetail) ") }, "name": "phones_ContactDetail", "selectOnFocus": true });
    var keep_volatiles_panel212 = new Ext.form.FieldSet({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "bodyBorder": true, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": this.addresses_Address210, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": this.phones_ContactDetail211, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 144, "layout": "hbox", "layoutConfig": { "align": "stretchmax" }, "title": "Also reassign volatile related objects" });
    this.reason215 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to209, "labelAlign": "top", "layout": "form", "xtype": "panel" }, keep_volatiles_panel212, { "anchor": "-20", "autoHeight": true, "items": this.reason215, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to209, this.addresses_Address210, this.phones_ContactDetail211, this.reason215 ];
    Lino.contacts.Persons.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.gfks.HelpTexts.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/gfks/HelpTexts",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to253 = new Lino.RemoteComboFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Help Text...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/gfks/HelpTexts/merge_row/merge_to" }) }) });
    this.reason254 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to253, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason254, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to253, this.reason254 ];
    Lino.gfks.HelpTexts.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.users.Users.verify_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 162,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'verify',
  ls_url: "/users/Users",
  window_title: "Verify",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.email452 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "e-mail address", "listeners": { "render": Lino.quicktip_renderer("e-mail address","(Verify.email) ") }, "maxLength": 254, "name": "email", "selectOnFocus": true });
    this.verification_code453 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Verification code", "listeners": { "render": Lino.quicktip_renderer("Verification code","(Verify.verification_code) ") }, "maxLength": 50, "name": "verification_code", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.email452, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.verification_code453, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.email452, this.verification_code453 ];
    Lino.users.Users.verify_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.phones.ContactDetails.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/phones/ContactDetails",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to325 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Contact detail...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.phones.ContactDetails.detail,Lino.phones.ContactDetails.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/phones/ContactDetails/merge_row/merge_to" }) }) });
    this.reason326 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to325, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason326, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to325, this.reason326 ];
    Lino.phones.ContactDetails.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.countries.Countries.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/countries/Countries",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to187 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Country...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.countries.Countries.detail,Lino.countries.Countries.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/countries/Countries/merge_row/merge_to" }) }) });
    this.reason188 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to187, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason188, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to187, this.reason188 ];
    Lino.countries.Countries.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.Subscriptions.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/cal/Subscriptions",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to278 = new Lino.RemoteComboFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Subscription...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/cal/Subscriptions/merge_row/merge_to" }) }) });
    this.reason279 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to278, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason279, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to278, this.reason279 ];
    Lino.cal.Subscriptions.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.Calendars.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/cal/Calendars",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to273 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Calendar...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.cal.Calendars.detail,Lino.cal.Calendars.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/cal/Calendars/merge_row/merge_to" }) }) });
    this.reason274 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to273, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason274, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to273, this.reason274 ];
    Lino.cal.Calendars.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.users.UsersOverview.sign_in_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 81,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "left",
  action_name: 'sign_in',
  ls_url: "/users/UsersOverview",
  window_title: "Sign in",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.username462 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Username", "listeners": { "render": Lino.quicktip_renderer("Username","(Sign in.username) ") }, "maxLength": null, "name": "username", "selectOnFocus": true });
    this.password463 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Password", "inputType": "password", "listeners": { "render": Lino.quicktip_renderer("Password","(Sign in.password) ") }, "maxLength": null, "name": "password", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.username462, "labelAlign": "left", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.password463, "labelAlign": "left", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.username462, this.password463 ];
    Lino.users.UsersOverview.sign_in_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.contacts.RoleTypes.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/contacts/RoleTypes",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to238 = new Lino.RemoteComboFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Function...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/contacts/RoleTypes/merge_row/merge_to" }) }) });
    this.reason239 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to238, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason239, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to238, this.reason239 ];
    Lino.contacts.RoleTypes.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.excerpts.Excerpts.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/excerpts/Excerpts",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to410 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Excerpt...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.excerpts.Excerpts.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/excerpts/Excerpts/merge_row/merge_to" }) }) });
    this.reason411 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to410, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason411, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to410, this.reason411 ];
    Lino.excerpts.Excerpts.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.comments.Comments.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/comments/Comments",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to425 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Comment...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.comments.Comments.detail,Lino.comments.Comments.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/comments/Comments/merge_row/merge_to" }) }) });
    this.reason426 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to425, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason426, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to425, this.reason426 ];
    Lino.comments.Comments.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.EventPolicies.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/cal/EventPolicies",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to315 = new Lino.RemoteComboFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Recurrency policy...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/cal/EventPolicies/merge_row/merge_to" }) }) });
    this.reason316 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to315, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason316, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to315, this.reason316 ];
    Lino.cal.EventPolicies.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.comments.CommentTypes.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/comments/CommentTypes",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to420 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Comment Type...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.comments.CommentTypes.detail,Lino.comments.CommentTypes.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/comments/CommentTypes/merge_row/merge_to" }) }) });
    this.reason421 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to420, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason421, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to420, this.reason421 ];
    Lino.comments.CommentTypes.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.tinymce.TextFieldTemplates.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/tinymce/TextFieldTemplates",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to415 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Text Field Template...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.tinymce.TextFieldTemplates.detail,Lino.tinymce.TextFieldTemplates.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/tinymce/TextFieldTemplates/merge_row/merge_to" }) }) });
    this.reason416 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to415, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason416, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to415, this.reason416 ];
    Lino.tinymce.TextFieldTemplates.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.households.Members.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/households/Members",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to345 = new Lino.RemoteComboFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Household Member...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/households/Members/merge_row/merge_to" }) }) });
    this.reason346 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to345, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason346, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to345, this.reason346 ];
    Lino.households.Members.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.users.AllUsers.send_welcome_email_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 135,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'send_welcome_email',
  ls_url: "/users/AllUsers",
  window_title: "Welcome mail",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.email457 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "e-mail address", "listeners": { "render": Lino.quicktip_renderer("e-mail address","(Welcome mail.email) ") }, "maxLength": 254, "name": "email", "selectOnFocus": true });
    this.subject458 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Subject", "listeners": { "render": Lino.quicktip_renderer("Subject","(Welcome mail.subject) ") }, "maxLength": 250, "name": "subject", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.email457, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.subject458, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.email457, this.subject458 ];
    Lino.users.AllUsers.send_welcome_email_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.Events.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 351,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/cal/Events",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to308 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Calendar entry...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.cal.OneEvent.detail,Lino.cal.OneEvent.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/cal/OneEvent/merge_row/merge_to" }) }) });
    this.cal_Guest309 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Also reassign volatile related objects", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Presences","(Merge.cal_Guest) ") }, "name": "cal_Guest", "selectOnFocus": true });
    this.reason310 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to308, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.cal_Guest309, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason310, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to308, this.cal_Guest309, this.reason310 ];
    Lino.cal.Events.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.topics.Interests.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/topics/Interests",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to365 = new Lino.RemoteComboFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Interest...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/topics/Interests/merge_row/merge_to" }) }) });
    this.reason366 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to365, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason366, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to365, this.reason366 ];
    Lino.topics.Interests.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.Guests.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/cal/Guests",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to293 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Presence...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.cal.Guests.detail,Lino.cal.Guests.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/cal/Guests/merge_row/merge_to" }) }) });
    this.reason294 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to293, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason294, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to293, this.reason294 ];
    Lino.cal.Guests.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.lists.Lists.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/lists/Lists",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to375 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Partner List...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.lists.Lists.detail,Lino.lists.Lists.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/lists/Lists/merge_row/merge_to" }) }) });
    this.reason376 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to375, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason376, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to375, this.reason376 ];
    Lino.lists.Lists.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.RemoteCalendars.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/cal/RemoteCalendars",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to258 = new Lino.RemoteComboFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Remote Calendar...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/cal/RemoteCalendars/merge_row/merge_to" }) }) });
    this.reason259 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to258, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason259, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to258, this.reason259 ];
    Lino.cal.RemoteCalendars.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.dashboard.Widgets.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/dashboard/Widgets",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to430 = new Lino.RemoteComboFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Widget...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/dashboard/Widgets/merge_row/merge_to" }) }) });
    this.reason431 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to430, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason431, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to430, this.reason431 ];
    Lino.dashboard.Widgets.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.contacts.Persons.create_household_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 162,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'create_household',
  ls_url: "/contacts/Persons",
  window_title: "Create Household",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.head219 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Person...", "fieldLabel": "Head of household", "hiddenName": "headHidden", "listeners": { "render": Lino.quicktip_renderer("Head of household","(Create Household.head) ") }, "name": "head", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Persons.detail,Lino.contacts.Persons.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/contacts/Persons/create_household/head" }) }) });
    this.type220 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Household Type...", "fieldLabel": "Household Type", "hiddenName": "typeHidden", "listeners": { "render": Lino.quicktip_renderer("Household Type","(Create Household.type) ") }, "name": "type", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.households.Types.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/contacts/Persons/create_household/type" }) }) });
    this.partner221 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Person...", "fieldLabel": "Partner", "hiddenName": "partnerHidden", "listeners": { "render": Lino.quicktip_renderer("Partner","(Create Household.partner) ") }, "name": "partner", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Persons.detail,Lino.contacts.Persons.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/contacts/Persons/create_household/partner" }) }) });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.head219, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.type220, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.partner221, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.head219, this.type220, this.partner221 ];
    Lino.contacts.Persons.create_household_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.uploads.Uploads.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/uploads/Uploads",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to400 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Upload...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.uploads.Uploads.detail,Lino.uploads.Uploads.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/uploads/Uploads/merge_row/merge_to" }) }) });
    this.reason401 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to400, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason401, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to400, this.reason401 ];
    Lino.uploads.Uploads.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.addresses.Addresses.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/addresses/Addresses",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to320 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Address...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.addresses.Addresses.detail,Lino.addresses.Addresses.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/addresses/Addresses/merge_row/merge_to" }) }) });
    this.reason321 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to320, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason321, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to320, this.reason321 ];
    Lino.addresses.Addresses.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.EventTypes.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/cal/EventTypes",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to298 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Calendar entry type...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.cal.EventTypes.detail,Lino.cal.EventTypes.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/cal/EventTypes/merge_row/merge_to" }) }) });
    this.reason299 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to298, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason299, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to298, this.reason299 ];
    Lino.cal.EventTypes.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.lists.Members.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/lists/Members",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to380 = new Lino.RemoteComboFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a List membership...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/lists/Members/merge_row/merge_to" }) }) });
    this.reason381 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to380, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason381, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to380, this.reason381 ];
    Lino.lists.Members.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.contacts.Companies.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 351,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/contacts/Companies",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to231 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Organization...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Companies.detail,Lino.contacts.Companies.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/contacts/Companies/merge_row/merge_to" }) }) });
    this.phones_ContactDetail232 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Also reassign volatile related objects", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Contact details","(Merge.phones_ContactDetail) ") }, "name": "phones_ContactDetail", "selectOnFocus": true });
    this.reason233 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to231, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.phones_ContactDetail232, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason233, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to231, this.phones_ContactDetail232, this.reason233 ];
    Lino.contacts.Companies.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.sessions.SessionTable.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/sessions/SessionTable",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to477 = new Lino.RemoteComboFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a session...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/sessions/SessionTable/merge_row/merge_to" }) }) });
    this.reason478 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to477, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason478, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to477, this.reason478 ];
    Lino.sessions.SessionTable.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.contacts.Roles.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/contacts/Roles",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to243 = new Lino.RemoteComboFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Contact Person...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/contacts/Roles/merge_row/merge_to" }) }) });
    this.reason244 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to243, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason244, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to243, this.reason244 ];
    Lino.contacts.Roles.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.excerpts.ExcerptTypes.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/excerpts/ExcerptTypes",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to405 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Excerpt Type...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.excerpts.ExcerptTypes.detail,Lino.excerpts.ExcerptTypes.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/excerpts/ExcerptTypes/merge_row/merge_to" }) }) });
    this.reason406 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to405, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason406, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to405, this.reason406 ];
    Lino.excerpts.ExcerptTypes.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.RecurrentEvents.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/cal/RecurrentEvents",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to303 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Recurring event...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.cal.RecurrentEvents.detail,Lino.cal.RecurrentEvents.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/cal/RecurrentEvents/merge_row/merge_to" }) }) });
    this.reason304 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to303, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason304, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to303, this.reason304 ];
    Lino.cal.RecurrentEvents.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.blogs.Entries.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/blogs/Entries",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to390 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Blog Entry...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.blogs.Entries.detail,Lino.blogs.Entries.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/blogs/Entries/merge_row/merge_to" }) }) });
    this.reason391 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to390, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason391, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to390, this.reason391 ];
    Lino.blogs.Entries.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.users.Users.change_password_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 171,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'change_password',
  ls_url: "/users/Users",
  window_title: "Change password",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.current445 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Current password", "inputType": "password", "listeners": { "render": Lino.quicktip_renderer("Current password","(Change password.current) ") }, "maxLength": null, "name": "current", "selectOnFocus": true });
    this.new1446 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "New password", "inputType": "password", "listeners": { "render": Lino.quicktip_renderer("New password","(Change password.new1) ") }, "maxLength": null, "name": "new1", "selectOnFocus": true });
    this.new2447 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "New password again", "inputType": "password", "listeners": { "render": Lino.quicktip_renderer("New password again","(Change password.new2) ") }, "maxLength": null, "name": "new2", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.current445, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.new1446, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.new2447, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.current445, this.new1446, this.new2447 ];
    Lino.users.Users.change_password_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.humanlinks.Links.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/humanlinks/Links",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to350 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Personal Link...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.humanlinks.Links.detail,Lino.humanlinks.Links.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/humanlinks/Links/merge_row/merge_to" }) }) });
    this.reason351 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to350, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason351, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to350, this.reason351 ];
    Lino.humanlinks.Links.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.countries.Places.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/countries/Places",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to192 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Place...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.countries.Places.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/countries/Places/merge_row/merge_to" }) }) });
    this.reason193 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to192, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason193, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to192, this.reason193 ];
    Lino.countries.Places.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.topics.Topics.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/topics/Topics",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to360 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Topic...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.topics.Topics.detail,Lino.topics.Topics.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/topics/Topics/merge_row/merge_to" }) }) });
    this.reason361 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to360, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason361, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to360, this.reason361 ];
    Lino.topics.Topics.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.blogs.EntryTypes.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/blogs/EntryTypes",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to385 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Blog Entry Type...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.blogs.EntryTypes.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/blogs/EntryTypes/merge_row/merge_to" }) }) });
    this.reason386 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to385, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason386, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to385, this.reason386 ];
    Lino.blogs.EntryTypes.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.gfks.ContentTypes.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/gfks/ContentTypes",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to248 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a content type...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.gfks.ContentTypes.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/gfks/ContentTypes/merge_row/merge_to" }) }) });
    this.reason249 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to248, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason249, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to248, this.reason249 ];
    Lino.gfks.ContentTypes.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.Rooms.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/cal/Rooms",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to263 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Room...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.cal.Rooms.detail,Lino.cal.Rooms.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/cal/Rooms/merge_row/merge_to" }) }) });
    this.reason264 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to263, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason264, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to263, this.reason264 ];
    Lino.cal.Rooms.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.households.Types.merge_row_ActionFormPanel = Ext.extend(Lino.ActionFormPanel,{
  autoScroll: false,
  autoHeight: true,
  border: false,
  layout: "form",
  labelWidth: 72,
  hideCheckBoxLabels: true,
  frame: true,
  bodyBorder: false,
  labelAlign: "top",
  action_name: 'merge_row',
  ls_url: "/households/Types",
  window_title: "Merge",
  before_row_edit : function(record) {
  },
  autoHeight: true,
  initComponent : function() {
    this.merge_to330 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Household Type...", "fieldLabel": "into...", "hiddenName": "merge_toHidden", "listeners": { "render": Lino.quicktip_renderer("into...","(Merge.merge_to) ") }, "name": "merge_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.households.Types.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/apchoices/households/Types/merge_row/merge_to" }) }) });
    this.reason331 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Reason", "listeners": { "render": Lino.quicktip_renderer("Reason","(Merge.reason) ") }, "maxLength": 100, "name": "reason", "selectOnFocus": true });
    this.items = [ { "anchor": "-20", "autoHeight": true, "items": this.merge_to330, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": this.reason331, "labelAlign": "top", "layout": "form", "xtype": "panel" } ];
    this.fields = [ this.merge_to330, this.reason331 ];
    Lino.households.Types.merge_row_ActionFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.Tasks.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 15,
  initComponent : function() {
    var start_date482 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Start date", "listeners": { "render": Lino.quicktip_renderer("Start date","(cal.Tasks.start_date) ") }, "name": "start_date", "selectOnFocus": true });
    var due_date483 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Due date", "listeners": { "render": Lino.quicktip_renderer("Due date","(cal.Tasks.due_date) ") }, "name": "due_date", "selectOnFocus": true });
    var id484 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(cal.Tasks.id) ") }, "name": "id", "selectOnFocus": true });
    var workflow_buttons_disp485 = new Ext.form.DisplayField({ "always_enabled": true, "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "Workflow", "listeners": { "render": Lino.quicktip_renderer("Workflow","(cal.Tasks.workflow_buttons) ") }, "name": "workflow_buttons", "value": "<br/>" });
    var main_1_panel486 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 21, "items": start_date482, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 21, "items": due_date483, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 8, "items": id484, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 49, "items": workflow_buttons_disp485, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 99, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var summary491 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Short description", "listeners": { "render": Lino.quicktip_renderer("Short description","(cal.Tasks.summary) ") }, "maxLength": 200, "name": "summary", "selectOnFocus": true });
    var user492 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "Author", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Author","(cal.Tasks.user) ") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Tasks/user" }) }) });
    var owner_disp493 = new Ext.form.DisplayField({ "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "Controlled by", "name": "owner" });
    var created494 = new Ext.form.DisplayField({ "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Created</span>", "listeners": { "render": Lino.quicktip_renderer("Created","(cal.Tasks.created) The timestame when this object was created.") }, "name": "created", "value": "<br>" });
    var modified495 = new Ext.form.DisplayField({ "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "Modified", "listeners": { "render": Lino.quicktip_renderer("Modified","(cal.Tasks.modified) ") }, "name": "modified", "value": "<br>" });
    var main_4_panel496 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 20, "items": owner_disp493, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 40, "items": created494, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 40, "items": modified495, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 126, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var description500 = new Ext.form.TextArea({ "anchor": "-20 -10", "fieldLabel": "Description", "growMax": 2000, "listeners": { "render": Lino.quicktip_renderer("Description","(cal.Tasks.description) ") }, "name": "description", "selectOnFocus": true });
    var main_panel501 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel486, { "autoHeight": true, "items": summary491, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "items": user492, "labelAlign": "top", "layout": "form", "xtype": "panel" }, main_4_panel496, { "flex": 45, "items": description500, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 162, "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel501;
    this.before_row_edit = function(record) {
    }
    Lino.cal.Tasks.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.lists.Lists.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 38,
  initComponent : function() {
    var ref505 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Reference</span>", "listeners": { "render": Lino.quicktip_renderer("Reference","(lists.Lists.ref) The reference. This must be either empty or unique.") }, "maxLength": 40, "name": "ref", "selectOnFocus": true });
    var list_type506 = new Lino.RemoteComboFieldElement({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a List Type...", "fieldLabel": "List Type", "hiddenName": "list_typeHidden", "listeners": { "render": Lino.quicktip_renderer("List Type","(lists.Lists.list_type) ") }, "name": "list_type", "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/lists/Lists/list_type" }) }) });
    var main_1_panel507 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 51, "items": ref505, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 48, "items": list_type506, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 90, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var designation510 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation", "listeners": { "render": Lino.quicktip_renderer("Designation","(lists.Lists.designation) ") }, "maxLength": 200, "name": "designation", "selectOnFocus": true });
    var designation_fr511 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(lists.Lists.designation_fr) ") }, "maxLength": 200, "name": "designation_fr", "selectOnFocus": true });
    var main_2_panel512 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": designation510, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": designation_fr511, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var remarks515 = new Lino.RichTextPanel({ "containing_panel": this, "fieldLabel": "Remarks", "flex": 71, "name": "remarks", "selectOnFocus": true, "title": "Remarks" });
    var main_panel516 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel507, main_2_panel512, remarks515 ], "labelAlign": "top", "labelWidth": 72, "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel516;
    this.before_row_edit = function(record) {
      remarks515.refresh();
    }
    Lino.lists.Lists.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.users.OtherUsers.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 10,
  disable_editing: true,
  initComponent : function() {
    var first_name517 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">First name</span>", "listeners": { "render": Lino.quicktip_renderer("First name","(users.OtherUsers.first_name) The first name, also known as given name.") }, "maxLength": 200, "name": "first_name", "selectOnFocus": true });
    var last_name518 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Last name</span>", "listeners": { "render": Lino.quicktip_renderer("Last name","(users.OtherUsers.last_name) The last name, also known as family name.") }, "maxLength": 200, "name": "last_name", "selectOnFocus": true });
    var city519 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Place...", "fieldLabel": "Locality", "forceSelection": false, "hiddenName": "cityHidden", "listeners": { "render": Lino.quicktip_renderer("Locality","(users.OtherUsers.city) ") }, "name": "city", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.countries.Places.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/users/OtherUsers/city" }) }) });
    var main_1_panel520 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 33, "items": first_name517, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 33, "items": last_name518, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 32, "items": city519, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 99, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var phone524 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Phone</span>", "listeners": { "render": Lino.quicktip_renderer("Phone","(users.OtherUsers.phone) The primary phone number.  Note that Lino does not ignore\nformatting characters in phone numbers when searching.  For\nexample, if you enter \"087/12.34.56\" as a phone number, then a\nsearch for phone number containing \"1234\" will not find it.") }, "maxLength": 200, "name": "phone", "selectOnFocus": true });
    var gsm525 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">GSM</span>", "listeners": { "render": Lino.quicktip_renderer("GSM","(users.OtherUsers.gsm) The primary mobile phone number.") }, "maxLength": 200, "name": "gsm", "selectOnFocus": true });
    var main_2_panel526 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": phone524, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": gsm525, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 54, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var about_me_htmlbox529 = new Lino.HtmlBoxPanel({ "always_enabled": true, "bodyStyle": "overflow-x:hidden;", "containing_panel": this, "flex": 60, "items": new Ext.BoxComponent({autoScroll:true}), "layout": "fit", "listeners": { "render": Lino.quicktip_renderer("About me","(users.OtherUsers.about_me) ") }, "name": "about_me", "title": "About me", "value": "<br/>" });
    var main_panel530 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel520, main_2_panel526, about_me_htmlbox529 ], "labelAlign": "top", "labelWidth": 81, "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel530;
    this.before_row_edit = function(record) {
      about_me_htmlbox529.refresh();
    }
    Lino.users.OtherUsers.DetailFormPanel.superclass.initComponent.call(this);
    // active_fields:
    city519.on("change", function(){ this.save() }, this);
  }
});


Lino.contacts.Companies.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 5,
  initComponent : function() {
    var name531 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Name</span>", "listeners": { "render": Lino.quicktip_renderer("Name","(contacts.Companies.name) The full name of this partner. Used for alphabetic sorting.\nSubclasses may hide this field and fill it automatically,\ne.g. saving a Person will automatically set her\nname field to \"last_name, first_name\".") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var email532 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">e-mail address</span>", "listeners": { "render": Lino.quicktip_renderer("e-mail address","(contacts.Companies.email) The primary email address.") }, "maxLength": 254, "name": "email", "selectOnFocus": true });
    var type533 = new Lino.RemoteComboFieldElement({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Organization type...", "fieldLabel": "Organization type", "hiddenName": "typeHidden", "listeners": { "render": Lino.quicktip_renderer("Organization type","(contacts.Companies.type) ") }, "name": "type", "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/contacts/Companies/type" }) }) });
    var id534 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(contacts.Companies.id) ") }, "name": "id", "selectOnFocus": true });
    var main_3_panel535 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 80, "items": type533, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 20, "items": id534, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 162, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel538 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ { "anchor": "-20", "autoHeight": true, "items": name531, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": email532, "labelAlign": "top", "layout": "form", "xtype": "panel" }, main_3_panel535 ], "labelAlign": "top", "labelWidth": 135, "layout": "form" });
    this.items = main_panel538;
    this.before_row_edit = function(record) {
    }
    Lino.contacts.Companies.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.about.Models.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  disable_editing: true,
  initComponent : function() {
    var app_disp541 = new Ext.form.DisplayField({ "always_enabled": true, "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "app_label", "listeners": { "render": Lino.quicktip_renderer("app_label","(about.Models.app) ") }, "name": "app", "value": "<br/>" });
    var name_disp542 = new Ext.form.DisplayField({ "always_enabled": true, "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "name", "listeners": { "render": Lino.quicktip_renderer("name","(about.Models.name) ") }, "name": "name", "value": "<br/>" });
    var docstring_disp543 = new Ext.form.DisplayField({ "always_enabled": true, "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "docstring", "listeners": { "render": Lino.quicktip_renderer("docstring","(about.Models.docstring) ") }, "name": "docstring", "value": "<br/>" });
    var rows544 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "Rows", "listeners": { "render": Lino.quicktip_renderer("Rows","(about.Models.rows) ") }, "name": "rows" });
    var main_1_panel545 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 31, "items": app_disp541, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 31, "items": name_disp542, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 31, "items": docstring_disp543, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 5, "items": rows544, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 90, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel555 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel545 ], "labelAlign": "top", "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel555;
    this.before_row_edit = function(record) {
    }
    Lino.about.Models.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.uploads.UploadsByController.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 42,
  initComponent : function() {
    var file556 = Lino.file_field_handler(this,{ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">File</span>", "listeners": { "render": Lino.quicktip_renderer("File","(uploads.UploadsByController.file) Pointer to the uploaded file. See\nlino.mixins.uploadable.Uploadable.file") }, "maxLength": 100, "name": "file", "selectOnFocus": true });
    var type557 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Upload Type...", "fieldLabel": "Upload Type", "hiddenName": "typeHidden", "listeners": { "render": Lino.quicktip_renderer("Upload Type","(uploads.UploadsByController.type) ") }, "name": "type", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.uploads.UploadTypes.detail,Lino.uploads.UploadTypes.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/uploads/UploadsByController/type" }) }) });
    var description558 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Description</span>", "listeners": { "render": Lino.quicktip_renderer("Description","(uploads.UploadsByController.description) A short description entered manually by the user.") }, "maxLength": 200, "name": "description", "selectOnFocus": true });
    var main_panel559 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ { "anchor": "-20", "autoHeight": true, "items": file556, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": type557, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": description558, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 108, "layout": "form" });
    this.items = main_panel559;
    this.before_row_edit = function(record) {
      type557.setContextValue('upload_area', record ? record.data['upload_areaHidden'] : undefined);
    }
    Lino.uploads.UploadsByController.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.contacts.Partners.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 8,
  initComponent : function() {
    var name563 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Name</span>", "listeners": { "render": Lino.quicktip_renderer("Name","(contacts.Partners.name) The full name of this partner. Used for alphabetic sorting.\nSubclasses may hide this field and fill it automatically,\ne.g. saving a Person will automatically set her\nname field to \"last_name, first_name\".") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var email564 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">e-mail address</span>", "listeners": { "render": Lino.quicktip_renderer("e-mail address","(contacts.Partners.email) The primary email address.") }, "maxLength": 254, "name": "email", "selectOnFocus": true });
    var main_panel565 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ { "anchor": "-20", "autoHeight": true, "items": name563, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": email564, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 135, "layout": "form" });
    this.items = main_panel565;
    this.before_row_edit = function(record) {
    }
    Lino.contacts.Partners.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.excerpts.ExcerptTypes.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 43,
  initComponent : function() {
    var id568 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(excerpts.ExcerptTypes.id) ") }, "name": "id", "selectOnFocus": true });
    var name569 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Designation</span>", "listeners": { "render": Lino.quicktip_renderer("Designation","(excerpts.ExcerptTypes.name) The designation of this excerpt type.\nOne field for every language.") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var name_fr570 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(excerpts.ExcerptTypes.name_fr) ") }, "maxLength": 200, "name": "name_fr", "selectOnFocus": true });
    var main_1_panel571 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 10, "items": id568, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 44, "items": name569, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 44, "items": name_fr570, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var content_type575 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a content type...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Model</span>", "hiddenName": "content_typeHidden", "listeners": { "render": Lino.quicktip_renderer("Model","(excerpts.ExcerptTypes.content_type) The model that can issue printouts of this type.") }, "name": "content_type", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.gfks.ContentTypes.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/excerpts/ExcerptTypes/content_type" }) }) });
    var build_method576 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Build method</span>", "forceSelection": true, "hiddenName": "build_methodHidden", "listeners": { "render": Lino.quicktip_renderer("Build method","(excerpts.ExcerptTypes.build_method) See lino.modlib.printing.mixins.PrintableType.build_method.") }, "name": "build_method", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.printing.BuildMethods) });
    var template577 = new Lino.SimpleRemoteComboFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Template</span>", "listeners": { "render": Lino.quicktip_renderer("Template","(excerpts.ExcerptTypes.template) The main template to be used when printing an excerpt of this type.") }, "name": "template", "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/excerpts/ExcerptTypes/template" }) }) });
    var body_template578 = new Lino.SimpleRemoteComboFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Body template</span>", "listeners": { "render": Lino.quicktip_renderer("Body template","(excerpts.ExcerptTypes.body_template) The body template to be used when         rendering a printable of this type. This is a list of files         with extension `.body.html`.") }, "name": "body_template", "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/excerpts/ExcerptTypes/body_template" }) }) });
    var email_template579 = new Lino.SimpleRemoteComboFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Email template</span>", "listeners": { "render": Lino.quicktip_renderer("Email template","(excerpts.ExcerptTypes.email_template) The name of the file to be used as template when creating an email from a mailable of this type.") }, "name": "email_template", "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/excerpts/ExcerptTypes/email_template" }) }) });
    var shortcut580 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Excerpt shortcut</span>", "listeners": { "render": Lino.quicktip_renderer("Excerpt shortcut","(excerpts.ExcerptTypes.shortcut) Optional pointer to a shortcut field.  If this is not empty, then\nthe given shortcut field will manage excerpts of this type.") }, "maxLength": 50, "name": "shortcut", "selectOnFocus": true });
    var main_2_panel581 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 15, "items": content_type575, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 15, "items": build_method576, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 15, "items": template577, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 15, "items": body_template578, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 15, "items": email_template579, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 21, "items": shortcut580, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var primary588 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Primary", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Primary","(excerpts.ExcerptTypes.primary) Whether this is the default type to use for this model. There's at most one primary type per model. Enabling this field will automatically make the other types non-primary.") }, "name": "primary", "selectOnFocus": true });
    var print_directly589 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Print directly", "checked": true, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Print directly","(excerpts.ExcerptTypes.print_directly) ") }, "name": "print_directly", "selectOnFocus": true });
    var certifying590 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Certifying", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Certifying","(excerpts.ExcerptTypes.certifying) Whether an excerpt of this type is a unique printout.") }, "name": "certifying", "selectOnFocus": true });
    var print_recipient591 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Print recipient", "checked": true, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Print recipient","(excerpts.ExcerptTypes.print_recipient) Whether to print a recipient field in document.") }, "name": "print_recipient", "selectOnFocus": true });
    var backward_compat592 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Backward compatible", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Backward compatible","(excerpts.ExcerptTypes.backward_compat) Check this to have `this` in template context point to owner instead of excerpt.") }, "name": "backward_compat", "selectOnFocus": true });
    var attach_to_email593 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Attach to email", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Attach to email","(excerpts.ExcerptTypes.attach_to_email) Whether the printable file should be attached to the email\nwhen creating an email from a mailable of this type.\n") }, "name": "attach_to_email", "selectOnFocus": true });
    var main_3_panel594 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 16, "items": primary588, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 16, "items": print_directly589, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 16, "items": certifying590, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 16, "items": print_recipient591, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 16, "items": backward_compat592, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 16, "items": attach_to_email593, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 180, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel651 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel571, main_2_panel581, main_3_panel594 ], "labelAlign": "top", "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel651;
    this.before_row_edit = function(record) {
      template577.setContextValue('build_method', record ? record.data['build_methodHidden'] : undefined);
      template577.setContextValue('content_type', record ? record.data['content_typeHidden'] : undefined);
      body_template578.setContextValue('content_type', record ? record.data['content_typeHidden'] : undefined);
      email_template579.setContextValue('content_type', record ? record.data['content_typeHidden'] : undefined);
    }
    this.onRender = function(ct, position) {
      build_method576.on('change',Lino.chooser_handler(template577,'build_method'));
      content_type575.on('change',Lino.chooser_handler(template577,'content_type'));
      content_type575.on('change',Lino.chooser_handler(body_template578,'content_type'));
      content_type575.on('change',Lino.chooser_handler(email_template579,'content_type'));
      Lino.excerpts.ExcerptTypes.DetailFormPanel.superclass.onRender.call(this, ct, position);
    }
    Lino.excerpts.ExcerptTypes.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.households.Types.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 31,
  initComponent : function() {
    var name652 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation", "listeners": { "render": Lino.quicktip_renderer("Designation","(households.Types.name) ") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var name_fr653 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(households.Types.name_fr) ") }, "maxLength": 200, "name": "name_fr", "selectOnFocus": true });
    var main_1_panel654 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": name652, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": name_fr653, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel750 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel654 ], "labelAlign": "top", "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel750;
    this.before_row_edit = function(record) {
    }
    Lino.households.Types.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.excerpts.Excerpts.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 44,
  initComponent : function() {
    var id619 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(excerpts.Excerpts.id) ") }, "name": "id", "selectOnFocus": true });
    var excerpt_type620 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Excerpt Type...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Excerpt Type</span>", "hiddenName": "excerpt_typeHidden", "listeners": { "render": Lino.quicktip_renderer("Excerpt Type","(excerpts.Excerpts.excerpt_type) The type of this excerpt (ForeignKey to ExcerptType).") }, "name": "excerpt_type", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.excerpts.ExcerptTypes.detail,Lino.excerpts.ExcerptTypes.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/excerpts/Excerpts/excerpt_type" }) }) });
    var main_1_panel621 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 16, "items": id619, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 83, "items": excerpt_type620, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 117, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var user624 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "Author", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Author","(excerpts.Excerpts.user) ") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/excerpts/Excerpts/user" }) }) });
    var build_method625 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Build method", "forceSelection": true, "hiddenName": "build_methodHidden", "listeners": { "render": Lino.quicktip_renderer("Build method","(excerpts.Excerpts.build_method) ") }, "name": "build_method", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.printing.BuildMethods) });
    var main_2_panel626 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 30, "items": user624, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 69, "items": build_method625, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 117, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var company629 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Organization...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Recipient (Organization)</span>", "hiddenName": "companyHidden", "listeners": { "render": Lino.quicktip_renderer("Recipient (Organization)","(excerpts.Excerpts.company) The optional company of the recipient of this\nexcerpt.  See ContactRelated.company.") }, "name": "company", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Companies.detail,Lino.contacts.Companies.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/excerpts/Excerpts/company" }) }) });
    var contact_person630 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Person...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Recipient (Person)</span>", "hiddenName": "contact_personHidden", "listeners": { "render": Lino.quicktip_renderer("Recipient (Person)","(excerpts.Excerpts.contact_person) The optional contact person of the recipient of this\nexcerpt.  See ContactRelated.contact_person.") }, "name": "contact_person", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Persons.detail,Lino.contacts.Persons.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/excerpts/Excerpts/contact_person" }) }) });
    var language631 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Language</span>", "hiddenName": "languageHidden", "listeners": { "render": Lino.quicktip_renderer("Language","(excerpts.Excerpts.language) The language used for printing this excerpt.") }, "name": "language", "selectOnFocus": true, "store": [ [ "en", "English" ], [ "fr", "French" ] ] });
    var main_3_panel632 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 33, "items": company629, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 33, "items": contact_person630, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 33, "items": language631, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 225, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var owner_disp636 = new Ext.form.DisplayField({ "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Controlled by</span>", "name": "owner" });
    var build_time637 = new Ext.form.DisplayField({ "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "build time", "listeners": { "render": Lino.quicktip_renderer("build time","(excerpts.Excerpts.build_time) ") }, "name": "build_time", "value": "<br>" });
    var main_4_panel638 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 38, "items": owner_disp636, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 61, "items": build_time637, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 126, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel641 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel621, main_2_panel626, main_3_panel632, main_4_panel638 ], "labelAlign": "top", "layout": "form" });
    this.items = main_panel641;
    this.before_row_edit = function(record) {
      excerpt_type620.setContextValue('owner', record ? record.data['owner'] : undefined);
      contact_person630.setContextValue('company', record ? record.data['companyHidden'] : undefined);
    }
    this.onRender = function(ct, position) {
      owner_disp636.on('change',Lino.chooser_handler(excerpt_type620,'owner'));
      company629.on('change',Lino.chooser_handler(contact_person630,'company'));
      Lino.excerpts.Excerpts.DetailFormPanel.superclass.onRender.call(this, ct, position);
    }
    Lino.excerpts.Excerpts.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.contacts.Partners.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 8,
  initComponent : function() {
    var name751 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Name</span>", "listeners": { "render": Lino.quicktip_renderer("Name","(contacts.Partners.name) The full name of this partner. Used for alphabetic sorting.\nSubclasses may hide this field and fill it automatically,\ne.g. saving a Person will automatically set her\nname field to \"last_name, first_name\".") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var country752 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Country...", "fieldLabel": "Country", "hiddenName": "countryHidden", "listeners": { "render": Lino.quicktip_renderer("Country","(contacts.Partners.country) ") }, "name": "country", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.countries.Countries.detail,Lino.countries.Countries.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/contacts/Partners/country" }) }) });
    var city753 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Place...", "fieldLabel": "Locality", "forceSelection": false, "hiddenName": "cityHidden", "listeners": { "render": Lino.quicktip_renderer("Locality","(contacts.Partners.city) ") }, "name": "city", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.countries.Places.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/contacts/Partners/city" }) }) });
    var zip_code754 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "boxMinWidth": Lino.chars2width(10), "fieldLabel": "Zip code", "listeners": { "render": Lino.quicktip_renderer("Zip code","(contacts.Partners.zip_code) ") }, "maxLength": 10, "name": "zip_code", "selectOnFocus": true });
    var address_box_2_panel755 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 40, "items": country752, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 40, "items": city753, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 20, "items": zip_code754, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 81, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var street759 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Street", "listeners": { "render": Lino.quicktip_renderer("Street","(contacts.Partners.street) ") }, "maxLength": 200, "name": "street", "selectOnFocus": true });
    var street_no760 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "boxMinWidth": Lino.chars2width(10), "fieldLabel": "No.", "listeners": { "render": Lino.quicktip_renderer("No.","(contacts.Partners.street_no) ") }, "maxLength": 10, "name": "street_no", "selectOnFocus": true });
    var street_box761 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "boxMinWidth": Lino.chars2width(10), "fieldLabel": "Box", "listeners": { "render": Lino.quicktip_renderer("Box","(contacts.Partners.street_box) ") }, "maxLength": 10, "name": "street_box", "selectOnFocus": true });
    var address_box_4_panel762 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 53, "items": street759, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 23, "items": street_no760, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 23, "items": street_box761, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 63, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var address_box_panel766 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "flex": 50, "frame": true, "hideCheckBoxLabels": true, "items": [ { "anchor": "-20", "autoHeight": true, "items": name751, "labelAlign": "top", "layout": "form", "xtype": "panel" }, address_box_2_panel755, address_box_4_panel762 ], "labelAlign": "top", "labelWidth": 45, "layout": "form" });
    var url768 = new Lino.URLField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "URL", "listeners": { "render": Lino.quicktip_renderer("URL","(contacts.Partners.url) ") }, "maxLength": 200, "name": "url", "selectOnFocus": true });
    var phone769 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Phone</span>", "listeners": { "render": Lino.quicktip_renderer("Phone","(contacts.Partners.phone) The primary phone number.  Note that Lino does not ignore\nformatting characters in phone numbers when searching.  For\nexample, if you enter \"087/12.34.56\" as a phone number, then a\nsearch for phone number containing \"1234\" will not find it.") }, "maxLength": 200, "name": "phone", "selectOnFocus": true });
    var gsm770 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">GSM</span>", "listeners": { "render": Lino.quicktip_renderer("GSM","(contacts.Partners.gsm) The primary mobile phone number.") }, "maxLength": 200, "name": "gsm", "selectOnFocus": true });
    var contact_box_panel771 = new Ext.form.FieldSet({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "flex": 25, "frame": true, "hideCheckBoxLabels": true, "items": [ { "anchor": "-20", "autoHeight": true, "items": url768, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": phone769, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": gsm770, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 54, "layout": "form", "title": "Contact" });
    var overview_htmlbox775 = new Lino.HtmlBoxPanel({ "always_enabled": true, "bodyStyle": "overflow-x:hidden;", "containing_panel": this, "flex": 25, "items": new Ext.BoxComponent({autoScroll:true}), "layout": "fit", "listeners": { "render": Lino.quicktip_renderer(null,"(contacts.Partners.overview) ") }, "name": "overview", "value": "<br/>" });
    var main_1_panel776 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ address_box_panel766, contact_box_panel771, overview_htmlbox775 ], "labelAlign": "top", "labelWidth": 0, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var remarks777 = new Lino.RichTextPanel({ "containing_panel": this, "fieldLabel": "About me", "flex": 62, "name": "remarks", "selectOnFocus": true, "title": "About me" });
    var main_panel778 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel776, remarks777 ], "labelAlign": "top", "labelWidth": 81, "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel778;
    this.before_row_edit = function(record) {
      city753.setContextValue('country', record ? record.data['countryHidden'] : undefined);
      city753.setContextValue('region', record ? record.data['regionHidden'] : undefined);
      overview_htmlbox775.refresh();
      remarks777.refresh();
    }
    this.onRender = function(ct, position) {
      country752.on('change',Lino.chooser_handler(city753,'country'));
      Lino.contacts.Partners.DetailFormPanel.superclass.onRender.call(this, ct, position);
    }
    Lino.contacts.Partners.DetailFormPanel.superclass.initComponent.call(this);
    // active_fields:
    city753.on("change", function(){ this.save() }, this);
    zip_code754.on("change", function(){ this.save() }, this);
  }
});


Lino.cal.Rooms.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 16,
  initComponent : function() {
    var id779 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(cal.Rooms.id) ") }, "name": "id", "selectOnFocus": true });
    var name780 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation", "listeners": { "render": Lino.quicktip_renderer("Designation","(cal.Rooms.name) ") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var name_fr781 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(cal.Rooms.name_fr) ") }, "maxLength": 200, "name": "name_fr", "selectOnFocus": true });
    var main_1_panel782 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 10, "items": id779, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 44, "items": name780, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 44, "items": name_fr781, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var company786 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Organization...", "fieldLabel": "Responsible", "hiddenName": "companyHidden", "listeners": { "render": Lino.quicktip_renderer("Responsible","(cal.Rooms.company) ") }, "name": "company", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Companies.detail,Lino.contacts.Companies.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Rooms/company" }) }) });
    var contact_person787 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Person...", "fieldLabel": "Contact person", "hiddenName": "contact_personHidden", "listeners": { "render": Lino.quicktip_renderer("Contact person","(cal.Rooms.contact_person) ") }, "name": "contact_person", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Persons.detail,Lino.contacts.Persons.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Rooms/contact_person" }) }) });
    var main_panel788 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel782, { "anchor": "-20", "autoHeight": true, "items": company786, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": contact_person787, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 135, "layout": "form" });
    this.items = main_panel788;
    this.before_row_edit = function(record) {
      contact_person787.setContextValue('company', record ? record.data['companyHidden'] : undefined);
    }
    this.onRender = function(ct, position) {
      company786.on('change',Lino.chooser_handler(contact_person787,'company'));
      Lino.cal.Rooms.InsertFormPanel.superclass.onRender.call(this, ct, position);
    }
    Lino.cal.Rooms.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.blogs.Entries.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 39,
  initComponent : function() {
    var title791 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Heading", "listeners": { "render": Lino.quicktip_renderer("Heading","(blogs.Entries.title) ") }, "maxLength": 200, "name": "title", "selectOnFocus": true });
    var entry_type792 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Blog Entry Type...", "fieldLabel": "Blog Entry Type", "hiddenName": "entry_typeHidden", "listeners": { "render": Lino.quicktip_renderer("Blog Entry Type","(blogs.Entries.entry_type) ") }, "name": "entry_type", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.blogs.EntryTypes.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/blogs/Entries/entry_type" }) }) });
    var id793 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(blogs.Entries.id) ") }, "name": "id", "selectOnFocus": true });
    var main_1_panel794 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 55, "items": title791, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 31, "items": entry_type792, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 13, "items": id793, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 144, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var pub_date798 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Publication date", "listeners": { "render": Lino.quicktip_renderer("Publication date","(blogs.Entries.pub_date) ") }, "name": "pub_date", "selectOnFocus": true });
    var pub_time799 = new Lino.TimeField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Publication time", "listeners": { "render": Lino.quicktip_renderer("Publication time","(blogs.Entries.pub_time) ") }, "name": "pub_time", "selectOnFocus": true });
    var user800 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "Author", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Author","(blogs.Entries.user) ") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/blogs/Entries/user" }) }) });
    var language801 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Language", "hiddenName": "languageHidden", "listeners": { "render": Lino.quicktip_renderer("Language","(blogs.Entries.language) ") }, "name": "language", "selectOnFocus": true, "store": [ [ "en", "English" ], [ "fr", "French" ] ] });
    var owner_disp802 = new Ext.form.DisplayField({ "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "Controlled by", "name": "owner" });
    var add_interest803 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Topic...", "fieldLabel": "Add interest", "hiddenName": "add_interestHidden", "listeners": { "render": Lino.quicktip_renderer("Add interest","(blogs.Entries.add_interest) ") }, "name": "add_interest", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.topics.Topics.detail,Lino.topics.Topics.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/blogs/Entries/add_interest" }) }) });
    var main_2_panel804 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 18, "items": pub_date798, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 11, "items": pub_time799, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 14, "items": user800, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 14, "items": language801, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 14, "items": owner_disp802, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 28, "items": add_interest803, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var body811 = new Lino.RichTextPanel({ "containing_panel": this, "fieldLabel": "Body", "flex": 75, "name": "body", "selectOnFocus": true, "title": "Body" });
    var main_3_panel813 = new Ext.Panel({ "autoScroll": false, "border": false, "flex": 71, "frame": false, "hideCheckBoxLabels": true, "items": [ body811 ], "labelAlign": "top", "labelWidth": 90, "layout": "hbox", "layoutConfig": { "align": "stretch" } });
    var main_panel814 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel794, main_2_panel804, main_3_panel813 ], "labelAlign": "top", "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel814;
    this.before_row_edit = function(record) {
      body811.refresh();
    }
    Lino.blogs.Entries.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.comments.Comments.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 46,
  initComponent : function() {
    var reply_to815 = new Lino.TwinCombo({ "emptyText": "Select a Comment...", "fieldLabel": "Reply to", "flex": 33, "hidden": true, "hiddenName": "reply_toHidden", "listeners": { "render": Lino.quicktip_renderer("Reply to","(comments.Comments.reply_to) ") }, "name": "reply_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.comments.Comments.detail,Lino.comments.Comments.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/comments/Comments/reply_to" }) }) });
    var owner_disp816 = new Ext.form.DisplayField({ "disabled": true, "fieldLabel": "Controlled by", "flex": 16, "hidden": true, "name": "owner" });
    var owner_type817 = new Lino.TwinCombo({ "emptyText": "Select a content type...", "fieldLabel": "Controlled by (type)", "flex": 33, "hidden": true, "hiddenName": "owner_typeHidden", "listeners": { "render": Lino.quicktip_renderer("Controlled by (type)","(comments.Comments.owner_type) ") }, "name": "owner_type", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.gfks.ContentTypes.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/comments/Comments/owner_type" }) }) });
    var owner_id818 = new Lino.RemoteComboFieldElement({ "fieldLabel": "Controlled by (object)", "flex": 16, "hidden": true, "hiddenName": "owner_idHidden", "listeners": { "render": Lino.quicktip_renderer("Controlled by (object)","(comments.Comments.owner_id) ") }, "name": "owner_id", "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/comments/Comments/owner_id" }) }) });
    var main_1_panel819 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hidden": true, "hideCheckBoxLabels": true, "items": [ reply_to815, owner_disp816, owner_type817, owner_id818 ], "labelAlign": "top", "labelWidth": 207, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var short_text820 = new Lino.RichTextPanel({ "allowBlank": false, "containing_panel": this, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Short text</span>", "flex": 83, "name": "short_text", "selectOnFocus": true, "title": "Short text" });
    var main_panel821 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel819, short_text820 ], "labelAlign": "top", "labelWidth": 99, "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel821;
    this.before_row_edit = function(record) {
      owner_id818.setContextValue('owner_type', record ? record.data['owner_typeHidden'] : undefined);
      short_text820.refresh();
    }
    this.onRender = function(ct, position) {
      owner_type817.on('change',Lino.chooser_handler(owner_id818,'owner_type'));
      Lino.comments.Comments.InsertFormPanel.superclass.onRender.call(this, ct, position);
    }
    Lino.comments.Comments.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.Guests.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 21,
  initComponent : function() {
    var event822 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Calendar entry...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Calendar entry</span>", "hiddenName": "eventHidden", "listeners": { "render": Lino.quicktip_renderer("Calendar entry","(cal.Guests.event) The calendar event to which this presence applies.") }, "name": "event", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.cal.OneEvent.detail,Lino.cal.OneEvent.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Guests/event" }) }) });
    var partner823 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Person...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Person</span>", "hiddenName": "partnerHidden", "listeners": { "render": Lino.quicktip_renderer("Person","(cal.Guests.partner) The partner to which this presence applies.") }, "name": "partner", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Persons.detail,Lino.contacts.Persons.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Guests/partner" }) }) });
    var role824 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Guest Role...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Role</span>", "hiddenName": "roleHidden", "listeners": { "render": Lino.quicktip_renderer("Role","(cal.Guests.role) The role of this partner in this presence.") }, "name": "role", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.cal.GuestRoles.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Guests/role" }) }) });
    var main_panel825 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ { "anchor": "-20", "autoHeight": true, "items": event822, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": partner823, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": role824, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 135, "layout": "form" });
    this.items = main_panel825;
    this.before_row_edit = function(record) {
    }
    Lino.cal.Guests.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.addresses.Addresses.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 27,
  initComponent : function() {
    var country829 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Country...", "fieldLabel": "Country", "hiddenName": "countryHidden", "listeners": { "render": Lino.quicktip_renderer("Country","(addresses.Addresses.country) ") }, "name": "country", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.countries.Countries.detail,Lino.countries.Countries.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/addresses/Addresses/country" }) }) });
    var city830 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Place...", "fieldLabel": "Locality", "forceSelection": false, "hiddenName": "cityHidden", "listeners": { "render": Lino.quicktip_renderer("Locality","(addresses.Addresses.city) ") }, "name": "city", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.countries.Places.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/addresses/Addresses/city" }) }) });
    var main_1_panel831 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": country829, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": city830, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 81, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var street834 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Street", "listeners": { "render": Lino.quicktip_renderer("Street","(addresses.Addresses.street) ") }, "maxLength": 200, "name": "street", "selectOnFocus": true });
    var street_no835 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "boxMinWidth": Lino.chars2width(10), "fieldLabel": "No.", "listeners": { "render": Lino.quicktip_renderer("No.","(addresses.Addresses.street_no) ") }, "maxLength": 10, "name": "street_no", "selectOnFocus": true });
    var street_box836 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "boxMinWidth": Lino.chars2width(10), "fieldLabel": "Box", "listeners": { "render": Lino.quicktip_renderer("Box","(addresses.Addresses.street_box) ") }, "maxLength": 10, "name": "street_box", "selectOnFocus": true });
    var main_2_panel837 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 48, "items": street834, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 25, "items": street_no835, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 25, "items": street_box836, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 63, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var address_type841 = new Lino.ChoicesFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Address type", "forceSelection": true, "hiddenName": "address_typeHidden", "listeners": { "render": Lino.quicktip_renderer("Address type","(addresses.Addresses.address_type) ") }, "name": "address_type", "selectOnFocus": true, "store": Lino.addresses.AddressTypes });
    var remark842 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Remark", "listeners": { "render": Lino.quicktip_renderer("Remark","(addresses.Addresses.remark) ") }, "maxLength": 50, "name": "remark", "selectOnFocus": true });
    var main_3_panel843 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": address_type841, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": remark842, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 117, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel846 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel831, main_2_panel837, main_3_panel843 ], "labelAlign": "top", "layout": "form" });
    this.items = main_panel846;
    this.before_row_edit = function(record) {
      city830.setContextValue('country', record ? record.data['countryHidden'] : undefined);
      city830.setContextValue('region', record ? record.data['regionHidden'] : undefined);
    }
    this.onRender = function(ct, position) {
      country829.on('change',Lino.chooser_handler(city830,'country'));
      Lino.addresses.Addresses.InsertFormPanel.superclass.onRender.call(this, ct, position);
    }
    Lino.addresses.Addresses.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.comments.CommentTypes.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 47,
  initComponent : function() {
    var id847 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(comments.CommentTypes.id) ") }, "name": "id", "selectOnFocus": true });
    var name848 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation", "listeners": { "render": Lino.quicktip_renderer("Designation","(comments.CommentTypes.name) ") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var name_fr849 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(comments.CommentTypes.name_fr) ") }, "maxLength": 200, "name": "name_fr", "selectOnFocus": true });
    var main_1_panel850 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 10, "items": id847, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 44, "items": name848, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 44, "items": name_fr849, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel855 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel850 ], "labelAlign": "top", "labelWidth": 81, "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel855;
    this.before_row_edit = function(record) {
    }
    Lino.comments.CommentTypes.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.contacts.Persons.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 6,
  initComponent : function() {
    var overview_htmlbox856 = new Lino.HtmlBoxPanel({ "always_enabled": true, "bodyStyle": "overflow-x:hidden;", "containing_panel": this, "flex": 45, "items": new Ext.BoxComponent({autoScroll:true}), "layout": "fit", "listeners": { "render": Lino.quicktip_renderer(null,"(contacts.Persons.overview) ") }, "name": "overview", "value": "<br/>" });
    var last_name857 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Last name</span>", "listeners": { "render": Lino.quicktip_renderer("Last name","(contacts.Persons.last_name) The last name, also known as family name.") }, "maxLength": 200, "name": "last_name", "selectOnFocus": true });
    var first_name858 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">First name</span>", "listeners": { "render": Lino.quicktip_renderer("First name","(contacts.Persons.first_name) The first name, also known as given name.") }, "maxLength": 200, "name": "first_name", "selectOnFocus": true });
    var contact_box_1_panel859 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 58, "items": last_name857, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 41, "items": first_name858, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 99, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var gender862 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Gender</span>", "forceSelection": true, "hiddenName": "genderHidden", "listeners": { "render": Lino.quicktip_renderer("Gender","(contacts.Persons.gender) The sex of this person (male or female).") }, "name": "gender", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.system.Genders) });
    var language863 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Language</span>", "hiddenName": "languageHidden", "listeners": { "render": Lino.quicktip_renderer("Language","(contacts.Persons.language) The language to use when communicating with this partner.") }, "name": "language", "selectOnFocus": true, "store": [ [ "en", "English" ], [ "fr", "French" ] ] });
    var contact_box_2_panel864 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 47, "items": gender862, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 52, "items": language863, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 81, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var birth_date867 = new Lino.IncompleteDateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Birth date</span>", "listeners": { "render": Lino.quicktip_renderer("Birth date","(contacts.Persons.birth_date) Uncomplete dates are allowed, e.g. \n\"00.00.1980\" means \"some day in 1980\", \n\"00.07.1980\" means \"in July 1980\"\nor \"23.07.0000\" means \"on a 23th of July\".") }, "name": "birth_date", "selectOnFocus": true });
    var age_disp868 = new Ext.form.DisplayField({ "always_enabled": true, "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "Age", "listeners": { "render": Lino.quicktip_renderer("Age","(contacts.Persons.age) ") }, "name": "age", "value": "<br/>" });
    var id869 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(contacts.Persons.id) ") }, "name": "id", "selectOnFocus": true });
    var contact_box_3_panel870 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 42, "items": birth_date867, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 35, "items": age_disp868, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 21, "items": id869, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 99, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var contact_box_panel874 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "flex": 54, "frame": true, "hideCheckBoxLabels": true, "items": [ contact_box_1_panel859, contact_box_2_panel864, contact_box_3_panel870 ], "labelAlign": "top", "layout": "form" });
    var general_1_panel875 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ overview_htmlbox856, contact_box_panel874 ], "labelAlign": "top", "labelWidth": 0, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var general_panel900 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ general_1_panel875 ], "labelAlign": "top", "layout": "vbox", "layoutConfig": { "align": "stretch" }, "listeners": { "activate": Lino.on_tab_activate }, "title": "General" });
    var remarks925 = new Lino.RichTextPanel({ "containing_panel": this, "fieldLabel": "About me", "flex": 66, "name": "remarks", "selectOnFocus": true, "title": "About me" });
    var more_1_panel927 = new Ext.Panel({ "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ remarks925 ], "labelAlign": "top", "labelWidth": 126, "layout": "hbox", "layoutConfig": { "align": "stretch" }, "listeners": { "activate": Lino.on_tab_activate }, "title": "More" });
    var main_panel928 = new Ext.TabPanel({ "activeTab": 0, "autoScroll": false, "bodyBorder": false, "border": false, "enableTabScroll": true, "frame": true, "hideCheckBoxLabels": true, "items": [ general_panel900, more_1_panel927 ], "labelAlign": "top", "split": true });
    this.items = main_panel928;
    this.before_row_edit = function(record) {
      overview_htmlbox856.refresh();
      remarks925.refresh();
    }
    Lino.contacts.Persons.DetailFormPanel.superclass.initComponent.call(this);
    // active_fields:
  }
});


Lino.cal.Tasks.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 15,
  initComponent : function() {
    var summary929 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Short description", "listeners": { "render": Lino.quicktip_renderer("Short description","(cal.Tasks.summary) ") }, "maxLength": 200, "name": "summary", "selectOnFocus": true });
    var user930 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "Author", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Author","(cal.Tasks.user) ") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Tasks/user" }) }) });
    var main_panel931 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ { "anchor": "-20", "autoHeight": true, "items": summary929, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": user930, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 162, "layout": "form" });
    this.items = main_panel931;
    this.before_row_edit = function(record) {
    }
    Lino.cal.Tasks.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.uploads.UploadTypes.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 41,
  initComponent : function() {
    var id934 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(uploads.UploadTypes.id) ") }, "name": "id", "selectOnFocus": true });
    var upload_area935 = new Lino.ChoicesFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Upload Area", "forceSelection": true, "hiddenName": "upload_areaHidden", "listeners": { "render": Lino.quicktip_renderer("Upload Area","(uploads.UploadTypes.upload_area) ") }, "name": "upload_area", "selectOnFocus": true, "store": Lino.uploads.UploadAreas });
    var wanted936 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Wanted", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Wanted","(uploads.UploadTypes.wanted) Add a (+) button when there is no upload of this type.") }, "name": "wanted", "selectOnFocus": true });
    var max_number937 = new Ext.form.NumberField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Max. number</span>", "listeners": { "render": Lino.quicktip_renderer("Max. number","(uploads.UploadTypes.max_number) No need to upload more uploads than N of this type.\n-1 means no limit.") }, "name": "max_number", "selectOnFocus": true, "value": -1 });
    var shortcut938 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Upload shortcut</span>", "listeners": { "render": Lino.quicktip_renderer("Upload shortcut","(uploads.UploadTypes.shortcut) Optional pointer to a virtual upload shortcut field.  If\nthis is not empty, then the given shortcut field will manage\nuploads of this type.  See also Shortcuts.") }, "maxLength": 50, "name": "shortcut", "selectOnFocus": true });
    var main_1_panel939 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 9, "items": id934, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 19, "items": upload_area935, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 19, "items": wanted936, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 9, "items": max_number937, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 41, "items": shortcut938, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 144, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var name945 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation", "listeners": { "render": Lino.quicktip_renderer("Designation","(uploads.UploadTypes.name) ") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var name_fr946 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(uploads.UploadTypes.name_fr) ") }, "maxLength": 200, "name": "name_fr", "selectOnFocus": true });
    var main_2_panel947 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": name945, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": name_fr946, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel990 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel939, main_2_panel947 ], "labelAlign": "top", "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel990;
    this.before_row_edit = function(record) {
    }
    Lino.uploads.UploadTypes.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.checkdata.Problems.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 14,
  disable_editing: true,
  initComponent : function() {
    var checker991 = new Lino.ChoicesFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Checker</span>", "forceSelection": true, "hiddenName": "checkerHidden", "listeners": { "render": Lino.quicktip_renderer("Checker","(checkdata.Problems.checker) The Checker which reported\nthis problem.") }, "name": "checker", "selectOnFocus": true, "store": Lino.checkdata.Checkers });
    var owner_disp992 = new Ext.form.DisplayField({ "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "Database object", "name": "owner" });
    var message993 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Message</span>", "listeners": { "render": Lino.quicktip_renderer("Message","(checkdata.Problems.message) The message text. This is a concatenation of all messages that\nwere yeld by the checker.") }, "maxLength": 250, "name": "message", "selectOnFocus": true });
    var user994 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Responsible</span>", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Responsible","(checkdata.Problems.user) The user reponsible\nfor fixing this problem.") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/checkdata/Problems/user" }) }) });
    var id995 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(checkdata.Problems.id) ") }, "name": "id", "selectOnFocus": true });
    var main_4_panel996 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 66, "items": user994, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 33, "items": id995, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 108, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel999 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ { "anchor": "-20", "autoHeight": true, "items": checker991, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": owner_disp992, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": message993, "labelAlign": "top", "layout": "form", "xtype": "panel" }, main_4_panel996 ], "labelAlign": "top", "labelWidth": 144, "layout": "form" });
    this.items = main_panel999;
    this.before_row_edit = function(record) {
    }
    Lino.checkdata.Problems.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.households.MembersByPerson.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 29,
  initComponent : function() {
    var person1003 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Person...", "fieldLabel": "Person", "hiddenName": "personHidden", "listeners": { "render": Lino.quicktip_renderer("Person","(households.MembersByPerson.person) ") }, "name": "person", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Persons.detail,Lino.contacts.Persons.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/households/MembersByPerson/person" }) }) });
    var role1004 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Role", "forceSelection": true, "hiddenName": "roleHidden", "listeners": { "render": Lino.quicktip_renderer("Role","(households.MembersByPerson.role) ") }, "name": "role", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.households.MemberRoles) });
    var household1005 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Household...", "fieldLabel": "Household", "hiddenName": "householdHidden", "listeners": { "render": Lino.quicktip_renderer("Household","(households.MembersByPerson.household) ") }, "name": "household", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.households.Households.detail,Lino.households.Households.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/households/MembersByPerson/household" }) }) });
    var primary1006 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Primary", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Primary","(households.MembersByPerson.primary) Whether this is the primary household of this person. Checking this field will automatically disable any other primary memberships.") }, "name": "primary", "selectOnFocus": true });
    var main_panel1007 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ { "anchor": "-20", "autoHeight": true, "items": person1003, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": role1004, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": household1005, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": primary1006, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 90, "layout": "form" });
    this.items = main_panel1007;
    this.before_row_edit = function(record) {
    }
    Lino.households.MembersByPerson.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.Calendars.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 24,
  initComponent : function() {
    var name1012 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation", "listeners": { "render": Lino.quicktip_renderer("Designation","(cal.Calendars.name) ") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var name_fr1013 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(cal.Calendars.name_fr) ") }, "maxLength": 200, "name": "name_fr", "selectOnFocus": true });
    var main_1_panel1014 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": name1012, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": name_fr1013, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var color1017 = new Ext.form.NumberField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "color", "listeners": { "render": Lino.quicktip_renderer("color","(cal.Calendars.color) ") }, "name": "color", "selectOnFocus": true });
    var main_panel1018 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1014, { "anchor": "-20", "autoHeight": true, "items": color1017, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 54, "layout": "form" });
    this.items = main_panel1018;
    this.before_row_edit = function(record) {
    }
    Lino.cal.Calendars.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.tinymce.TextFieldTemplates.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 45,
  initComponent : function() {
    var name1020 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation", "listeners": { "render": Lino.quicktip_renderer("Designation","(tinymce.TextFieldTemplates.name) ") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var user1021 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "Author", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Author","(tinymce.TextFieldTemplates.user) ") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/tinymce/TextFieldTemplates/user" }) }) });
    var main_panel1022 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ { "anchor": "-20", "autoHeight": true, "items": name1020, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": user1021, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 108, "layout": "form" });
    this.items = main_panel1022;
    this.before_row_edit = function(record) {
    }
    Lino.tinymce.TextFieldTemplates.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.excerpts.Excerpts.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 44,
  initComponent : function() {
    var excerpt_type642 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Excerpt Type...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Excerpt Type</span>", "hiddenName": "excerpt_typeHidden", "listeners": { "render": Lino.quicktip_renderer("Excerpt Type","(excerpts.Excerpts.excerpt_type) The type of this excerpt (ForeignKey to ExcerptType).") }, "name": "excerpt_type", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.excerpts.ExcerptTypes.detail,Lino.excerpts.ExcerptTypes.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/excerpts/Excerpts/excerpt_type" }) }) });
    var company643 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Organization...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Recipient (Organization)</span>", "hiddenName": "companyHidden", "listeners": { "render": Lino.quicktip_renderer("Recipient (Organization)","(excerpts.Excerpts.company) The optional company of the recipient of this\nexcerpt.  See ContactRelated.company.") }, "name": "company", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Companies.detail,Lino.contacts.Companies.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/excerpts/Excerpts/company" }) }) });
    var contact_person644 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Person...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Recipient (Person)</span>", "hiddenName": "contact_personHidden", "listeners": { "render": Lino.quicktip_renderer("Recipient (Person)","(excerpts.Excerpts.contact_person) The optional contact person of the recipient of this\nexcerpt.  See ContactRelated.contact_person.") }, "name": "contact_person", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Persons.detail,Lino.contacts.Persons.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/excerpts/Excerpts/contact_person" }) }) });
    var main_2_panel645 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": company643, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": contact_person644, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 225, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel648 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ { "anchor": "-20", "autoHeight": true, "items": excerpt_type642, "labelAlign": "top", "layout": "form", "xtype": "panel" }, main_2_panel645 ], "labelAlign": "top", "labelWidth": 117, "layout": "form" });
    this.items = main_panel648;
    this.before_row_edit = function(record) {
      excerpt_type642.setContextValue('owner', record ? record.data['owner'] : undefined);
      contact_person644.setContextValue('company', record ? record.data['companyHidden'] : undefined);
    }
    this.onRender = function(ct, position) {
      company643.on('change',Lino.chooser_handler(contact_person644,'company'));
      Lino.excerpts.Excerpts.InsertFormPanel.superclass.onRender.call(this, ct, position);
    }
    Lino.excerpts.Excerpts.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.uploads.Uploads.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 42,
  initComponent : function() {
    var file965 = Lino.file_field_handler(this,{ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">File</span>", "listeners": { "render": Lino.quicktip_renderer("File","(uploads.Uploads.file) Pointer to the uploaded file. See\nlino.mixins.uploadable.Uploadable.file") }, "maxLength": 100, "name": "file", "selectOnFocus": true });
    var user966 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "Uploaded by", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Uploaded by","(uploads.Uploads.user) ") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/uploads/Uploads/user" }) }) });
    var main_1_panel967 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 51, "items": file965, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 48, "items": user966, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 108, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var upload_area970 = new Lino.ChoicesFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Upload Area", "forceSelection": true, "hiddenName": "upload_areaHidden", "listeners": { "render": Lino.quicktip_renderer("Upload Area","(uploads.Uploads.upload_area) ") }, "name": "upload_area", "selectOnFocus": true, "store": Lino.uploads.UploadAreas });
    var type971 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Upload Type...", "fieldLabel": "Upload Type", "hiddenName": "typeHidden", "listeners": { "render": Lino.quicktip_renderer("Upload Type","(uploads.Uploads.type) ") }, "name": "type", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.uploads.UploadTypes.detail,Lino.uploads.UploadTypes.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/uploads/Uploads/type" }) }) });
    var description972 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Description</span>", "listeners": { "render": Lino.quicktip_renderer("Description","(uploads.Uploads.description) A short description entered manually by the user.") }, "maxLength": 200, "name": "description", "selectOnFocus": true });
    var main_2_panel973 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 19, "items": upload_area970, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 39, "items": type971, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 41, "items": description972, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 108, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var owner_disp977 = new Ext.form.DisplayField({ "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "Controlled by", "name": "owner" });
    var main_panel978 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel967, main_2_panel973, { "anchor": "-20", "autoHeight": true, "items": owner_disp977, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 126, "layout": "form" });
    this.items = main_panel978;
    this.before_row_edit = function(record) {
      type971.setContextValue('upload_area', record ? record.data['upload_areaHidden'] : undefined);
    }
    this.onRender = function(ct, position) {
      upload_area970.on('change',Lino.chooser_handler(type971,'upload_area'));
      Lino.uploads.Uploads.DetailFormPanel.superclass.onRender.call(this, ct, position);
    }
    Lino.uploads.Uploads.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.humanlinks.Links.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 32,
  initComponent : function() {
    var parent1025 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Person...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Who is...</span>", "hiddenName": "parentHidden", "listeners": { "render": Lino.quicktip_renderer("Who is...","(humanlinks.Links.parent) Pointer to the person who is \"parent\".") }, "name": "parent", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Persons.detail,Lino.contacts.Persons.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/humanlinks/Links/parent" }) }) });
    var type1026 = new Lino.ChoicesFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Parency type</span>", "forceSelection": true, "hiddenName": "typeHidden", "listeners": { "render": Lino.quicktip_renderer("Parency type","(humanlinks.Links.type) The type of link.  Pointer to LinkTypes.") }, "name": "type", "selectOnFocus": true, "store": Lino.humanlinks.LinkTypes });
    var child1027 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Person...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">To whom...</span>", "hiddenName": "childHidden", "listeners": { "render": Lino.quicktip_renderer("To whom...","(humanlinks.Links.child) Pointer to the person who is \"child\".") }, "name": "child", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Persons.detail,Lino.contacts.Persons.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/humanlinks/Links/child" }) }) });
    var main_panel1028 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ { "anchor": "-20", "autoHeight": true, "items": parent1025, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": type1026, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": child1027, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 117, "layout": "form" });
    this.items = main_panel1028;
    this.before_row_edit = function(record) {
    }
    Lino.humanlinks.Links.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.users.Register.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 10,
  initComponent : function() {
    var first_name1032 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">First name</span>", "listeners": { "render": Lino.quicktip_renderer("First name","(users.Register.first_name) The first name, also known as given name.") }, "maxLength": 200, "name": "first_name", "selectOnFocus": true });
    var last_name1033 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Last name</span>", "listeners": { "render": Lino.quicktip_renderer("Last name","(users.Register.last_name) The last name, also known as family name.") }, "maxLength": 200, "name": "last_name", "selectOnFocus": true });
    var main_1_panel1034 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": first_name1032, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": last_name1033, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 99, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var email1037 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">e-mail address</span>", "listeners": { "render": Lino.quicktip_renderer("e-mail address","(users.Register.email) The primary email address.") }, "maxLength": 254, "name": "email", "selectOnFocus": true });
    var language1038 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Language</span>", "hiddenName": "languageHidden", "listeners": { "render": Lino.quicktip_renderer("Language","(users.Register.language) The language to use when communicating with this partner.") }, "name": "language", "selectOnFocus": true, "store": [ [ "en", "English" ], [ "fr", "French" ] ] });
    var main_2_panel1039 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 51, "items": email1037, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 48, "items": language1038, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 135, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var gsm1042 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">GSM</span>", "listeners": { "render": Lino.quicktip_renderer("GSM","(users.Register.gsm) The primary mobile phone number.") }, "maxLength": 200, "name": "gsm", "selectOnFocus": true });
    var phone1043 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Phone</span>", "listeners": { "render": Lino.quicktip_renderer("Phone","(users.Register.phone) The primary phone number.  Note that Lino does not ignore\nformatting characters in phone numbers when searching.  For\nexample, if you enter \"087/12.34.56\" as a phone number, then a\nsearch for phone number containing \"1234\" will not find it.") }, "maxLength": 200, "name": "phone", "selectOnFocus": true });
    var main_3_panel1044 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": gsm1042, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": phone1043, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 54, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var country1047 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Country...", "fieldLabel": "Country", "hiddenName": "countryHidden", "listeners": { "render": Lino.quicktip_renderer("Country","(users.Register.country) ") }, "name": "country", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.countries.Countries.detail,Lino.countries.Countries.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/users/Register/country" }) }) });
    var city1048 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Place...", "fieldLabel": "Locality", "forceSelection": false, "hiddenName": "cityHidden", "listeners": { "render": Lino.quicktip_renderer("Locality","(users.Register.city) ") }, "name": "city", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.countries.Places.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/users/Register/city" }) }) });
    var main_4_panel1049 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": country1047, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": city1048, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 81, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var street1052 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Street", "listeners": { "render": Lino.quicktip_renderer("Street","(users.Register.street) ") }, "maxLength": 200, "name": "street", "selectOnFocus": true });
    var street_no1053 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "boxMinWidth": Lino.chars2width(10), "fieldLabel": "No.", "listeners": { "render": Lino.quicktip_renderer("No.","(users.Register.street_no) ") }, "maxLength": 10, "name": "street_no", "selectOnFocus": true });
    var main_5_panel1054 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 65, "items": street1052, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 34, "items": street_no1053, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 63, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var username1057 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Username</span>", "listeners": { "render": Lino.quicktip_renderer("Username","(users.Register.username) Must be unique and cannot be empty.") }, "maxLength": 30, "name": "username", "selectOnFocus": true });
    var main_panel1058 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1034, main_2_panel1039, main_3_panel1044, main_4_panel1049, main_5_panel1054, { "anchor": "-20", "autoHeight": true, "items": username1057, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 81, "layout": "form" });
    this.items = main_panel1058;
    this.before_row_edit = function(record) {
      city1048.setContextValue('country', record ? record.data['countryHidden'] : undefined);
      city1048.setContextValue('region', record ? record.data['regionHidden'] : undefined);
    }
    this.onRender = function(ct, position) {
      country1047.on('change',Lino.chooser_handler(city1048,'country'));
      Lino.users.Register.InsertFormPanel.superclass.onRender.call(this, ct, position);
    }
    Lino.users.Register.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.humanlinks.Links.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 32,
  initComponent : function() {
    var parent1060 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Person...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Who is...</span>", "hiddenName": "parentHidden", "listeners": { "render": Lino.quicktip_renderer("Who is...","(humanlinks.Links.parent) Pointer to the person who is \"parent\".") }, "name": "parent", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Persons.detail,Lino.contacts.Persons.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/humanlinks/Links/parent" }) }) });
    var type1061 = new Lino.ChoicesFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Parency type</span>", "forceSelection": true, "hiddenName": "typeHidden", "listeners": { "render": Lino.quicktip_renderer("Parency type","(humanlinks.Links.type) The type of link.  Pointer to LinkTypes.") }, "name": "type", "selectOnFocus": true, "store": Lino.humanlinks.LinkTypes });
    var child1062 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Person...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">To whom...</span>", "hiddenName": "childHidden", "listeners": { "render": Lino.quicktip_renderer("To whom...","(humanlinks.Links.child) Pointer to the person who is \"child\".") }, "name": "child", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Persons.detail,Lino.contacts.Persons.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/humanlinks/Links/child" }) }) });
    var main_panel1063 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ { "anchor": "-20", "autoHeight": true, "items": parent1060, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": type1061, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": child1062, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 117, "layout": "form" });
    this.items = main_panel1063;
    this.before_row_edit = function(record) {
    }
    Lino.humanlinks.Links.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.Guests.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 21,
  initComponent : function() {
    var event1067 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Calendar entry...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Calendar entry</span>", "hiddenName": "eventHidden", "listeners": { "render": Lino.quicktip_renderer("Calendar entry","(cal.Guests.event) The calendar event to which this presence applies.") }, "name": "event", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.cal.OneEvent.detail,Lino.cal.OneEvent.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Guests/event" }) }) });
    var partner1068 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Person...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Person</span>", "hiddenName": "partnerHidden", "listeners": { "render": Lino.quicktip_renderer("Person","(cal.Guests.partner) The partner to which this presence applies.") }, "name": "partner", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Persons.detail,Lino.contacts.Persons.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Guests/partner" }) }) });
    var role1069 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Guest Role...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Role</span>", "hiddenName": "roleHidden", "listeners": { "render": Lino.quicktip_renderer("Role","(cal.Guests.role) The role of this partner in this presence.") }, "name": "role", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.cal.GuestRoles.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Guests/role" }) }) });
    var main_1_panel1070 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 33, "items": event1067, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 33, "items": partner1068, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 33, "items": role1069, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 135, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var state1074 = new Lino.ChoicesFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">State</span>", "forceSelection": true, "hiddenName": "stateHidden", "listeners": { "render": Lino.quicktip_renderer("State","(cal.Guests.state) The state of this presence.") }, "name": "state", "selectOnFocus": true, "store": Lino.cal.GuestStates });
    var remark1075 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Remark", "listeners": { "render": Lino.quicktip_renderer("Remark","(cal.Guests.remark) ") }, "maxLength": 200, "name": "remark", "selectOnFocus": true });
    var workflow_buttons_disp1076 = new Ext.form.DisplayField({ "always_enabled": true, "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "Workflow", "listeners": { "render": Lino.quicktip_renderer("Workflow","(cal.Guests.workflow_buttons) ") }, "name": "workflow_buttons", "value": "<br/>" });
    var main_2_panel1077 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 16, "items": state1074, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 34, "items": remark1075, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 49, "items": workflow_buttons_disp1076, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 81, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel1081 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1070, main_2_panel1077 ], "labelAlign": "top", "layout": "form" });
    this.items = main_panel1081;
    this.before_row_edit = function(record) {
    }
    Lino.cal.Guests.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.EventTypes.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 18,
  initComponent : function() {
    var name1082 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation", "listeners": { "render": Lino.quicktip_renderer("Designation","(cal.EventTypes.name) ") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var name_fr1083 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(cal.EventTypes.name_fr) ") }, "maxLength": 200, "name": "name_fr", "selectOnFocus": true });
    var main_1_panel1084 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": name1082, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": name_fr1083, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var event_label1087 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Entry label</span>", "listeners": { "render": Lino.quicktip_renderer("Entry label","(cal.EventTypes.event_label) Default text for summary of new entries.") }, "maxLength": 200, "name": "event_label", "selectOnFocus": true });
    var event_label_fr1088 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Entry label (fr)", "listeners": { "render": Lino.quicktip_renderer("Entry label (fr)","(cal.EventTypes.event_label_fr) ") }, "maxLength": 200, "name": "event_label_fr", "selectOnFocus": true });
    var main_2_panel1089 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": event_label1087, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": event_label_fr1088, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel1092 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1084, main_2_panel1089 ], "labelAlign": "top", "layout": "form" });
    this.items = main_panel1092;
    this.before_row_edit = function(record) {
    }
    Lino.cal.EventTypes.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.about.About.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  disable_editing: true,
  initComponent : function() {
    var server_status_disp1094 = new Ext.form.DisplayField({ "always_enabled": true, "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "Server status", "listeners": { "render": Lino.quicktip_renderer("Server status","(about.About.server_status) ") }, "name": "server_status", "value": "<br/>" });
    var main_panel1095 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ { "flex": 25, "html": "<div class=\"htmlText\"><span>This is <a href=\"http://amici.lino-framework.org/\" target=\"_blank\">Lino Amici</a> 17.10.0 using <a href=\"http://www.lino-framework.org\" target=\"_blank\">Lino</a> 17.10.1, <a href=\"http://www.djangoproject.com\" target=\"_blank\">Django</a> 1.11.8, <a href=\"http://www.python.org/\" target=\"_blank\">Python</a> 2.7.12, <a href=\"http://babel.edgewall.org/\" target=\"_blank\">Babel</a> 2.5.1, <a href=\"http://jinja.pocoo.org/\" target=\"_blank\">Jinja</a> 2.10, <a href=\"http://labix.org/python-dateutil\" target=\"_blank\">python-dateutil</a> 2.6.1, <a href=\"http://getbootstrap.com\" target=\"_blank\">Bootstrap</a> 3.3.4, <a href=\"http://www.sencha.com\" target=\"_blank\">ExtJS</a> <a href=\"#\" onclick=\"alert('ExtJS client version is ' + Ext.version);\" title=\"Click to see ExtJS client version\">(version)</a>, <a href=\"http://www.famfamfam.com/lab/icons/silk/\" target=\"_blank\">Silk Icons</a> 1.3, <a href=\"http://ext.ensible.com/products/calendar/\" target=\"_blank\">Ext.ensible adapter</a> <a href=\"#\" onclick=\"alert('Extensible Calendar version is '             + Ext.ensible.version);\" title=\"Click to see Extensible Calendar version\">(version)</a>, <a href=\"http://www.tinymce.com/\" target=\"_blank\">TinyMCE</a> 3.5.11, <a href=\"http://www.byte-force.com\" target=\"_blank\">Ext.ux.TinyMCE</a> 0.8.4</span><p>Languages: en, fr</p><p>Server uptime : <b>22/12/2017 at 14:56</b> (UTC)</p><p>This is a Lino demo site.</p><p>We are running with simulated date set to Thursday, 16 March 2017.</p><p>Source timestamps:</p><ul><li>atelier : <b>17/12/2017 at 02:37</b></li><li>django : <b>19/12/2017 at 05:11</b></li><li>lino_xl : <b>20/12/2017 at 15:14</b></li><li>lino : <b>21/12/2017 at 18:44</b></li><li>lino_amici : <b>22/12/2017 at 14:55</b></li></ul></div>", "xtype": "label" }, { "autoHeight": true, "items": server_status_disp1094, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 126, "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel1095;
    this.before_row_edit = function(record) {
    }
    Lino.about.About.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.uploads.Uploads.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 42,
  initComponent : function() {
    var type980 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Upload Type...", "fieldLabel": "Upload Type", "hiddenName": "typeHidden", "listeners": { "render": Lino.quicktip_renderer("Upload Type","(uploads.Uploads.type) ") }, "name": "type", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.uploads.UploadTypes.detail,Lino.uploads.UploadTypes.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/uploads/Uploads/type" }) }) });
    var description981 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Description</span>", "listeners": { "render": Lino.quicktip_renderer("Description","(uploads.Uploads.description) A short description entered manually by the user.") }, "maxLength": 200, "name": "description", "selectOnFocus": true });
    var file982 = Lino.file_field_handler(this,{ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">File</span>", "listeners": { "render": Lino.quicktip_renderer("File","(uploads.Uploads.file) Pointer to the uploaded file. See\nlino.mixins.uploadable.Uploadable.file") }, "maxLength": 100, "name": "file", "selectOnFocus": true });
    var user983 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "Uploaded by", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Uploaded by","(uploads.Uploads.user) ") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/uploads/Uploads/user" }) }) });
    var main_panel984 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ { "anchor": "-20", "autoHeight": true, "items": type980, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": description981, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": file982, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": user983, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 108, "layout": "form" });
    this.items = main_panel984;
    this.before_row_edit = function(record) {
      type980.setContextValue('upload_area', record ? record.data['upload_areaHidden'] : undefined);
    }
    Lino.uploads.Uploads.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.tinymce.TextFieldTemplates.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 45,
  initComponent : function() {
    var id1097 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(tinymce.TextFieldTemplates.id) ") }, "name": "id", "selectOnFocus": true });
    var name1098 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation", "listeners": { "render": Lino.quicktip_renderer("Designation","(tinymce.TextFieldTemplates.name) ") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var user1099 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "Author", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Author","(tinymce.TextFieldTemplates.user) ") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/tinymce/TextFieldTemplates/user" }) }) });
    var main_1_panel1100 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 10, "items": id1097, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 45, "items": name1098, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 43, "items": user1099, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 108, "layout": "hbox", "layoutConfig": { "align": "stretchmax" }, "region": "north", "split": true });
    var description1104 = new Ext.form.TextArea({ "anchor": "-20 -10", "fieldLabel": "Description", "growMax": 2000, "listeners": { "render": Lino.quicktip_renderer("Description","(tinymce.TextFieldTemplates.description) ") }, "name": "description", "selectOnFocus": true });
    var text1105 = new Lino.RichTextPanel({ "containing_panel": this, "fieldLabel": "Template Text", "flex": 5, "name": "text", "region": "south", "selectOnFocus": true, "split": true, "title": "Template Text" });
    var main_panel1106 = new Lino.VBorderPanel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1100, { "flex": 5, "items": description1104, "labelAlign": "top", "layout": "form", "region": "center", "split": true, "xtype": "panel" }, text1105 ], "labelAlign": "top", "labelWidth": 126 });
    this.items = main_panel1106;
    this.before_row_edit = function(record) {
      text1105.refresh();
    }
    Lino.tinymce.TextFieldTemplates.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.topics.Topics.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 34,
  initComponent : function() {
    var topic_group1108 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Topic group...", "fieldLabel": "Topic group", "hiddenName": "topic_groupHidden", "listeners": { "render": Lino.quicktip_renderer("Topic group","(topics.Topics.topic_group) ") }, "name": "topic_group", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.topics.TopicGroups.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/topics/Topics/topic_group" }) }) });
    var name1109 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation", "listeners": { "render": Lino.quicktip_renderer("Designation","(topics.Topics.name) ") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var name_fr1110 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(topics.Topics.name_fr) ") }, "maxLength": 200, "name": "name_fr", "selectOnFocus": true });
    var main_2_panel1111 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": name1109, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": name_fr1110, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel1114 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ { "anchor": "-20", "autoHeight": true, "items": topic_group1108, "labelAlign": "top", "layout": "form", "xtype": "panel" }, main_2_panel1111 ], "labelAlign": "top", "labelWidth": 108, "layout": "form" });
    this.items = main_panel1114;
    this.before_row_edit = function(record) {
    }
    Lino.topics.Topics.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.contacts.Companies.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 5,
  initComponent : function() {
    var overview_htmlbox1116 = new Lino.HtmlBoxPanel({ "always_enabled": true, "bodyStyle": "overflow-x:hidden;", "containing_panel": this, "flex": 27, "items": new Ext.BoxComponent({autoScroll:true}), "layout": "fit", "listeners": { "render": Lino.quicktip_renderer(null,"(contacts.Companies.overview) ") }, "name": "overview", "value": "<br/>" });
    var id1117 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(contacts.Companies.id) ") }, "name": "id", "selectOnFocus": true });
    var language1118 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Language</span>", "hiddenName": "languageHidden", "listeners": { "render": Lino.quicktip_renderer("Language","(contacts.Companies.language) The language to use when communicating with this partner.") }, "name": "language", "selectOnFocus": true, "store": [ [ "en", "English" ], [ "fr", "French" ] ] });
    var parent1119 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Organization...", "fieldLabel": "Parent", "hiddenName": "parentHidden", "listeners": { "render": Lino.quicktip_renderer("Parent","(contacts.Companies.parent) ") }, "name": "parent", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Companies.detail,Lino.contacts.Companies.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/contacts/Companies/parent" }) }) });
    var general_middle_panel1120 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "flex": 18, "frame": true, "hideCheckBoxLabels": true, "items": [ { "anchor": "-20", "autoHeight": true, "items": id1117, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": language1118, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": parent1119, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 81, "layout": "form" });
    var prefix1124 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Name prefix</span>", "listeners": { "render": Lino.quicktip_renderer("Name prefix","(contacts.Companies.prefix) An optional name prefix. For organisations this is inserted\nbefore the name, for persons this is inserted between first\nname and last name (see\nlino.mixins.human.Human.get_last_name_prefix()).") }, "maxLength": 200, "name": "prefix", "selectOnFocus": true });
    var name1125 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Name</span>", "listeners": { "render": Lino.quicktip_renderer("Name","(contacts.Companies.name) The full name of this partner. Used for alphabetic sorting.\nSubclasses may hide this field and fill it automatically,\ne.g. saving a Person will automatically set her\nname field to \"last_name, first_name\".") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var type1126 = new Lino.RemoteComboFieldElement({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Organization type...", "fieldLabel": "Organization type", "hiddenName": "typeHidden", "listeners": { "render": Lino.quicktip_renderer("Organization type","(contacts.Companies.type) ") }, "name": "type", "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/contacts/Companies/type" }) }) });
    var name_box_panel1127 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 16, "items": prefix1124, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 34, "items": name1125, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 49, "items": type1126, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 162, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var country1131 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Country...", "fieldLabel": "Country", "hiddenName": "countryHidden", "listeners": { "render": Lino.quicktip_renderer("Country","(contacts.Companies.country) ") }, "name": "country", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.countries.Countries.detail,Lino.countries.Countries.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/contacts/Companies/country" }) }) });
    var city1132 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Place...", "fieldLabel": "Locality", "forceSelection": false, "hiddenName": "cityHidden", "listeners": { "render": Lino.quicktip_renderer("Locality","(contacts.Companies.city) ") }, "name": "city", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.countries.Places.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/contacts/Companies/city" }) }) });
    var zip_code1133 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "boxMinWidth": Lino.chars2width(10), "fieldLabel": "Zip code", "listeners": { "render": Lino.quicktip_renderer("Zip code","(contacts.Companies.zip_code) ") }, "maxLength": 10, "name": "zip_code", "selectOnFocus": true });
    var address_box_2_panel1134 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 40, "items": country1131, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 40, "items": city1132, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 20, "items": zip_code1133, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 81, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var street1138 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Street", "listeners": { "render": Lino.quicktip_renderer("Street","(contacts.Companies.street) ") }, "maxLength": 200, "name": "street", "selectOnFocus": true });
    var street_no1139 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "boxMinWidth": Lino.chars2width(10), "fieldLabel": "No.", "listeners": { "render": Lino.quicktip_renderer("No.","(contacts.Companies.street_no) ") }, "maxLength": 10, "name": "street_no", "selectOnFocus": true });
    var street_box1140 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "boxMinWidth": Lino.chars2width(10), "fieldLabel": "Box", "listeners": { "render": Lino.quicktip_renderer("Box","(contacts.Companies.street_box) ") }, "maxLength": 10, "name": "street_box", "selectOnFocus": true });
    var address_box_4_panel1141 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 53, "items": street1138, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 23, "items": street_no1139, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 23, "items": street_box1140, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 63, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var address_box_panel1145 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "flex": 54, "frame": true, "hideCheckBoxLabels": true, "items": [ name_box_panel1127, address_box_2_panel1134, address_box_4_panel1141 ], "labelAlign": "top", "layout": "form" });
    var general_1_panel1146 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ overview_htmlbox1116, general_middle_panel1120, address_box_panel1145 ], "labelAlign": "top", "labelWidth": 0, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var general_panel1160 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ general_1_panel1146 ], "labelAlign": "top", "layout": "vbox", "layoutConfig": { "align": "stretch" }, "listeners": { "activate": Lino.on_tab_activate }, "title": "General" });
    var remarks1161 = new Lino.RichTextPanel({ "containing_panel": this, "fieldLabel": "About me", "flex": 33, "name": "remarks", "selectOnFocus": true, "title": "About me" });
    var contact_1_panel1163 = new Ext.Panel({ "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ remarks1161 ], "labelAlign": "top", "labelWidth": 81, "layout": "hbox", "layoutConfig": { "align": "stretch" }, "listeners": { "activate": Lino.on_tab_activate }, "title": "Contact" });
    var main_panel1240 = new Ext.TabPanel({ "activeTab": 0, "autoScroll": false, "bodyBorder": false, "border": false, "enableTabScroll": true, "frame": true, "hideCheckBoxLabels": true, "items": [ general_panel1160, contact_1_panel1163 ], "labelAlign": "top", "split": true });
    this.items = main_panel1240;
    this.before_row_edit = function(record) {
      overview_htmlbox1116.refresh();
      city1132.setContextValue('country', record ? record.data['countryHidden'] : undefined);
      city1132.setContextValue('region', record ? record.data['regionHidden'] : undefined);
      remarks1161.refresh();
    }
    this.onRender = function(ct, position) {
      country1131.on('change',Lino.chooser_handler(city1132,'country'));
      Lino.contacts.Companies.DetailFormPanel.superclass.onRender.call(this, ct, position);
    }
    Lino.contacts.Companies.DetailFormPanel.superclass.initComponent.call(this);
    // active_fields:
    city1132.on("change", function(){ this.save() }, this);
    zip_code1133.on("change", function(){ this.save() }, this);
  }
});


Lino.blogs.EntryTypes.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 40,
  initComponent : function() {
    var id1241 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(blogs.EntryTypes.id) ") }, "name": "id", "selectOnFocus": true });
    var name1242 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation", "listeners": { "render": Lino.quicktip_renderer("Designation","(blogs.EntryTypes.name) ") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var name_fr1243 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(blogs.EntryTypes.name_fr) ") }, "maxLength": 200, "name": "name_fr", "selectOnFocus": true });
    var main_1_panel1244 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 10, "items": id1241, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 44, "items": name1242, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 44, "items": name_fr1243, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" }, "region": "north", "split": true });
    var remark1248 = new Lino.RichTextPanel({ "containing_panel": this, "fieldLabel": "Remark", "flex": 5, "name": "remark", "region": "center", "selectOnFocus": true, "split": true, "title": "Remark" });
    var main_panel1272 = new Lino.VBorderPanel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1244, remark1248 ], "labelAlign": "top", "labelWidth": 63 });
    this.items = main_panel1272;
    this.before_row_edit = function(record) {
      remark1248.refresh();
    }
    Lino.blogs.EntryTypes.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.topics.TopicGroups.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 33,
  initComponent : function() {
    var id1273 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(topics.TopicGroups.id) ") }, "name": "id", "selectOnFocus": true });
    var name1274 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation", "listeners": { "render": Lino.quicktip_renderer("Designation","(topics.TopicGroups.name) ") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var name_fr1275 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(topics.TopicGroups.name_fr) ") }, "maxLength": 200, "name": "name_fr", "selectOnFocus": true });
    var main_1_panel1276 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 10, "items": id1273, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 44, "items": name1274, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 44, "items": name_fr1275, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" }, "region": "north", "split": true });
    var description1280 = new Lino.RichTextPanel({ "containing_panel": this, "fieldLabel": "Description", "flex": 5, "name": "description", "region": "center", "selectOnFocus": true, "split": true, "title": "Description" });
    var main_panel1320 = new Lino.VBorderPanel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1276, description1280 ], "labelAlign": "top", "labelWidth": 108 });
    this.items = main_panel1320;
    this.before_row_edit = function(record) {
      description1280.refresh();
    }
    Lino.topics.TopicGroups.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.uploads.UploadTypes.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 41,
  initComponent : function() {
    var name1321 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation", "listeners": { "render": Lino.quicktip_renderer("Designation","(uploads.UploadTypes.name) ") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var name_fr1322 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(uploads.UploadTypes.name_fr) ") }, "maxLength": 200, "name": "name_fr", "selectOnFocus": true });
    var main_1_panel1323 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": name1321, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": name_fr1322, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var upload_area1326 = new Lino.ChoicesFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Upload Area", "forceSelection": true, "hiddenName": "upload_areaHidden", "listeners": { "render": Lino.quicktip_renderer("Upload Area","(uploads.UploadTypes.upload_area) ") }, "name": "upload_area", "selectOnFocus": true, "store": Lino.uploads.UploadAreas });
    var main_panel1327 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1323, { "anchor": "-20", "autoHeight": true, "items": upload_area1326, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 108, "layout": "form" });
    this.items = main_panel1327;
    this.before_row_edit = function(record) {
    }
    Lino.uploads.UploadTypes.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.countries.Places.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 2,
  initComponent : function() {
    var name1329 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation", "listeners": { "render": Lino.quicktip_renderer("Designation","(countries.Places.name) ") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var name_fr1330 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(countries.Places.name_fr) ") }, "maxLength": 200, "name": "name_fr", "selectOnFocus": true });
    var country1331 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Country...", "fieldLabel": "Country", "hiddenName": "countryHidden", "listeners": { "render": Lino.quicktip_renderer("Country","(countries.Places.country) ") }, "name": "country", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.countries.Countries.detail,Lino.countries.Countries.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/countries/Places/country" }) }) });
    var main_1_panel1332 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 33, "items": name1329, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 33, "items": name_fr1330, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 32, "items": country1331, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var type1336 = new Lino.RemoteComboFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Place Type", "hiddenName": "typeHidden", "listeners": { "render": Lino.quicktip_renderer("Place Type","(countries.Places.type) ") }, "name": "type", "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/countries/Places/type" }) }) });
    var parent1337 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Place...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Part of</span>", "hiddenName": "parentHidden", "listeners": { "render": Lino.quicktip_renderer("Part of","(countries.Places.parent) The superordinate geographic place of which this place is a part.") }, "name": "parent", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.countries.Places.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/countries/Places/parent" }) }) });
    var zip_code1338 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "boxMinWidth": Lino.chars2width(8), "fieldLabel": "zip code", "listeners": { "render": Lino.quicktip_renderer("zip code","(countries.Places.zip_code) ") }, "maxLength": 8, "name": "zip_code", "selectOnFocus": true });
    var id1339 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(countries.Places.id) ") }, "name": "id", "selectOnFocus": true });
    var main_2_panel1340 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 22, "items": type1336, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 45, "items": parent1337, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 20, "items": zip_code1338, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 11, "items": id1339, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 99, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel1460 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1332, main_2_panel1340 ], "labelAlign": "top", "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel1460;
    this.before_row_edit = function(record) {
      type1336.setContextValue('country', record ? record.data['countryHidden'] : undefined);
    }
    this.onRender = function(ct, position) {
      country1331.on('change',Lino.chooser_handler(type1336,'country'));
      Lino.countries.Places.DetailFormPanel.superclass.onRender.call(this, ct, position);
    }
    Lino.countries.Places.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.blogs.Entries.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 39,
  initComponent : function() {
    var title1266 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Heading", "listeners": { "render": Lino.quicktip_renderer("Heading","(blogs.Entries.title) ") }, "maxLength": 200, "name": "title", "selectOnFocus": true });
    var entry_type1267 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Blog Entry Type...", "fieldLabel": "Blog Entry Type", "hiddenName": "entry_typeHidden", "listeners": { "render": Lino.quicktip_renderer("Blog Entry Type","(blogs.Entries.entry_type) ") }, "name": "entry_type", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.blogs.EntryTypes.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/blogs/Entries/entry_type" }) }) });
    var main_panel1268 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ { "anchor": "-20", "autoHeight": true, "items": title1266, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": entry_type1267, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 144, "layout": "form" });
    this.items = main_panel1268;
    this.before_row_edit = function(record) {
    }
    Lino.blogs.Entries.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.topics.Topics.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 34,
  initComponent : function() {
    var id1292 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(topics.Topics.id) ") }, "name": "id", "selectOnFocus": true });
    var ref1293 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Reference</span>", "listeners": { "render": Lino.quicktip_renderer("Reference","(topics.Topics.ref) The reference. This must be either empty or unique.") }, "maxLength": 40, "name": "ref", "selectOnFocus": true });
    var name1294 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation", "listeners": { "render": Lino.quicktip_renderer("Designation","(topics.Topics.name) ") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var name_fr1295 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(topics.Topics.name_fr) ") }, "maxLength": 200, "name": "name_fr", "selectOnFocus": true });
    var topic_group1296 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Topic group...", "fieldLabel": "Topic group", "hiddenName": "topic_groupHidden", "listeners": { "render": Lino.quicktip_renderer("Topic group","(topics.Topics.topic_group) ") }, "name": "topic_group", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.topics.TopicGroups.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/topics/Topics/topic_group" }) }) });
    var main_1_panel1297 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 5, "items": id1292, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 23, "items": ref1293, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 23, "items": name1294, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 23, "items": name_fr1295, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 22, "items": topic_group1296, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" }, "region": "north", "split": true });
    var description1303 = new Lino.RichTextPanel({ "containing_panel": this, "fieldLabel": "Long description", "flex": 50, "name": "description", "selectOnFocus": true, "title": "Long description" });
    var description_fr1304 = new Lino.RichTextPanel({ "containing_panel": this, "fieldLabel": "Long description (fr)", "flex": 50, "name": "description_fr", "selectOnFocus": true, "title": "Long description (fr)" });
    var main_2_panel1305 = new Ext.Panel({ "autoScroll": false, "border": false, "flex": 5, "frame": false, "hideCheckBoxLabels": true, "items": [ description1303, description_fr1304 ], "labelAlign": "top", "labelWidth": 198, "layout": "hbox", "layoutConfig": { "align": "stretch" }, "region": "center", "split": true });
    var main_panel1318 = new Lino.VBorderPanel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1297, main_2_panel1305 ], "labelAlign": "top" });
    this.items = main_panel1318;
    this.before_row_edit = function(record) {
      description1303.refresh();
      description_fr1304.refresh();
    }
    Lino.topics.Topics.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.phones.ContactDetails.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 28,
  initComponent : function() {
    var partner1461 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Partner...", "fieldLabel": "Partner", "hiddenName": "partnerHidden", "listeners": { "render": Lino.quicktip_renderer("Partner","(phones.ContactDetails.partner) ") }, "name": "partner", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Partners.detail,Lino.contacts.Partners.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/phones/ContactDetails/partner" }) }) });
    var detail_type1462 = new Lino.ChoicesFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Contact detail type", "forceSelection": true, "hiddenName": "detail_typeHidden", "listeners": { "render": Lino.quicktip_renderer("Contact detail type","(phones.ContactDetails.detail_type) ") }, "name": "detail_type", "selectOnFocus": true, "store": Lino.phones.ContactDetailTypes });
    var value1463 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Value", "listeners": { "render": Lino.quicktip_renderer("Value","(phones.ContactDetails.value) ") }, "maxLength": 200, "name": "value", "selectOnFocus": true });
    var remark1464 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Remark", "listeners": { "render": Lino.quicktip_renderer("Remark","(phones.ContactDetails.remark) ") }, "maxLength": 200, "name": "remark", "selectOnFocus": true });
    var main_panel1465 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ { "anchor": "-20", "autoHeight": true, "items": partner1461, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": detail_type1462, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": value1463, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": remark1464, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 180, "layout": "form" });
    this.items = main_panel1465;
    this.before_row_edit = function(record) {
    }
    Lino.phones.ContactDetails.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.comments.CommentTypes.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 47,
  initComponent : function() {
    var name1470 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation", "listeners": { "render": Lino.quicktip_renderer("Designation","(comments.CommentTypes.name) ") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var name_fr1471 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(comments.CommentTypes.name_fr) ") }, "maxLength": 200, "name": "name_fr", "selectOnFocus": true });
    var main_1_panel1472 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": name1470, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": name_fr1471, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var id1475 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(comments.CommentTypes.id) ") }, "name": "id", "selectOnFocus": true });
    var main_panel1476 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1472, { "anchor": "-20", "autoHeight": true, "items": id1475, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 27, "layout": "form" });
    this.items = main_panel1476;
    this.before_row_edit = function(record) {
    }
    Lino.comments.CommentTypes.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.countries.Countries.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 1,
  initComponent : function() {
    var isocode1478 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "boxMinWidth": Lino.chars2width(4), "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">ISO code</span>", "listeners": { "render": Lino.quicktip_renderer("ISO code","(countries.Countries.isocode)         The two-letter code for this country as defined by ISO 3166-1.\n        For countries that no longer exist it may be a 4-letter code.") }, "maxLength": 4, "name": "isocode", "selectOnFocus": true });
    var name1479 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation", "listeners": { "render": Lino.quicktip_renderer("Designation","(countries.Countries.name) ") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var name_fr1480 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(countries.Countries.name_fr) ") }, "maxLength": 200, "name": "name_fr", "selectOnFocus": true });
    var short_code1481 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "boxMinWidth": Lino.chars2width(4), "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Short code</span>", "listeners": { "render": Lino.quicktip_renderer("Short code","(countries.Countries.short_code) A short abbreviation for regional usage. Obsolete.") }, "maxLength": 4, "name": "short_code", "selectOnFocus": true });
    var main_1_panel1482 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 16, "items": isocode1478, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 33, "items": name1479, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 33, "items": name_fr1480, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 16, "items": short_code1481, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel1501 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1482 ], "labelAlign": "top", "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel1501;
    this.before_row_edit = function(record) {
    }
    Lino.countries.Countries.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.comments.Comments.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 46,
  initComponent : function() {
    var id1502 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(comments.Comments.id) ") }, "name": "id", "selectOnFocus": true });
    var user1503 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "disabled": true, "emptyText": "Select a User...", "fieldLabel": "Author", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Author","(comments.Comments.user) ") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "store": new Lino.ComplexRemoteComboStore({  }) });
    var created1504 = new Ext.form.DisplayField({ "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Created</span>", "listeners": { "render": Lino.quicktip_renderer("Created","(comments.Comments.created) The timestame when this object was created.") }, "name": "created", "value": "<br>" });
    var modified1505 = new Ext.form.DisplayField({ "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "Modified", "listeners": { "render": Lino.quicktip_renderer("Modified","(comments.Comments.modified) ") }, "name": "modified", "value": "<br>" });
    var main_1_panel1506 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 8, "items": id1502, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 35, "items": user1503, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 28, "items": created1504, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 28, "items": modified1505, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 81, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var reply_to1511 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Comment...", "fieldLabel": "Reply to", "hiddenName": "reply_toHidden", "listeners": { "render": Lino.quicktip_renderer("Reply to","(comments.Comments.reply_to) ") }, "name": "reply_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.comments.Comments.detail,Lino.comments.Comments.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/comments/Comments/reply_to" }) }) });
    var owner_disp1512 = new Ext.form.DisplayField({ "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "Controlled by", "name": "owner" });
    var owner_type1513 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a content type...", "fieldLabel": "Controlled by (type)", "hiddenName": "owner_typeHidden", "listeners": { "render": Lino.quicktip_renderer("Controlled by (type)","(comments.Comments.owner_type) ") }, "name": "owner_type", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.gfks.ContentTypes.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/comments/Comments/owner_type" }) }) });
    var owner_id1514 = new Lino.RemoteComboFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Controlled by (object)", "hiddenName": "owner_idHidden", "listeners": { "render": Lino.quicktip_renderer("Controlled by (object)","(comments.Comments.owner_id) ") }, "name": "owner_id", "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/comments/Comments/owner_id" }) }) });
    var comment_type1515 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Comment Type...", "fieldLabel": "Comment Type", "hiddenName": "comment_typeHidden", "listeners": { "render": Lino.quicktip_renderer("Comment Type","(comments.Comments.comment_type) ") }, "name": "comment_type", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.comments.CommentTypes.detail,Lino.comments.CommentTypes.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/comments/Comments/comment_type" }) }) });
    var main_2_panel1516 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 25, "items": reply_to1511, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 12, "items": owner_disp1512, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 25, "items": owner_type1513, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 12, "items": owner_id1514, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 25, "items": comment_type1515, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 207, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var short_text1522 = new Lino.RichTextPanel({ "allowBlank": false, "containing_panel": this, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Short text</span>", "flex": 71, "name": "short_text", "selectOnFocus": true, "title": "Short text" });
    var main_panel1523 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1506, main_2_panel1516, short_text1522 ], "labelAlign": "top", "labelWidth": 99, "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel1523;
    this.before_row_edit = function(record) {
      owner_id1514.setContextValue('owner_type', record ? record.data['owner_typeHidden'] : undefined);
      short_text1522.refresh();
    }
    this.onRender = function(ct, position) {
      owner_type1513.on('change',Lino.chooser_handler(owner_id1514,'owner_type'));
      Lino.comments.Comments.DetailFormPanel.superclass.onRender.call(this, ct, position);
    }
    Lino.comments.Comments.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.phones.ContactDetails.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 28,
  initComponent : function() {
    var detail_type1524 = new Lino.ChoicesFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Contact detail type", "forceSelection": true, "hiddenName": "detail_typeHidden", "listeners": { "render": Lino.quicktip_renderer("Contact detail type","(phones.ContactDetails.detail_type) ") }, "name": "detail_type", "selectOnFocus": true, "store": Lino.phones.ContactDetailTypes });
    var value1525 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Value", "listeners": { "render": Lino.quicktip_renderer("Value","(phones.ContactDetails.value) ") }, "maxLength": 200, "name": "value", "selectOnFocus": true });
    var remark1526 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Remark", "listeners": { "render": Lino.quicktip_renderer("Remark","(phones.ContactDetails.remark) ") }, "maxLength": 200, "name": "remark", "selectOnFocus": true });
    var main_panel1527 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ { "anchor": "-20", "autoHeight": true, "items": detail_type1524, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": value1525, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": remark1526, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 180, "layout": "form" });
    this.items = main_panel1527;
    this.before_row_edit = function(record) {
    }
    Lino.phones.ContactDetails.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.excerpts.ExcerptTypes.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 43,
  initComponent : function() {
    var name1531 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Designation</span>", "listeners": { "render": Lino.quicktip_renderer("Designation","(excerpts.ExcerptTypes.name) The designation of this excerpt type.\nOne field for every language.") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var name_fr1532 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(excerpts.ExcerptTypes.name_fr) ") }, "maxLength": 200, "name": "name_fr", "selectOnFocus": true });
    var main_1_panel1533 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": name1531, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": name_fr1532, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var content_type1536 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a content type...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Model</span>", "hiddenName": "content_typeHidden", "listeners": { "render": Lino.quicktip_renderer("Model","(excerpts.ExcerptTypes.content_type) The model that can issue printouts of this type.") }, "name": "content_type", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.gfks.ContentTypes.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/excerpts/ExcerptTypes/content_type" }) }) });
    var primary1537 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Primary", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Primary","(excerpts.ExcerptTypes.primary) Whether this is the default type to use for this model. There's at most one primary type per model. Enabling this field will automatically make the other types non-primary.") }, "name": "primary", "selectOnFocus": true });
    var certifying1538 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Certifying", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Certifying","(excerpts.ExcerptTypes.certifying) Whether an excerpt of this type is a unique printout.") }, "name": "certifying", "selectOnFocus": true });
    var main_2_panel1539 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": content_type1536, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 25, "items": primary1537, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 25, "items": certifying1538, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 99, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var build_method1543 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Build method</span>", "forceSelection": true, "hiddenName": "build_methodHidden", "listeners": { "render": Lino.quicktip_renderer("Build method","(excerpts.ExcerptTypes.build_method) See lino.modlib.printing.mixins.PrintableType.build_method.") }, "name": "build_method", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.printing.BuildMethods) });
    var template1544 = new Lino.SimpleRemoteComboFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Template</span>", "listeners": { "render": Lino.quicktip_renderer("Template","(excerpts.ExcerptTypes.template) The main template to be used when printing an excerpt of this type.") }, "name": "template", "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/excerpts/ExcerptTypes/template" }) }) });
    var body_template1545 = new Lino.SimpleRemoteComboFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Body template</span>", "listeners": { "render": Lino.quicktip_renderer("Body template","(excerpts.ExcerptTypes.body_template) The body template to be used when         rendering a printable of this type. This is a list of files         with extension `.body.html`.") }, "name": "body_template", "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/excerpts/ExcerptTypes/body_template" }) }) });
    var main_3_panel1546 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 53, "items": build_method1543, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 23, "items": template1544, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 23, "items": body_template1545, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 126, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel1550 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1533, main_2_panel1539, main_3_panel1546 ], "labelAlign": "top", "layout": "form" });
    this.items = main_panel1550;
    this.before_row_edit = function(record) {
      template1544.setContextValue('build_method', record ? record.data['build_methodHidden'] : undefined);
      template1544.setContextValue('content_type', record ? record.data['content_typeHidden'] : undefined);
      body_template1545.setContextValue('content_type', record ? record.data['content_typeHidden'] : undefined);
    }
    this.onRender = function(ct, position) {
      build_method1543.on('change',Lino.chooser_handler(template1544,'build_method'));
      content_type1536.on('change',Lino.chooser_handler(template1544,'content_type'));
      content_type1536.on('change',Lino.chooser_handler(body_template1545,'content_type'));
      Lino.excerpts.ExcerptTypes.InsertFormPanel.superclass.onRender.call(this, ct, position);
    }
    Lino.excerpts.ExcerptTypes.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.addresses.Addresses.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 27,
  initComponent : function() {
    var country1366 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Country...", "fieldLabel": "Country", "hiddenName": "countryHidden", "listeners": { "render": Lino.quicktip_renderer("Country","(addresses.Addresses.country) ") }, "name": "country", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.countries.Countries.detail,Lino.countries.Countries.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/addresses/Addresses/country" }) }) });
    var city1367 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Place...", "fieldLabel": "Locality", "forceSelection": false, "hiddenName": "cityHidden", "listeners": { "render": Lino.quicktip_renderer("Locality","(addresses.Addresses.city) ") }, "name": "city", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.countries.Places.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/addresses/Addresses/city" }) }) });
    var zip_code1368 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "boxMinWidth": Lino.chars2width(10), "fieldLabel": "Zip code", "listeners": { "render": Lino.quicktip_renderer("Zip code","(addresses.Addresses.zip_code) ") }, "maxLength": 10, "name": "zip_code", "selectOnFocus": true });
    var main_1_panel1369 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 39, "items": country1366, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 39, "items": city1367, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 21, "items": zip_code1368, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 81, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var addr11373 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Address line before street", "listeners": { "render": Lino.quicktip_renderer("Address line before street","(addresses.Addresses.addr1) ") }, "maxLength": 200, "name": "addr1", "selectOnFocus": true });
    var street1374 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Street", "listeners": { "render": Lino.quicktip_renderer("Street","(addresses.Addresses.street) ") }, "maxLength": 200, "name": "street", "selectOnFocus": true });
    var street_no1375 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "boxMinWidth": Lino.chars2width(10), "fieldLabel": "No.", "listeners": { "render": Lino.quicktip_renderer("No.","(addresses.Addresses.street_no) ") }, "maxLength": 10, "name": "street_no", "selectOnFocus": true });
    var street_box1376 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "boxMinWidth": Lino.chars2width(10), "fieldLabel": "Box", "listeners": { "render": Lino.quicktip_renderer("Box","(addresses.Addresses.street_box) ") }, "maxLength": 10, "name": "street_box", "selectOnFocus": true });
    var main_3_panel1377 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 48, "items": street1374, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 25, "items": street_no1375, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 25, "items": street_box1376, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 63, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var addr21381 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Address line after street", "listeners": { "render": Lino.quicktip_renderer("Address line after street","(addresses.Addresses.addr2) ") }, "maxLength": 200, "name": "addr2", "selectOnFocus": true });
    var address_type1382 = new Lino.ChoicesFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Address type", "forceSelection": true, "hiddenName": "address_typeHidden", "listeners": { "render": Lino.quicktip_renderer("Address type","(addresses.Addresses.address_type) ") }, "name": "address_type", "selectOnFocus": true, "store": Lino.addresses.AddressTypes });
    var remark1383 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Remark", "listeners": { "render": Lino.quicktip_renderer("Remark","(addresses.Addresses.remark) ") }, "maxLength": 50, "name": "remark", "selectOnFocus": true });
    var main_5_panel1384 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": address_type1382, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": remark1383, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 117, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var data_source1387 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Data source</span>", "forceSelection": true, "hiddenName": "data_sourceHidden", "listeners": { "render": Lino.quicktip_renderer("Data source","(addresses.Addresses.data_source) Pointer to choicelists.DataSources.") }, "name": "data_source", "store": Lino.addresses.DataSources });
    var partner1388 = new Lino.TwinCombo({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "emptyText": "Select a Person...", "fieldLabel": "Person", "hiddenName": "partnerHidden", "listeners": { "render": Lino.quicktip_renderer("Person","(addresses.Addresses.partner) ") }, "name": "partner", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Persons.detail,Lino.contacts.Persons.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/addresses/Addresses/partner" }) }) });
    var main_6_panel1389 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 48, "items": data_source1387, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 51, "items": partner1388, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 108, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel1392 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1369, { "anchor": "-20", "autoHeight": true, "items": addr11373, "labelAlign": "top", "layout": "form", "xtype": "panel" }, main_3_panel1377, { "anchor": "-20", "autoHeight": true, "items": addr21381, "labelAlign": "top", "layout": "form", "xtype": "panel" }, main_5_panel1384, main_6_panel1389 ], "labelAlign": "top", "labelWidth": 243, "layout": "form" });
    this.items = main_panel1392;
    this.before_row_edit = function(record) {
      city1367.setContextValue('country', record ? record.data['countryHidden'] : undefined);
      city1367.setContextValue('region', record ? record.data['regionHidden'] : undefined);
    }
    this.onRender = function(ct, position) {
      country1366.on('change',Lino.chooser_handler(city1367,'country'));
      Lino.addresses.Addresses.DetailFormPanel.superclass.onRender.call(this, ct, position);
    }
    Lino.addresses.Addresses.DetailFormPanel.superclass.initComponent.call(this);
    // active_fields:
    city1367.on("change", function(){ this.save() }, this);
    zip_code1368.on("change", function(){ this.save() }, this);
  }
});


Lino.gfks.ContentTypes.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 12,
  initComponent : function() {
    var id1551 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(gfks.ContentTypes.id) ") }, "name": "id", "selectOnFocus": true });
    var app_label1552 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "app label", "listeners": { "render": Lino.quicktip_renderer("app label","(gfks.ContentTypes.app_label) ") }, "maxLength": 100, "name": "app_label", "selectOnFocus": true });
    var model1553 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "python model class name", "listeners": { "render": Lino.quicktip_renderer("python model class name","(gfks.ContentTypes.model) ") }, "maxLength": 100, "name": "model", "selectOnFocus": true });
    var base_classes_disp1554 = new Ext.form.DisplayField({ "always_enabled": true, "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "Base classes", "listeners": { "render": Lino.quicktip_renderer("Base classes","(gfks.ContentTypes.base_classes) ") }, "name": "base_classes", "value": "<br/>" });
    var main_1_panel1555 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 6, "items": id1551, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 27, "items": app_label1552, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 27, "items": model1553, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 38, "items": base_classes_disp1554, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 216, "layout": "hbox", "layoutConfig": { "align": "stretchmax" }, "region": "north", "split": true });
    var main_panel1572 = new Lino.VBorderPanel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1555 ], "labelAlign": "top" });
    this.items = main_panel1572;
    this.before_row_edit = function(record) {
    }
    Lino.gfks.ContentTypes.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.users.Users.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 10,
  initComponent : function() {
    var username1573 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Username</span>", "listeners": { "render": Lino.quicktip_renderer("Username","(users.Users.username) Must be unique and cannot be empty.") }, "maxLength": 30, "name": "username", "selectOnFocus": true });
    var email1574 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">e-mail address</span>", "listeners": { "render": Lino.quicktip_renderer("e-mail address","(users.Users.email) The primary email address.") }, "maxLength": 254, "name": "email", "selectOnFocus": true });
    var main_1_panel1575 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": username1573, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": email1574, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 135, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var first_name1578 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">First name</span>", "listeners": { "render": Lino.quicktip_renderer("First name","(users.Users.first_name) The first name, also known as given name.") }, "maxLength": 200, "name": "first_name", "selectOnFocus": true });
    var last_name1579 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Last name</span>", "listeners": { "render": Lino.quicktip_renderer("Last name","(users.Users.last_name) The last name, also known as family name.") }, "maxLength": 200, "name": "last_name", "selectOnFocus": true });
    var main_2_panel1580 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": first_name1578, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": last_name1579, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 99, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var language1583 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Language</span>", "hiddenName": "languageHidden", "listeners": { "render": Lino.quicktip_renderer("Language","(users.Users.language) The language to use when communicating with this partner.") }, "name": "language", "selectOnFocus": true, "store": [ [ "en", "English" ], [ "fr", "French" ] ] });
    var user_type1584 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">User type</span>", "forceSelection": true, "hiddenName": "user_typeHidden", "listeners": { "render": Lino.quicktip_renderer("User type","(users.Users.user_type) The user_type of a user is what defines her or his permissions.") }, "name": "user_type", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.users.UserTypes) });
    var main_4_panel1585 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 45, "items": language1583, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 54, "items": user_type1584, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 90, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel1588 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1575, main_2_panel1580, main_4_panel1585 ], "labelAlign": "top", "layout": "form" });
    this.items = main_panel1588;
    this.before_row_edit = function(record) {
    }
    Lino.users.Users.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.Calendars.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 24,
  initComponent : function() {
    var name1589 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation", "listeners": { "render": Lino.quicktip_renderer("Designation","(cal.Calendars.name) ") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var name_fr1590 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(cal.Calendars.name_fr) ") }, "maxLength": 200, "name": "name_fr", "selectOnFocus": true });
    var color1591 = new Ext.form.NumberField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "color", "listeners": { "render": Lino.quicktip_renderer("color","(cal.Calendars.color) ") }, "name": "color", "selectOnFocus": true });
    var id1592 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(cal.Calendars.id) ") }, "name": "id", "selectOnFocus": true });
    var main_1_panel1593 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 40, "items": name1589, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 40, "items": name_fr1590, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 9, "items": color1591, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 9, "items": id1592, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var description1598 = new Lino.RichTextPanel({ "containing_panel": this, "fieldLabel": "Description", "flex": 33, "name": "description", "selectOnFocus": true, "title": "Description" });
    var main_2_panel1608 = new Ext.Panel({ "autoScroll": false, "border": false, "flex": 83, "frame": false, "hideCheckBoxLabels": true, "items": [ description1598 ], "labelAlign": "top", "labelWidth": 108, "layout": "hbox", "layoutConfig": { "align": "stretch" } });
    var main_panel1609 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1593, main_2_panel1608 ], "labelAlign": "top", "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel1609;
    this.before_row_edit = function(record) {
      description1598.refresh();
    }
    Lino.cal.Calendars.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.lists.Lists.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 38,
  initComponent : function() {
    var id1610 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(lists.Lists.id) ") }, "name": "id", "selectOnFocus": true });
    var ref1611 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Reference</span>", "listeners": { "render": Lino.quicktip_renderer("Reference","(lists.Lists.ref) The reference. This must be either empty or unique.") }, "maxLength": 40, "name": "ref", "selectOnFocus": true });
    var list_type1612 = new Lino.RemoteComboFieldElement({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a List Type...", "fieldLabel": "List Type", "hiddenName": "list_typeHidden", "listeners": { "render": Lino.quicktip_renderer("List Type","(lists.Lists.list_type) ") }, "name": "list_type", "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/lists/Lists/list_type" }) }) });
    var print_actions_disp1613 = new Ext.form.DisplayField({ "always_enabled": true, "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "Print", "listeners": { "render": Lino.quicktip_renderer("Print","(lists.Lists.print_actions) ") }, "name": "print_actions", "value": "<br/>" });
    var main_1_panel1614 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 6, "items": id1610, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 27, "items": ref1611, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 26, "items": list_type1612, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 39, "items": print_actions_disp1613, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 90, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var designation1619 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation", "listeners": { "render": Lino.quicktip_renderer("Designation","(lists.Lists.designation) ") }, "maxLength": 200, "name": "designation", "selectOnFocus": true });
    var designation_fr1620 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(lists.Lists.designation_fr) ") }, "maxLength": 200, "name": "designation_fr", "selectOnFocus": true });
    var main_2_panel1621 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": designation1619, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": designation_fr1620, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var remarks1624 = new Lino.RichTextPanel({ "containing_panel": this, "fieldLabel": "Remarks", "flex": 35, "name": "remarks", "selectOnFocus": true, "title": "Remarks" });
    var main_panel1636 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1614, main_2_panel1621, remarks1624 ], "labelAlign": "top", "labelWidth": 72, "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel1636;
    this.before_row_edit = function(record) {
      remarks1624.refresh();
    }
    Lino.lists.Lists.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.contacts.Persons.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 6,
  initComponent : function() {
    var first_name1637 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">First name</span>", "listeners": { "render": Lino.quicktip_renderer("First name","(contacts.Persons.first_name) The first name, also known as given name.") }, "maxLength": 200, "name": "first_name", "selectOnFocus": true });
    var last_name1638 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Last name</span>", "listeners": { "render": Lino.quicktip_renderer("Last name","(contacts.Persons.last_name) The last name, also known as family name.") }, "maxLength": 200, "name": "last_name", "selectOnFocus": true });
    var main_1_panel1639 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": first_name1637, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": last_name1638, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 99, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var gender1642 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Gender</span>", "forceSelection": true, "hiddenName": "genderHidden", "listeners": { "render": Lino.quicktip_renderer("Gender","(contacts.Persons.gender) The sex of this person (male or female).") }, "name": "gender", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.system.Genders) });
    var email1643 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">e-mail address</span>", "listeners": { "render": Lino.quicktip_renderer("e-mail address","(contacts.Persons.email) The primary email address.") }, "maxLength": 254, "name": "email", "selectOnFocus": true });
    var main_2_panel1644 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 30, "items": gender1642, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 70, "items": email1643, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 135, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel1647 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1639, main_2_panel1644 ], "labelAlign": "top", "layout": "form" });
    this.items = main_panel1647;
    this.before_row_edit = function(record) {
    }
    Lino.contacts.Persons.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.GuestRoles.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 23,
  initComponent : function() {
    var id1648 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(cal.GuestRoles.id) ") }, "name": "id", "selectOnFocus": true });
    var name1649 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation", "listeners": { "render": Lino.quicktip_renderer("Designation","(cal.GuestRoles.name) ") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var name_fr1650 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(cal.GuestRoles.name_fr) ") }, "maxLength": 200, "name": "name_fr", "selectOnFocus": true });
    var main_1_panel1651 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 10, "items": id1648, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 44, "items": name1649, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 44, "items": name_fr1650, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel1667 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1651 ], "labelAlign": "top", "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel1667;
    this.before_row_edit = function(record) {
    }
    Lino.cal.GuestRoles.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.RecurrentEvents.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 17,
  initComponent : function() {
    var name1668 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Designation</span>", "listeners": { "render": Lino.quicktip_renderer("Designation","(cal.RecurrentEvents.name) See lino.utils.mldbc.mixins.BabelNamed.name.") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var name_fr1669 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(cal.RecurrentEvents.name_fr) ") }, "maxLength": 200, "name": "name_fr", "selectOnFocus": true });
    var main_1_panel1670 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": name1668, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": name_fr1669, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var id1673 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(cal.RecurrentEvents.id) ") }, "name": "id", "selectOnFocus": true });
    var user1674 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "Author", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Author","(cal.RecurrentEvents.user) ") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/RecurrentEvents/user" }) }) });
    var event_type1675 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Calendar entry type...", "fieldLabel": "Calendar entry type", "hiddenName": "event_typeHidden", "listeners": { "render": Lino.quicktip_renderer("Calendar entry type","(cal.RecurrentEvents.event_type) ") }, "name": "event_type", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.cal.EventTypes.detail,Lino.cal.EventTypes.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/RecurrentEvents/event_type" }) }) });
    var main_2_panel1676 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 11, "items": id1673, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 44, "items": user1674, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 44, "items": event_type1675, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 180, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var start_date1680 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Start date", "listeners": { "render": Lino.quicktip_renderer("Start date","(cal.RecurrentEvents.start_date) ") }, "name": "start_date", "selectOnFocus": true });
    var start_time1681 = new Lino.TimeField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Start time", "listeners": { "render": Lino.quicktip_renderer("Start time","(cal.RecurrentEvents.start_time) ") }, "name": "start_time", "selectOnFocus": true });
    var end_date1682 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "End Date", "listeners": { "render": Lino.quicktip_renderer("End Date","(cal.RecurrentEvents.end_date) ") }, "name": "end_date", "selectOnFocus": true });
    var end_time1683 = new Lino.TimeField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "End Time", "listeners": { "render": Lino.quicktip_renderer("End Time","(cal.RecurrentEvents.end_time) ") }, "name": "end_time", "selectOnFocus": true });
    var main_3_panel1684 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 30, "items": start_date1680, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 19, "items": start_time1681, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 30, "items": end_date1682, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 19, "items": end_time1683, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 99, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var every_unit1689 = new Lino.ChoicesFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Recurrency</span>", "forceSelection": true, "hiddenName": "every_unitHidden", "listeners": { "render": Lino.quicktip_renderer("Recurrency","(cal.RecurrentEvents.every_unit) Inherited from RecurrentSet.every_unit.") }, "name": "every_unit", "selectOnFocus": true, "store": Lino.cal.Recurrencies });
    var every1690 = new Ext.form.NumberField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Repeat every", "listeners": { "render": Lino.quicktip_renderer("Repeat every","(cal.RecurrentEvents.every) ") }, "name": "every", "selectOnFocus": true, "value": 1 });
    var max_events1691 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Number of events", "listeners": { "render": Lino.quicktip_renderer("Number of events","(cal.RecurrentEvents.max_events) ") }, "name": "max_events", "selectOnFocus": true });
    var main_4_panel1692 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 67, "items": every_unit1689, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 16, "items": every1690, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 16, "items": max_events1691, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var monday1696 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Monday", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Monday","(cal.RecurrentEvents.monday) ") }, "name": "monday", "selectOnFocus": true });
    var tuesday1697 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Tuesday", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Tuesday","(cal.RecurrentEvents.tuesday) ") }, "name": "tuesday", "selectOnFocus": true });
    var wednesday1698 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Wednesday", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Wednesday","(cal.RecurrentEvents.wednesday) ") }, "name": "wednesday", "selectOnFocus": true });
    var thursday1699 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Thursday", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Thursday","(cal.RecurrentEvents.thursday) ") }, "name": "thursday", "selectOnFocus": true });
    var friday1700 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Friday", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Friday","(cal.RecurrentEvents.friday) ") }, "name": "friday", "selectOnFocus": true });
    var saturday1701 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Saturday", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Saturday","(cal.RecurrentEvents.saturday) ") }, "name": "saturday", "selectOnFocus": true });
    var sunday1702 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Sunday", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Sunday","(cal.RecurrentEvents.sunday) ") }, "name": "sunday", "selectOnFocus": true });
    var main_5_panel1703 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 14, "items": monday1696, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 14, "items": tuesday1697, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 14, "items": wednesday1698, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 14, "items": thursday1699, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 14, "items": friday1700, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 14, "items": saturday1701, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 14, "items": sunday1702, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 90, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var description1711 = new Lino.RichTextPanel({ "containing_panel": this, "fieldLabel": "Description", "flex": 66, "name": "description", "selectOnFocus": true, "title": "Description" });
    var main_6_panel1713 = new Ext.Panel({ "autoScroll": false, "border": false, "flex": 50, "frame": false, "hideCheckBoxLabels": true, "items": [ description1711 ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretch" } });
    var main_panel1714 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1670, main_2_panel1676, main_3_panel1684, main_4_panel1692, main_5_panel1703, main_6_panel1713 ], "labelAlign": "top", "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel1714;
    this.before_row_edit = function(record) {
      description1711.refresh();
    }
    Lino.cal.RecurrentEvents.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.countries.Countries.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 1,
  initComponent : function() {
    var isocode1715 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "boxMinWidth": Lino.chars2width(4), "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">ISO code</span>", "listeners": { "render": Lino.quicktip_renderer("ISO code","(countries.Countries.isocode)         The two-letter code for this country as defined by ISO 3166-1.\n        For countries that no longer exist it may be a 4-letter code.") }, "maxLength": 4, "name": "isocode", "selectOnFocus": true });
    var short_code1716 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "boxMinWidth": Lino.chars2width(4), "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Short code</span>", "listeners": { "render": Lino.quicktip_renderer("Short code","(countries.Countries.short_code) A short abbreviation for regional usage. Obsolete.") }, "maxLength": 4, "name": "short_code", "selectOnFocus": true });
    var main_1_panel1717 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": isocode1715, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": short_code1716, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 99, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var name1720 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation", "listeners": { "render": Lino.quicktip_renderer("Designation","(countries.Countries.name) ") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var name_fr1721 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(countries.Countries.name_fr) ") }, "maxLength": 200, "name": "name_fr", "selectOnFocus": true });
    var main_2_panel1722 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": name1720, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": name_fr1721, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel1725 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1717, main_2_panel1722 ], "labelAlign": "top", "layout": "form" });
    this.items = main_panel1725;
    this.before_row_edit = function(record) {
    }
    Lino.countries.Countries.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.users.Users.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 10,
  initComponent : function() {
    var username1726 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Username</span>", "listeners": { "render": Lino.quicktip_renderer("Username","(users.Users.username) Must be unique and cannot be empty.") }, "maxLength": 30, "name": "username", "selectOnFocus": true });
    var user_type1727 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">User type</span>", "forceSelection": true, "hiddenName": "user_typeHidden", "listeners": { "render": Lino.quicktip_renderer("User type","(users.Users.user_type) The user_type of a user is what defines her or his permissions.") }, "name": "user_type", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.users.UserTypes) });
    var box1_1_panel1728 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 51, "items": username1726, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 48, "items": user_type1727, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 90, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var first_name1731 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">First name</span>", "listeners": { "render": Lino.quicktip_renderer("First name","(users.Users.first_name) The first name, also known as given name.") }, "maxLength": 200, "name": "first_name", "selectOnFocus": true });
    var last_name1732 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Last name</span>", "listeners": { "render": Lino.quicktip_renderer("Last name","(users.Users.last_name) The last name, also known as family name.") }, "maxLength": 200, "name": "last_name", "selectOnFocus": true });
    var initials1733 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "boxMinWidth": Lino.chars2width(10), "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Initials</span>", "listeners": { "render": Lino.quicktip_renderer("Initials","(users.Users.initials) The nickname or initials of this user. This does not need to\nbe unique but should provide a reasonably identifying\nfunction.") }, "maxLength": 10, "name": "initials", "selectOnFocus": true });
    var box1_2_panel1734 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 39, "items": first_name1731, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 39, "items": last_name1732, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 20, "items": initials1733, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 99, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var email1738 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">e-mail address</span>", "listeners": { "render": Lino.quicktip_renderer("e-mail address","(users.Users.email) The primary email address.") }, "maxLength": 254, "name": "email", "selectOnFocus": true });
    var language1739 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Language</span>", "hiddenName": "languageHidden", "listeners": { "render": Lino.quicktip_renderer("Language","(users.Users.language) The language to use when communicating with this partner.") }, "name": "language", "selectOnFocus": true, "store": [ [ "en", "English" ], [ "fr", "French" ] ] });
    var timezone1740 = new Lino.SimpleRemoteComboFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Time zone", "listeners": { "render": Lino.quicktip_renderer("Time zone","(users.Users.timezone) ") }, "name": "timezone", "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/users/Users/timezone" }) }) });
    var box1_3_panel1741 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 41, "items": email1738, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 39, "items": language1739, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 19, "items": timezone1740, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 135, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var id1745 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(users.Users.id) ") }, "name": "id", "selectOnFocus": true });
    var created1746 = new Ext.form.DisplayField({ "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Created</span>", "listeners": { "render": Lino.quicktip_renderer("Created","(users.Users.created) The timestame when this object was created.") }, "name": "created", "value": "<br>" });
    var modified1747 = new Ext.form.DisplayField({ "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "Modified", "listeners": { "render": Lino.quicktip_renderer("Modified","(users.Users.modified) ") }, "name": "modified", "value": "<br>" });
    var box1_4_panel1748 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 13, "items": id1745, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 43, "items": created1746, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 43, "items": modified1747, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 81, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var box1_panel1752 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ box1_1_panel1728, box1_2_panel1734, box1_3_panel1741, box1_4_panel1748 ], "labelAlign": "top", "layout": "form" });
    var remarks1753 = new Lino.RichTextPanel({ "containing_panel": this, "fieldLabel": "About me", "flex": 66, "name": "remarks", "selectOnFocus": true, "title": "About me" });
    var main_2_panel1757 = new Ext.Panel({ "autoScroll": false, "border": false, "flex": 55, "frame": false, "hideCheckBoxLabels": true, "items": [ remarks1753 ], "labelAlign": "top", "labelWidth": 81, "layout": "hbox", "layoutConfig": { "align": "stretch" } });
    var main_panel1758 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ box1_panel1752, main_2_panel1757 ], "labelAlign": "top", "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel1758;
    this.before_row_edit = function(record) {
      timezone1740.setContextValue('partner', record ? record.data['partner'] : undefined);
      remarks1753.refresh();
    }
    Lino.users.Users.DetailFormPanel.superclass.initComponent.call(this);
    // active_fields:
  }
});


Lino.comments.CommentsByRFC.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 46,
  initComponent : function() {
    var reply_to1759 = new Lino.TwinCombo({ "emptyText": "Select a Comment...", "fieldLabel": "Reply to", "hidden": true, "hiddenName": "reply_toHidden", "listeners": { "render": Lino.quicktip_renderer("Reply to","(comments.CommentsByRFC.reply_to) ") }, "name": "reply_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.comments.Comments.detail,Lino.comments.Comments.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/comments/CommentsByRFC/reply_to" }) }) });
    var short_text1760 = new Lino.RichTextPanel({ "allowBlank": false, "containing_panel": this, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Short text</span>", "flex": 83, "name": "short_text", "selectOnFocus": true, "title": "Short text" });
    var main_panel1761 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ reply_to1759, short_text1760 ], "labelAlign": "top", "labelWidth": 99, "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel1761;
    this.before_row_edit = function(record) {
      short_text1760.refresh();
    }
    Lino.comments.CommentsByRFC.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.system.SiteConfigs.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 3,
  initComponent : function() {
    var site_company1762 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Organization...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Site owner</span>", "hiddenName": "site_companyHidden", "listeners": { "render": Lino.quicktip_renderer("Site owner","(system.SiteConfigs.site_company) The organisation who runs this site.  This is used e.g. when\nprinting your address in certain documents or reports.  Or\nnewly created partners inherit the country of the site owner.") }, "name": "site_company", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Companies.detail,Lino.contacts.Companies.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/system/SiteConfigs/site_company" }) }) });
    var next_partner_id1763 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Next partner id</span>", "listeners": { "render": Lino.quicktip_renderer("Next partner id","(system.SiteConfigs.next_partner_id) The next automatic id for any new partner.") }, "name": "next_partner_id", "selectOnFocus": true, "value": 100 });
    var default_build_method1764 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Default build method</span>", "forceSelection": true, "hiddenName": "default_build_methodHidden", "listeners": { "render": Lino.quicktip_renderer("Default build method","(system.SiteConfigs.default_build_method) The default build method to use when rendering printable documents.") }, "name": "default_build_method", "selectOnFocus": true, "store": [['','<br>']].concat(Lino.printing.BuildMethods) });
    var main_1_panel1765 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 37, "items": site_company1762, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 18, "items": next_partner_id1763, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 43, "items": default_build_method1764, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 189, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel1769 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1765 ], "labelAlign": "top", "layout": "fit" });
    this.items = main_panel1769;
    this.before_row_edit = function(record) {
    }
    Lino.system.SiteConfigs.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.Events.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 19,
  initComponent : function() {
    var event_type1770 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Calendar entry type...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Calendar entry type</span>", "hiddenName": "event_typeHidden", "listeners": { "render": Lino.quicktip_renderer("Calendar entry type","(cal.Events.event_type) The type of this entry. Every calendar entry should have this\nfield pointing to a given EventType, which holds\nextended configurable information about this entry.") }, "name": "event_type", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.cal.EventTypes.detail,Lino.cal.EventTypes.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Events/event_type" }) }) });
    var summary1771 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Short description</span>", "listeners": { "render": Lino.quicktip_renderer("Short description","(cal.Events.summary) A one-line descriptive text.") }, "maxLength": 200, "name": "summary", "selectOnFocus": true });
    var user1772 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Responsible user</span>", "hiddenName": "userHidden", "listeners": { "render": Lino.quicktip_renderer("Responsible user","(cal.Events.user) The responsible user.") }, "name": "user", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Events/user" }) }) });
    var main_1_panel1773 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 32, "items": event_type1770, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 34, "items": summary1771, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 32, "items": user1772, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 180, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var start_date1777 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Start date", "listeners": { "render": Lino.quicktip_renderer("Start date","(cal.Events.start_date) ") }, "name": "start_date", "selectOnFocus": true });
    var start_time1778 = new Lino.TimeField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Start time", "listeners": { "render": Lino.quicktip_renderer("Start time","(cal.Events.start_time) ") }, "name": "start_time", "selectOnFocus": true });
    var start_panel1779 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "flex": 33, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 61, "items": start_date1777, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 38, "items": start_time1778, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 99, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var end_date1782 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "End Date", "listeners": { "render": Lino.quicktip_renderer("End Date","(cal.Events.end_date) ") }, "name": "end_date", "selectOnFocus": true });
    var end_time1783 = new Lino.TimeField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">End Time</span>", "listeners": { "render": Lino.quicktip_renderer("End Time","(cal.Events.end_time) These four fields define the duration of this entry.\nOnly start_date is mandatory.") }, "name": "end_time", "selectOnFocus": true });
    var end_panel1784 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "flex": 33, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 61, "items": end_date1782, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 38, "items": end_time1783, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 81, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var assigned_to1787 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a User...", "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Assigned to</span>", "hiddenName": "assigned_toHidden", "listeners": { "render": Lino.quicktip_renderer("Assigned to","(cal.Events.assigned_to) Another user who is expected to take responsibility for this\nentry.") }, "name": "assigned_to", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.users.Users.detail,Lino.users.Users.insert)}, "pageSize": 20, "preferred_width": 15, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Events/assigned_to" }) }) });
    var main_2_panel1788 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ start_panel1779, end_panel1784, { "autoHeight": true, "flex": 32, "items": assigned_to1787, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 108, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var room1790 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Room...", "fieldLabel": "Room", "hiddenName": "roomHidden", "listeners": { "render": Lino.quicktip_renderer("Room","(cal.Events.room) ") }, "name": "room", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.cal.Rooms.detail,Lino.cal.Rooms.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Events/room" }) }) });
    var owner_disp1791 = new Ext.form.DisplayField({ "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "Controlled by", "name": "owner" });
    var workflow_buttons_disp1792 = new Ext.form.DisplayField({ "always_enabled": true, "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "Workflow", "listeners": { "render": Lino.quicktip_renderer("Workflow","(cal.Events.workflow_buttons) ") }, "name": "workflow_buttons", "value": "<br/>" });
    var main_3_panel1793 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 33, "items": room1790, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 16, "items": owner_disp1791, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": workflow_buttons_disp1792, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 126, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel1809 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1773, main_2_panel1788, main_3_panel1793 ], "labelAlign": "top", "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel1809;
    this.before_row_edit = function(record) {
    }
    Lino.cal.Events.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.RecurrentEvents.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 17,
  initComponent : function() {
    var name1810 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Designation</span>", "listeners": { "render": Lino.quicktip_renderer("Designation","(cal.RecurrentEvents.name) See lino.utils.mldbc.mixins.BabelNamed.name.") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var name_fr1811 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(cal.RecurrentEvents.name_fr) ") }, "maxLength": 200, "name": "name_fr", "selectOnFocus": true });
    var main_1_panel1812 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": name1810, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": name_fr1811, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var start_date1815 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Start date", "listeners": { "render": Lino.quicktip_renderer("Start date","(cal.RecurrentEvents.start_date) ") }, "name": "start_date", "selectOnFocus": true });
    var end_date1816 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "End Date", "listeners": { "render": Lino.quicktip_renderer("End Date","(cal.RecurrentEvents.end_date) ") }, "name": "end_date", "selectOnFocus": true });
    var every_unit1817 = new Lino.ChoicesFieldElement({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Recurrency</span>", "forceSelection": true, "hiddenName": "every_unitHidden", "listeners": { "render": Lino.quicktip_renderer("Recurrency","(cal.RecurrentEvents.every_unit) Inherited from RecurrentSet.every_unit.") }, "name": "every_unit", "selectOnFocus": true, "store": Lino.cal.Recurrencies });
    var event_type1818 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Calendar entry type...", "fieldLabel": "Calendar entry type", "hiddenName": "event_typeHidden", "listeners": { "render": Lino.quicktip_renderer("Calendar entry type","(cal.RecurrentEvents.event_type) ") }, "name": "event_type", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.cal.EventTypes.detail,Lino.cal.EventTypes.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/RecurrentEvents/event_type" }) }) });
    var main_2_panel1819 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 19, "items": start_date1815, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 19, "items": end_date1816, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 31, "items": every_unit1817, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 29, "items": event_type1818, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 180, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel1824 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1812, main_2_panel1819 ], "labelAlign": "top", "layout": "form" });
    this.items = main_panel1824;
    this.before_row_edit = function(record) {
    }
    Lino.cal.RecurrentEvents.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.checkdata.Checkers.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  disable_editing: true,
  initComponent : function() {
    var value1825 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "value", "listeners": { "render": Lino.quicktip_renderer("value","(checkdata.Checkers.value) ") }, "maxLength": 20, "name": "value" });
    var text1826 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "disabled": true, "fieldLabel": "text", "listeners": { "render": Lino.quicktip_renderer("text","(checkdata.Checkers.text) ") }, "maxLength": 50, "name": "text" });
    var main_1_panel1827 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": value1825, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": text1826, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 54, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel1842 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1827 ], "labelAlign": "top", "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel1842;
    this.before_row_edit = function(record) {
    }
    Lino.checkdata.Checkers.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.Events.InsertFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  autoHeight: true,
  content_type: 19,
  initComponent : function() {
    var start_date1843 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Start date", "listeners": { "render": Lino.quicktip_renderer("Start date","(cal.Events.start_date) ") }, "name": "start_date", "selectOnFocus": true });
    var start_time1844 = new Lino.TimeField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Start time", "listeners": { "render": Lino.quicktip_renderer("Start time","(cal.Events.start_time) ") }, "name": "start_time", "selectOnFocus": true });
    var end_date1845 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "End Date", "listeners": { "render": Lino.quicktip_renderer("End Date","(cal.Events.end_date) ") }, "name": "end_date", "selectOnFocus": true });
    var end_time1846 = new Lino.TimeField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">End Time</span>", "listeners": { "render": Lino.quicktip_renderer("End Time","(cal.Events.end_time) These four fields define the duration of this entry.\nOnly start_date is mandatory.") }, "name": "end_time", "selectOnFocus": true });
    var main_1_panel1847 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 30, "items": start_date1843, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 19, "items": start_time1844, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 30, "items": end_date1845, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 19, "items": end_time1846, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 99, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var summary1852 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Short description</span>", "listeners": { "render": Lino.quicktip_renderer("Short description","(cal.Events.summary) A one-line descriptive text.") }, "maxLength": 200, "name": "summary", "selectOnFocus": true });
    var main_panel1853 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1847, { "anchor": "-20", "autoHeight": true, "items": summary1852, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 162, "layout": "form" });
    this.items = main_panel1853;
    this.before_row_edit = function(record) {
    }
    Lino.cal.Events.InsertFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.Rooms.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 16,
  initComponent : function() {
    var id1855 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(cal.Rooms.id) ") }, "name": "id", "selectOnFocus": true });
    var name1856 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation", "listeners": { "render": Lino.quicktip_renderer("Designation","(cal.Rooms.name) ") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var name_fr1857 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(cal.Rooms.name_fr) ") }, "maxLength": 200, "name": "name_fr", "selectOnFocus": true });
    var main_1_panel1858 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 10, "items": id1855, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 44, "items": name1856, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 44, "items": name_fr1857, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var company1862 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Organization...", "fieldLabel": "Responsible", "hiddenName": "companyHidden", "listeners": { "render": Lino.quicktip_renderer("Responsible","(cal.Rooms.company) ") }, "name": "company", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Companies.detail,Lino.contacts.Companies.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Rooms/company" }) }) });
    var contact_person1863 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Person...", "fieldLabel": "Contact person", "hiddenName": "contact_personHidden", "listeners": { "render": Lino.quicktip_renderer("Contact person","(cal.Rooms.contact_person) ") }, "name": "contact_person", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.contacts.Persons.detail,Lino.contacts.Persons.insert)}, "pageSize": 20, "preferred_width": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/Rooms/contact_person" }) }) });
    var main_2_panel1864 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": company1862, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": contact_person1863, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 135, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var description1867 = new Lino.RichTextPanel({ "containing_panel": this, "fieldLabel": "Description", "flex": 41, "name": "description", "selectOnFocus": true, "title": "Description" });
    var main_panel1905 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1858, main_2_panel1864, description1867 ], "labelAlign": "top", "labelWidth": 108, "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel1905;
    this.before_row_edit = function(record) {
      contact_person1863.setContextValue('company', record ? record.data['companyHidden'] : undefined);
      description1867.refresh();
    }
    this.onRender = function(ct, position) {
      company1862.on('change',Lino.chooser_handler(contact_person1863,'company'));
      Lino.cal.Rooms.DetailFormPanel.superclass.onRender.call(this, ct, position);
    }
    Lino.cal.Rooms.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.cal.EventTypes.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 18,
  initComponent : function() {
    var name1906 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation", "listeners": { "render": Lino.quicktip_renderer("Designation","(cal.EventTypes.name) ") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var name_fr1907 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Designation (fr)", "listeners": { "render": Lino.quicktip_renderer("Designation (fr)","(cal.EventTypes.name_fr) ") }, "maxLength": 200, "name": "name_fr", "selectOnFocus": true });
    var main_1_panel1908 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": name1906, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": name_fr1907, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var event_label1911 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Entry label</span>", "listeners": { "render": Lino.quicktip_renderer("Entry label","(cal.EventTypes.event_label) Default text for summary of new entries.") }, "maxLength": 200, "name": "event_label", "selectOnFocus": true });
    var event_label_fr1912 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Entry label (fr)", "listeners": { "render": Lino.quicktip_renderer("Entry label (fr)","(cal.EventTypes.event_label_fr) ") }, "maxLength": 200, "name": "event_label_fr", "selectOnFocus": true });
    var main_2_panel1913 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": event_label1911, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": event_label_fr1912, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 153, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var start_date1916 = new Lino.DateField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Start date", "listeners": { "render": Lino.quicktip_renderer("Start date","(cal.EventTypes.start_date) ") }, "name": "start_date", "selectOnFocus": true });
    var max_days1917 = new Ext.form.NumberField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Maximum days</span>", "listeners": { "render": Lino.quicktip_renderer("Maximum days","(cal.EventTypes.max_days) The maximal number of days allowed as duration.") }, "name": "max_days", "selectOnFocus": true, "value": 1 });
    var id1918 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(cal.EventTypes.id) ") }, "name": "id", "selectOnFocus": true });
    var main_3_panel1919 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 56, "items": start_date1916, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 21, "items": max_days1917, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 21, "items": id1918, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 117, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var email_template1923 = new Lino.SimpleRemoteComboFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Email template</span>", "listeners": { "render": Lino.quicktip_renderer("Email template","(cal.EventTypes.email_template) The name of the file to be used as template when creating an email from a mailable of this type.") }, "name": "email_template", "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/cal/EventTypes/email_template" }) }) });
    var attach_to_email1924 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Attach to email", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Attach to email","(cal.EventTypes.attach_to_email) Whether the printable file should be attached to the email\nwhen creating an email from a mailable of this type.\n") }, "name": "attach_to_email", "selectOnFocus": true });
    var main_4_panel1925 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": email_template1923, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": attach_to_email1924, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 144, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var is_appointment1928 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Appointment", "checked": true, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Appointment","(cal.EventTypes.is_appointment) Whether entries of this type are considered as \"appointments\"\n(i.e. whose time and place have been agreed upon with other\nusers or external parties).") }, "name": "is_appointment", "selectOnFocus": true });
    var all_rooms1929 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Locks all rooms", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Locks all rooms","(cal.EventTypes.all_rooms) ") }, "name": "all_rooms", "selectOnFocus": true });
    var locks_user1930 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Locks the user", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Locks the user","(cal.EventTypes.locks_user) Whether calendar entries of this type make the user\nunavailable for other locking events at the same time.") }, "name": "locks_user", "selectOnFocus": true });
    var transparent1931 = new Ext.form.Checkbox({ "anchor": "-20", "autoHeight": true, "boxLabel": "Transparent", "checked": false, "hideLabel": true, "listeners": { "render": Lino.quicktip_renderer("Transparent","(cal.EventTypes.transparent) Allow entries of this type to conflict with other events.") }, "name": "transparent", "selectOnFocus": true });
    var max_conflicting1932 = new Ext.form.NumberField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Simultaneous entries</span>", "listeners": { "render": Lino.quicktip_renderer("Simultaneous entries","(cal.EventTypes.max_conflicting) How many conflicting events should be tolerated.") }, "name": "max_conflicting", "selectOnFocus": true, "value": 1 });
    var main_5_panel1933 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 22, "items": is_appointment1928, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 22, "items": all_rooms1929, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 22, "items": locks_user1930, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 22, "items": transparent1931, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 11, "items": max_conflicting1932, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 189, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel1976 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel1908, main_2_panel1913, main_3_panel1919, main_4_panel1925, main_5_panel1933 ], "labelAlign": "top", "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel1976;
    this.before_row_edit = function(record) {
    }
    Lino.cal.EventTypes.DetailFormPanel.superclass.initComponent.call(this);
  }
});


Lino.households.Households.DetailFormPanel = Ext.extend(Lino.FormPanel,{
  layout: 'fit',
  auto_save: true,
  content_type: 30,
  initComponent : function() {
    var type685 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Household Type...", "fieldLabel": "Household Type", "hiddenName": "typeHidden", "listeners": { "render": Lino.quicktip_renderer("Household Type","(households.Households.type) ") }, "name": "type", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.households.Types.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/households/Households/type" }) }) });
    var prefix686 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Name prefix</span>", "listeners": { "render": Lino.quicktip_renderer("Name prefix","(households.Households.prefix) An optional name prefix. For organisations this is inserted\nbefore the name, for persons this is inserted between first\nname and last name (see\nlino.mixins.human.Human.get_last_name_prefix()).") }, "maxLength": 200, "name": "prefix", "selectOnFocus": true });
    var name687 = new Ext.form.TextField({ "allowBlank": false, "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Name</span>", "listeners": { "render": Lino.quicktip_renderer("Name","(households.Households.name) The full name of this partner. Used for alphabetic sorting.\nSubclasses may hide this field and fill it automatically,\ne.g. saving a Person will automatically set her\nname field to \"last_name, first_name\".") }, "maxLength": 200, "name": "name", "selectOnFocus": true });
    var language688 = new Lino.ChoicesFieldElement({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Language</span>", "hiddenName": "languageHidden", "listeners": { "render": Lino.quicktip_renderer("Language","(households.Households.language) The language to use when communicating with this partner.") }, "name": "language", "selectOnFocus": true, "store": [ [ "en", "English" ], [ "fr", "French" ] ] });
    var id689 = new Ext.form.NumberField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "ID", "listeners": { "render": Lino.quicktip_renderer("ID","(households.Households.id) ") }, "name": "id", "selectOnFocus": true });
    var main_1_panel690 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 25, "items": type685, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 27, "items": prefix686, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 27, "items": name687, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 12, "items": language688, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 6, "items": id689, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 135, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var country696 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Country...", "fieldLabel": "Country", "hiddenName": "countryHidden", "listeners": { "render": Lino.quicktip_renderer("Country","(households.Households.country) ") }, "name": "country", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.countries.Countries.detail,Lino.countries.Countries.insert)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/households/Households/country" }) }) });
    var region697 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Place...", "fieldLabel": "County", "hiddenName": "regionHidden", "listeners": { "render": Lino.quicktip_renderer("County","(households.Households.region) ") }, "name": "region", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.countries.Places.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/households/Households/region" }) }) });
    var box3_1_panel698 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 50, "items": country696, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 50, "items": region697, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 72, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var city701 = new Lino.TwinCombo({ "anchor": "-20", "autoHeight": true, "emptyText": "Select a Place...", "fieldLabel": "Locality", "forceSelection": false, "hiddenName": "cityHidden", "listeners": { "render": Lino.quicktip_renderer("Locality","(households.Households.city) ") }, "name": "city", "onTrigger2Click": function(e){ Lino.show_fk_detail(this,Lino.countries.Places.detail,null)}, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/households/Households/city" }) }) });
    var zip_code702 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "boxMinWidth": Lino.chars2width(10), "fieldLabel": "Zip code", "listeners": { "render": Lino.quicktip_renderer("Zip code","(households.Households.zip_code) ") }, "maxLength": 10, "name": "zip_code", "selectOnFocus": true });
    var box3_2_panel703 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 66, "items": city701, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 33, "items": zip_code702, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 81, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var street_prefix706 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Street prefix", "listeners": { "render": Lino.quicktip_renderer("Street prefix","(households.Households.street_prefix) ") }, "maxLength": 200, "name": "street_prefix", "selectOnFocus": true });
    var street707 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Street", "listeners": { "render": Lino.quicktip_renderer("Street","(households.Households.street) ") }, "maxLength": 200, "name": "street", "selectOnFocus": true });
    var street_no708 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "boxMinWidth": Lino.chars2width(10), "fieldLabel": "No.", "listeners": { "render": Lino.quicktip_renderer("No.","(households.Households.street_no) ") }, "maxLength": 10, "name": "street_no", "selectOnFocus": true });
    var street_box709 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "boxMinWidth": Lino.chars2width(10), "fieldLabel": "Box", "listeners": { "render": Lino.quicktip_renderer("Box","(households.Households.street_box) ") }, "maxLength": 10, "name": "street_box", "selectOnFocus": true });
    var box3_3_panel710 = new Ext.Panel({ "anchor": "-20", "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ { "autoHeight": true, "flex": 30, "items": street_prefix706, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 36, "items": street707, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 16, "items": street_no708, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "autoHeight": true, "flex": 16, "items": street_box709, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 126, "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var addr2715 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "Address line after street", "listeners": { "render": Lino.quicktip_renderer("Address line after street","(households.Households.addr2) ") }, "maxLength": 200, "name": "addr2", "selectOnFocus": true });
    var box3_panel716 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "flex": 62, "frame": true, "hideCheckBoxLabels": true, "items": [ box3_1_panel698, box3_2_panel703, box3_3_panel710, { "anchor": "-20", "autoHeight": true, "items": addr2715, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 234, "layout": "form" });
    var phone718 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">Phone</span>", "listeners": { "render": Lino.quicktip_renderer("Phone","(households.Households.phone) The primary phone number.  Note that Lino does not ignore\nformatting characters in phone numbers when searching.  For\nexample, if you enter \"087/12.34.56\" as a phone number, then a\nsearch for phone number containing \"1234\" will not find it.") }, "maxLength": 200, "name": "phone", "selectOnFocus": true });
    var gsm719 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">GSM</span>", "listeners": { "render": Lino.quicktip_renderer("GSM","(households.Households.gsm) The primary mobile phone number.") }, "maxLength": 200, "name": "gsm", "selectOnFocus": true });
    var email720 = new Ext.form.TextField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "<span style=\"border-bottom: 1px dotted #000000;\">e-mail address</span>", "listeners": { "render": Lino.quicktip_renderer("e-mail address","(households.Households.email) The primary email address.") }, "maxLength": 254, "name": "email", "selectOnFocus": true });
    var url721 = new Lino.URLField({ "anchor": "-20", "autoHeight": true, "fieldLabel": "URL", "listeners": { "render": Lino.quicktip_renderer("URL","(households.Households.url) ") }, "maxLength": 200, "name": "url", "selectOnFocus": true });
    var box4_panel722 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "bodyBorder": false, "border": false, "flex": 37, "frame": true, "hideCheckBoxLabels": true, "items": [ { "anchor": "-20", "autoHeight": true, "items": phone718, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": gsm719, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": email720, "labelAlign": "top", "layout": "form", "xtype": "panel" }, { "anchor": "-20", "autoHeight": true, "items": url721, "labelAlign": "top", "layout": "form", "xtype": "panel" } ], "labelAlign": "top", "labelWidth": 135, "layout": "form" });
    var address_box_panel727 = new Ext.Panel({ "autoHeight": true, "autoScroll": false, "border": false, "frame": false, "hideCheckBoxLabels": true, "items": [ box3_panel716, box4_panel722 ], "labelAlign": "top", "layout": "hbox", "layoutConfig": { "align": "stretchmax" } });
    var main_panel748 = new Ext.Panel({ "autoScroll": false, "bodyBorder": false, "border": false, "frame": true, "hideCheckBoxLabels": true, "items": [ main_1_panel690, address_box_panel727 ], "labelAlign": "top", "layout": "vbox", "layoutConfig": { "align": "stretch" } });
    this.items = main_panel748;
    this.before_row_edit = function(record) {
      region697.setContextValue('country', record ? record.data['countryHidden'] : undefined);
      city701.setContextValue('country', record ? record.data['countryHidden'] : undefined);
      city701.setContextValue('region', record ? record.data['regionHidden'] : undefined);
    }
    this.onRender = function(ct, position) {
      country696.on('change',Lino.chooser_handler(region697,'country'));
      country696.on('change',Lino.chooser_handler(city701,'country'));
      region697.on('change',Lino.chooser_handler(city701,'region'));
      Lino.households.Households.DetailFormPanel.superclass.onRender.call(this, ct, position);
    }
    Lino.households.Households.DetailFormPanel.superclass.initComponent.call(this);
    // active_fields:
    city701.on("change", function(){ this.save() }, this);
    zip_code702.on("change", function(){ this.save() }, this);
  }
});

Lino.users.Users.merge_row = new Lino.WindowAction({ "autoHeight": true, "draggable": true, "maximizable": true, "maximized": false, "modal": true, "width": Lino.chars2width(70) }, function(){
  var p = { "hide_top_toolbar": true, "is_main_window": true };
  return new Lino.users.Users.merge_row_ActionFormPanel({});
});
Lino.users.Users.change_password = new Lino.WindowAction({ "autoHeight": true, "draggable": true, "maximizable": true, "maximized": false, "modal": true, "width": Lino.chars2width(50) }, function(){
  var p = { "hide_top_toolbar": true, "is_main_window": true };
  return new Lino.users.Users.change_password_ActionFormPanel({});
});
Lino.contacts.Persons.create_household = new Lino.WindowAction({ "autoHeight": true, "draggable": true, "maximizable": true, "maximized": false, "modal": true, "width": Lino.chars2width(50) }, function(){
  var p = { "hide_top_toolbar": true, "is_main_window": true };
  return new Lino.contacts.Persons.create_household_ActionFormPanel({});
});
Lino.users.UsersOverview.sign_in = new Lino.WindowAction({ "autoHeight": true, "draggable": true, "maximizable": true, "maximized": false, "modal": true, "width": Lino.chars2width(50) }, function(){
  var p = { "hide_top_toolbar": true, "is_main_window": true };
  return new Lino.users.UsersOverview.sign_in_ActionFormPanel({});
});
Lino.users.Users.verify = new Lino.WindowAction({ "autoHeight": true, "draggable": true, "maximizable": true, "maximized": false, "modal": true, "width": Lino.chars2width(50) }, function(){
  var p = { "hide_top_toolbar": true, "is_main_window": true };
  return new Lino.users.Users.verify_ActionFormPanel({});
});

// js_render_GridPanel_class users.UsersOverview
Lino.users.UsersOverview.GridPanel = Ext.extend(Lino.GridPanel,{
  disabled_fields_index : 6,
  viewConfig : { "emptyText": "No data to display.", "forceFit": true, "getRowClass": Lino.getRowClass },
  ls_url : "/users/UsersOverview",
  ls_bbar_actions : [ { "auto_save": true, "iconCls": "x-tbar-html", "itemId": "show_as_html", "menu_item_text": "HTML", "overflowText": "HTML", "panel_btn_handler": Lino.list_action_handler('/users/UsersOverview','show_as_html','GET',Lino.get_current_grid_config), "tooltip": "Show this table in Bootstrap3 interface" }, { "auto_save": true, "iconCls": "x-tbar-vcard", "itemId": "export_vcf", "menu_item_text": "Export as vCard", "overflowText": "Export as vCard", "panel_btn_handler": Lino.list_action_handler('/users/UsersOverview','export_vcf','GET',null), "tooltip": "Download all records as a .vcf file which you can import to another\ncontacts application." }, { "auto_save": true, "iconCls": "x-tbar-page_excel", "itemId": "export_excel", "menu_item_text": "Export to .xls", "overflowText": "Export to .xls", "panel_btn_handler": Lino.list_action_handler('/users/UsersOverview','export_excel','GET',Lino.get_current_grid_config), "tooltip": "Export this table as an .xls document" }, { "auto_save": true, "iconCls": "x-tbar-application_form", "itemId": "detail", "menu_item_text": "Detail", "overflowText": "Detail", "panel_btn_handler": Lino.show_detail, "tooltip": "Detail" }, { "auto_save": true, "itemId": "change_password", "menu_item_text": "Change password", "overflowText": "Change password", "panel_btn_handler": Lino.param_action_handler(Lino.users.Users.change_password), "text": " <font size=\"4\">\u2731</font>" }, { "iconCls": "x-tbar-bell", "menu": [ { "auto_save": true, "itemId": "check_data", "menu_item_text": "Check data", "overflowText": "Check data", "panel_btn_handler": Lino.row_action_handler('check_data','GET',null), "text": "Check data", "tooltip": "Updates the table of data problems for a given database\nobject, also removing those messages which no longer exist. This\naction does not change anything else in the database." }, { "auto_save": true, "itemId": "fix_problems", "menu_item_text": "Fix data problems", "overflowText": "Fix data problems", "panel_btn_handler": Lino.row_action_handler('fix_problems','GET',null), "text": "Fix data problems", "tooltip": "Updates the table of data problems for a given database\nobject, also removing those messages which no longer exist. This\naction does not change anything else in the database." } ], "menu_item_text": "Check data", "panel_btn_handler": Lino.row_action_handler('check_data','GET',null), "text": null, "xtype": "splitbutton" }, { "auto_save": true, "itemId": "sign_in", "menu_item_text": "Sign in", "overflowText": "Sign in", "panel_btn_handler": Lino.param_action_handler(Lino.users.UsersOverview.sign_in), "text": "Sign in" }, { "auto_save": true, "itemId": "sign_out", "menu_item_text": "Sign out", "overflowText": "Sign out", "panel_btn_handler": Lino.list_action_handler('/users/UsersOverview','sign_out','GET',null), "text": "Sign out" }, { "auto_save": true, "itemId": "update_widgets", "listeners": { "render": Lino.quicktip_renderer('a2btn',"Create or update the widgets for this user.") }, "menu_item_text": "Update widgets", "overflowText": "Update widgets", "panel_btn_handler": Lino.row_action_handler('update_widgets','GET',null), "text": "\u00a0\u26a1\u00a0" } ],
  cell_edit : true,
  title : "Users",
  page_length : 20,
  params_panel_hidden : true,
  stripeRows : true,
  ls_store_fields : [ { "name": "username" }, { "name": "user_type" }, 'user_typeHidden', { "name": "language" }, 'languageHidden', { "name": "person_ptr" }, { "name": "disabled_fields" }, { "name": "disable_editing" } ],
  pk_index : 5,
  ls_grid_configs : [  ],
  content_type : 10,
  ls_id_property : "person_ptr",
  gc_name : 0,
  initComponent : function() {
    this.ls_detail_handler = Lino.users.UsersOverview.detail;
    this.ls_insert_handler = Lino.users.UsersOverview.insert;
    var ww = this.containing_window;
    var username1977 = new Ext.form.TextField({ "allowBlank": false, "maxLength": 30, "selectOnFocus": true });
    var user_type1978 = new Lino.ChoicesFieldElement({ "forceSelection": true, "selectOnFocus": true, "store": [['','<br>']].concat(Lino.users.UserTypes) });
    var language1979 = new Lino.ChoicesFieldElement({ "selectOnFocus": true, "store": [ [ "en", "English" ], [ "fr", "French" ] ] });
    this.before_row_edit = function(record) {
    };
    this.ls_columns = [ { "colIndex": 0, "dataIndex": "username", "editable": true, "editor": username1977, "filter": { "type": "string" }, "header": "Username", "sortable": true, "tooltip": "(users.UsersOverview.username) Must be unique and cannot be empty.", "width": Lino.chars2width(22) }, { "colIndex": 1, "dataIndex": "user_type", "editable": true, "editor": user_type1978, "filter": { "type": "string" }, "header": "User type", "sortable": false, "tooltip": "(users.UsersOverview.user_type) The user_type of a user is what defines her or his permissions.", "width": Lino.chars2width(25) }, { "colIndex": 2, "dataIndex": "language", "editable": true, "editor": language1979, "filter": { "type": "string" }, "header": "Language", "sortable": false, "tooltip": "(users.UsersOverview.language) The language to use when communicating with this partner.", "width": Lino.chars2width(21) } ];
    Lino.users.UsersOverview.GridPanel.superclass.initComponent.call(this);
  }
});

Lino.users.UsersOverview.show_as_html = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "show_as_html", params, Lino.get_current_grid_config);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.UsersOverview.export_vcf = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "export_vcf", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.UsersOverview.export_excel = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "export_excel", params, Lino.get_current_grid_config);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.UsersOverview.grid_post = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "grid_post", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.UsersOverview.grid_put = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "grid_put", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};

Lino.users.UsersOverview.insertPanel = Ext.extend(Lino.users.Users.InsertFormPanel,{
  empty_title: "New",
  hide_navigator: true,
  params_panel_hidden: true,
  save_action_name: "submit_insert",
  ls_bbar_actions: [  ],
  ls_url: "/users/UsersOverview",
  action_name: "insert",
  default_record_id: -99999,
  initComponent : function() {
    this.ls_detail_handler = Lino.users.UsersOverview.detail;
    this.ls_insert_handler = Lino.users.UsersOverview.insert;
    Lino.users.UsersOverview.insertPanel.superclass.initComponent.call(this);
  }
});

Lino.users.UsersOverview.insert = new Lino.WindowAction({ "autoHeight": true, "draggable": true, "maximizable": true, "maximized": false, "modal": true, "width": Lino.chars2width(60) }, function(){
  var p = { "hide_top_toolbar": true, "is_main_window": true };
  return new Lino.users.UsersOverview.insertPanel(p);
});
Lino.users.UsersOverview.submit_detail = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "submit_detail", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.UsersOverview.submit_insert = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "submit_insert", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};

Lino.users.UsersOverview.detailPanel = Ext.extend(Lino.users.Users.DetailFormPanel,{
  empty_title: "Detail",
  params_panel_hidden: true,
  save_action_name: "submit_detail",
  ls_bbar_actions: [ { "auto_save": true, "iconCls": "x-tbar-vcard", "itemId": "export_vcf", "menu_item_text": "Export as vCard", "overflowText": "Export as vCard", "panel_btn_handler": Lino.list_action_handler('/users/UsersOverview','export_vcf','GET',null), "tooltip": "Download all records as a .vcf file which you can import to another\ncontacts application." }, { "auto_save": true, "itemId": "change_password", "menu_item_text": "Change password", "overflowText": "Change password", "panel_btn_handler": Lino.param_action_handler(Lino.users.Users.change_password), "text": " <font size=\"4\">\u2731</font>" }, { "iconCls": "x-tbar-bell", "menu": [ { "auto_save": true, "itemId": "check_data", "menu_item_text": "Check data", "overflowText": "Check data", "panel_btn_handler": Lino.row_action_handler('check_data','GET',null), "text": "Check data", "tooltip": "Updates the table of data problems for a given database\nobject, also removing those messages which no longer exist. This\naction does not change anything else in the database." }, { "auto_save": true, "itemId": "fix_problems", "menu_item_text": "Fix data problems", "overflowText": "Fix data problems", "panel_btn_handler": Lino.row_action_handler('fix_problems','GET',null), "text": "Fix data problems", "tooltip": "Updates the table of data problems for a given database\nobject, also removing those messages which no longer exist. This\naction does not change anything else in the database." } ], "menu_item_text": "Check data", "panel_btn_handler": Lino.row_action_handler('check_data','GET',null), "text": null, "xtype": "splitbutton" }, { "auto_save": true, "itemId": "sign_in", "menu_item_text": "Sign in", "overflowText": "Sign in", "panel_btn_handler": Lino.param_action_handler(Lino.users.UsersOverview.sign_in), "text": "Sign in" }, { "auto_save": true, "itemId": "sign_out", "menu_item_text": "Sign out", "overflowText": "Sign out", "panel_btn_handler": Lino.list_action_handler('/users/UsersOverview','sign_out','GET',null), "text": "Sign out" }, { "auto_save": true, "itemId": "update_widgets", "listeners": { "render": Lino.quicktip_renderer('a2btn',"Create or update the widgets for this user.") }, "menu_item_text": "Update widgets", "overflowText": "Update widgets", "panel_btn_handler": Lino.row_action_handler('update_widgets','GET',null), "text": "\u00a0\u26a1\u00a0" } ],
  ls_url: "/users/UsersOverview",
  action_name: "detail",
  initComponent : function() {
    this.ls_detail_handler = Lino.users.UsersOverview.detail;
    this.ls_insert_handler = Lino.users.UsersOverview.insert;
    Lino.users.UsersOverview.detailPanel.superclass.initComponent.call(this);
  }
});

Lino.users.UsersOverview.detail = new Lino.WindowAction({  }, function(){
  var p = { "is_main_window": true };
  return new Lino.users.UsersOverview.detailPanel(p);
});
Lino.users.UsersOverview.delete_selected = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "delete_selected", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.UsersOverview.check_data = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "check_data", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.UsersOverview.del_company = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "del_company", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.UsersOverview.del_household = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "del_household", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.UsersOverview.del_partner = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "del_partner", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.UsersOverview.del_person = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "del_person", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.UsersOverview.del_user = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "del_user", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.UsersOverview.fix_problems = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "fix_problems", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.UsersOverview.grid = new Lino.WindowAction({  }, function(){
  var p = { "is_main_window": true };
  p.params_panel = new Lino.users.Users.ParamsPanel({});
  return new Lino.users.UsersOverview.GridPanel(p);
});
Lino.users.UsersOverview.ins_company = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "ins_company", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.UsersOverview.ins_household = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "ins_household", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.UsersOverview.ins_partner = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "ins_partner", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.UsersOverview.ins_person = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "ins_person", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.UsersOverview.ins_user = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "ins_user", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.UsersOverview.sign_out = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "sign_out", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.UsersOverview.update_widgets = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "update_widgets", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.UsersOverview.validate = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "validate", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.UsersOverview.wf1 = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "wf1", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.UsersOverview.wf2 = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "wf2", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.UsersOverview.wf3 = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/UsersOverview", "GET", pk, "wf3", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};

// js_render_GridPanel_class users.Register
Lino.users.Register.GridPanel = Ext.extend(Lino.GridPanel,{
  disabled_fields_index : 58,
  viewConfig : { "emptyText": "No data to display.", "forceFit": true, "getRowClass": Lino.getRowClass },
  ls_url : "/users/Register",
  ls_bbar_actions : [ { "auto_save": true, "iconCls": "x-tbar-html", "itemId": "show_as_html", "menu_item_text": "HTML", "overflowText": "HTML", "panel_btn_handler": Lino.list_action_handler('/users/Register','show_as_html','GET',Lino.get_current_grid_config), "tooltip": "Show this table in Bootstrap3 interface" }, { "auto_save": true, "iconCls": "x-tbar-vcard", "itemId": "export_vcf", "menu_item_text": "Export as vCard", "overflowText": "Export as vCard", "panel_btn_handler": Lino.list_action_handler('/users/Register','export_vcf','GET',null), "tooltip": "Download all records as a .vcf file which you can import to another\ncontacts application." }, { "auto_save": true, "iconCls": "x-tbar-page_excel", "itemId": "export_excel", "menu_item_text": "Export to .xls", "overflowText": "Export to .xls", "panel_btn_handler": Lino.list_action_handler('/users/Register','export_excel','GET',Lino.get_current_grid_config), "tooltip": "Export this table as an .xls document" }, { "auto_save": true, "iconCls": "x-tbar-application_form", "itemId": "detail", "menu_item_text": "Detail", "overflowText": "Detail", "panel_btn_handler": Lino.show_detail, "tooltip": "Detail" }, { "auto_save": true, "itemId": "change_password", "menu_item_text": "Change password", "overflowText": "Change password", "panel_btn_handler": Lino.param_action_handler(Lino.users.Users.change_password), "text": " <font size=\"4\">\u2731</font>" }, { "iconCls": "x-tbar-bell", "menu": [ { "auto_save": true, "itemId": "check_data", "menu_item_text": "Check data", "overflowText": "Check data", "panel_btn_handler": Lino.row_action_handler('check_data','GET',null), "text": "Check data", "tooltip": "Updates the table of data problems for a given database\nobject, also removing those messages which no longer exist. This\naction does not change anything else in the database." }, { "auto_save": true, "itemId": "fix_problems", "menu_item_text": "Fix data problems", "overflowText": "Fix data problems", "panel_btn_handler": Lino.row_action_handler('fix_problems','GET',null), "text": "Fix data problems", "tooltip": "Updates the table of data problems for a given database\nobject, also removing those messages which no longer exist. This\naction does not change anything else in the database." } ], "menu_item_text": "Check data", "panel_btn_handler": Lino.row_action_handler('check_data','GET',null), "text": null, "xtype": "splitbutton" }, { "auto_save": true, "itemId": "sign_out", "menu_item_text": "Sign out", "overflowText": "Sign out", "panel_btn_handler": Lino.list_action_handler('/users/Register','sign_out','GET',null), "text": "Sign out" }, { "auto_save": true, "itemId": "update_widgets", "listeners": { "render": Lino.quicktip_renderer('a2btn',"Create or update the widgets for this user.") }, "menu_item_text": "Update widgets", "overflowText": "Update widgets", "panel_btn_handler": Lino.row_action_handler('update_widgets','GET',null), "text": "\u00a0\u26a1\u00a0" } ],
  cell_edit : true,
  title : "Users",
  page_length : 20,
  params_panel_hidden : true,
  stripeRows : true,
  ls_store_fields : [ { "name": "username" }, { "name": "user_type" }, 'user_typeHidden', { "name": "first_name" }, { "name": "last_name" }, { "name": "id", "type": "int" }, { "name": "email" }, { "name": "language" }, 'languageHidden', { "name": "url" }, { "name": "phone" }, { "name": "gsm" }, { "name": "fax" }, { "name": "country" }, 'countryHidden', { "name": "city" }, 'cityHidden', { "name": "zip_code" }, { "name": "region" }, 'regionHidden', { "name": "addr1" }, { "name": "street_prefix" }, { "name": "street" }, { "name": "street_no" }, { "name": "street_box" }, { "name": "addr2" }, { "name": "prefix" }, { "name": "name" }, { "name": "remarks" }, { "name": "title" }, { "name": "middle_name" }, { "name": "gender" }, 'genderHidden', { "name": "birth_date" }, { "name": "private", "type": "boolean" }, { "name": "modified" }, { "name": "created" }, { "name": "password" }, { "name": "last_login" }, { "name": "timezone" }, { "name": "initials" }, { "name": "callme_mode", "type": "boolean" }, { "name": "verification_code" }, { "name": "user_state" }, 'user_stateHidden', { "name": "access_class" }, 'access_classHidden', { "name": "event_type" }, 'event_typeHidden', { "name": "about_me" }, { "name": "name_column" }, { "name": "workflow_buttons" }, { "name": "mobile_item" }, { "name": "overview" }, { "name": "created_natural" }, { "name": "age" }, { "name": "mti_navigator" }, { "name": "address_column" }, { "name": "disabled_fields" }, { "name": "disable_editing" } ],
  pk_index : 5,
  ls_grid_configs : [  ],
  content_type : 8,
  ls_id_property : "id",
  gc_name : 0,
  initComponent : function() {
    this.ls_detail_handler = Lino.users.Register.detail;
    this.ls_insert_handler = Lino.users.Register.insert;
    var ww = this.containing_window;
    var username1981 = new Ext.form.TextField({ "allowBlank": false, "maxLength": 30, "selectOnFocus": true });
    var user_type1982 = new Lino.ChoicesFieldElement({ "forceSelection": true, "selectOnFocus": true, "store": [['','<br>']].concat(Lino.users.UserTypes) });
    var first_name1983 = new Ext.form.TextField({ "maxLength": 200, "selectOnFocus": true });
    var last_name1984 = new Ext.form.TextField({ "maxLength": 200, "selectOnFocus": true });
    var id1985 = new Ext.form.NumberField({ "hidden": true, "selectOnFocus": true });
    var email1986 = new Ext.form.TextField({ "hidden": true, "maxLength": 254, "selectOnFocus": true });
    var language1987 = new Lino.ChoicesFieldElement({ "hidden": true, "selectOnFocus": true, "store": [ [ "en", "English" ], [ "fr", "French" ] ] });
    var url1988 = new Lino.URLField({ "hidden": true, "maxLength": 200, "selectOnFocus": true });
    var phone1989 = new Ext.form.TextField({ "hidden": true, "maxLength": 200, "selectOnFocus": true });
    var gsm1990 = new Ext.form.TextField({ "hidden": true, "maxLength": 200, "selectOnFocus": true });
    var fax1991 = new Ext.form.TextField({ "hidden": true, "maxLength": 200, "selectOnFocus": true });
    var country1992 = new Lino.RemoteComboFieldElement({ "emptyText": "Select a Country...", "hidden": true, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/users/Register/country" }) }) });
    var city1993 = new Lino.RemoteComboFieldElement({ "emptyText": "Select a Place...", "forceSelection": false, "hidden": true, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/users/Register/city" }) }) });
    var zip_code1994 = new Ext.form.TextField({ "boxMinWidth": Lino.chars2width(10), "hidden": true, "maxLength": 10, "selectOnFocus": true });
    var region1995 = new Lino.RemoteComboFieldElement({ "emptyText": "Select a Place...", "hidden": true, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/users/Register/region" }) }) });
    var addr11996 = new Ext.form.TextField({ "hidden": true, "maxLength": 200, "selectOnFocus": true });
    var street_prefix1997 = new Ext.form.TextField({ "hidden": true, "maxLength": 200, "selectOnFocus": true });
    var street1998 = new Ext.form.TextField({ "hidden": true, "maxLength": 200, "selectOnFocus": true });
    var street_no1999 = new Ext.form.TextField({ "boxMinWidth": Lino.chars2width(10), "hidden": true, "maxLength": 10, "selectOnFocus": true });
    var street_box2000 = new Ext.form.TextField({ "boxMinWidth": Lino.chars2width(10), "hidden": true, "maxLength": 10, "selectOnFocus": true });
    var addr22001 = new Ext.form.TextField({ "hidden": true, "maxLength": 200, "selectOnFocus": true });
    var prefix2002 = new Ext.form.TextField({ "hidden": true, "maxLength": 200, "selectOnFocus": true });
    var name2003 = new Ext.form.TextField({ "allowBlank": false, "hidden": true, "maxLength": 200, "selectOnFocus": true });
    var remarks2004 = new Lino.RichTextPanel({ "containing_panel": this, "hidden": true, "selectOnFocus": true, "title": "About me" });
    var title2005 = new Ext.form.TextField({ "hidden": true, "maxLength": 200, "selectOnFocus": true });
    var middle_name2006 = new Ext.form.TextField({ "hidden": true, "maxLength": 200, "selectOnFocus": true });
    var gender2007 = new Lino.ChoicesFieldElement({ "forceSelection": true, "hidden": true, "selectOnFocus": true, "store": [['','<br>']].concat(Lino.system.Genders) });
    var birth_date2008 = new Lino.IncompleteDateField({ "hidden": true, "selectOnFocus": true });
    var private2009 = new Ext.form.Checkbox({ "checked": false, "hidden": true, "selectOnFocus": true });
    var modified2010 = new Ext.form.DisplayField({ "disabled": true, "hidden": true, "value": "<br>" });
    var created2011 = new Ext.form.DisplayField({ "disabled": true, "hidden": true, "value": "<br>" });
    var password2012 = new Ext.form.TextField({ "allowBlank": false, "hidden": true, "maxLength": 128, "selectOnFocus": true });
    var last_login2013 = new Ext.form.DisplayField({ "hidden": true, "selectOnFocus": true, "value": "<br>" });
    var timezone2014 = new Lino.SimpleRemoteComboFieldElement({ "hidden": true, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/users/Register/timezone" }) }) });
    var initials2015 = new Ext.form.TextField({ "boxMinWidth": Lino.chars2width(10), "hidden": true, "maxLength": 10, "selectOnFocus": true });
    var callme_mode2016 = new Ext.form.Checkbox({ "checked": true, "hidden": true, "selectOnFocus": true });
    var verification_code2017 = new Ext.form.TextField({ "hidden": true, "maxLength": 200, "selectOnFocus": true });
    var user_state2018 = new Lino.ChoicesFieldElement({ "allowBlank": false, "forceSelection": true, "hidden": true, "selectOnFocus": true, "store": Lino.users.UserStates });
    var access_class2019 = new Lino.ChoicesFieldElement({ "allowBlank": false, "forceSelection": true, "hidden": true, "selectOnFocus": true, "store": Lino.cal.AccessClasses });
    var event_type2020 = new Lino.RemoteComboFieldElement({ "emptyText": "Select a Calendar entry type...", "hidden": true, "pageSize": 20, "selectOnFocus": true, "store": new Lino.ComplexRemoteComboStore({ "proxy": new Ext.data.HttpProxy({ "method": "GET", "url": "/choices/users/Register/event_type" }) }) });
    var about_me_htmlbox2021 = new Lino.HtmlBoxPanel({ "always_enabled": true, "bodyStyle": "overflow-x:hidden;", "containing_panel": this, "hidden": true, "items": new Ext.BoxComponent({autoScroll:true}), "layout": "fit", "name": "about_me", "title": "About me", "value": "<br/>" });
    var name_column_disp2022 = new Ext.form.DisplayField({ "always_enabled": true, "disabled": true, "hidden": true, "value": "<br/>" });
    var workflow_buttons_disp2023 = new Ext.form.DisplayField({ "always_enabled": true, "disabled": true, "hidden": true, "value": "<br/>" });
    var mobile_item_disp2024 = new Ext.form.DisplayField({ "always_enabled": true, "disabled": true, "hidden": true, "value": "<br/>" });
    var overview_htmlbox2025 = new Lino.HtmlBoxPanel({ "always_enabled": true, "bodyStyle": "overflow-x:hidden;", "containing_panel": this, "hidden": true, "items": new Ext.BoxComponent({autoScroll:true}), "layout": "fit", "name": "overview", "value": "<br/>" });
    var created_natural_disp2026 = new Ext.form.DisplayField({ "always_enabled": true, "disabled": true, "hidden": true, "value": "<br/>" });
    var age_disp2027 = new Ext.form.DisplayField({ "always_enabled": true, "disabled": true, "hidden": true, "value": "<br/>" });
    var mti_navigator_disp2028 = new Ext.form.DisplayField({ "always_enabled": true, "disabled": true, "hidden": true, "value": "<br/>" });
    var address_column_disp2029 = new Ext.form.DisplayField({ "always_enabled": true, "disabled": true, "hidden": true, "value": "<br/>" });
    this.before_row_edit = function(record) {
      city1993.setContextValue('country', record ? record.data['countryHidden'] : undefined);
      city1993.setContextValue('region', record ? record.data['regionHidden'] : undefined);
      region1995.setContextValue('country', record ? record.data['countryHidden'] : undefined);
      remarks2004.refresh();
      timezone2014.setContextValue('partner', record ? record.data['partner'] : undefined);
      about_me_htmlbox2021.refresh();
      overview_htmlbox2025.refresh();
    };
    this.onRender = function(ct, position) {
      country1992.on('change',Lino.chooser_handler(city1993,'country'));
      region1995.on('change',Lino.chooser_handler(city1993,'region'));
      country1992.on('change',Lino.chooser_handler(region1995,'country'));
      Lino.users.Register.GridPanel.superclass.onRender.call(this, ct, position);
    }
    this.ls_columns = [ { "colIndex": 0, "dataIndex": "username", "editable": true, "editor": username1981, "filter": { "type": "string" }, "header": "Username", "sortable": true, "tooltip": "(users.Register.username) Must be unique and cannot be empty.", "width": Lino.chars2width(22) }, { "colIndex": 1, "dataIndex": "user_type", "editable": true, "editor": user_type1982, "filter": { "type": "string" }, "header": "User type", "sortable": false, "tooltip": "(users.Register.user_type) The user_type of a user is what defines her or his permissions.", "width": Lino.chars2width(25) }, { "colIndex": 2, "dataIndex": "first_name", "editable": true, "editor": first_name1983, "filter": { "type": "string" }, "header": "First name", "sortable": true, "tooltip": "(users.Register.first_name) The first name, also known as given name.", "width": Lino.chars2width(22) }, { "colIndex": 3, "dataIndex": "last_name", "editable": true, "editor": last_name1984, "filter": { "type": "string" }, "header": "Last name", "sortable": true, "tooltip": "(users.Register.last_name) The last name, also known as family name.", "width": Lino.chars2width(22) }, { "align": "right", "colIndex": 4, "dataIndex": "id", "editable": true, "editor": id1985, "filter": { "type": "numeric" }, "format": "0", "header": "ID", "hidden": true, "sortable": true, "tooltip": "(users.Register.id) ", "width": Lino.chars2width(6), "xtype": "numbercolumn" }, { "colIndex": 5, "dataIndex": "email", "editable": true, "editor": email1986, "filter": { "type": "string" }, "header": "e-mail address", "hidden": true, "sortable": true, "tooltip": "(users.Register.email) The primary email address.", "width": Lino.chars2width(22) }, { "colIndex": 6, "dataIndex": "language", "editable": true, "editor": language1987, "filter": { "type": "string" }, "header": "Language", "hidden": true, "sortable": false, "tooltip": "(users.Register.language) The language to use when communicating with this partner.", "width": Lino.chars2width(21) }, { "colIndex": 7, "dataIndex": "url", "editable": true, "editor": url1988, "filter": { "type": "string" }, "header": "URL", "hidden": true, "sortable": true, "tooltip": "(users.Register.url) ", "width": Lino.chars2width(22) }, { "colIndex": 8, "dataIndex": "phone", "editable": true, "editor": phone1989, "filter": { "type": "string" }, "header": "Phone", "hidden": true, "sortable": true, "tooltip": "(users.Register.phone) The primary phone number.  Note that Lino does not ignore\nformatting characters in phone numbers when searching.  For\nexample, if you enter \"087/12.34.56\" as a phone number, then a\nsearch for phone number containing \"1234\" will not find it.", "width": Lino.chars2width(22) }, { "colIndex": 9, "dataIndex": "gsm", "editable": true, "editor": gsm1990, "filter": { "type": "string" }, "header": "GSM", "hidden": true, "sortable": true, "tooltip": "(users.Register.gsm) The primary mobile phone number.", "width": Lino.chars2width(22) }, { "colIndex": 10, "dataIndex": "fax", "editable": true, "editor": fax1991, "filter": { "type": "string" }, "header": "Fax", "hidden": true, "sortable": true, "tooltip": "(users.Register.fax) ", "width": Lino.chars2width(22) }, { "colIndex": 11, "dataIndex": "country", "editable": true, "editor": country1992, "filter": { "type": "string" }, "header": "Country", "hidden": true, "sortable": false, "tooltip": "(users.Register.country) ", "width": Lino.chars2width(21) }, { "colIndex": 12, "dataIndex": "city", "editable": true, "editor": city1993, "filter": { "type": "string" }, "header": "Locality", "hidden": true, "sortable": false, "tooltip": "(users.Register.city) ", "width": Lino.chars2width(21) }, { "colIndex": 13, "dataIndex": "zip_code", "editable": true, "editor": zip_code1994, "filter": { "type": "string" }, "header": "Zip code", "hidden": true, "sortable": true, "tooltip": "(users.Register.zip_code) ", "width": Lino.chars2width(12) }, { "colIndex": 14, "dataIndex": "region", "editable": true, "editor": region1995, "filter": { "type": "string" }, "header": "County", "hidden": true, "sortable": false, "tooltip": "(users.Register.region) ", "width": Lino.chars2width(21) }, { "colIndex": 15, "dataIndex": "addr1", "editable": true, "editor": addr11996, "filter": { "type": "string" }, "header": "Address line before street", "hidden": true, "sortable": true, "tooltip": "(users.Register.addr1) ", "width": Lino.chars2width(22) }, { "colIndex": 16, "dataIndex": "street_prefix", "editable": true, "editor": street_prefix1997, "filter": { "type": "string" }, "header": "Street prefix", "hidden": true, "sortable": true, "tooltip": "(users.Register.street_prefix) ", "width": Lino.chars2width(22) }, { "colIndex": 17, "dataIndex": "street", "editable": true, "editor": street1998, "filter": { "type": "string" }, "header": "Street", "hidden": true, "sortable": true, "tooltip": "(users.Register.street) ", "width": Lino.chars2width(22) }, { "colIndex": 18, "dataIndex": "street_no", "editable": true, "editor": street_no1999, "filter": { "type": "string" }, "header": "No.", "hidden": true, "sortable": true, "tooltip": "(users.Register.street_no) ", "width": Lino.chars2width(12) }, { "colIndex": 19, "dataIndex": "street_box", "editable": true, "editor": street_box2000, "filter": { "type": "string" }, "header": "Box", "hidden": true, "sortable": true, "tooltip": "(users.Register.street_box) ", "width": Lino.chars2width(12) }, { "colIndex": 20, "dataIndex": "addr2", "editable": true, "editor": addr22001, "filter": { "type": "string" }, "header": "Address line after street", "hidden": true, "sortable": true, "tooltip": "(users.Register.addr2) ", "width": Lino.chars2width(22) }, { "colIndex": 21, "dataIndex": "prefix", "editable": true, "editor": prefix2002, "filter": { "type": "string" }, "header": "Name prefix", "hidden": true, "sortable": true, "tooltip": "(users.Register.prefix) An optional name prefix. For organisations this is inserted\nbefore the name, for persons this is inserted between first\nname and last name (see\nlino.mixins.human.Human.get_last_name_prefix()).", "width": Lino.chars2width(22) }, { "colIndex": 22, "dataIndex": "name", "editable": true, "editor": name2003, "filter": { "type": "string" }, "header": "Name", "hidden": true, "sortable": true, "tooltip": "(users.Register.name) The full name of this partner. Used for alphabetic sorting.\nSubclasses may hide this field and fill it automatically,\ne.g. saving a Person will automatically set her\nname field to \"last_name, first_name\".", "width": Lino.chars2width(22) }, { "colIndex": 23, "dataIndex": "remarks", "editable": true, "editor": remarks2004, "filter": { "type": "string" }, "header": "About me", "hidden": true, "sortable": false, "tooltip": "(users.Register.remarks) ", "width": Lino.chars2width(61) }, { "colIndex": 24, "dataIndex": "title", "editable": true, "editor": title2005, "filter": { "type": "string" }, "header": "Title", "hidden": true, "sortable": true, "tooltip": "(users.Register.title) Used to specify a professional position or academic\nqualification like \"Dr.\" or \"PhD\".", "width": Lino.chars2width(22) }, { "colIndex": 25, "dataIndex": "middle_name", "editable": true, "editor": middle_name2006, "filter": { "type": "string" }, "header": "Middle name", "hidden": true, "sortable": true, "tooltip": "(users.Register.middle_name) A space-separated list of all middle names.", "width": Lino.chars2width(22) }, { "colIndex": 26, "dataIndex": "gender", "editable": true, "editor": gender2007, "filter": { "type": "string" }, "header": "Gender", "hidden": true, "sortable": false, "tooltip": "(users.Register.gender) The sex of this person (male or female).", "width": Lino.chars2width(10) }, { "colIndex": 27, "dataIndex": "birth_date", "editable": true, "editor": birth_date2008, "filter": { "type": "string" }, "header": "Birth date", "hidden": true, "sortable": true, "tooltip": "(users.Register.birth_date) Uncomplete dates are allowed, e.g. \n\"00.00.1980\" means \"some day in 1980\", \n\"00.07.1980\" means \"in July 1980\"\nor \"23.07.0000\" means \"on a 23th of July\".", "width": Lino.chars2width(13) }, { "colIndex": 28, "dataIndex": "private", "editable": true, "filter": { "type": "boolean" }, "header": "Private", "hidden": true, "sortable": false, "tooltip": "(users.Register.private) ", "width": Lino.chars2width(11), "xtype": "checkcolumn" }, { "colIndex": 29, "dataIndex": "modified", "editable": false, "header": "Modified", "hidden": true, "sortable": true, "tooltip": "(users.Register.modified) ", "width": Lino.chars2width(17) }, { "colIndex": 30, "dataIndex": "created", "editable": false, "header": "Created", "hidden": true, "sortable": true, "tooltip": "(users.Register.created) The timestame when this object was created.", "width": Lino.chars2width(17) }, { "colIndex": 31, "dataIndex": "password", "editable": true, "editor": password2012, "filter": { "type": "string" }, "header": "password", "hidden": true, "sortable": true, "tooltip": "(users.Register.password) ", "width": Lino.chars2width(22) }, { "colIndex": 32, "dataIndex": "last_login", "editable": true, "editor": last_login2013, "header": "last login", "hidden": true, "sortable": true, "tooltip": "(users.Register.last_login) Not used in Lino.", "width": Lino.chars2width(17) }, { "colIndex": 33, "dataIndex": "timezone", "editable": true, "editor": timezone2014, "filter": { "type": "string" }, "header": "Time zone", "hidden": true, "sortable": false, "tooltip": "(users.Register.timezone) ", "width": Lino.chars2width(11) }, { "colIndex": 34, "dataIndex": "initials", "editable": true, "editor": initials2015, "filter": { "type": "string" }, "header": "Initials", "hidden": true, "sortable": true, "tooltip": "(users.Register.initials) The nickname or initials of this user. This does not need to\nbe unique but should provide a reasonably identifying\nfunction.", "width": Lino.chars2width(12) }, { "colIndex": 35, "dataIndex": "callme_mode", "editable": true, "filter": { "type": "boolean" }, "header": "Others may contact me", "hidden": true, "sortable": false, "tooltip": "(users.Register.callme_mode) Whether other users can see my contact data.", "width": Lino.chars2width(11), "xtype": "checkcolumn" }, { "colIndex": 36, "dataIndex": "verification_code", "editable": true, "editor": verification_code2017, "filter": { "type": "string" }, "header": "verification code", "hidden": true, "sortable": true, "tooltip": "(users.Register.verification_code) A random string set for every new user. Used for\nonline_registration.", "width": Lino.chars2width(22) }, { "colIndex": 37, "dataIndex": "user_state", "editable": true, "editor": user_state2018, "filter": { "type": "string" }, "header": "User state", "hidden": true, "sortable": false, "tooltip": "(users.Register.user_state) The registration state of this user.", "width": Lino.chars2width(12) }, { "colIndex": 38, "dataIndex": "access_class", "editable": true, "editor": access_class2019, "filter": { "type": "string" }, "header": "Default access class", "hidden": true, "sortable": false, "tooltip": "(users.Register.access_class) The default access class for your calendar events and tasks.", "width": Lino.chars2width(13) }, { "colIndex": 39, "dataIndex": "event_type", "editable": true, "editor": event_type2020, "filter": { "type": "string" }, "header": "Default Event Type", "hidden": true, "sortable": false, "tooltip": "(users.Register.event_type) The default event type for your calendar events.", "width": Lino.chars2width(21) }, { "colIndex": 40, "dataIndex": "about_me", "editable": false, "header": "About me", "hidden": true, "sortable": false, "tooltip": "(users.Register.about_me) ", "width": Lino.chars2width(31) }, { "colIndex": 41, "dataIndex": "name_column", "editable": false, "header": "Name", "hidden": true, "sortable": false, "tooltip": "(users.Register.name_column) ", "width": Lino.chars2width(16) }, { "colIndex": 42, "dataIndex": "workflow_buttons", "editable": false, "header": "Workflow", "hidden": true, "sortable": false, "tooltip": "(users.Register.workflow_buttons) ", "width": Lino.chars2width(31) }, { "colIndex": 43, "dataIndex": "mobile_item", "editable": false, "header": "Description", "hidden": true, "sortable": false, "tooltip": "(users.Register.mobile_item) ", "width": Lino.chars2width(31) }, { "colIndex": 44, "dataIndex": "overview", "editable": false, "header": "overview", "hidden": true, "sortable": false, "tooltip": "(users.Register.overview) ", "width": Lino.chars2width(31) }, { "colIndex": 45, "dataIndex": "created_natural", "editable": false, "header": "Created", "hidden": true, "sortable": false, "tooltip": "(users.Register.created_natural) ", "width": Lino.chars2width(31) }, { "colIndex": 46, "dataIndex": "age", "editable": false, "header": "Age", "hidden": true, "sortable": false, "tooltip": "(users.Register.age) ", "width": Lino.chars2width(31) }, { "colIndex": 47, "dataIndex": "mti_navigator", "editable": false, "header": "See as ", "hidden": true, "sortable": false, "tooltip": "(users.Register.mti_navigator) ", "width": Lino.chars2width(31) }, { "colIndex": 48, "dataIndex": "address_column", "editable": false, "header": "Address", "hidden": true, "sortable": false, "tooltip": "(users.Register.address_column) ", "width": Lino.chars2width(31) } ];
    Lino.users.Register.GridPanel.superclass.initComponent.call(this);
  }
});

Lino.users.Register.show_as_html = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "show_as_html", params, Lino.get_current_grid_config);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.Register.export_vcf = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "export_vcf", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.Register.export_excel = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "export_excel", params, Lino.get_current_grid_config);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.Register.grid_post = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "grid_post", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.Register.grid_put = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "grid_put", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};

Lino.users.Register.insertPanel = Ext.extend(Lino.users.Register.InsertFormPanel,{
  empty_title: "New",
  hide_navigator: true,
  params_panel_hidden: true,
  save_action_name: "submit_insert",
  ls_bbar_actions: [  ],
  ls_url: "/users/Register",
  action_name: "insert",
  default_record_id: -99999,
  initComponent : function() {
    this.ls_detail_handler = Lino.users.Register.detail;
    this.ls_insert_handler = Lino.users.Register.insert;
    Lino.users.Register.insertPanel.superclass.initComponent.call(this);
  }
});

Lino.users.Register.insert = new Lino.WindowAction({ "autoHeight": true, "draggable": true, "maximizable": true, "maximized": false, "modal": true, "width": Lino.chars2width(60) }, function(){
  var p = { "hide_top_toolbar": true, "is_main_window": true };
  return new Lino.users.Register.insertPanel(p);
});
Lino.users.Register.submit_detail = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "submit_detail", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.Register.submit_insert = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "submit_insert", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};

Lino.users.Register.detailPanel = Ext.extend(Lino.users.Users.DetailFormPanel,{
  empty_title: "Detail",
  params_panel_hidden: true,
  save_action_name: "submit_detail",
  ls_bbar_actions: [ { "auto_save": true, "iconCls": "x-tbar-vcard", "itemId": "export_vcf", "menu_item_text": "Export as vCard", "overflowText": "Export as vCard", "panel_btn_handler": Lino.list_action_handler('/users/Register','export_vcf','GET',null), "tooltip": "Download all records as a .vcf file which you can import to another\ncontacts application." }, { "auto_save": true, "itemId": "change_password", "menu_item_text": "Change password", "overflowText": "Change password", "panel_btn_handler": Lino.param_action_handler(Lino.users.Users.change_password), "text": " <font size=\"4\">\u2731</font>" }, { "iconCls": "x-tbar-bell", "menu": [ { "auto_save": true, "itemId": "check_data", "menu_item_text": "Check data", "overflowText": "Check data", "panel_btn_handler": Lino.row_action_handler('check_data','GET',null), "text": "Check data", "tooltip": "Updates the table of data problems for a given database\nobject, also removing those messages which no longer exist. This\naction does not change anything else in the database." }, { "auto_save": true, "itemId": "fix_problems", "menu_item_text": "Fix data problems", "overflowText": "Fix data problems", "panel_btn_handler": Lino.row_action_handler('fix_problems','GET',null), "text": "Fix data problems", "tooltip": "Updates the table of data problems for a given database\nobject, also removing those messages which no longer exist. This\naction does not change anything else in the database." } ], "menu_item_text": "Check data", "panel_btn_handler": Lino.row_action_handler('check_data','GET',null), "text": null, "xtype": "splitbutton" }, { "auto_save": true, "itemId": "sign_out", "menu_item_text": "Sign out", "overflowText": "Sign out", "panel_btn_handler": Lino.list_action_handler('/users/Register','sign_out','GET',null), "text": "Sign out" }, { "auto_save": true, "itemId": "update_widgets", "listeners": { "render": Lino.quicktip_renderer('a2btn',"Create or update the widgets for this user.") }, "menu_item_text": "Update widgets", "overflowText": "Update widgets", "panel_btn_handler": Lino.row_action_handler('update_widgets','GET',null), "text": "\u00a0\u26a1\u00a0" } ],
  ls_url: "/users/Register",
  action_name: "detail",
  initComponent : function() {
    this.ls_detail_handler = Lino.users.Register.detail;
    this.ls_insert_handler = Lino.users.Register.insert;
    Lino.users.Register.detailPanel.superclass.initComponent.call(this);
  }
});

Lino.users.Register.detail = new Lino.WindowAction({  }, function(){
  var p = { "is_main_window": true };
  return new Lino.users.Register.detailPanel(p);
});
Lino.users.Register.delete_selected = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "delete_selected", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.Register.check_data = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "check_data", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.Register.del_company = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "del_company", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.Register.del_household = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "del_household", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.Register.del_partner = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "del_partner", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.Register.del_person = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "del_person", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.Register.del_user = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "del_user", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.Register.fix_problems = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "fix_problems", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.Register.grid = new Lino.WindowAction({  }, function(){
  var p = { "is_main_window": true };
  p.params_panel = new Lino.users.Users.ParamsPanel({});
  return new Lino.users.Register.GridPanel(p);
});
Lino.users.Register.ins_company = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "ins_company", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.Register.ins_household = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "ins_household", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.Register.ins_partner = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "ins_partner", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.Register.ins_person = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "ins_person", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.Register.ins_user = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "ins_user", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.Register.sign_out = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "sign_out", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.Register.update_widgets = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "update_widgets", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.Register.validate = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "validate", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.Register.wf1 = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "wf1", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.Register.wf2 = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "wf2", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};
Lino.users.Register.wf3 = function(rp, is_main, pk, params) { 
  var h = function() { 
    Lino.run_row_action(rp, is_main, "/users/Register", "GET", pk, "wf3", params, null);
  };
  var panel = Ext.getCmp(rp);
  if(panel) panel.do_when_clean(true, h); else h();
};

Lino.about.About.showPanel = Ext.extend(Lino.about.About.DetailFormPanel,{
  empty_title: "About",
  hide_navigator: true,
  params_panel_hidden: true,
  save_action_name: "submit_detail",
  ls_bbar_actions: [  ],
  ls_url: "/about/About",
  initComponent : function() {
    this.ls_detail_handler = Lino.about.About.show;
    Lino.about.About.showPanel.superclass.initComponent.call(this);
  }
});

Lino.about.About.show = new Lino.WindowAction({ "draggable": true, "height": Lino.rows2height(20), "maximizable": true, "maximized": false, "modal": true, "width": Lino.chars2width(60) }, function(){
  var p = { "hide_top_toolbar": true, "is_main_window": true };
  return new Lino.about.About.showPanel(p);
});

Lino.about.About.showPanel = Ext.extend(Lino.about.About.DetailFormPanel,{
  empty_title: "About",
  hide_navigator: true,
  params_panel_hidden: true,
  save_action_name: "submit_detail",
  ls_bbar_actions: [  ],
  ls_url: "/about/About",
  initComponent : function() {
    this.ls_detail_handler = Lino.about.About.show;
    Lino.about.About.showPanel.superclass.initComponent.call(this);
  }
});

Lino.about.About.show = new Lino.WindowAction({ "draggable": true, "height": Lino.rows2height(20), "maximizable": true, "maximized": false, "modal": true, "width": Lino.chars2width(60) }, function(){
  var p = { "hide_top_toolbar": true, "is_main_window": true };
  return new Lino.about.About.showPanel(p);
});
