Skip to content

Instantly share code, notes, and snippets.

@ivanteoh
Created October 8, 2013 05:10
Show Gist options
  • Save ivanteoh/6879764 to your computer and use it in GitHub Desktop.
Save ivanteoh/6879764 to your computer and use it in GitHub Desktop.
Calender widget does not save time zone value
<plominodatabase id="adb">
<design>
<dbsettings version="1.16">
<AboutDescription type="Products.Archetypes.Field.TextField"><![CDATA[]]></AboutDescription>
<UsingDescription type="Products.Archetypes.Field.TextField"><![CDATA[]]></UsingDescription>
<IndexAttachments type="Products.Archetypes.Field.BooleanField">False</IndexAttachments>
<FulltextIndex type="Products.Archetypes.Field.BooleanField">True</FulltextIndex>
<IndexInPortal type="Products.Archetypes.Field.BooleanField">False</IndexInPortal>
<debugMode type="Products.Archetypes.Field.BooleanField">False</debugMode>
<CountDocuments type="Products.Archetypes.Field.BooleanField">False</CountDocuments>
<DateTimeFormat type="Products.Archetypes.Field.StringField">%Y-%m-%d</DateTimeFormat>
<StartPage type="Products.Archetypes.Field.StringField"/>
<i18n type="Products.Archetypes.Field.StringField"/>
<DoNotListUsers type="Products.Archetypes.Field.BooleanField">False</DoNotListUsers>
<DoNotReindex type="Products.Archetypes.Field.BooleanField">False</DoNotReindex>
<excludeFromNav type="Products.Archetypes.Field.BooleanField">False</excludeFromNav>
<acl AnomynousAccessRight="NoAccess" AuthenticatedAccessRight="NoAccess">
<params id="UserRoles">
<param>
<value><struct>
</struct></value>
</param>
</params>
<params id="SpecificRights">
<param>
<value><struct>
<member>
<name>specific_deletedocument</name>
<value><string>PlominoAuthor</string></value>
</member>
</struct></value>
</param>
</params>
</acl>
</dbsettings>
<element id="frmDemo" title="Demo" type="PlominoForm">
<id type="Products.Archetypes.Field.StringField">frmDemo</id>
<onCreateDocument type="Products.Archetypes.Field.TextField"><![CDATA[]]></onCreateDocument>
<onOpenDocument type="Products.Archetypes.Field.TextField"><![CDATA[]]></onOpenDocument>
<beforeSaveDocument type="Products.Archetypes.Field.TextField"><![CDATA[]]></beforeSaveDocument>
<onSaveDocument type="Products.Archetypes.Field.TextField"><![CDATA[]]></onSaveDocument>
<onDeleteDocument type="Products.Archetypes.Field.TextField"><![CDATA[]]></onDeleteDocument>
<onSearch type="Products.Archetypes.Field.TextField"><![CDATA[]]></onSearch>
<beforeCreateDocument type="Products.Archetypes.Field.TextField"><![CDATA[]]></beforeCreateDocument>
<FormLayout type="Products.Archetypes.Field.TextField"><![CDATA[
<p>Date: <span class="plominoFieldClass">today_date</span></p>
<p>Last modified date: <span class="plominoFieldClass">title_text</span></p>
]]></FormLayout>
<FormMethod type="Products.Archetypes.Field.TextField"><![CDATA[Auto]]></FormMethod>
<DocumentTitle type="Products.Archetypes.Field.TextField"><![CDATA[]]></DocumentTitle>
<DynamicDocumentTitle type="Products.Archetypes.Field.BooleanField">False</DynamicDocumentTitle>
<StoreDynamicDocumentTitle type="Products.Archetypes.Field.BooleanField">False</StoreDynamicDocumentTitle>
<DocumentId type="Products.Archetypes.Field.TextField"><![CDATA[]]></DocumentId>
<ActionBarPosition type="Products.Archetypes.Field.StringField">TOP</ActionBarPosition>
<HideDefaultActions type="Products.Archetypes.Field.BooleanField">False</HideDefaultActions>
<HideInMenu type="Products.Archetypes.Field.BooleanField">False</HideInMenu>
<isSearchForm type="Products.Archetypes.Field.BooleanField">False</isSearchForm>
<isPage type="Products.Archetypes.Field.BooleanField">False</isPage>
<SearchView type="Products.Archetypes.Field.StringField"/>
<SearchFormula type="Products.Archetypes.Field.TextField"><![CDATA[]]></SearchFormula>
<Position type="Products.Archetypes.Field.IntegerField"/>
<excludeFromNav type="Products.Archetypes.Field.BooleanField">False</excludeFromNav>
<elements>
<element id="title_text" title="title_text" type="PlominoField">
<id type="Products.Archetypes.Field.StringField">title_text</id>
<FieldType type="Products.Archetypes.Field.StringField">TEXT</FieldType>
<FieldMode type="Products.Archetypes.Field.StringField">DISPLAY</FieldMode>
<Formula type="Products.Archetypes.Field.TextField"><![CDATA[if not isDocument(plominoDocument):
return ''
if plominoDocument.isNewDocument() or plominoDocument.isEditMode():
return ''
property_history_date = ''
last_modified_date = plominoDocument.getLastModified()
if last_modified_date:
property_history_date = DateToString(last_modified_date, format='%d %B %Y %I:%M %p')
return property_history_date]]></Formula>
<FieldReadTemplate type="Products.Archetypes.Field.StringField"/>
<FieldEditTemplate type="Products.Archetypes.Field.StringField"/>
<Mandatory type="Products.Archetypes.Field.BooleanField">False</Mandatory>
<ValidationFormula type="Products.Archetypes.Field.TextField"><![CDATA[]]></ValidationFormula>
<ToBeIndexed type="Products.Archetypes.Field.BooleanField">False</ToBeIndexed>
<IndexType type="Products.Archetypes.Field.StringField">DEFAULT</IndexType>
</element>
<element id="today_date" title="today_date" type="PlominoField">
<id type="Products.Archetypes.Field.StringField">today_date</id>
<FieldType type="Products.Archetypes.Field.StringField">DATETIME</FieldType>
<FieldMode type="Products.Archetypes.Field.StringField">EDITABLE</FieldMode>
<Formula type="Products.Archetypes.Field.TextField"><![CDATA[return Now()]]></Formula>
<FieldReadTemplate type="Products.Archetypes.Field.StringField"/>
<FieldEditTemplate type="Products.Archetypes.Field.StringField"/>
<Mandatory type="Products.Archetypes.Field.BooleanField">False</Mandatory>
<ValidationFormula type="Products.Archetypes.Field.TextField"><![CDATA[]]></ValidationFormula>
<ToBeIndexed type="Products.Archetypes.Field.BooleanField">False</ToBeIndexed>
<IndexType type="Products.Archetypes.Field.StringField">DEFAULT</IndexType>
<params>
<param>
<value><struct>
<member>
<name>format</name>
<value><string>%d %B %Y %I:%M %p</string></value>
</member>
</struct></value>
</param>
</params>
</element>
</elements>
</element>
</design>
</plominodatabase>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment