Fixed mod page function call, minor template fixes
This commit is contained in:
parent
0aa7417c09
commit
4156c2465c
2
mod.php
2
mod.php
|
@ -198,7 +198,7 @@ foreach ($pages as $uri => $handler) {
|
||||||
} elseif (is_callable("mod_page_$handler")) {
|
} elseif (is_callable("mod_page_$handler")) {
|
||||||
call_user_func_array("mod_page_$handler", $matches);
|
call_user_func_array("mod_page_$handler", $matches);
|
||||||
} elseif (is_callable("mod_$handler")) {
|
} elseif (is_callable("mod_$handler")) {
|
||||||
call_user_func_array("mod_$handler", $matches);
|
call_user_func_array("mod_$handler", array_slice($matches, 0, 2));
|
||||||
} else {
|
} else {
|
||||||
error("Mod page '$handler' not found!");
|
error("Mod page '$handler' not found!");
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,10 +32,10 @@
|
||||||
<th>{% trans 'Group' %}</th>
|
<th>{% trans 'Group' %}</th>
|
||||||
<td>
|
<td>
|
||||||
<ul style="padding:5px 8px;list-style:none">
|
<ul style="padding:5px 8px;list-style:none">
|
||||||
{% for group_value, group_name in config.mod.groups if group_name != 'Disabled' %}
|
{% for group_value, group_name in config.mod.groups|filter((group_value, group_name) => group_name != 'Disabled') %}
|
||||||
<li>
|
<li>
|
||||||
<input type="radio" name="type" id="group_{{ group_name }}" value="{{ group_value }}">
|
<input type="radio" name="type" id="group_{{ group_name }}" value="{{ group_value }}">
|
||||||
<label for="group_{{ group_name }}">{% trans group_name %}</label>
|
<label for="group_{{ group_name }}">{{ group_name|trans }}</label>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<fieldset id="notes">
|
<fieldset id="notes">
|
||||||
<legend>
|
<legend>
|
||||||
{% set notes_on_record = 'note' ~ (notes|count != 1 ? 's' : '') ~ ' on record' %}
|
{% set notes_on_record = 'note' ~ (notes|count != 1 ? 's' : '') ~ ' on record' %}
|
||||||
<legend>{{ notes|count }} {% trans notes_on_record %}</legend>
|
<legend>{{ notes|count }} {{ notes_on_record|trans }}</legend>
|
||||||
</legend>
|
</legend>
|
||||||
|
|
||||||
{% if notes and notes|length > 0 %}
|
{% if notes and notes|length > 0 %}
|
||||||
|
|
Loading…
Reference in New Issue