Example #1
0
 def get_namespace(self, resource, context):
     # Build namespace
     proxy = super(Contact_AddForm, self)
     namespace = proxy.get_namespace(resource, context)
     monolingual_widgets(namespace)
     namespace['existing_mission'] = context.get_query_value('mission')
     return namespace
Example #2
0
 def get_namespace(self, resource, context):
     # Build namespace
     proxy = super(Mission_EditForm, self)
     namespace = proxy.get_namespace(resource, context)
     monolingual_widgets(namespace)
     reset_comment(namespace, is_edit=self.is_edit(context))
     try:
         alert = resource.get_property('crm_m_alert')
     except ValueError:
         # New mission
         alert = context.timestamp
     namespace['icon_alert'] = get_alert_icon(alert, context)
     try:
         status = resource.get_property('crm_m_status')
     except ValueError:
         # New mission
         status = 'opportunity'
     namespace['icon_status'] = StatusIcon(status, css="nofloat")
     return namespace