$v) {
// special handling for "disabled"
if ($k === "disabled" && !sql_bool_to_bool($v))
continue;
array_push($rv, "$k=\"" . htmlspecialchars($v) . "\"");
}
return implode(" ", $rv);
}
// shortcut syntax (disabled)
/* function pluginhandler_tags(\Plugin $plugin, string $method) {
return hidden_tag("op", strtolower(get_class($plugin) . \PluginHost::PUBLIC_METHOD_DELIMITER . $method));
} */
function public_method_tags(\Plugin $plugin, string $method) {
return hidden_tag("op", strtolower(get_class($plugin) . \PluginHost::PUBLIC_METHOD_DELIMITER . $method));
}
function pluginhandler_tags(\Plugin $plugin, string $method) {
return hidden_tag("op", "pluginhandler") .
hidden_tag("plugin", strtolower(get_class($plugin))) .
hidden_tag("method", $method);
}
function button_tag(string $value, string $type, array $attributes = []) {
return "";
}
function input_tag(string $name, string $value, string $type = "text", array $attributes = [], string $id = "") {
$attributes_str = attributes_to_string($attributes);
$dojo_type = strpos($attributes_str, "dojoType") === false ? "dojoType='dijit.form.TextBox'" : "";
return "";
}
function number_spinner_tag(string $name, string $value, array $attributes = [], string $id = "") {
return input_tag($name, $value, "text", array_merge(["dojoType" => "dijit.form.NumberSpinner"], $attributes), $id);
}
function submit_tag(string $value, array $attributes = []) {
return button_tag($value, "submit", array_merge(["class" => "alt-primary"], $attributes));
}
function cancel_dialog_tag(string $value, array $attributes = []) {
return button_tag($value, "", array_merge(["onclick" => "App.dialogOf(this).hide()"], $attributes));
}
function icon(string $icon, array $attributes = []) {
return "$icon";
}
function select_tag(string $name, $value, array $values, array $attributes = [], string $id = "") {
$attributes_str = attributes_to_string($attributes);
$dojo_type = strpos($attributes_str, "dojoType") === false ? "dojoType='fox.form.Select'" : "";
$rv = "";
return $rv;
}
/*function select_labels(string $name, string $value, array $attributes = [], string $id = "") {
$values = \Labels::get_as_hash($_SESSION["uid"]);
return select_tag($name, $value, $values, $attributes, $id);
}*/
function select_hash(string $name, $value, array $values, array $attributes = [], string $id = "") {
$attributes_str = attributes_to_string($attributes);
$dojo_type = strpos($attributes_str, "dojoType") === false ? "dojoType='fox.form.Select'" : "";
$rv = "";
return $rv;
}
function hidden_tag(string $name, string $value, array $attributes = []) {
return "";
}
function checkbox_tag(string $name, bool $checked = false, string $value = "", array $attributes = [], string $id = "") {
$is_checked = $checked ? "checked" : "";
$value_str = $value ? "value=\"".htmlspecialchars($value)."\"" : "";
return "";
}
function select_feeds_cats(string $name, int $default_id = null, array $attributes = [],
bool $include_all_cats = true, string $root_id = null, int $nest_level = 0, string $id = "") {
$ret = "";
if (!$root_id) {
$ret .= "";
}
return $ret;
}