mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Merge branch 'ent-9044-Mejorar-interfaz-de-herramienta-de-copia-de-configuraciones-remotas' into 'develop'
Added Go Back input function pandora_enterprise#9044 See merge request artica/pandorafms!4997
This commit is contained in:
commit
8f00e9da6c
@ -6134,3 +6134,36 @@ function html_print_select_agent_secondary($agent, $id_agente, $options=[])
|
|||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prints a simple 'Go Back' button.
|
||||||
|
*
|
||||||
|
* @param string $url Destination Url.
|
||||||
|
* @param array $options Options.
|
||||||
|
* `button_class`: Class for button. 'w100p' by default.
|
||||||
|
* `title`: Title of the button. 'Go Back' by default.
|
||||||
|
* `action_class`: Class of icon of button. 'cancel' by default.
|
||||||
|
* @param boolean $return If true, return a formed HTML element.
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
function html_print_go_back_button(string $url, array $options=[], bool $return=false)
|
||||||
|
{
|
||||||
|
$output = html_print_div(
|
||||||
|
[
|
||||||
|
'class' => ($options['button_class'] ?? 'w100p'),
|
||||||
|
'content' => html_print_button(
|
||||||
|
($options['title'] ?? __('Go back')),
|
||||||
|
'go_back',
|
||||||
|
false,
|
||||||
|
'window.location.href = \''.$url.'\'',
|
||||||
|
'class="sub '.($options['action_class'] ?? ' cancel').' right"',
|
||||||
|
true
|
||||||
|
),
|
||||||
|
],
|
||||||
|
$return
|
||||||
|
);
|
||||||
|
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user