mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-01 16:39:46 +00:00
(feat) added custom fields support from Thunderbird's address book
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (C) 2004-2005 SKYRIX Software AG
|
||||
Copyright (C) 2005-2015 Inverse inc.
|
||||
Copyright (C) 2005-2017 Inverse inc.
|
||||
|
||||
This file is part of SOGo
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (C) 2004 SKYRIX Software AG
|
||||
Copyright (C) 2005-2015 Inverse inc.
|
||||
Copyright (C) 2005-2017 Inverse inc.
|
||||
|
||||
This file is part of SOGo.
|
||||
|
||||
@@ -573,11 +573,55 @@
|
||||
return [self _urlOfType: @"work"];
|
||||
}
|
||||
|
||||
- (NSString *) custom1
|
||||
{
|
||||
NSString *value;
|
||||
|
||||
value = [[card uniqueChildWithTag: @"custom1"] flattenedValuesForKey: @""];
|
||||
value = [value stringByEscapingHTMLString];
|
||||
|
||||
return [self _cardStringWithLabel: @"Custom 1" value: value];
|
||||
}
|
||||
|
||||
- (NSString *) custom2
|
||||
{
|
||||
NSString *value;
|
||||
|
||||
value = [[card uniqueChildWithTag: @"custom2"] flattenedValuesForKey: @""];
|
||||
value = [value stringByEscapingHTMLString];
|
||||
|
||||
return [self _cardStringWithLabel: @"Custom 2" value: value];
|
||||
}
|
||||
|
||||
- (NSString *) custom3
|
||||
{
|
||||
NSString *value;
|
||||
|
||||
value = [[card uniqueChildWithTag: @"custom3"] flattenedValuesForKey: @""];
|
||||
value = [value stringByEscapingHTMLString];
|
||||
|
||||
return [self _cardStringWithLabel: @"Custom 3" value: value];
|
||||
}
|
||||
|
||||
- (NSString *) custom4
|
||||
{
|
||||
NSString *value;
|
||||
|
||||
value = [[card uniqueChildWithTag: @"custom4"] flattenedValuesForKey: @""];
|
||||
value = [value stringByEscapingHTMLString];
|
||||
|
||||
return [self _cardStringWithLabel: @"Custom 4" value: value];
|
||||
}
|
||||
|
||||
- (BOOL) hasOtherInfos
|
||||
{
|
||||
return ([[card note] length] > 0
|
||||
|| [[card bday] length] > 0
|
||||
|| [[card tz] length] > 0);
|
||||
|| [[card tz] length] > 0
|
||||
|| [[[card uniqueChildWithTag: @"custom1"] flattenedValuesForKey: @""] length] > 0
|
||||
|| [[[card uniqueChildWithTag: @"custom1"] flattenedValuesForKey: @""] length] > 0
|
||||
|| [[[card uniqueChildWithTag: @"custom1"] flattenedValuesForKey: @""] length] > 0
|
||||
|| [[[card uniqueChildWithTag: @"custom1"] flattenedValuesForKey: @""] length] > 0);
|
||||
}
|
||||
|
||||
- (NSString *) bday
|
||||
|
||||
@@ -377,6 +377,42 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label><var:string label:value="Custom 1"
|
||||
/>
|
||||
<input type="text" class="textField" name="custom1"
|
||||
id="nsaimid" var:value="ldifRecord.custom1"
|
||||
/></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label><var:string label:value="Custom 2"
|
||||
/>
|
||||
<input type="text" class="textField" name="custom2"
|
||||
id="nsaimid" var:value="ldifRecord.custom2"
|
||||
/></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label><var:string label:value="Custom 3"
|
||||
/>
|
||||
<input type="text" class="textField" name="custom3"
|
||||
id="nsaimid" var:value="ldifRecord.custom3"
|
||||
/></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label><var:string label:value="Custom 4"
|
||||
/>
|
||||
<input type="text" class="textField" name="custom4"
|
||||
id="nsaimid" var:value="ldifRecord.custom4"
|
||||
/></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label><var:string label:value="Note" /></label>
|
||||
|
||||
@@ -48,6 +48,10 @@
|
||||
<dl class="dl-horizontal">
|
||||
<var:string value="bday" escapeHTML="NO"
|
||||
/><var:string value="tz" escapeHTML="NO"
|
||||
/><var:string value="custom1" escapeHTML="NO"
|
||||
/><var:string value="custom2" escapeHTML="NO"
|
||||
/><var:string value="custom3" escapeHTML="NO"
|
||||
/><var:string value="custom4" escapeHTML="NO"
|
||||
/><var:string value="note" escapeHTML="NO"
|
||||
/>
|
||||
</dl>
|
||||
|
||||
Reference in New Issue
Block a user