version 1.130, 2004/06/25 11:02:16
|
version 1.131, 2004/06/28 14:42:32
|
Line 2716 class ECHO_partner(Image,Persistent):
|
Line 2716 class ECHO_partner(Image,Persistent):
|
|
|
meta_type="ECHO_partner" |
meta_type="ECHO_partner" |
|
|
def __init__(self, id, title,url, file, copyrightType, person, email, country, content_type='', precondition=''): |
def __init__(self, id, title,url, file, copyrightType, person, email, country, color, content_type='', precondition=''): |
self.__name__=id |
self.__name__=id |
self.title=title |
self.title=title |
self.url=url |
self.url=url |
self.person=person |
self.person=person |
self.email=email |
self.email=email |
self.country=country |
self.country=country |
|
self.color=color |
self.precondition=precondition |
self.precondition=precondition |
self.copyrightType=copyrightType |
self.copyrightType=copyrightType |
data, size = self._read_data(file) |
data, size = self._read_data(file) |
Line 2734 class ECHO_partner(Image,Persistent):
|
Line 2735 class ECHO_partner(Image,Persistent):
|
) |
) |
|
|
|
|
def changeECHO_partner(self,url,copyrightType,person, email, country, RESPONSE=None): |
def changeECHO_partner(self,url,copyrightType,person, email, country, color, RESPONSE=None): |
"""Change main information""" |
"""Change main information""" |
self.url=url |
self.url=url |
self.person=person |
self.person=person |
self.email=email |
self.email=email |
self.country=country |
self.country=country |
|
self.color=color |
self.copyrightType=copyrightType |
self.copyrightType=copyrightType |
if RESPONSE is not None: |
if RESPONSE is not None: |
RESPONSE.redirect('manage_main') |
RESPONSE.redirect('manage_main') |
Line 2759 manage_addECHO_partnerForm=DTMLFile('dtm
|
Line 2761 manage_addECHO_partnerForm=DTMLFile('dtm
|
|
|
|
|
|
|
def manage_addECHO_partner(self, id,file,url, person, email, country, copyrightType='', title='', precondition='', content_type='', |
def manage_addECHO_partner(self, id, url, person, email, country, color, file=None, copyrightType='', title='', precondition='', content_type='', |
REQUEST=None): |
REQUEST=None): |
""" |
""" |
Add a new ECHO_partner object. |
Add a new ECHO_partner object. |
Line 2778 def manage_addECHO_partner(self, id,file
|
Line 2780 def manage_addECHO_partner(self, id,file
|
self=self.this() |
self=self.this() |
|
|
# First, we create the image without data: |
# First, we create the image without data: |
self._setObject(id, ECHO_partner(id,title,url,'',copyrightType, person, email, country, content_type, precondition)) |
self._setObject(id, ECHO_partner(id,title,url,'',copyrightType, person, email, country, color, content_type, precondition)) |
|
|
# Now we "upload" the data. By doing this in two steps, we |
# Now we "upload" the data. By doing this in two steps, we |
# can use a database trick to make the upload more efficient. |
# can use a database trick to make the upload more efficient. |