|
Lines 331-340
def name( self ):
Link Here
|
| 331 |
return self.get( 'name', '' ) |
331 |
return self.get( 'name', '' ) |
| 332 |
|
332 |
|
| 333 |
@property |
333 |
@property |
| 334 |
def fillWidth( self ): |
|
|
| 335 |
return self.get( 'fillWidth', False ) |
| 336 |
|
| 337 |
@property |
| 338 |
def overwrite( self ): |
334 |
def overwrite( self ): |
| 339 |
return self.get( 'overwrite', None ) |
335 |
return self.get( 'overwrite', None ) |
| 340 |
|
336 |
|
|
Lines 452-458
def update_extended_attributes(lo, module, position):
Link Here
|
| 452 |
longdesc = attrs.get('univentionUDMPropertyTranslationLongDescription;entry-%s' % lang, attrs.get('univentionUDMPropertyLongDescription', ['']))[0] |
448 |
longdesc = attrs.get('univentionUDMPropertyTranslationLongDescription;entry-%s' % lang, attrs.get('univentionUDMPropertyLongDescription', ['']))[0] |
| 453 |
|
449 |
|
| 454 |
# create property |
450 |
# create property |
| 455 |
# FIXME: must add attribute to honor fullWidth (should be defined by the syntax) |
451 |
fullWidth = (attrs.get('univentionUDMPropertyLayoutFullWidth',[ '0' ])[0].upper() in [ '1', 'TRUE' ]) |
| 456 |
module.property_descriptions[pname] = univention.admin.property( |
452 |
module.property_descriptions[pname] = univention.admin.property( |
| 457 |
short_description = shortdesc, |
453 |
short_description = shortdesc, |
| 458 |
long_description = longdesc, |
454 |
long_description = longdesc, |
|
Lines 464-470
def update_extended_attributes(lo, module, position):
Link Here
|
| 464 |
dontsearch = doNotSearch, |
460 |
dontsearch = doNotSearch, |
| 465 |
identifies = 0, |
461 |
identifies = 0, |
| 466 |
default = propertyDefault, |
462 |
default = propertyDefault, |
| 467 |
editable = editable |
463 |
editable = editable, |
|
|
464 |
size = 'Two' if fullWidth else None, |
| 468 |
) |
465 |
) |
| 469 |
|
466 |
|
| 470 |
# add LDAP mapping |
467 |
# add LDAP mapping |
|
Lines 483-489
def update_extended_attributes(lo, module, position):
Link Here
|
| 483 |
overwriteProp = attrs.get( 'univentionUDMPropertyLayoutOverwritePosition', [ '' ] )[ 0 ] |
480 |
overwriteProp = attrs.get( 'univentionUDMPropertyLayoutOverwritePosition', [ '' ] )[ 0 ] |
| 484 |
if overwriteProp == '0': |
481 |
if overwriteProp == '0': |
| 485 |
overwriteProp = None |
482 |
overwriteProp = None |
| 486 |
fullWidth = ( attrs.get('univentionUDMPropertyLayoutFullWidth',[ '0' ])[0].upper() in [ '1', 'TRUE' ] ) |
|
|
| 487 |
deleteObjectClass = ( attrs.get('univentionUDMPropertyDeleteObjectClass', ['0'])[0].upper() in [ '1', 'TRUE' ] ) |
483 |
deleteObjectClass = ( attrs.get('univentionUDMPropertyDeleteObjectClass', ['0'])[0].upper() in [ '1', 'TRUE' ] ) |
| 488 |
tabAdvanced = ( attrs.get('univentionUDMPropertyLayoutTabAdvanced',[ '0' ])[0].upper() in [ '1', 'TRUE' ] ) |
484 |
tabAdvanced = ( attrs.get('univentionUDMPropertyLayoutTabAdvanced',[ '0' ])[0].upper() in [ '1', 'TRUE' ] ) |
| 489 |
|
485 |
|
|
Lines 528-534
def update_extended_attributes(lo, module, position):
Link Here
|
| 528 |
except: |
524 |
except: |
| 529 |
ud.debug(ud.ADMIN, ud.WARN, 'modules update_extended_attributes: custom field for tab %s: failed to set tabPosition' % tabname) |
525 |
ud.debug(ud.ADMIN, ud.WARN, 'modules update_extended_attributes: custom field for tab %s: failed to set tabPosition' % tabname) |
| 530 |
|
526 |
|
| 531 |
properties4tabs[ tabname ].append( EA_Layout( name = pname, tabName = tabname, position = tabPosition, advanced = tabAdvanced, overwrite = overwriteProp, fullWidth = fullWidth, groupName = groupname, groupPosition = groupPosition ) ) |
527 |
properties4tabs[ tabname ].append( EA_Layout( name = pname, tabName = tabname, position = tabPosition, advanced = tabAdvanced, overwrite = overwriteProp, groupName = groupname, groupPosition = groupPosition ) ) |
| 532 |
|
528 |
|
| 533 |
module.extended_udm_attributes.extend( [ univention.admin.extended_attribute( pname, attrs.get('univentionUDMPropertyObjectClass', [])[0], |
529 |
module.extended_udm_attributes.extend( [ univention.admin.extended_attribute( pname, attrs.get('univentionUDMPropertyObjectClass', [])[0], |
| 534 |
attrs['univentionUDMPropertyLdapMapping'][0], deleteObjectClass, |
530 |
attrs['univentionUDMPropertyLdapMapping'][0], deleteObjectClass, |