def create_form(self): form = widgets.form.Form() form.set_title('Category') form.add_field(widgets.field.Textbox('name')) form.add_field(widgets.field.Textarea('description')) form.add_field(widgets.field.Combobox('manager_id', choices=user_components.UserStore(self.get_container()).populate_combobox())) form.add_field(widgets.field.List('responsibilities', { 'user_id': widgets.field.Combobox('user_id', choices=user_components.UserStore(self.get_container()).populate_combobox()), 'description': widgets.field.Textarea('description'), })) form.add_field(widgets.field.List('stages', { 'board_stage_id': widgets.field.Combobox('stage_id', choices=board_stage_components.BoardStageStore(self.get_container()).populate_combobox(self.params['board_id'])), 'manager_id': widgets.field.Combobox('user_id', choices=user_components.UserStore(self.get_container()).populate_combobox()), })) form.renderer = renderers.widgets.form.HorizontalFormRenderer() form.renderer.add_section('Category information') form.renderer.add_field('name', 'Name') form.renderer.add_field('description', 'Description', rows=5) form.renderer.add_field('manager_id', 'Manager') form.renderer.add_field('responsibilities', 'Responsibilities', columns=[ {'id': 'user_id', 'label': 'User', 'width': '20%'}, {'id': 'description', 'label': 'Description', 'width': '65%'}, ]) form.renderer.add_field('stages', 'Stages', columns=[ {'id': 'manager_id', 'label': 'User', 'width': '20%'}, {'id': 'board_stage_id', 'label': 'Stage', 'width': '65%'}, ]) form.renderer.set_field_renderer('textbox', renderers.widgets.field.TextboxRenderer()) form.renderer.set_field_renderer('textarea', renderers.widgets.field.TextareaRenderer()) form.renderer.set_field_renderer('combobox', renderers.widgets.field.ComboboxRenderer()) form.renderer.set_field_renderer('multiple_choice', renderers.widgets.field.MultipleChoiceRenderer()) form.renderer.set_field_renderer('list', renderers.widgets.field.ListRenderer()) return form
def create_form(self): form = widgets.form.Form() form.set_title('Goal') form.add_field(widgets.field.Textbox('name')) form.add_field(widgets.field.Textarea('description')) form.add_field(widgets.field.Combobox('status', choices=constants.BOARD_GOAL_STATUS)) form.add_field(widgets.field.Combobox('user_id', choices=user_components.UserStore(self.get_container()).populate_combobox())) form.add_field(widgets.field.List('objectives', { 'description': widgets.field.Textarea('description'), 'result': widgets.field.Combobox('result', choices=constants.OBJECTIVE_RESULTS), 'note': widgets.field.Textarea('note') })) form.renderer = renderers.widgets.form.HorizontalFormRenderer() form.renderer.add_section('Goal information') form.renderer.add_field('name', 'Name') form.renderer.add_field('user_id', 'User') form.renderer.add_field('description', 'Description', rows=5) form.renderer.add_field('status', 'Status') form.renderer.add_field('objectives', 'Objectives', columns=[ {'id': 'description', 'label': 'Description', 'width': '40%'}, {'id': 'result', 'label': 'Result', 'width': '20%'}, {'id': 'note', 'label': 'Note', 'width': '40%'}, ]) form.renderer.set_field_renderer('textbox', renderers.widgets.field.TextboxRenderer()) form.renderer.set_field_renderer('textarea', renderers.widgets.field.TextareaRenderer()) form.renderer.set_field_renderer('combobox', renderers.widgets.field.ComboboxRenderer()) form.renderer.set_field_renderer('multiple_choice', renderers.widgets.field.MultipleChoiceRenderer()) form.renderer.set_field_renderer('list', renderers.widgets.field.ListRenderer()) return form
def create_form(self): form = widgets.form.Form() form.set_title('User monthly performance') form.add_field( widgets.field.Combobox('user_id', choices=user_components.UserStore( self.container).populate_combobox())) form.add_field(widgets.field.Textbox('month')) form.add_field(widgets.field.Textbox('year')) form.add_field(widgets.field.Textbox('L')) form.add_field(widgets.field.Textbox('B')) form.add_field(widgets.field.Textbox('R')) form.add_field(widgets.field.Textbox('notes')) form.add_field(widgets.field.Textarea('summary')) form.renderer = renderers.widgets.form.HorizontalFormRenderer() form.renderer.add_section('User monthly performance') form.renderer.add_field('user_id', 'User') form.renderer.add_field('year', 'Year') form.renderer.add_field('month', 'Month') form.renderer.add_field('L', 'Workload') form.renderer.add_field('B', 'Behavior') form.renderer.add_field('R', 'Work Result') form.renderer.add_field('notes', 'Notes') form.renderer.add_field('summary', 'Summary', rows=10) form.renderer.set_field_renderer( 'textbox', renderers.widgets.field.TextboxRenderer()) form.renderer.set_field_renderer( 'textarea', renderers.widgets.field.TextareaRenderer()) form.renderer.set_field_renderer( 'combobox', renderers.widgets.field.ComboboxRenderer()) return form
def create_form(self): form = widgets.form.Form() form.set_title('Board') form.add_field(widgets.field.Textbox('name')) form.add_field(widgets.field.Textarea('description')) form.add_field(widgets.field.DatePicker('start_date')) form.add_field(widgets.field.DatePicker('end_date')) form.add_field(widgets.field.Combobox('status', choices=constants.BOARD_STATUS)) form.add_field(widgets.field.MultipleChoice('users', choices=user_components.UserStore(self.get_container()).populate_combobox())) form.add_field(widgets.field.Checkbox('is_template')) form.renderer = renderers.widgets.form.HorizontalFormRenderer() form.renderer.add_section('Board information') form.renderer.add_field('name', 'Name') form.renderer.add_field('description', 'Description', rows=5) form.renderer.add_field('start_date', 'Start date') form.renderer.add_field('end_date', 'End date') form.renderer.add_field('status', 'Status') form.renderer.add_field('users', 'Users') form.renderer.add_field('is_template', 'Is Template') ## Board Responsibility form.add_field(widgets.field.List('board_responsibility', { 'id': widgets.field.Textbox('id'), 'manager': widgets.field.Combobox('manager', choices=user_components.UserStore(self.get_container()).populate_combobox()), 'description': widgets.field.Textbox('description') })) form.renderer.add_section('Board - Responsibility') form.renderer.add_field('board_responsibility', '', columns=[ {'id': 'manager', 'label': 'Manager', 'width': '10%'}, {'id': 'description', 'label': 'Description', 'width': '70%'} ]) form.renderer.set_field_renderer('date_picker', renderers.widgets.field.DatePickerRenderer()) form.renderer.set_field_renderer('textbox', renderers.widgets.field.TextboxRenderer()) form.renderer.set_field_renderer('textarea', renderers.widgets.field.TextareaRenderer()) form.renderer.set_field_renderer('combobox', renderers.widgets.field.ComboboxRenderer()) form.renderer.set_field_renderer('checkbox', renderers.widgets.field.CheckboxRenderer()) form.renderer.set_field_renderer('multiple_choice', renderers.widgets.field.MultipleChoiceRenderer()) form.renderer.set_field_renderer('list', renderers.widgets.field.ListRenderer()) return form
def create_form(self): form = widgets.form.Form() form.set_title('Task') form.add_field( widgets.field.Combobox( 'board_category_id', choices=board_category_components.BoardCategoryStore( self.get_container()).populate_combobox( self.params['board_id']))) form.add_field(widgets.field.Textbox('name')) form.add_field(widgets.field.Textarea('description')) form.add_field( widgets.field.Combobox( 'manager_id', choices=user_components.UserStore( self.get_container()).populate_combobox())) form.add_field( widgets.field.Combobox( 'board_stage_id', choices=board_stage_components.BoardStageStore( self.get_container()).populate_combobox( self.params['board_id']))) form.renderer = renderers.widgets.form.HorizontalFormRenderer() form.renderer.add_section('Task information') form.renderer.add_field('board_category_id', 'Category') form.renderer.add_field('name', 'Name') form.renderer.add_field('description', 'Description', rows=5) form.renderer.add_field('manager_id', 'Manager') form.renderer.add_field('board_stage_id', 'Stage') form.renderer.set_field_renderer( 'textbox', renderers.widgets.field.TextboxRenderer()) form.renderer.set_field_renderer( 'textarea', renderers.widgets.field.TextareaRenderer()) form.renderer.set_field_renderer( 'combobox', renderers.widgets.field.ComboboxRenderer()) form.renderer.set_field_renderer( 'multiple_choice', renderers.widgets.field.MultipleChoiceRenderer()) form.renderer.set_field_renderer( 'list', renderers.widgets.field.ListRenderer()) return form
def create_form(self): form = widgets.form.Form() form.set_title('Stage') form.add_field(widgets.field.Textbox('name')) form.add_field(widgets.field.Textarea('description')) form.add_field(widgets.field.Textbox('sort_order')) form.add_field(widgets.field.Textbox('text_color')) form.add_field(widgets.field.Textbox('bg_color')) form.add_field(widgets.field.Textbox('result_code')) form.add_field( widgets.field.Combobox( 'manager_id', blank=True, choices=user_components.UserStore( self.get_container()).populate_combobox())) form.add_field( widgets.field.List( 'responsibilities', { 'user_id': widgets.field.Combobox( 'user_id', choices=user_components.UserStore( self.get_container()).populate_combobox()), 'description': widgets.field.Textarea('description'), })) form.renderer = renderers.widgets.form.HorizontalFormRenderer() form.renderer.add_section('Stage information') form.renderer.add_field('name', 'Name') form.renderer.add_field('description', 'Description', rows=5) form.renderer.add_field('sort_order', 'Order') form.renderer.add_field('bg_color', 'Background color') form.renderer.add_field('text_color', 'Text color') form.renderer.add_field('result_code', 'Result Code') form.renderer.add_field('manager_id', 'Manager') form.renderer.add_field('responsibilities', 'Responsibilities', columns=[ { 'id': 'user_id', 'label': 'User', 'width': '20%' }, { 'id': 'description', 'label': 'Description', 'width': '65%' }, ]) form.renderer.set_field_renderer( 'textbox', renderers.widgets.field.TextboxRenderer()) form.renderer.set_field_renderer( 'texteditor', renderers.widgets.field.TexteditorRenderer()) form.renderer.set_field_renderer( 'color_picker', renderers.widgets.field.ColorPickerRenderer()) form.renderer.set_field_renderer( 'textarea', renderers.widgets.field.TextareaRenderer()) form.renderer.set_field_renderer( 'combobox', renderers.widgets.field.ComboboxRenderer()) form.renderer.set_field_renderer( 'multiple_choice', renderers.widgets.field.MultipleChoiceRenderer()) form.renderer.set_field_renderer( 'list', renderers.widgets.field.ListRenderer()) return form