當前位置: 首頁>>代碼示例>>Python>>正文


Python TextInputWdg.set_name方法代碼示例

本文整理匯總了Python中tactic.ui.input.TextInputWdg.set_name方法的典型用法代碼示例。如果您正苦於以下問題:Python TextInputWdg.set_name方法的具體用法?Python TextInputWdg.set_name怎麽用?Python TextInputWdg.set_name使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在tactic.ui.input.TextInputWdg的用法示例。


在下文中一共展示了TextInputWdg.set_name方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: get_display

# 需要導入模塊: from tactic.ui.input import TextInputWdg [as 別名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 別名]
    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
開發者ID:2gDigitalPost,項目名稱:custom,代碼行數:33,代碼來源:work_order_builder.py

示例2: get_display

# 需要導入模塊: from tactic.ui.input import TextInputWdg [as 別名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 別名]
    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
開發者ID:2gDigitalPost,項目名稱:custom-rewrite,代碼行數:35,代碼來源:new_order_entry.py

示例3: get_display

# 需要導入模塊: from tactic.ui.input import TextInputWdg [as 別名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 別名]
    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
開發者ID:2gDigitalPost,項目名稱:custom,代碼行數:30,代碼來源:title_entry_wdg.py

示例4: get_display

# 需要導入模塊: from tactic.ui.input import TextInputWdg [as 別名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 別名]
    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
開發者ID:2gDigitalPost,項目名稱:custom,代碼行數:35,代碼來源:order_entry_wdg.py

示例5: get_text_input_wdg

# 需要導入模塊: from tactic.ui.input import TextInputWdg [as 別名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 別名]
    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
開發者ID:2gDigitalPost,項目名稱:custom-rewrite,代碼行數:12,代碼來源:prequal_eval_lines_wdg.py

示例6: get_text_input_wdg

# 需要導入模塊: from tactic.ui.input import TextInputWdg [as 別名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 別名]
    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
開發者ID:2gDigitalPost,項目名稱:custom-rewrite,代碼行數:12,代碼來源:metadata_report_wdg.py

示例7: get_text_input_wdg

# 需要導入模塊: from tactic.ui.input import TextInputWdg [as 別名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 別名]
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
開發者ID:2gDigitalPost,項目名稱:custom-rewrite,代碼行數:12,代碼來源:input_widgets.py

示例8: get_timecode_textbox

# 需要導入模塊: from tactic.ui.input import TextInputWdg [as 別名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 別名]
    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
開發者ID:2gDigitalPost,項目名稱:custom-rewrite,代碼行數:14,代碼來源:prequal_eval_lines_wdg.py

示例9: get_text_input_wdg

# 需要導入模塊: from tactic.ui.input import TextInputWdg [as 別名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 別名]
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
開發者ID:2gDigitalPost,項目名稱:custom-rewrite,代碼行數:15,代碼來源:utils.py

示例10: get_process_widget

# 需要導入模塊: from tactic.ui.input import TextInputWdg [as 別名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 別名]
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)
開發者ID:2gDigitalPost,項目名稱:custom,代碼行數:8,代碼來源:task_utils.py

示例11: get_priority_widget

# 需要導入模塊: from tactic.ui.input import TextInputWdg [as 別名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 別名]
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)
開發者ID:2gDigitalPost,項目名稱:custom,代碼行數:8,代碼來源:task_utils.py

示例12: get_total_program_runtime_widget

# 需要導入模塊: from tactic.ui.input import TextInputWdg [as 別名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 別名]
    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)
開發者ID:2gDigitalPost,項目名稱:custom,代碼行數:8,代碼來源:order_title_builder.py


注:本文中的tactic.ui.input.TextInputWdg.set_name方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。