当前位置: 首页>>代码示例>>Python>>正文


Python HtmlElement.label方法代码示例

本文整理汇总了Python中pyasm.web.HtmlElement.label方法的典型用法代码示例。如果您正苦于以下问题:Python HtmlElement.label方法的具体用法?Python HtmlElement.label怎么用?Python HtmlElement.label使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pyasm.web.HtmlElement的用法示例。


在下文中一共展示了HtmlElement.label方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_display

# 需要导入模块: from pyasm.web import HtmlElement [as 别名]
# 或者: from pyasm.web.HtmlElement import label [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

示例2: get_display

# 需要导入模块: from pyasm.web import HtmlElement [as 别名]
# 或者: from pyasm.web.HtmlElement import label [as 别名]
    def get_display(self):
        outer_div = DivWdg()
        outer_div.set_id('new-external-rejection-form')

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

        root_cause_types = ProdSetting.get_seq_by_key('external_rejection_root_cause_types')
        root_cause_type_wdg = SelectWdg(name='root_cause_type', label='Root Cause Type')
        root_cause_type_wdg.add_empty_option()

        for root_cause_type in root_cause_types:
            root_cause_type_wdg.append_option(root_cause_type, root_cause_type)

        outer_div.add(root_cause_type_wdg)

        # TODO: Get this list from the schema, not hard coded
        video_rejection_reasons = [
            ('video_cropping', 'Cropping'),
            ('video_digital_hits_macroblocking', 'Digital Hits / Macroblocking'),
            ('video_dropped_frames', 'Dropped Frames'),
            ('video_dropout', 'Dropout'),
            ('video_duplicate_frames', 'Duplicate Frames'),
            ('video_interlacing_on_a_progressive_file', 'Interlacing on a Progressive File'),
            ('video_motion_image_lag', 'Motion / Image Lag'),
            ('video_missing_elements', 'Missing Elements'),
            ('video_corrupt_file', 'Corrupt File'),
            ('video_incorrect_aspect_ratio', 'Incorrect Aspect Ratio'),
            ('video_incorrect_resolution', 'Incorrect Resolution'),
            ('video_incorrect_pixel_aspect_ratio', 'Incorrect Pixel Aspect Ratio'),
            ('video_incorrect_specifications', 'Incorrect Specifications'),
            ('video_incorrect_head_tail_format', 'Incorrect Head / Tail Format'),
            ('video_other', 'Other')
        ]

        audio_rejection_reasons = [
            ('video_incorrect_audio_mapping', 'Incorrect Audio Mapping'),
            ('video_missing_audio_channel', 'Missing Audio Channel'),
            ('video_crackle_hiss_pop_static_ticks', 'Crackle / Hiss / Pop / Static / Ticks'),
            ('video_distortion', 'Distortion'),
            ('video_dropouts', 'Dropouts'),
            ('video_sync_issue', 'Sync Issue'),
            ('video_missing_elements', 'Missing Elements'),
            ('video_corrupt_missing_file', 'Corrupt / Missing File'),
            ('video_incorrect_specifications', 'Incorrect Specifications'),
            ('video_other', 'Other')
        ]

        metadata_rejection_reasons = [
            ('metadata_missing_information', 'Missing Information'),
            ('metadata_incorrect_information', 'Incorrect Information'),
            ('metadata_incorrect_formatting', 'Incorrect Formatting'),
            ('metadata_other', 'Other')
        ]

        subtitle_rejection_reasons = [
            ('subtitle_interlacing_on_subtitles', 'Interlacing on Subtitles'),
            ('subtitle_incorrect_subtitles', 'Incorrect Subtitles'),
            ('subtitle_sync_issue', 'Sync Issue'),
            ('subtitle_overlapping_other_text', 'Overlapping Other Text'),
            ('subtitle_other', 'Other')
        ]

        closed_captions_rejection_reasons = [
            ('closed_captions_sync_issue', 'Sync Issue'),
            ('closed_captions_incorrect_cc', 'Incorrect CC'),
            ('closed_captions_overlapping_other_text', 'Overlapping Other Text'),
            ('closed_captions_other', 'Other')
        ]

        video_checkbox_table = self.setup_checkboxes_div('Video', video_rejection_reasons)
        audio_checkbox_table = self.setup_checkboxes_div('Audio', audio_rejection_reasons)
        metadata_checkbox_table = self.setup_checkboxes_div('MetaData', metadata_rejection_reasons)
        subtitle_checkbox_table = self.setup_checkboxes_div('Subtitles', subtitle_rejection_reasons)
        closed_captions_checkbox_table = self.setup_checkboxes_div('Closed Captions', closed_captions_rejection_reasons)

        outer_div.add(video_checkbox_table)
        outer_div.add(audio_checkbox_table)
        outer_div.add(metadata_checkbox_table)
        outer_div.add(subtitle_checkbox_table)
        outer_div.add(closed_captions_checkbox_table)

        return outer_div
开发者ID:2gDigitalPost,项目名称:custom-rewrite,代码行数:87,代码来源:external_rejection_on_title_order_wdg.py


注:本文中的pyasm.web.HtmlElement.label方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。