Ergonomy : add button Close

Cosmetic : color
This commit is contained in:
sparkyx 2022-12-11 11:38:43 +01:00
parent 5007bab50c
commit c727310432
2 changed files with 61 additions and 29 deletions

View file

@ -27,6 +27,7 @@ if (!defined('ALLOWED'))
* admin-noalyss.php
* @see admin-noalyss.php ajax_misc.php admin.js
*/
global $g_user;
if ($g_user->Admin()==0)
{
die();
@ -239,8 +240,16 @@ if (in_array($op, array('modele_drop', 'modele_modify', 'folder_modify', 'folder
$max_email_input->value=$dos->get_parameter('max_email');
$max_email_input->prec=0;
echo $max_email_input->input();
echo '<br>';
echo '<ul class="aligned-block">';
echo "<li>";
echo HtmlInput::submit('upd', _('Modifie'));
echo "</li>";
echo "<li>";
echo HtmlInput::button_close("folder_admin_div");
echo "</li>";
echo '</ul>';
echo '</form>';
$content=ob_get_clean();
$status='OK';
@ -263,10 +272,16 @@ if (in_array($op, array('modele_drop', 'modele_modify', 'folder_modify', 'folder
echo _("Tapez le code de confirmation");
echo confirm_with_string("fld_drop",5);
echo '</p>';
echo '<p style="text-align:center">';
echo '<ul class="aligned-block">';
echo "<li>";
echo HtmlInput::submit('remove', _('Effacer'));
echo '</p>';
echo "</li>";
echo "<li>";
echo HtmlInput::button_close("folder_admin_div");
echo "</li>";
echo '</ul>';
echo '</form>';
$content=ob_get_clean();
$status='OK';
}
@ -288,9 +303,15 @@ if (in_array($op, array('modele_drop', 'modele_modify', 'folder_modify', 'folder
echo _('Cochez la case si vous êtes sûr de vouloir effacer ce modèle');
echo $confirm->input();
echo '</p>';
echo '<p style="text-align:center">';
echo '<ul class="aligned-block">';
echo "<li>";
echo HtmlInput::submit('remove', _('Effacer'));
echo '</p>';
echo "</li>";
echo "<li>";
echo HtmlInput::button_close("folder_admin_div");
echo "</li>";
echo '</ul>';
echo '</form>';
$content=ob_get_clean();
$status='OK';
@ -317,8 +338,17 @@ if (in_array($op, array('modele_drop', 'modele_modify', 'folder_modify', 'folder
echo $wDesc->input('desc', $desc);
echo HtmlInput::hidden('m', $dossier);
echo HtmlInput::hidden('action', 'modele_mgt');
echo '<br>';
echo HtmlInput::submit('upd', _('Modifie'));
echo '<ul class="aligned-block">';
echo "<li>";
echo HtmlInput::submit('upd', _('Modifie'));
echo "</li>";
echo "<li>";
echo HtmlInput::button_close("folder_admin_div");
echo "</li>";
echo '</ul>';
echo '</form>';
$content=ob_get_clean();
$status='OK';

View file

@ -25,6 +25,8 @@
*/
class Sort_Table
{
private $nb;
private $array;
function __construct()
{
@ -35,12 +37,12 @@ class Sort_Table
/**
*@brief add row of a header in the internal array ($this->array)
* , it uses the $_GET['ord'] parameter,
* @param type $p_header label of the header
* @param type $p_url base url
* @param type $p_sql_asc sql if ascending
* @param type $p_sql_desc sql if descending
* @param type $p_get_asc the value in $_GET if ascending is choosen
* @param type $p_get_desc the value in $_GET if descending is choosen
* @param string $p_header label of the header
* @param string $p_url base url
* @param string $p_sql_asc sql if ascending
* @param string $p_sql_desc sql if descending
* @param string $p_get_asc the value in $_GET if ascending is choosen
* @param string $p_get_desc the value in $_GET if descending is choosen
*/
function add($p_header, $p_url, $p_sql_asc, $p_sql_desc, $p_get_asc, $p_get_desc)
{
@ -51,8 +53,8 @@ class Sort_Table
'sql_desc' => $p_sql_desc,
'parm_asc' => $p_get_asc,
'parm_desc' => $p_get_desc,
'car_asc' => '<span>&#9650</span>',
'car_desc' => '<span>&#9660</span>'
'car_asc' => '<span style="font-size:70%">&#9650</span>',
'car_desc' => '<span style="font-size:70%">&#9660</span>'
);
$ind = $this->nb;
$this->array[$ind] = $array;
@ -61,7 +63,7 @@ class Sort_Table
/**
* Returns the header (the value into th tags) with the symbol ascending and
* descending
* @param $p_ind the element (from 0 to nb)
* @param int $p_ind the element (from 0 to nb)
* @return string
*/
function get_header($p_ind)
@ -84,19 +86,19 @@ class Sort_Table
function get_sql_order($p_get)
{
for ($i = 0; $i < $this->nb; $i++)
{
if ($p_get == $this->array[$i]['parm_asc'])
{
$this->array[$i]['car_asc'] = '<span style="color:red">&#9650</span>';
return $this->array[$i]['sql_asc'];
}
if ($p_get == $this->array[$i]['parm_desc'])
{
$this->array[$i]['car_desc'] = '<span style="color:red">&#9660</span>';
return $this->array[$i]['sql_desc'];
}
}
for ($i = 0; $i < $this->nb; $i++)
{
if ($p_get == $this->array[$i]['parm_asc'])
{
$this->array[$i]['car_asc'] = '<span style="color:red;font-size:70%">&#9650</span>';
return $this->array[$i]['sql_asc'];
}
if ($p_get == $this->array[$i]['parm_desc'])
{
$this->array[$i]['car_desc'] = '<span style="color:red;font-size:70%">&#9660</span>';
return $this->array[$i]['sql_desc'];
}
}
}
}