// bind template to class Frame: LSWSkyrixFrame {} Window: LSWWindowFrame { title = labels.personeditor_title; onClose = cancel; } Calendar: SkyCalendarScript {} PersonForm: WOForm { name = "personEditor"; enctype = "multipart/form-data"; } // TODO: replace editor with individual fields PersonEditor: LSWObjectEditor { labels = labels; object = person; attributes = ( { key = "name"; label = "lastName"; }, { key = "firstname"; label = "firstName"; }, { key = "middlename"; label = "middlename"; }, { key = "nickname"; label = "nickname"; }, { key = "degree"; label = "degree"; }, { key = "salutation"; label = "salutation"; isLocalized = YES; valueKeys = ( "01_dear_ms", "02_dear_mrs", "03_dear_mr", "04_dear_prof", "05_dear_dr", "06_geehrt_herr", "07_geehrt_frau", "08_geehrt_herr_prof", "09_geehrt_herr_dr", "10_geehrt_frau_prof", "11_geehrt_frau_dr", "12_monsieur", "13_madame", "14_signora", "15_signore" ); }, { key = "sex"; label = "sex"; isLocalized = YES; valueKeys = ( "female", "male", "undefined" ); }, { key = "url"; label = "url"; nilString = "http://" }, { key = "birthday"; label = "birthday"; calendarFormat = "%Y-%m-%d"; couldNotFormat = "couldNotFormatBirthday"; },); } AddressTypes: WOTable { list = person.addressTypes; item = addressType; maxColumns = session.userDefaults.company_editor_address_columns; width = "100%"; } AddressEditor: SkyAddressSubEditor { document = addressDocument; } PhoneEditor: SkyPhoneSubEditor { document = person; } ExtendedAttrEditor: SkyExtendedAttrsSubEditor { document = person; } CategoryEditor: SkyCategorySubEditor { document = person; } CommentEditor: SkyCommentSubEditor { document = person; } ContactEditor: SkyContactSubEditor { document = person; } CompanyFlagEditor: SkyCompanyFlagSubEditor { document = person; } EditorButtons: SkyEditorButtons { isDeleteEnabled = isDeleteEnabled; //saveLabel = "save"; //cancelLabel = "cancel"; } WarningMode: SkyWarningMode { onOk = warningOkAction; phrase = warningPhrase; isInWarningMode = isInWarningMode; } LoginCollapsible: SkyCollapsibleContent { visibilityDefault = "person_editor_loginVisibility"; submitActionName = ""; title = "Login"; // labels.commonAttributes; } CommonCollapsible: SkyCollapsibleContent { visibilityDefault = "person_editor_commonVisibility"; submitActionName = ""; title = labels.commonAttributes; } ExtendedCollapsible: SkyCollapsibleContent { visibilityDefault = "person_editor_extendedVisibility"; submitActionName = ""; title = labels.extendedAttributes; } CommentCollapsible: SkyCollapsibleContent { visibilityDefault = "person_editor_commentVisibility"; submitActionName = ""; title = labels.comment; } PictureCollapsible: SkyCollapsibleContent { visibilityDefault = "person_editor_pictureVisibility"; submitActionName = ""; title = labels.picture; } ContactCollapsible: SkyCollapsibleContent { visibilityDefault = "person_editor_contactVisibility"; submitActionName = ""; title = labels.contact; } CategoryCollapsible: SkyCollapsibleContent { visibilityDefault = "person_editor_categoryVisibility"; submitActionName = ""; title = labels.categories; } PrivateCollapsible: SkyCollapsibleContent { visibilityDefault = "person_editor_privateVisibility"; submitActionName = ""; title = labels.privateAttributes; } AddressCollapsible: SkyCollapsibleContent { visibilityDefault = "person_editor_addressVisibility"; submitActionName = ""; title = labels.addresses; } TelephoneCollapsible: SkyCollapsibleContent { visibilityDefault = "person_editor_telephoneVisibility"; submitActionName = ""; title = labels.telephones; } AttributeCell: SkyAttributeCell {} ValueCell: SkyValueCell { alignTop = YES; } Font: SkyConfigFont {} EditFont: SkyConfigEditFont {} PictureUploadLabel: WOString { value = labels.pictureUpload; } PictureUpload: WOFileUpload { data = data; filePath = filePath; size = "40"; } IsOwnerLoggedInOrNewCond: WOConditional { condition = isOwnerLoggedInOrNew; } IsNotInNewMode: WOConditional { condition = isInNewMode; negate = YES; } DeleteImageCond: WOConditional { condition = hasImage; } DeleteImageLabel: WOString { value = labels.deleteImage; escapeHTML = NO; } DeleteImageCheckBox: WOCheckBox { checked = deleteImage; } HasAccessRightsCond: WOConditional { condition = isAccessRightEnabled; } IsInNewModeCond: WOConditional { condition = isInNewMode; } CreateLimitedAttr: SkyAttribute { label = labels.createWithAccessOnlyForMe; } CreateLimitedCheckBox: WOCheckBox { checked = limitAccessToCreator; } /* Login SubEditor (only Root) */ LoginLabel: WOString { value = labels.login; } LoginStatusLabel: WOString { value = labels.loginStatus; } LoginTF: WOTextField { value = person.login; size = "20"; } LoginStatus: WOCheckBox { checked = person.isAccount; } // TODO: should not check directly for 10000 IsRootCondElse: WOConditional { condition = person.companyId.intValue; value = 10000; negate = YES; } IsRootLoggedIn: WOConditional { condition = session.activeAccountIsRoot; } DefaultAction: WOImageButton { action = doNothing; filename = "invisible_space_1.gif"; border = "0"; }