mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 05:25:56 +00:00
* filters: remove duplicate code, overall cleanup
* check if some tres exist before trying to reload them
This commit is contained in:
@@ -35,15 +35,23 @@ function print_select_hash($id, $default, $values, $attributes = "", $name = "")
|
||||
print "</select>";
|
||||
}
|
||||
|
||||
function print_hidden($name, $value) {
|
||||
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"$name\" value=\"$value\">";
|
||||
function format_hidden($name, $value) {
|
||||
return "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"$name\" value=\"$value\">";
|
||||
}
|
||||
|
||||
function print_checkbox($id, $checked, $value = "", $attributes = "") {
|
||||
function print_hidden($name, $value) {
|
||||
print format_hidden($name, $value);
|
||||
}
|
||||
|
||||
function format_checkbox($id, $checked, $value = "", $attributes = "") {
|
||||
$checked_str = $checked ? "checked" : "";
|
||||
$value_str = $value ? "value=\"$value\"" : "";
|
||||
|
||||
print "<input dojoType=\"dijit.form.CheckBox\" id=\"$id\" $value_str $checked_str $attributes name=\"$id\">";
|
||||
return "<input dojoType=\"dijit.form.CheckBox\" id=\"$id\" $value_str $checked_str $attributes name=\"$id\">";
|
||||
}
|
||||
|
||||
function print_checkbox($id, $checked, $value = "", $attributes = "") {
|
||||
print format_checkbox($id, $checked, $value, $attributes);
|
||||
}
|
||||
|
||||
function print_button($type, $value, $attributes = "") {
|
||||
|
||||
Reference in New Issue
Block a user