/**
* -----------------------------------------------------------------------------
* @package smartVISU
* @author Martin Gleiß
* @copyright 2012 - 2015
* @license GPL [http://www.gnu.de]
* -----------------------------------------------------------------------------
*/
/**
* Init of a flip-form-element
*
* @param {id} of the form-element
* @param {init-value}
*/
{% macro flip_init(id, val) %}
{% endmacro %}
/**
* Init of a select-form-element
*
* @param {id} of the form-element
* @param {init-value}
*/
{% macro select_init(id, val) %}
{% endmacro %}
/**
* Init of a text-form-element
*
* @param {id} of the form-element
* @param {init-value}
*/
{% macro text_init(id, val) %}
{% endmacro %}
/**
* dispays a row of multiple input elements
*
* @param {text} source of the settings (global, pages, device, tplchk)
* @param {text} values being available from source
* @param {text} name of the parameter to enter
* @param {text[?]} array of input elements
*/
{% macro config_row(source, values, id, content) %}
{% set hint = lang('configuration_page', id, 'hint') %}
{% if not hint is empty %}
{{ hint|nl2br }}
{% endif %}
{% for c in (content is iterable ? content : [content]) %}
{{ c|raw }}
{% endfor %}
{% if not hint is empty %}
{% endif %}
{% endmacro %}
/**
* dispays an input field pre-filled by defaults
*
* @param {text} source of the settings (global, pages, device, tplchk)
* @param {text} values being available from source
* @param {text} name of the parameter to enter
* @param {text=} type of the value to enter (text, wide)
*/
{% macro config_input(source, values, id, type) %}
{% set hint = lang('configuration_page', id, 'hint') %}
{% if not hint is empty %}
{{ hint|nl2br }}
{% endif %}
{% if not hint is empty %}
{% endif %}
{% endmacro %}
/**
* dispays a select element filled by contents of a given file directory
*
* @param {text} source of the settings (global, pages, device, tplchk)
* @param {text} values being available from source
* @param {text} name of the parameter to select
* @param {text[?]} directory of files to select from
* @param {text=} set to 'true' if select is part of a row widget (optional, default = '')
*/
{% macro config_select(source, values, id, files, rowcontent) %}
{% if rowcontent is empty %}
{% set hint = lang('configuration_page', id, 'hint') %}
{% if not hint is empty %}
{{ hint|nl2br }}
{% endif %}
{% endif %}
/** display deprecated options in italic */
{% if rowcontent is empty %}
{% if not hint is empty %}
{% endif %}
{% endif %}
{% endmacro %}
/**
* dispays a flipswitch providing ability to execute flexible code
*
* @param {text} source of the settings (global, pages, device, tplchk)
* @param {text} values being available from source
* @param {text} name of the option to activate
* @param {text=} executable html code as addition
*/
{% macro config_flip(source, values, id, addition) %}
{% set hint = lang('configuration_page', id, 'hint') %}
{% if not hint is empty %}
{{ hint|nl2br }}
{% endif %}
{{ addition|raw }}
{% if not hint is empty %}
{% endif %}
{% endmacro %}
/**
* fill configuration options without displaying anything
*
* @param {text} source of the settings (global, pages, device, tplchk)
* @param {text} values being available from source
* @param {text} name of the parameter to configure
*/
{% macro config_hidden(source, values, id) %}
{% endmacro %}
/**
* disables input of IP address and port if reverse proxy is configured
macro will be called in the "addition" parameter of config_flip for the reverse proxy option only
*
* @param {text} source of the settings (global, pages, device, tplchk)
* @param {text} values being available from source
* @param {text} name of the parameter to configure
*
* @author: Wolfram v. Hülsen
*/
{% macro config_reverseproxy(source, values, id) %}
{% endmacro %}
/**
* checks whether temp directory is writeable and disables cache activation if not writeable
*
* @param {text} source of the settings (global, pages, device, tplchk)
* @param {text} values being available from source
* @param {text} name of the parameter to configure
*
* @author: Wolfram v. Hülsen
*/
{% macro check_cache(source, values, id) %}