Merge branch 'devel'
This commit is contained in:
commit
b0a300cdd6
17 changed files with 201 additions and 70 deletions
|
|
@ -909,7 +909,7 @@ function ajax_disconnected($p_div)
|
|||
echo HtmlInput::title_box(_("Déconnecté"), $p_div);
|
||||
echo h2(_('Données non disponibles'), 'class="error" ');
|
||||
echo h2(_('Veuillez vous reconnecter soit dans une autre fenêtre soit '
|
||||
. ' en cliquant sur le lien'), 'class="error"');
|
||||
. ' en cliquant sur le bouton'), 'class="error"');
|
||||
// Reload button
|
||||
$reload=new IButton("reload");
|
||||
$reload->value=_("Se connecter");
|
||||
|
|
@ -918,7 +918,7 @@ function ajax_disconnected($p_div)
|
|||
// Link to log in another tab
|
||||
echo '<p style="text-align:center">';
|
||||
echo $reload->input();
|
||||
echo HtmlInput::button_close($p_div);
|
||||
echo HtmlInput::button_close($p_div,'button');
|
||||
echo '</p>';
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -79,6 +79,8 @@ EOF;
|
|||
<pre><?= print_r($_GET) ?></pre>
|
||||
$_REQUEST
|
||||
<pre><?= print_r($_REQUEST) ?></pre>
|
||||
$_FILES
|
||||
<pre><?= print_r($_FILES) ?></pre>
|
||||
<?= \HtmlInput::button_hide($id) ?>
|
||||
</div>
|
||||
<input type="button" onclick="document.getElementById('<?= $id ?>').show();" value="Show request">
|
||||
|
|
|
|||
|
|
@ -444,10 +444,11 @@ class HtmlInput
|
|||
* @see add_div modify_operation
|
||||
* @param $div_name is the name of the div to remove
|
||||
*/
|
||||
static function button_close($div_name)
|
||||
static function button_close($div_name,$class='smallbutton')
|
||||
{
|
||||
$a=new IButton('Fermer');
|
||||
$a->label=_("Fermer");
|
||||
$a->class=$class;
|
||||
$a->javascript="removeDiv('".$div_name."')";
|
||||
$html=$a->input();
|
||||
|
||||
|
|
|
|||
|
|
@ -31,10 +31,23 @@ class IFile extends HtmlInput
|
|||
{
|
||||
// if true , the size is tested and a box is displaid
|
||||
private $alert_on_size;
|
||||
private $multiple ; // false by default, if true allow to select several files
|
||||
function __construct($p_name = "", $p_value = "", $p_id = "")
|
||||
{
|
||||
parent::__construct($p_name, $p_value, $p_id);
|
||||
$this->alert_on_size=false;
|
||||
$this->multiple=false;
|
||||
}
|
||||
|
||||
public function get_multiple(): bool
|
||||
{
|
||||
return $this->multiple;
|
||||
}
|
||||
|
||||
public function set_multiple(bool $multiple): IFile
|
||||
{
|
||||
$this->multiple = $multiple;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -61,7 +74,11 @@ class IFile extends HtmlInput
|
|||
$this->value=($p_value==null)?$this->value:$p_value;
|
||||
if ( $this->readOnly==true) return $this->display();
|
||||
if ($this->id=="") $this->id=uniqid("file_");
|
||||
$r=sprintf('<INPUT class="inp" TYPE="file" name="%s" id="%s" value="%s">',
|
||||
$multiple="";
|
||||
if ( $this->multiple) $multiple=" multiple ";
|
||||
|
||||
$r=sprintf('<INPUT class="inp" %s TYPE="file" name="%s" id="%s" value="%s">',
|
||||
$multiple,
|
||||
$this->name,
|
||||
$this->id,
|
||||
$this->value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue