Changeset b0c70b3 in github


Ignore:
Timestamp:
Jun 3, 2011 6:37:47 PM (2 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
9382b6d
Parents:
62e2254
Message:

Use address_template config when adding a new address block (#1487944)

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    re9a9f2f6 rb0c70b3  
    22=========================== 
    33 
     4- Use 'address_template' config option when adding a new address block (#1487944) 
    45- Added addressbook advanced search 
    56- Add popup with basic fields selection for addressbook search 
  • program/js/app.js

    re9a9f2f6 rb0c70b3  
    41104110        } 
    41114111        else if (colprop.type == 'composite') { 
    4112           var childcol, cp, first; 
    4113           for (childcol in colprop.childs) { 
     4112          var childcol, cp, first, templ, cols = [], suffices = []; 
     4113          // read template for composite field order 
     4114          if ((templ = this.env[col+'_template'])) { 
     4115            for (var j=0; j < templ.length; j++) { 
     4116              cols.push(templ[j][1]); 
     4117              suffices.push(templ[j][2]); 
     4118            } 
     4119          } 
     4120          else {  // list fields according to appearance in colprop 
     4121            for (childcol in colprop.childs) 
     4122              cols.push(childcol); 
     4123          } 
     4124           
     4125          for (var i=0; i < cols.length; i++) { 
     4126            childcol = cols[i]; 
    41144127            cp = colprop.childs[childcol]; 
    41154128            input = $('<input>') 
    41164129              .addClass('ff_'+childcol) 
    4117               .attr({type: 'text', name: '_'+childcol+name_suffix, size: cp.size}) 
     4130              .attr({ type: 'text', name: '_'+childcol+name_suffix, size: cp.size }) 
    41184131              .appendTo(cell); 
    4119             cell.append(" "); 
     4132            cell.append(suffices[i] || " "); 
    41204133            this.init_edit_field(childcol, input); 
    41214134            if (!first) first = input; 
  • program/steps/addressbook/edit.inc

    r3d8b54e rb0c70b3  
    9191    // add some labels to client 
    9292    $RCMAIL->output->add_label('noemailwarning', 'nonamewarning'); 
     93     
     94    // copy (parsed) address template to client 
     95    if (preg_match_all('/\{([a-z0-9]+)\}([^{]*)/i', $RCMAIL->config->get('address_template', ''), $templ, PREG_SET_ORDER)) 
     96      $RCMAIL->output->set_env('address_template', $templ); 
    9397 
    9498    $i_size = !empty($attrib['size']) ? $attrib['size'] : 40; 
Note: See TracChangeset for help on using the changeset viewer.