Skip to content

OGo Docs

Sections
Personal tools
You are here: Home » Members » wmarques's Home » Duplicate Enterprise Address Form Fields

Duplicate Enterprise Address Form Fields

Document Actions
This procedure add a Javascript to the template to make possible duplicate fields from the billing address to shipping address, in the enterprise form.

In my experience using OpenGroupware, I see that almost every Enterprise that I add has the same values for billing address and shipping address, so I decided to make a javascript to make easy duplicate this fields.

The archives you have to edit are: SkyEnterpriseEditor.html and SkyEnterpriseAttributesEditor.html.

The archives are in /usr/local/share/opengroupware.org-1.0a/templates/Themes/YOURTHEME/EnterprisesUI/ or /usr/local/share/opengroupware.org-1.0a/templates/EnterprisesUI, if you want to modify the default theme.

Just use your favorite text editor, put the content, save and restart opengroupware, to make effective the changes.

Then log in , go to enterprises, and see that you have a brand new button, to duplicate the billing address to shipping address.

Follows SkyEnterpriseEditor.html:

<#Frame> <#Window> <#WarningMode> <#EnterpriseForm>

<#CommonCollapsible><#EnterpriseEditor/>

<#TelephoneCollapsible><#PhoneEditor/>

<#AddressCollapsible>

<#ExtendedCollapsible><#ExtendedAttrEditor/>

<#CategoryCollapsible><#CategoryEditor/>

<#CommentCollapsible><#CommentEditor/>

<#ContactCollapsible><#ContactEditor/>

<#IsOwnerLoggedInOrNewCond>

<#PrivateCollapsible> <#CompanyFlagEditor/>

<#HasAccessRightsCond> <#IsInNewModeCond> <#CreateLimitedAttr> <#CreateLimitedCheckBox/>

<#EditorButtons/>

<#AddressTypes><#AddressEditor/>

follows SkyEnterpriseAttributesEditor.html:

<#Frame> <#Window> <#EnterpriseForm>

<#CommonAttributes/> <#ExtendedAttributes/>

<#ShowCommentCond><#Comment/> <#ShowContactCond><#Contact/> <#ShowCategoryCond><#Category/>

<#Telephons/>

<#EditorButtons/>

<#AddressTypes><#Address/>

Note that you have to adjust for your language the value="Duplicar Campos", it's in Portuguese, because I'm Brazilian :-). "Duplicar Campos" means "Duplicate fields". I'll see how can I integrate it with ogo translation (TODO).

That's all, easy and simple. Now is easyer to add enterprises to my OpenGroupware, hope it help someone else. Any suggestions, e-mail-me: wmarques at vmlinuz dot com dot br

Created by wmarques
Last modified 2005-07-07 01:03 PM
 

Powered by Plone

This site conforms to the following standards: