{# Copyright (C) 2023 Dirk Stöcker This software is licensed as described in the file COPYING, which you should have received as part of this distribution. The terms are also available at https://trac.edgewall.org/wiki/TracLicense. This software consists of voluntary contributions made by many individuals. For the exact contribution history, see the revision history and logs, available at https://trac.edgewall.org/. #} # extends 'admin.html' # block admintitle ${_("Edit Trac Settings (trac.ini)")} # endblock admintitle # block adminpanel

${_("Edit Trac Settings (trac.ini)")}

# trans Allows you to edit the trac.ini file.
Note: To "delete" an option from the trac.ini file, just set it to its default value. # endtrans

${jmacros.form_token_input()}
${_("Change Section")}

${_("Warning: Changing the section discards all unsaved changes.")}

${jmacros.form_token_input()}
${_("Add New Section")}

${_("Warning: Adding a new section discards all unsaved changes.")}

# if len(sections) != 0:
${jmacros.form_token_input()} ## This field is used to enable auto detection which submit button was meant to be used. Works only with JavaScript enabled. # for section_name, section in sections.items(): # if descriptions.get(section_name): # endif # for access_level, access_level_options in (('modifiable', modifiable_options[section_name]), ('readonly', readonly_options[section_name])): # if len(access_level_options) != 0: # endif # for option_name, option in access_level_options.items(): # if option.access != 'modifiable': # if option.type == 'password': # endif # if option.option_info == None: # endif # endfor # endfor # if len(hidden_options[section_name]) > 0: # if len(hidden_options[section_name]) == 1: # else: # endif # endif # endfor
${_("Name")} ${_("Default")} ${_("Value")}
# if section.emptynote: # trans Note: This section is essentially empty and won't persist unless a not-default value is specified for at least one option in this section. # endtrans # endif [${section_name}] ## Add dummy field so that empty section won't get lost.
${wiki_to_html(context, descriptions[section_name])}
${access_level == 'modifiable' and _('Modifiable Options') or _('Read-only Options')}
# else: # endif ${option_name} (*) # if option.type == "bool": # elif option.type == "choice": # elif option.type == "password": ## NOTE: The value for password fields is intentionally empty so that passwords can't be found in the HTML code. # else: # endif
# trans Note: This option represents a password. Therefore the value of this field is intentionally empty. To change the password, simply enter it. To keep the current password keep this field empty." # endtrans
# trans Note: This option is a custom option. It will be completely deleted if it's set to its default value. To keep it you need to assign a (non-empty) value to it. # endtrans
# if option.desc:
${wiki_to_html(context, "**"+_("Description:")+"** " + option.desc)}
# endif ${_("Type:")} # if option.type == 'list': ${_("list (separated by '%(separation)s')") % {'separation': option.option_info.sep[0]}} # elif option.type == 'path': ${_("file system path")} # elif option.type == 'envrelativepath': ${_("file system path relative to the Trac env")} # elif option.type == 'extension': ${_("one component implementing '%(name)s'") % {'name': option.option_info.xtnpt.interface.__name__}} # elif option.type == 'orderedextensions': ${_("ordered list of components implementing '%(name)s' (comma separated)") % {'name': option.option_info.xtnpt.interface.__name__}} # else: ${_(option.type)} # endif | ${_("Access:")} ${_(option.access)} # if option.type == 'password': | ${_("Default value:")} ${option.default_value and _('') or _('')} | ${_("Currently stored value:")} ${option.stored_value and _('') or _('')} # else | ${_("Default value:")} ${option.default_value or _('')} | ${_("Currently stored value:")} ${(option.stored_value and option.stored_value != option.default_value and (len(unicode(option.stored_value)) < 100 and option.stored_value or (option.stored_value[:100] + '...'))) or _('')} # endif
${_("Hidden Options")}
${_("Due to security restrictions there is one option marked as hidden in this section.")}${_("Due to security restrictions there are %(options)s options marked as hidden in this section.") % {'options': hidden_options}}
# if len(sections) > 1:
# endif
# endif # endblock adminpanel