Ejemplo n.º 1
0
    def get_display(self):
        outer_div = DivWdg()
        outer_div.add_class('new-work-order-entry-form')

        page_label = "Work Order for {0}".format(self.title_order)
        outer_div.add(page_label)

        process_input = TextInputWdg()
        process_input.set_name('process')

        outer_div.add(get_label_widget('Process'))
        outer_div.add(process_input)

        instructions_input = TextAreaInputWdg()
        instructions_input.set_name('instructions')

        outer_div.add(get_label_widget('Instructions'))
        outer_div.add(instructions_input)

        description_input = TextAreaInputWdg()
        description_input.set_name('description')

        outer_div.add(get_label_widget('Description (Optional)'))
        outer_div.add(description_input)

        submit_button = SubmitWdg('Submit')
        submit_button.add_behavior(self.submit_button_behavior())

        outer_div.add(submit_button)

        return outer_div
    def get_display(self):
        # Set up the outer <div> to hold all the form elements
        outer_div = DivWdg()
        outer_div.add_class('new-order-entry-form')
        outer_div.set_id('new-order-entry-form')

        # Set up the <input> widget for 'name'
        outer_div.add(HtmlElement.label('Name'))
        name_input = TextInputWdg(name='name')
        outer_div.add(name_input)

        # Set up the <input> widget for 'po_number'
        outer_div.add(HtmlElement.label('PO Number'))
        po_number_input = TextInputWdg()
        po_number_input.set_name('po_number')
        outer_div.add(po_number_input)

        # Set up the <select> widget and it's options for 'client'
        outer_div.add(HtmlElement.label('Client'))
        client_select_wdg = get_select_widget_from_search_type(
            'twog/client', 'client', 'name', 'code')
        outer_div.add(client_select_wdg)

        # Set up the Save button
        save_button = SubmitWdg('Save')
        save_button.add_behavior(self.save_button_behavior())
        outer_div.add(save_button)

        # Set up the Save and Add button
        save_and_add_button = SubmitWdg('Save and Add')
        save_and_add_button.add_behavior(self.save_and_add_button_behavior())
        outer_div.add(save_and_add_button)

        return outer_div
    def get_display(self):
        # Set up the outer <div> to hold all the form elements
        outer_div = DivWdg()
        outer_div.add_class('new-order-entry-form')
        outer_div.set_id('new-order-entry-form')

        # Set up the <input> widget for 'name'
        outer_div.add(HtmlElement.label('Name'))
        name_input = TextInputWdg(name='name')
        outer_div.add(name_input)

        # Set up the <input> widget for 'po_number'
        outer_div.add(HtmlElement.label('PO Number'))
        po_number_input = TextInputWdg()
        po_number_input.set_name('po_number')
        outer_div.add(po_number_input)

        # Set up the <select> widget and it's options for 'client'
        outer_div.add(HtmlElement.label('Client'))
        client_select_wdg = get_select_widget_from_search_type('twog/client', 'client', 'name', 'code')
        outer_div.add(client_select_wdg)

        # Set up the Save button
        save_button = SubmitWdg('Save')
        save_button.add_behavior(self.save_button_behavior())
        outer_div.add(save_button)

        # Set up the Save and Add button
        save_and_add_button = SubmitWdg('Save and Add')
        save_and_add_button.add_behavior(self.save_and_add_button_behavior())
        outer_div.add(save_and_add_button)

        return outer_div
Ejemplo n.º 4
0
    def get_display(self):
        outer_div = DivWdg()
        outer_div.add_class('new-title-entry-form')

        title_name_input = TextInputWdg()
        title_name_input.set_name('name')

        outer_div.add(get_label_widget('Name'))
        outer_div.add(title_name_input)

        episode_input = TextInputWdg()
        episode_input.set_name('episode')

        outer_div.add(get_label_widget('Episode'))
        outer_div.add(episode_input)

        description_input = TextAreaInputWdg()
        description_input.set_name('description')

        outer_div.add(get_label_widget('Description'))
        outer_div.add(description_input)

        submit_button = SubmitWdg('Submit')
        submit_button.add_behavior(self.submit_button_behavior())

        outer_div.add(submit_button)

        return outer_div
