[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 15/22: New : new parameter (choice_cat) for t
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 15/22: New : new parameter (choice_cat) for the sub_menu see wiki |
Date: |
Thu, 18 Jun 2015 15:56:10 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 882060cd4b635b3159fd1fe7be4bbf45af7a0f9c
Author: Dany De Bontridder <address@hidden>
Date: Wed Jun 17 19:20:16 2015 +0200
New : new parameter (choice_cat) for the sub_menu see wiki
---
include/adm.inc.php | 31 ++++++++++++++++++++-----------
include/bank.inc.php | 25 ++++++++++++++++++-------
include/customer.inc.php | 42 ++++++++++++++++++++++++++----------------
include/dossier.inc.php | 4 ++--
include/manager.inc.php | 25 ++++++++++++++++++-------
include/modele.inc.php | 2 +-
include/supplier.inc.php | 23 ++++++++++++++++-------
7 files changed, 101 insertions(+), 51 deletions(-)
diff --git a/include/adm.inc.php b/include/adm.inc.php
index 77a9697..f708eda 100644
--- a/include/adm.inc.php
+++ b/include/adm.inc.php
@@ -74,17 +74,26 @@ if ( $low_action == "list" )
<?php
echo '<h2>' . "Exercice " . $g_user->get_exercice() . '</h2>';
echo dossier::hidden();
- $a=(isset($_GET['query']))?$_GET['query']:"";
- printf (_('Recherche').' <input class="input_text" type="text"
name="query" value="%s">',
- $a);
- echo HtmlInput::request_to_hidden(array('ac'));
- $sel_card=new ISelect('cat');
- $sel_card->value=$cn->make_array('select fd_id, fd_label from fiche_def '.
- ' where frd_id=$1 '.
- ' order by fd_label
',1,array(FICHE_TYPE_ADM_TAX));
- $sel_card->selected=(isset($_GET['cat']))?$_GET['cat']:-1;
- $sel_card->javascript=' onchange="submit(this);"';
- echo _('Catégorie :').$sel_card->input();
+ $a=(isset($_GET['query']))?$_GET['query']:"";
+ printf (_('Recherche').' <input class="input_text" type="text"
name="query" value="%s">',
+ $a);
+ echo HtmlInput::request_to_hidden(array('ac'));
+ $choice_cat=HtmlInput::default_value_request("choice_cat", 1);
+ if ( $choice_cat == 1 )
+ {
+ $sel_card=new ISelect('cat');
+ $sel_card->value=$cn->make_array('select fd_id, fd_label from
fiche_def '.
+ ' where frd_id=$1 '.
+ ' order by fd_label
',1,array(FICHE_TYPE_ADM_TAX));
+ $sel_card->selected=(isset($_GET['cat']))?$_GET['cat']:-1;
+ $sel_card->javascript=' onchange="submit(this);"';
+ echo _('Catégorie :').$sel_card->input();
+ } else
+ {
+ $cat=HtmlInput::default_value_request('cat', '');
+ echo HtmlInput::hidden("cat",$cat);
+ echo HtmlInput::hidden('choice_cat', 0);
+ }
?>
<input type="submit" class="button" name="submit_query" value="<?php echo
_('recherche')?>">
diff --git a/include/bank.inc.php b/include/bank.inc.php
index d199762..051a1f6 100644
--- a/include/bank.inc.php
+++ b/include/bank.inc.php
@@ -73,13 +73,24 @@ if ( $low_action == "list" )
$a=(isset($_GET['query']))?$_GET['query']:"";
printf (_('Recherche').' <input class="input_text" type="text"
name="query" value="%s">',
$a);
- $sel_card=new ISelect('cat');
- $sel_card->value=$cn->make_array('select fd_id, fd_label from fiche_def '.
- ' where frd_id=$1'.
- ' order by fd_label
',1,array(FICHE_TYPE_FIN));
- $sel_card->selected=(isset($_GET['cat']))?$_GET['cat']:-1;
- $sel_card->javascript=' onchange="submit(this);"';
- echo _('Catégorie :').$sel_card->input();
+ $choice_cat=HtmlInput::default_value_request("choice_cat", 1);
+
+ if ( $choice_cat == 1 )
+ {
+ $sel_card=new ISelect('cat');
+ $sel_card->value=$cn->make_array('select fd_id, fd_label from
fiche_def '.
+ ' where frd_id=$1'.
+ ' order by fd_label
',1,array(FICHE_TYPE_FIN));
+ $sel_card->selected=(isset($_GET['cat']))?$_GET['cat']:-1;
+ $sel_card->javascript=' onchange="submit(this);"';
+ echo _('Catégorie :').$sel_card->input();
+ }
+ else
+ {
+ $cat=HtmlInput::default_value_request('cat', '');
+ echo HtmlInput::hidden("cat", $cat);
+ echo HtmlInput::hidden('choice_cat', 0);
+ }
$nooperation=new ICheckBox('noop');
$nooperation->selected=(isset($_GET['noop']))?true:false;
echo _('Inclure les banques sans opération :').$nooperation->input();
diff --git a/include/customer.inc.php b/include/customer.inc.php
index 8b79781..9b8c54e 100644
--- a/include/customer.inc.php
+++ b/include/customer.inc.php
@@ -68,23 +68,33 @@ if ($low_action == "list")
<div class="content">
<div>
<form method="get" action="<?php echo $href;?>">
- <?php
- echo '<h2>' . "Exercice " . $g_user->get_exercice() . '</h2>';
- echo dossier::hidden();
- $a = (isset($_GET['query'])) ? $_GET['query'] : "";
- printf(_('Recherche') . ' <input class="input_text" type="text"
name="query" value="%s">', $a);
- $sel_card = new ISelect('cat');
- $sel_card->value = $cn->make_array('select fd_id, fd_label from
fiche_def ' .
- ' where frd_id=' . FICHE_TYPE_CLIENT .
- ' order by fd_label ', 1);
- $sel_card->selected = (isset($_GET['cat'])) ? $_GET['cat'] : -1;
- $sel_card->javascript = ' onchange="submit(this);"';
- echo _('Catégorie :') . $sel_card->input();
- $nooperation = new ICheckBox('noop');
- $nooperation->selected = (isset($_GET['noop'])) ? true : false;
-
- echo _('Inclure les clients sans opération :') .
$nooperation->input();
- ?>
+ <?php
+ echo '<h2>' . "Exercice " . $g_user->get_exercice() . '</h2>';
+ $a=(isset($_GET['query']))?$_GET['query']:"";
+ printf (_('Recherche').' <input class="input_text" type="text"
name="query" value="%s">',
+ $a);
+ $choice_cat=HtmlInput::default_value_request("choice_cat", 1);
+
+ if ( $choice_cat == 1 )
+ {
+ $sel_card=new ISelect('cat');
+ $sel_card->value=$cn->make_array('select fd_id, fd_label from
fiche_def '.
+ ' where
frd_id='.FICHE_TYPE_CLIENT.
+ ' order by fd_label ',1);
+ $sel_card->selected=(isset($_GET['cat']))?$_GET['cat']:-1;
+ $sel_card->javascript=' onchange="submit(this);"';
+ echo _('Catégorie :').$sel_card->input();
+ } else
+ {
+ $cat=HtmlInput::default_value_request('cat', '');
+ echo HtmlInput::hidden("cat",$cat);
+ echo HtmlInput::hidden('choice_cat', 0);
+ }
+ $nooperation = new ICheckBox('noop');
+ $nooperation->selected = (isset($_GET['noop'])) ? true : false;
+
+ echo _('Inclure les clients sans opération :') .
$nooperation->input();
+ ?>
<input type="submit" class="button" name="submit_query"
value="<?php echo _('recherche')?>">
<input type="hidden" name="ac" value="<?php echo
$_REQUEST['ac']?>">
</form>
diff --git a/include/dossier.inc.php b/include/dossier.inc.php
index 2f2bd23..47ed428 100644
--- a/include/dossier.inc.php
+++ b/include/dossier.inc.php
@@ -328,8 +328,8 @@ if ( $sa == 'remove' )
$sql="delete from ac_dossier where dos_id=$1";
$cn->exec_sql($sql,array($_REQUEST['d']));
print '<h2 class="error">';
- printf (_("Le dossier %s est effacé"),h($name))."</h2>";
- echo HtmlInput::button_anchor('Retour','?action=dossier_mgt');
+ printf (_("Le dossier %s est effacé").'</h2>',h($name));
+ echo HtmlInput::button_anchor(_('Retour'),'?action=dossier_mgt');
}
?>
</div>
diff --git a/include/manager.inc.php b/include/manager.inc.php
index 2064b71..9da8b33 100644
--- a/include/manager.inc.php
+++ b/include/manager.inc.php
@@ -76,13 +76,24 @@ if ($low_action == "list")
echo dossier::hidden();
$a = (isset($_GET['query'])) ? $_GET['query'] : "";
printf(_('Recherche') . ' <input class="input_text"
type="text" name="query" value="%s">', $a);
- $sel_card = new ISelect('cat');
- $sel_card->value = $cn->make_array('select fd_id, fd_label
from fiche_def ' .
- ' where frd_id=' . FICHE_TYPE_EMPL .
- ' order by fd_label ', 1);
- $sel_card->selected = (isset($_GET['cat'])) ? $_GET['cat'] :
-1;
- $sel_card->javascript = ' onchange="submit(this);"';
- echo _('Catégorie :') . $sel_card->input();
+ echo HtmlInput::request_to_hidden(array('ac'));
+ $choice_cat=HtmlInput::default_value_request("choice_cat", 1);
+ if ( $choice_cat == 1 )
+ {
+ $sel_card = new ISelect('cat');
+ $sel_card->value = $cn->make_array('select fd_id, fd_label
from fiche_def ' .
+ ' where frd_id=' . FICHE_TYPE_EMPL .
+ ' order by fd_label ', 1);
+ $sel_card->selected = (isset($_GET['cat'])) ? $_GET['cat']
: -1;
+ $sel_card->javascript = ' onchange="submit(this);"';
+ echo _('Catégorie :') . $sel_card->input();
+ }
+ else
+ {
+ $cat=HtmlInput::default_value_request('cat', '');
+ echo HtmlInput::hidden("cat",$cat);
+ echo HtmlInput::hidden('choice_cat', 0);
+ }
$nooperation = new ICheckBox('noop');
$nooperation->selected = (isset($_GET['noop'])) ? true : false;
echo _('Inclure les employés sans opération :') .
$nooperation->input();
diff --git a/include/modele.inc.php b/include/modele.inc.php
index 4ceefc0..baa6aff 100644
--- a/include/modele.inc.php
+++ b/include/modele.inc.php
@@ -383,7 +383,7 @@ if ($sa == 'list')
$sql = "delete from modeledef where mod_id=$1";
$cn->exec_sql($sql, array($_REQUEST['m']));
print '<h2 class="error">';
- printf (_("Le modèle %s est effacé"),$name )."</H2>";
+ printf (_("Le modèle %s est effacé")."</H2>",$name );
echo HtmlInput::button_anchor(_('Retour'),
'?action=modele_mgt');
}
echo '</div>';
diff --git a/include/supplier.inc.php b/include/supplier.inc.php
index 0dc5a65..ab8d8c9 100644
--- a/include/supplier.inc.php
+++ b/include/supplier.inc.php
@@ -78,13 +78,22 @@ if ( $low_action == "list" )
$a=(isset($_GET['query']))?$_GET['query']:"";
printf (_('Recherche').' <input class="input_text" type="text"
name="query" value="%s">',
$a);
- $sel_card=new ISelect('cat');
- $sel_card->value=$cn->make_array('select fd_id, fd_label from fiche_def '.
- ' where frd_id='.FICHE_TYPE_FOURNISSEUR.
- ' order by fd_label ',1);
- $sel_card->selected=(isset($_GET['cat']))?$_GET['cat']:-1;
- $sel_card->javascript=' onchange="submit(this);"';
- echo _('Catégorie :').$sel_card->input();
+ $choice_cat=HtmlInput::default_value_request("choice_cat", 1);
+ if ( $choice_cat == 1 )
+ {
+ $sel_card=new ISelect('cat');
+ $sel_card->value=$cn->make_array('select fd_id, fd_label from
fiche_def '.
+ ' where
frd_id='.FICHE_TYPE_FOURNISSEUR.
+ ' order by fd_label ',1);
+ $sel_card->selected=(isset($_GET['cat']))?$_GET['cat']:-1;
+ $sel_card->javascript=' onchange="submit(this);"';
+ echo _('Catégorie :').$sel_card->input();
+ } else
+ {
+ $cat=HtmlInput::default_value_request('cat', '');
+ echo HtmlInput::hidden("cat",$cat);
+ echo HtmlInput::hidden('choice_cat', 0);
+ }
$nooperation=new ICheckBox('noop');
$nooperation->selected=(isset($_GET['noop']))?true:false;
echo _('Inclure les fournisseurs sans opération :').$nooperation->input();
- [Noalyss-commit] [noalyss] 08/22: menu_ code is always upper case, (continued)
- [Noalyss-commit] [noalyss] 08/22: menu_ code is always upper case, Dany De Bontridder, 2015/06/18
- [Noalyss-commit] [noalyss] 13/22: Cosmetic, Dany De Bontridder, 2015/06/18
- [Noalyss-commit] [noalyss] 16/22: Documentation, Dany De Bontridder, 2015/06/18
- [Noalyss-commit] [noalyss] 09/22: plugin : remove trailing space, Dany De Bontridder, 2015/06/18
- [Noalyss-commit] [noalyss] 14/22: Cosmetic : add font, Dany De Bontridder, 2015/06/18
- [Noalyss-commit] [noalyss] 18/22: remove some javascript warnings, Dany De Bontridder, 2015/06/18
- [Noalyss-commit] [noalyss] 02/22: translation, Dany De Bontridder, 2015/06/18
- [Noalyss-commit] [noalyss] 22/22: Cosmetic, Dany De Bontridder, 2015/06/18
- [Noalyss-commit] [noalyss] 01/22: translation, Dany De Bontridder, 2015/06/18
- [Noalyss-commit] [noalyss] 19/22: upgrade SQL scripts, Dany De Bontridder, 2015/06/18
- [Noalyss-commit] [noalyss] 15/22: New : new parameter (choice_cat) for the sub_menu see wiki,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 17/22: Bug replace "Fermer" by a cross, Dany De Bontridder, 2015/06/18
- [Noalyss-commit] [noalyss] 21/22: upgrade SQL, Dany De Bontridder, 2015/06/18
- [Noalyss-commit] [noalyss] 20/22: translation, Dany De Bontridder, 2015/06/18
- [Noalyss-commit] [noalyss] 03/22: translation, Dany De Bontridder, 2015/06/18
- [Noalyss-commit] [noalyss] 06/22: translation, Dany De Bontridder, 2015/06/18
- [Noalyss-commit] [noalyss] 11/22: Documentation & indentation, Dany De Bontridder, 2015/06/18