def html(self): html_str = '<div id="{id}" class="{class_str}">{children}</div>'.format( id=self.controlID, class_str=pascal_to_underscore(self.tag), children=self.children_html, ) return html_str
def html(self): html_str = '<div id="{id}" class="{class_str}"><label><select name="{id}"{disabled}>{children}</select></label></div>'.format( id=self.controlID, class_str=pascal_to_underscore(self.tag), disabled=' disabled=""' if 'disabled' in getattr(self, 'state', '').lower() else '', children=''.join(self.options), ) return html_str
def html(self): html_str = '<div id="{id}" class="{class_str}"><label><input type="radio" name="{name}" value="{value}"{checked}{disabled}/> {display_val}</label></div>'.format( id=self.controlID, class_str=pascal_to_underscore(self.tag), name=self.name if hasattr(self, 'name') else self.controlID, display_val=self.display_val if hasattr(self, 'display_val') else self.REst_repl_text, value=self.unescaped_text, checked=' checked=""' if 'selected' in self.state.lower() else '', disabled=' disabled=""' if 'disabled' in self.state.lower() else '', ) return html_str
def html(self): container_str = '<div class="vert_tabbed {position}">{children}</div>'.format( id=self.controlID, position=self.position, children=self.children_html, ) tabs_str = '<ul class="vert_tab_container {position}">{tabs}</ul>'.format( id=self.controlID, position=self.position, tabs=''.join(self.tabs), ) html_str = '<div id="{id}" class="{class_str}">{children}<div class="clear"></div></div>'.format( id=self.controlID, class_str=pascal_to_underscore(self.tag), children=container_str + tabs_str, ) return html_str
def html(self): tabs_str = '<ul class="tab_container {position}">{tabs}</ul>'.format( id=self.controlID, position=self.position, tabs=''.join(self.tabs), ) container_str = '<div class="tabbed">{children}</div>'.format( id=self.controlID, children=self.children_html, ) tabs_and_container = tabs_str + container_str if self.position == "top" else container_str + tabs_str html_str = '<div id="{id}" class="{class_str}">{children}</div>'.format( id=self.controlID, class_str=pascal_to_underscore(self.tag), children=tabs_and_container, ) return html_str