Ejemplo n.º 5
0
    def get_display(self):
        outer_div = DivWdg()
        outer_div.add_class('new-order-entry-form')

        order_name_input = TextInputWdg()
        order_name_input.set_name('name')

        outer_div.add(get_label_widget('Name'))
        outer_div.add(order_name_input)

        po_number_input = TextInputWdg()
        po_number_input.set_name('po_number')

        outer_div.add(get_label_widget('PO Number'))
        outer_div.add(po_number_input)

        client_select_wdg = get_select_widget_from_search_type('twog/client', 'client', 'name', 'code')

        outer_div.add(get_label_widget('Client'))
        outer_div.add(client_select_wdg)

        sales_rep_select_wdg = get_select_widget_from_search_type('sthpw/login_in_group', 'Client', 'login_full_name',
                                                                  'code', [('login_group', 'sales')])

        outer_div.add(get_label_widget('Sales Rep'))
        outer_div.add(sales_rep_select_wdg)

        submit_button = SubmitWdg('Submit')
        submit_button.add_behavior(self.submit_button_behavior())

        outer_div.add(submit_button)

        return outer_div
Ejemplo n.º 6
0
    def get_text_input_wdg(self, field_name, width=200):
        textbox_wdg = TextInputWdg()
        textbox_wdg.set_id(field_name)
        textbox_wdg.set_name(field_name)
        textbox_wdg.add_style('width', '{0}px'.format(width))

        if hasattr(self, field_name):
            textbox_wdg.set_value(getattr(self, field_name))

        return textbox_wdg
Ejemplo n.º 7
0
def get_text_input_wdg(name, width=200, pretext=None):
    textbox_wdg = TextInputWdg()
    textbox_wdg.set_id(name)
    textbox_wdg.set_name(name)
    textbox_wdg.add_style('width', '{0}px'.format(width))

    if pretext:
        textbox_wdg.set_value(pretext)

    return textbox_wdg
    def get_text_input_wdg(self, field_name, width=200):
        textbox_wdg = TextInputWdg()
        textbox_wdg.set_id(field_name)
        textbox_wdg.set_name(field_name)
        textbox_wdg.add_style('width', '{0}px'.format(width))

        if hasattr(self, field_name):
            textbox_wdg.set_value(getattr(self, field_name))

        return textbox_wdg
    def get_text_input_wdg(name, width=200, line_data=None):
        textbox_wdg = TextInputWdg()
        textbox_wdg.set_id(name)
        textbox_wdg.set_name(name)
        textbox_wdg.add_style('width', '{0}px'.format(width))

        if line_data:
            textbox_wdg.set_value(line_data)

        return textbox_wdg
Ejemplo n.º 10
0
def get_text_input_wdg(name, width=200, pretext=None):
    textbox_wdg = TextInputWdg()
    textbox_wdg.set_id(name)
    textbox_wdg.set_name(name)
    textbox_wdg.add_style('width', '{0}px'.format(width))

    if pretext:
        textbox_wdg.set_value(pretext)

    return textbox_wdg
    def get_timecode_textbox(self, name, width=200, line_data=None):
        timecode_textbox = TextInputWdg()
        timecode_textbox.set_id(name)
        timecode_textbox.set_name(name)
        timecode_textbox.add_style('width', '{0}px'.format(width))

        timecode_textbox.add_behavior(get_add_colons_for_time_behavior())

        if line_data:
            timecode_textbox.set_value(line_data)

        return timecode_textbox
Ejemplo n.º 12
0
    def get_text_input_wdg(self, field_name, width=200):
        textbox_wdg = TextInputWdg()
        textbox_wdg.set_id(field_name)
        textbox_wdg.set_name(field_name)
        textbox_wdg.add_style('width', '{0}px'.format(width))

        try:
            textbox_wdg.set_value(self.prequal_eval_sobject.get(field_name))
        except AttributeError:
            pass

        return textbox_wdg
