[mod] config switch for central europe datetime inputs
This commit is contained in:
parent
5f6d72f67c
commit
ad322f7550
5 changed files with 41 additions and 34 deletions
|
@ -10766,11 +10766,16 @@ var lib_plankton;
|
|||
*/
|
||||
constructor(options = {}) {
|
||||
options = Object.assign({
|
||||
"label_timezone_shift": "",
|
||||
"label_date": "",
|
||||
"label_time": "",
|
||||
"label_timezone_shift": "",
|
||||
}, options);
|
||||
this.core = new zoo_input.class_input_group([
|
||||
{
|
||||
"name": "timezone_shift",
|
||||
"input": new zoo_input.class_input_number(),
|
||||
"label": options.label_timezone_shift,
|
||||
},
|
||||
{
|
||||
"name": "date",
|
||||
"input": new zoo_input.class_input_date(),
|
||||
|
@ -10781,11 +10786,6 @@ var lib_plankton;
|
|||
"input": new zoo_input.class_input_soft(new zoo_input.class_input_time()),
|
||||
"label": options.label_time,
|
||||
},
|
||||
{
|
||||
"name": "timezone_shift",
|
||||
"input": new zoo_input.class_input_number(),
|
||||
"label": options.label_timezone_shift,
|
||||
},
|
||||
]);
|
||||
}
|
||||
/**
|
||||
|
|
|
@ -52,6 +52,11 @@ namespace _zeitbild.frontend_web.conf
|
|||
"type": "string",
|
||||
"default": "http://localhost:8888/#oidc_finish,session_key={{session_key}}"
|
||||
},
|
||||
"use_central_europe_specific_datetime_inputs": {
|
||||
"nullable": true,
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
},
|
||||
"required": [
|
||||
],
|
||||
|
|
|
@ -257,4 +257,30 @@ namespace _zeitbild.frontend_web.helpers
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*/
|
||||
export function datetime_input(
|
||||
) : lib_plankton.zoo_input.interface_input<lib_plankton.pit.type_datetime>
|
||||
{
|
||||
return (
|
||||
_zeitbild.frontend_web.conf.get().misc.use_central_europe_specific_datetime_inputs
|
||||
?
|
||||
new lib_plankton.zoo_input.class_input_datetime_central_europe(
|
||||
{
|
||||
"label_date": lib_plankton.translate.get("common.date"),
|
||||
"label_time": lib_plankton.translate.get("common.time"),
|
||||
}
|
||||
)
|
||||
:
|
||||
new lib_plankton.zoo_input.class_input_datetime(
|
||||
{
|
||||
"label_timezone_shift": lib_plankton.translate.get("common.timezone_shift"),
|
||||
"label_date": lib_plankton.translate.get("common.date"),
|
||||
"label_time": lib_plankton.translate.get("common.time"),
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -140,25 +140,13 @@ namespace _zeitbild.frontend_web.pages
|
|||
},
|
||||
{
|
||||
"name": "begin",
|
||||
"input": new lib_plankton.zoo_input.class_input_datetime(
|
||||
{
|
||||
"label_timezone_shift": lib_plankton.translate.get("common.timezone_shift"),
|
||||
"label_date": lib_plankton.translate.get("common.date"),
|
||||
"label_time": lib_plankton.translate.get("common.time"),
|
||||
}
|
||||
),
|
||||
"input": _zeitbild.frontend_web.helpers.datetime_input(),
|
||||
"label": lib_plankton.translate.get("event.begin")
|
||||
},
|
||||
{
|
||||
"name": "end",
|
||||
"input": new lib_plankton.zoo_input.class_input_soft<lib_plankton.pit.type_datetime>(
|
||||
new lib_plankton.zoo_input.class_input_datetime(
|
||||
{
|
||||
"label_timezone_shift": lib_plankton.translate.get("common.timezone_shift"),
|
||||
"label_date": lib_plankton.translate.get("common.date"),
|
||||
"label_time": lib_plankton.translate.get("common.time"),
|
||||
}
|
||||
)
|
||||
_zeitbild.frontend_web.helpers.datetime_input()
|
||||
),
|
||||
"label": lib_plankton.translate.get("event.end")
|
||||
},
|
||||
|
|
|
@ -70,25 +70,13 @@ namespace _zeitbild.frontend_web.pages
|
|||
},
|
||||
{
|
||||
"name": "begin",
|
||||
"input": new lib_plankton.zoo_input.class_input_datetime(
|
||||
{
|
||||
"label_timezone_shift": lib_plankton.translate.get("common.timezone_shift"),
|
||||
"label_date": lib_plankton.translate.get("common.date"),
|
||||
"label_time": lib_plankton.translate.get("common.time"),
|
||||
}
|
||||
),
|
||||
"input": _zeitbild.frontend_web.helpers.datetime_input(),
|
||||
"label": lib_plankton.translate.get("event.begin")
|
||||
},
|
||||
{
|
||||
"name": "end",
|
||||
"input": new lib_plankton.zoo_input.class_input_soft<lib_plankton.pit.type_datetime>(
|
||||
new lib_plankton.zoo_input.class_input_datetime(
|
||||
{
|
||||
"label_timezone_shift": lib_plankton.translate.get("common.timezone_shift"),
|
||||
"label_date": lib_plankton.translate.get("common.date"),
|
||||
"label_time": lib_plankton.translate.get("common.time"),
|
||||
}
|
||||
)
|
||||
_zeitbild.frontend_web.helpers.datetime_input()
|
||||
),
|
||||
"label": lib_plankton.translate.get("event.end")
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue