<s> import os <EOL> import math <EOL> import errno <EOL> from inifile import IniFile <EOL> from lektor import types <EOL> from lektor . utils import slugify , bool_from_string <EOL> from lektor . environment import Expression , FormatExpression , PRIMARY_ALT <EOL> from lektor . i18n import load_i18n_block , get_i18n_block <EOL> from lektor . pagination import Pagination <EOL> class ChildConfig ( object ) : <EOL> def __init__ ( self , enabled = None , slug_format = None , model = None , <EOL> order_by = None , replaced_with = None ) : <EOL> if enabled is None : <EOL> enabled = True <EOL> self . enabled = enabled <EOL> self . slug_format = slug_format <EOL> self . model = model <EOL> self . order_by = order_by <EOL> self . replaced_with = replaced_with <EOL> def to_json ( self ) : <EOL> return { <EOL> '<STR_LIT>' : self . enabled , <EOL> '<STR_LIT>' : self . slug_format , <EOL> '<STR_LIT>' : self . model , <EOL> '<STR_LIT>' : self . order_by , <EOL> '<STR_LIT>' : self . replaced_with , <EOL> } <EOL> class PaginationConfig ( object ) : <EOL> def __init__ ( self , enabled = None , per_page = None , url_suffix = None ) : <EOL> if enabled is None : <EOL> enabled = False <EOL> self . enabled = enabled <EOL> if per_page is None : <EOL> per_page = <NUM_LIT:20> <EOL> self . per_page = per_page <EOL> if url_suffix is None : <EOL> url_suffix = '<STR_LIT>' <EOL> self . url_suffix = url_suffix <EOL> def count_pages ( self , record ) : <EOL> """<STR_LIT>""" <EOL> total = record . children . count ( ) <EOL> return int ( math . ceil ( total / float ( self . per_page ) ) ) <EOL> def slice_query_for_page ( self , query , page ) : <EOL> """<STR_LIT>""" <EOL> if not self . enabled or page is None : <EOL> return query <EOL> return query . limit ( self . per_page ) . offset ( ( page - <NUM_LIT:1> ) * self . per_page ) <EOL> def get_record_for_page ( self , record , page_num ) : <EOL> """<STR_LIT>""" <EOL> if record . page_num == page_num : <EOL> return record <EOL> pad = record . pad <EOL> rv = pad . cache . get ( record . path , alt = record . alt , page_num = page_num ) <EOL> if rv is not Ellipsis : <EOL> return rv <EOL> cls = record . __class__ <EOL> rv = cls ( record . pad , record . _data , page_num = page_num ) <EOL> pad . cache . remember ( rv ) <EOL> return rv <EOL> def match_pagination ( self , record , url_path ) : <EOL> """<STR_LIT>""" <EOL> if not self . enabled : <EOL> return <EOL> suffixes = self . url_suffix . strip ( '<STR_LIT:/>' ) . split ( '<STR_LIT:/>' ) <EOL> if url_path [ : len ( suffixes ) ] != suffixes : <EOL> return <EOL> try : <EOL> page_num = int ( url_path [ len ( suffixes ) ] ) <EOL> except ( ValueError , IndexError ) : <EOL> return <EOL> if page_num == <NUM_LIT:1> or len ( url_path ) != len ( suffixes ) + <NUM_LIT:1> : <EOL> return <EOL> rv = self . get_record_for_page ( record , page_num ) <EOL> if rv . pagination . items . first ( ) is not None : <EOL> return rv <EOL> def get_pagination_controller ( self , record ) : <EOL> if not self . enabled : <EOL> raise RuntimeError ( '<STR_LIT>' ) <EOL> return Pagination ( record , self ) <EOL> def to_json ( self ) : <EOL> return { <EOL> '<STR_LIT>' : self . enabled , <EOL> '<STR_LIT>' : self . per_page , <EOL> '<STR_LIT>' : self . url_suffix , <EOL> } <EOL> class AttachmentConfig ( object ) : <EOL> def __init__ ( self , enabled = None , model = None , order_by = None ) : <EOL> if enabled is None : <EOL> enabled = True <EOL> self . enabled = enabled <EOL> self . model = model <EOL> self . order_by = order_by <EOL> def to_json ( self ) : <EOL> return { <EOL> '<STR_LIT>' : self . enabled , <EOL> '<STR_LIT>' : self . model , <EOL> '<STR_LIT>' : self . order_by , <EOL> } <EOL> class Field ( object ) : <EOL> def __init__ ( self , env , name , type = None , options = None ) : <EOL> if type is None : <EOL> type = env . types [ '<STR_LIT:string>' ] <EOL> if options is None : <EOL> options = { } <EOL> self . options = options <EOL> self . name = name <EOL> label_i18n = get_i18n_block ( options , '<STR_LIT:label>' ) <EOL> if not label_i18n : <EOL> label_i18n = { '<STR_LIT>' : name . replace ( '<STR_LIT:_>' , '<STR_LIT:U+0020>' ) . strip ( ) . capitalize ( ) } <EOL> self . label_i18n = label_i18n <EOL> self . description_i18n = get_i18n_block ( options , '<STR_LIT:description>' ) or None <EOL> self . default = options . get ( '<STR_LIT:default>' ) <EOL> self . type = type ( env , options ) <EOL> @ property <EOL> def label ( self ) : <EOL> return self . label_i18n . get ( '<STR_LIT>' ) <EOL> def to_json ( self , pad , record = None , alt = PRIMARY_ALT ) : <EOL> return { <EOL> '<STR_LIT:name>' : self . name , <EOL> '<STR_LIT:label>' : self . label , <EOL> '<STR_LIT>' : self . label_i18n , <EOL> '<STR_LIT>' : bool_from_string ( self . options . get ( '<STR_LIT>' ) , <EOL> default = False ) , <EOL> '<STR_LIT>' : self . description_i18n , <EOL> '<STR_LIT:type>' : self . type . to_json ( pad , record , alt ) , <EOL> '<STR_LIT:default>' : self . default , <EOL> } <EOL> def deserialize_value ( self , value , pad = None ) : <EOL> raw_value = types . RawValue ( self . name , value , field = self , pad = pad ) <EOL> return self . type . value_from_raw_with_default ( raw_value ) <EOL> def serialize_value ( self , value ) : <EOL> return self . type . value_to_raw ( value ) <EOL> def __repr__ ( self ) : <EOL> return '<STR_LIT>' % ( <EOL> self . __class__ . __name__ , <EOL> self . name , <EOL> self . type , <EOL> ) <EOL> def _iter_all_fields ( obj ) : <EOL> for name in sorted ( x for x in obj . field_map if x [ : <NUM_LIT:1> ] == '<STR_LIT:_>' ) : <EOL> yield obj . field_map [ name ] <EOL> for field in obj . fields : <EOL> yield field <EOL> class DataModel ( object ) : <EOL> def __init__ ( self , env , id , name_i18n , label_i18n = None , <EOL> filename = None , hidden = None , protected = None , <EOL> child_config = None , attachment_config = None , <EOL> pagination_config = None , fields = None , <EOL> primary_field = None , parent = None ) : <EOL> self . env = env <EOL> self . filename = filename <EOL> self . id = id <EOL> self . name_i18n = name_i18n <EOL> self . label_i18n = label_i18n <EOL> if hidden is None : <EOL> hidden = False <EOL> self . hidden = hidden <EOL> if protected is None : <EOL> protected = False <EOL> self . protected = protected <EOL> if child_config is None : <EOL> child_config = ChildConfig ( ) <EOL> self . child_config = child_config <EOL> if attachment_config is None : <EOL> attachment_config = AttachmentConfig ( ) <EOL> self . attachment_config = attachment_config <EOL> if pagination_config is None : <EOL> pagination_config = PaginationConfig ( ) <EOL> self . pagination_config = pagination_config <EOL> if fields is None : <EOL> fields = [ ] <EOL> self . fields = fields <EOL> if primary_field is None and fields : <EOL> primary_field = fields [ <NUM_LIT:0> ] . name <EOL> self . primary_field = primary_field <EOL> self . parent = parent <EOL> self . field_map = dict ( ( x . name , x ) for x in fields ) <EOL> for key , ( ty , opts ) in system_fields . iteritems ( ) : <EOL> self . field_map [ key ] = Field ( env , name = key , type = ty , options = opts ) <EOL> self . _child_slug_tmpl = None <EOL> self . _child_replacements = None <EOL> self . _label_tmpls = { } <EOL> @ property <EOL> def name ( self ) : <EOL> name = ( self . name_i18n or { } ) . get ( '<STR_LIT>' ) <EOL> return name or self . id . title ( ) . replace ( '<STR_LIT:_>' , '<STR_LIT:U+0020>' ) <EOL> @ property <EOL> def label ( self ) : <EOL> return ( self . label_i18n or { } ) . get ( '<STR_LIT>' ) <EOL> def to_json ( self , pad , record = None , alt = PRIMARY_ALT ) : <EOL> """<STR_LIT>""" <EOL> return { <EOL> '<STR_LIT:filename>' : self . filename , <EOL> '<STR_LIT>' : alt , <EOL> '<STR_LIT:id>' : self . id , <EOL> '<STR_LIT:name>' : self . name , <EOL> '<STR_LIT>' : self . name_i18n , <EOL> '<STR_LIT>' : self . primary_field , <EOL> '<STR_LIT:label>' : self . label , <EOL> '<STR_LIT>' : self . label_i18n , <EOL> '<STR_LIT>' : self . hidden , <EOL> '<STR_LIT>' : self . protected , <EOL> '<STR_LIT>' : self . child_config . to_json ( ) , <EOL> '<STR_LIT>' : self . attachment_config . to_json ( ) , <EOL> '<STR_LIT>' : self . pagination_config . to_json ( ) , <EOL> '<STR_LIT>' : [ x . to_json ( pad , record , alt ) for x in <EOL> _iter_all_fields ( self ) ] , <EOL> } <EOL> def format_record_label ( self , record , lang = '<STR_LIT>' ) : <EOL> """<STR_LIT>""" <EOL> label = self . label_i18n . get ( lang ) <EOL> if label is None : <EOL> return None <EOL> tmpl = self . _label_tmpls . get ( lang ) <EOL> if tmpl is None : <EOL> tmpl = ( <EOL> label , <EOL> FormatExpression ( self . env , label ) <EOL> ) <EOL> self . _label_tmpls [ lang ] = tmpl <EOL> try : <EOL> return tmpl [ <NUM_LIT:1> ] . evaluate ( record . pad , this = record ) <EOL> except Exception : <EOL> return None <EOL> def get_default_child_slug ( self , pad , data ) : <EOL> """<STR_LIT>""" <EOL> slug_format = self . child_config . slug_format <EOL> if slug_format is None : <EOL> return data [ '<STR_LIT>' ] <EOL> if self . _child_slug_tmpl is None or self . _child_slug_tmpl [ <NUM_LIT:0> ] != slug_format : <EOL> self . _child_slug_tmpl = ( <EOL> slug_format , <EOL> FormatExpression ( self . env , slug_format ) <EOL> ) <EOL> try : <EOL> return '<STR_LIT:_>' . join ( self . _child_slug_tmpl [ <NUM_LIT:1> ] . evaluate ( <EOL> pad , this = data ) . strip ( ) . split ( ) ) . strip ( '<STR_LIT:/>' ) <EOL> except Exception : <EOL> return '<STR_LIT>' + slugify ( data [ '<STR_LIT>' ] ) <EOL> def get_default_template_name ( self ) : <EOL> return self . id + '<STR_LIT>' <EOL> @ property <EOL> def has_own_children ( self ) : <EOL> return self . child_config . replaced_with is None and self . child_config . enabled <EOL> @ property <EOL> def has_own_attachments ( self ) : <EOL> return self . attachment_config . enabled <EOL> def get_child_replacements ( self , record ) : <EOL> """<STR_LIT>""" <EOL> replaced_with = self . child_config . replaced_with <EOL> if replaced_with is None : <EOL> return None <EOL> if self . _child_replacements is None or self . _child_replacements [ <NUM_LIT:0> ] != replaced_with : <EOL> self . _child_replacements = ( <EOL> replaced_with , <EOL> Expression ( self . env , replaced_with ) <EOL> ) <EOL> return self . _child_replacements [ <NUM_LIT:1> ] . evaluate ( record . pad , this = record ) <EOL> def process_raw_data ( self , raw_data , pad = None ) : <EOL> rv = { } <EOL> for field in self . field_map . itervalues ( ) : <EOL> value = raw_data . get ( field . name ) <EOL> rv [ field . name ] = field . deserialize_value ( value , pad = pad ) <EOL> rv [ '<STR_LIT>' ] = self . id <EOL> return rv <EOL> def __repr__ ( self ) : <EOL> return '<STR_LIT>' % ( <EOL> self . __class__ . __name__ , <EOL> self . id , <EOL> ) <EOL> class FlowBlockModel ( object ) : <EOL> def __init__ ( self , env , id , name_i18n , filename = None , fields = None , <EOL> order = None , button_label = None ) : <EOL> self . env = env <EOL> self . id = id <EOL> self . name_i18n = name_i18n <EOL> self . filename = filename <EOL> if fields is None : <EOL> fields = [ ] <EOL> self . fields = fields <EOL> if order is None : <EOL> order = <NUM_LIT:100> <EOL> self . order = order <EOL> self . button_label = button_label <EOL> self . field_map = dict ( ( x . name , x ) for x in fields ) <EOL> self . field_map [ '<STR_LIT>' ] = Field ( <EOL> env , name = '<STR_LIT>' , type = env . types [ '<STR_LIT:string>' ] ) <EOL> @ property <EOL> def name ( self ) : <EOL> return self . name_i18n . get ( '<STR_LIT>' ) or self . id . title ( ) . replace ( '<STR_LIT:_>' , '<STR_LIT:U+0020>' ) <EOL> def to_json ( self , pad , record = None , alt = PRIMARY_ALT ) : <EOL> return { <EOL> '<STR_LIT:id>' : self . id , <EOL> '<STR_LIT:name>' : self . name , <EOL> '<STR_LIT>' : self . name_i18n , <EOL> '<STR_LIT:filename>' : self . filename , <EOL> '<STR_LIT>' : [ x . to_json ( pad , record , alt ) for x in _iter_all_fields ( self ) <EOL> if x . name != '<STR_LIT>' ] , <EOL> '<STR_LIT>' : self . order , <EOL> '<STR_LIT>' : self . button_label , <EOL> } <EOL> def process_raw_data ( self , raw_data , pad = None ) : <EOL> rv = { } <EOL> for field in self . field_map . itervalues ( ) : <EOL> value = raw_data . get ( field . name ) <EOL> rv [ field . name ] = field . deserialize_value ( value , pad = pad ) <EOL> rv [ '<STR_LIT>' ] = self . id <EOL> return rv <EOL> def __repr__ ( self ) : <EOL> return '<STR_LIT>' % ( <EOL> self . __class__ . __name__ , <EOL> self . id , <EOL> ) <EOL> def fielddata_from_ini ( inifile ) : <EOL> return [ ( <EOL> sect . split ( '<STR_LIT:.>' , <NUM_LIT:1> ) [ <NUM_LIT:1> ] , <EOL> inifile . section_as_dict ( sect ) , <EOL> ) for sect in inifile . sections ( ) if sect . startswith ( '<STR_LIT>' ) ] <EOL> def datamodel_data_from_ini ( id , inifile ) : <EOL> def _parse_order ( value ) : <EOL> value = ( value or '<STR_LIT>' ) . strip ( ) <EOL> if not value : <EOL> return None <EOL> return [ x for x in [ x . strip ( ) for x in value . strip ( ) . split ( '<STR_LIT:U+002C>' ) ] if x ] <EOL> return dict ( <EOL> filename = inifile . filename , <EOL> id = id , <EOL> parent = inifile . get ( '<STR_LIT>' ) , <EOL> name_i18n = get_i18n_block ( inifile , '<STR_LIT>' ) , <EOL> label_i18n = get_i18n_block ( inifile , '<STR_LIT>' ) , <EOL> primary_field = inifile . get ( '<STR_LIT>' ) , <EOL> hidden = inifile . get_bool ( '<STR_LIT>' , default = None ) , <EOL> protected = inifile . get_bool ( '<STR_LIT>' , default = None ) , <EOL> child_config = dict ( <EOL> enabled = inifile . get_bool ( '<STR_LIT>' , default = None ) , <EOL> slug_format = inifile . get ( '<STR_LIT>' ) , <EOL> model = inifile . get ( '<STR_LIT>' ) , <EOL> order_by = _parse_order ( inifile . get ( '<STR_LIT>' ) ) , <EOL> replaced_with = inifile . get ( '<STR_LIT>' ) , <EOL> ) , <EOL> attachment_config = dict ( <EOL> enabled = inifile . get_bool ( '<STR_LIT>' , default = None ) , <EOL> model = inifile . get ( '<STR_LIT>' ) , <EOL> order_by = _parse_order ( inifile . get ( '<STR_LIT>' ) ) , <EOL> ) , <EOL> pagination_config = dict ( <EOL> enabled = inifile . get_bool ( '<STR_LIT>' , default = None ) , <EOL> per_page = inifile . get_int ( '<STR_LIT>' ) , <EOL> url_suffix = inifile . get ( '<STR_LIT>' ) , <EOL> ) , <EOL> fields = fielddata_from_ini ( inifile ) , <EOL> ) <EOL> def flowblock_data_from_ini ( id , inifile ) : <EOL> return dict ( <EOL> filename = inifile . filename , <EOL> id = id , <EOL> name_i18n = get_i18n_block ( inifile , '<STR_LIT>' ) , <EOL> fields = fielddata_from_ini ( inifile ) , <EOL> order = inifile . get_int ( '<STR_LIT>' ) , <EOL> button_label = inifile . get ( '<STR_LIT>' ) , <EOL> ) <EOL> def fields_from_data ( env , data , parent_fields = None ) : <EOL> fields = [ ] <EOL> known_fields = set ( ) <EOL> for name , options in data : <EOL> ty = env . types [ options . get ( '<STR_LIT:type>' , '<STR_LIT:string>' ) ] <EOL> fields . append ( Field ( env = env , name = name , type = ty , options = options ) ) <EOL> known_fields . add ( name ) <EOL> if parent_fields is not None : <EOL> prepended_fields = [ ] <EOL> for field in parent_fields : <EOL> if field . name not in known_fields : <EOL> prepended_fields . append ( field ) <EOL> fields = prepended_fields + fields <EOL> return fields <EOL> def datamodel_from_data ( env , model_data , parent = None ) : <EOL> def get_value ( key ) : <EOL> path = key . split ( '<STR_LIT:.>' ) <EOL> node = model_data <EOL> for item in path : <EOL> node = node . get ( item ) <EOL> if node is not None : <EOL> return node <EOL> if parent is not None : <EOL> node = parent <EOL> for item in path : <EOL> node = getattr ( node , item ) <EOL> return node <EOL> fields = fields_from_data ( env , model_data [ '<STR_LIT>' ] , <EOL> parent and parent . fields or None ) <EOL> return DataModel ( <EOL> env , <EOL> filename = model_data [ '<STR_LIT:filename>' ] , <EOL> id = model_data [ '<STR_LIT:id>' ] , <EOL> parent = parent , <EOL> name_i18n = model_data [ '<STR_LIT>' ] , <EOL> primary_field = model_data [ '<STR_LIT>' ] , <EOL> label_i18n = get_value ( '<STR_LIT>' ) , <EOL> hidden = get_value ( '<STR_LIT>' ) , <EOL> protected = get_value ( '<STR_LIT>' ) , <EOL> child_config = ChildConfig ( <EOL> enabled = get_value ( '<STR_LIT>' ) , <EOL> slug_format = get_value ( '<STR_LIT>' ) , <EOL> model = get_value ( '<STR_LIT>' ) , <EOL> order_by = get_value ( '<STR_LIT>' ) , <EOL> replaced_with = get_value ( '<STR_LIT>' ) , <EOL> ) , <EOL> attachment_config = AttachmentConfig ( <EOL> enabled = get_value ( '<STR_LIT>' ) , <EOL> model = get_value ( '<STR_LIT>' ) , <EOL> order_by = get_value ( '<STR_LIT>' ) , <EOL> ) , <EOL> pagination_config = PaginationConfig ( <EOL> enabled = get_value ( '<STR_LIT>' ) , <EOL> per_page = get_value ( '<STR_LIT>' ) , <EOL> url_suffix = get_value ( '<STR_LIT>' ) , <EOL> ) , <EOL> fields = fields , <EOL> ) <EOL> def flowblock_from_data ( env , block_data ) : <EOL> return FlowBlockModel ( <EOL> env , <EOL> filename = block_data [ '<STR_LIT:filename>' ] , <EOL> id = block_data [ '<STR_LIT:id>' ] , <EOL> name_i18n = block_data [ '<STR_LIT>' ] , <EOL> fields = fields_from_data ( env , block_data [ '<STR_LIT>' ] ) , <EOL> order = block_data [ '<STR_LIT>' ] , <EOL> button_label = block_data [ '<STR_LIT>' ] , <EOL> ) <EOL> def iter_inis ( path ) : <EOL> try : <EOL> for filename in os . listdir ( path ) : <EOL> if not filename . endswith ( '<STR_LIT>' ) or filename [ : <NUM_LIT:1> ] in '<STR_LIT>' : <EOL> continue <EOL> fn = os . path . join ( path , filename ) <EOL> if os . path . isfile ( fn ) : <EOL> base = filename [ : - <NUM_LIT:4> ] . decode ( '<STR_LIT:ascii>' , '<STR_LIT:replace>' ) <EOL> inifile = IniFile ( fn ) <EOL> yield base , inifile <EOL> except OSError as e : <EOL> if e . errno != errno . ENOENT : <EOL> raise <EOL> def load_datamodels ( env ) : <EOL> """<STR_LIT>""" <EOL> path = os . path . join ( env . root_path , '<STR_LIT>' ) <EOL> data = { } <EOL> for model_id , inifile in iter_inis ( path ) : <EOL> data [ model_id ] = datamodel_data_from_ini ( model_id , inifile ) <EOL> rv = { } <EOL> def get_model ( model_id ) : <EOL> model = rv . get ( model_id ) <EOL> if model is not None : <EOL> return model <EOL> if model_id in data : <EOL> return create_model ( model_id ) <EOL> def create_model ( model_id ) : <EOL> model_data = data . get ( model_id ) <EOL> if model_data is None : <EOL> raise RuntimeError ( '<STR_LIT>' % model_id ) <EOL> if model_data [ '<STR_LIT>' ] is not None : <EOL> parent = get_model ( model_data [ '<STR_LIT>' ] ) <EOL> else : <EOL> parent = None <EOL> rv [ model_id ] = mod = datamodel_from_data ( env , model_data , parent ) <EOL> return mod <EOL> for model_id in data . keys ( ) : <EOL> get_model ( model_id ) <EOL> rv [ '<STR_LIT:none>' ] = DataModel ( env , '<STR_LIT:none>' , { '<STR_LIT>' : '<STR_LIT:None>' } , hidden = True ) <EOL> return rv <EOL> def load_flowblocks ( env ) : <EOL> """<STR_LIT>""" <EOL> path = os . path . join ( env . root_path , '<STR_LIT>' ) <EOL> rv = { } <EOL> for flowblock_id , inifile in iter_inis ( path ) : <EOL> rv [ flowblock_id ] = flowblock_from_data ( env , <EOL> flowblock_data_from_ini ( flowblock_id , inifile ) ) <EOL> return rv <EOL> system_fields = { } <EOL> def add_system_field ( name , ** opts ) : <EOL> for key , value in opts . items ( ) : <EOL> if key . endswith ( '<STR_LIT>' ) : <EOL> base_key = key [ : - <NUM_LIT:5> ] <EOL> for lang , trans in load_i18n_block ( value ) . iteritems ( ) : <EOL> opts [ '<STR_LIT>' % ( base_key , lang ) ] = trans <EOL> ty = types . builtin_types [ opts . pop ( '<STR_LIT:type>' ) ] <EOL> system_fields [ name ] = ( ty , opts ) <EOL> add_system_field ( '<STR_LIT>' , type = '<STR_LIT:string>' ) <EOL> add_system_field ( '<STR_LIT>' , type = '<STR_LIT:string>' ) <EOL> add_system_field ( '<STR_LIT>' , type = '<STR_LIT:string>' ) <EOL> add_system_field ( '<STR_LIT>' , type = '<STR_LIT:string>' ) <EOL> add_system_field ( '<STR_LIT>' , type = '<STR_LIT:string>' ) <EOL> add_system_field ( '<STR_LIT>' , type = '<STR_LIT:string>' ) <EOL> add_system_field ( '<STR_LIT>' , type = '<STR_LIT:string>' , <EOL> label_i18n = '<STR_LIT>' , width = '<STR_LIT>' , <EOL> addon_label = '<STR_LIT>' ) <EOL> add_system_field ( '<STR_LIT>' , type = '<STR_LIT>' , label_i18n = '<STR_LIT>' , <EOL> width = '<STR_LIT>' ) <EOL> add_system_field ( '<STR_LIT>' , type = '<STR_LIT>' , label_i18n = '<STR_LIT>' , <EOL> checkbox_label_i18n = '<STR_LIT>' ) <EOL> add_system_field ( '<STR_LIT>' , type = '<STR_LIT:string>' ) <EOL> add_system_field ( '<STR_LIT>' , type = '<STR_LIT:string>' , <EOL> label_i18n = '<STR_LIT>' , addon_label = '<STR_LIT>' ) </s>