Ejemplo n.º 13
0
    def get_name_input_wdg(self, width=500):
        textbox_wdg = TextInputWdg()
        textbox_wdg.set_id('name_data')
        textbox_wdg.set_name('name_data')
        textbox_wdg.add_style('width', '{0}px'.format(width))

        try:
            textbox_wdg.set_value(self.prequal_eval_sobject.get('name'))
        except AttributeError:
            pass

        return textbox_wdg
    def get_text_input_wdg_for_audio_config(self,
                                            name,
                                            width=200,
                                            line_data=None):
        textbox_wdg = TextInputWdg()
        textbox_wdg.set_id(name)
        textbox_wdg.set_name(name)
        textbox_wdg.add_style('width', '{0}px'.format(width))

        if line_data:
            textbox_wdg.set_value(line_data)

        return textbox_wdg
Ejemplo n.º 15
0
def get_text_input_wdg(name, data, width=200, timecode=False):
    textbox_wdg = TextInputWdg()
    textbox_wdg.set_id(name)
    textbox_wdg.set_name(name)
    textbox_wdg.add_style('width', '{0}px'.format(width))

    if timecode:
        textbox_wdg.add_behavior(get_add_colons_for_time_behavior())

    if data:
        textbox_wdg.set_value(data)

    return textbox_wdg
Ejemplo n.º 16
0
def get_text_input_wdg(name, data, width=200, timecode=False):
    textbox_wdg = TextInputWdg()
    textbox_wdg.set_id(name)
    textbox_wdg.set_name(name)
    textbox_wdg.add_style('width', '{0}px'.format(width))

    if timecode:
        textbox_wdg.add_behavior(get_add_colons_for_time_behavior())

    if data:
        textbox_wdg.set_value(data)

    return textbox_wdg
Ejemplo n.º 17
0
    def get_title_input_wdg(self):
        section_span = SpanWdg()
        section_span.add_style('display', 'inline-block')

        section_span.add('Title: ')

        textbox_wdg = TextInputWdg()
        textbox_wdg.set_id('title_data')
        textbox_wdg.set_name('title_data')
        textbox_wdg.add_style('width', '{0}px'.format(200))

        try:
            textbox_wdg.set_value(self.prequal_eval_sobject.get('title'))
        except AttributeError:
            pass

        section_span.add(textbox_wdg)

        return section_span
Ejemplo n.º 18
0
    def get_text_input_for_element_eval_line_wdg(name,
                                                 data,
                                                 is_checked,
                                                 width=200,
                                                 timecode=False):
        textbox_wdg = TextInputWdg()
        textbox_wdg.set_id(name)
        textbox_wdg.set_name(name)
        textbox_wdg.add_style('width', '{0}px'.format(width))

        if not is_checked:
            textbox_wdg.add_style('font-weight', 'bold')

        if timecode:
            textbox_wdg.add_behavior(get_add_colons_for_time_behavior())

        if data:
            textbox_wdg.set_value(data)

        return textbox_wdg
Ejemplo n.º 19
0
def get_priority_widget(outer_div):
    priority_input = TextInputWdg()
    priority_input.set_name('priority')

    outer_div.add(get_label_widget('Priority'))
    outer_div.add(priority_input)
Ejemplo n.º 20
0
def get_process_widget(outer_div):
    process_input = TextInputWdg()
    process_input.set_name('process')

    outer_div.add(get_label_widget('Process'))
    outer_div.add(process_input)
Ejemplo n.º 21
0
    def get_total_program_runtime_widget(outer_div):
        total_program_runtime_input = TextInputWdg()
        total_program_runtime_input.set_name('total_program_runtime')

        outer_div.add(get_label_widget('Total Program Runtime'))
        outer_div.add(total_program_runtime_input)