equal
deleted
inserted
replaced
1038 self.icon = None |
1038 self.icon = None |
1039 self.name = name |
1039 self.name = name |
1040 self.value = '' |
1040 self.value = '' |
1041 self.onclick = onclick |
1041 self.onclick = onclick |
1042 self.cwaction = cwaction |
1042 self.cwaction = cwaction |
1043 self.attrs.setdefault('class', self.css_class) |
|
1044 |
1043 |
1045 def render(self, form, field=None, renderer=None): |
1044 def render(self, form, field=None, renderer=None): |
1046 label = form._cw._(self.label) |
1045 label = form._cw._(self.label) |
1047 attrs = self.attrs.copy() |
1046 attrs = self.attrs.copy() |
|
1047 attrs.setdefault('class', self.css_class) |
1048 if self.cwaction: |
1048 if self.cwaction: |
1049 assert self.onclick is None |
1049 assert self.onclick is None |
1050 attrs['onclick'] = "postForm('__action_%s', \'%s\', \'%s\')" % ( |
1050 attrs['onclick'] = "postForm('__action_%s', \'%s\', \'%s\')" % ( |
1051 self.cwaction, self.label, form.domid) |
1051 self.cwaction, self.label, form.domid) |
1052 elif self.onclick: |
1052 elif self.onclick: |