[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 122/219: Anc ODS : check date is valid and co
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 122/219: Anc ODS : check date is valid and comment not empty |
Date: |
Mon, 18 Dec 2017 13:22:48 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit d774be930b18cf14d71b5a0e0018c2f8feb78fb9
Author: Dany De Bontridder <address@hidden>
Date: Wed Nov 1 12:02:48 2017 +0100
Anc ODS : check date is valid and comment not empty
---
include/anc_od.inc.php | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/include/anc_od.inc.php b/include/anc_od.inc.php
index 02fe6af..dca8c96 100644
--- a/include/anc_od.inc.php
+++ b/include/anc_od.inc.php
@@ -139,7 +139,7 @@ if ( isset($_GET['new']))
$wSubmit=new IHidden("p_action","ca_od");
$wSubmit->table=0;
echo '<div class="redcontent" >';
- echo '<form method="post">';
+ echo '<form id="anc_od_frm" method="post" onsubmit="return
validate_anc(\'anc_od_frm\');return false;">';
echo dossier::hidden();
echo $wSubmit->input();
echo $a->form();
@@ -153,6 +153,31 @@ if ( isset($_GET['new']))
';
echo '</div>';
+ $msg_comment=_("Commentaire vide");
+ $msg_date=_("Date invalide");
+echo <<<EOF
+<script>
+ function validate_anc(p_frm_id) {
+ console.debug($(p_frm_id)['pdate'].value );
+ try {
+ if ($('pdesc').value.length==0) {
+ smoke.alert('$msg_comment');
+ return false;
+ }
+ if ( ! check_date($(p_frm_id)['pdate'].value) ) {
+ smoke.alert('$msg_date');
+ return false;
+ }
+ } catch (e) {
+ smoke.alert(e.message);
+ }
+ return true;
+ }
+
+</script>;
+
+EOF;
+
return;
}
- [Noalyss-commit] [noalyss] 204/219: Bug : when pressing on the template button, the input field to focus is not diplaid and the javascript gives an exception, (continued)
- [Noalyss-commit] [noalyss] 204/219: Bug : when pressing on the template button, the input field to focus is not diplaid and the javascript gives an exception, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 206/219: typo, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 88/219: Task #0001481: Encodage Vente, Achat, Fin ou OD 1. S'il n'y a qu'une seule catégorie de fiche , il n'est plus nécessaire d'afficher le choix (puisqu'il n'y en a qu'un) 2. Avoir pour chaque ligne un bouton ajout fiche, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 212/219: Esthetic : show ledger : width of the box, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 179/219: Fix ID problem, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 167/219: Space, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 138/219: Javascript : small error, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 100/219: CSS input field with focus 0001302: FICHES: mise en évidence champs NOM/POSTE/CODE, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 26/219: task #1438 Remplacement de HtmlInput par Http_Input, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 91/219: Esthetic : change button appearance, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 122/219: Anc ODS : check date is valid and comment not empty,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 199/219: Task #001381 : ergonomy after selecting a filter remove the box, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 187/219: fix bug with filter_card : encodeURI not needed, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 18/219: remove href=javascript:void(0) + HtmlInput::generate_id replaced by uniqid, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 90/219: Task #0001481: Encodage Vente, Achat, Fin ou OD 1. S'il n'y a qu'une seule catégorie de fiche , il n'est plus nécessaire d'afficher le choix (puisqu'il n'y en a qu'un) 2. Avoir pour chaque ligne un bouton ajout fiche, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 62/219: Analytic : change the name and description in Ajax, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 54/219: NEW : ICard , you can hide or show the accounting in the search box with the functions ICard->hide_accounting and ICard->show_accounting, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 67/219: Icon : for Inplace Edit field, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 166/219: Space, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 19/219: Replace global $http by new httpInput() to make the test of scenario working, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 128/219: Esthetic, Dany De Bontridder, 2017/12/18