[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 68/119: Add new type of attribute : check
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 68/119: Add new type of attribute : check |
Date: |
Mon, 26 Oct 2020 18:27:24 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 1b041e65de5d508c1af1619e11f316b94701d809
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Sat Oct 10 19:34:30 2020 +0200
Add new type of attribute : check
---
include/class/card_attribut_mtable.class.php | 2 ++
include/class/fiche.class.php | 16 ++++++++++++++++
include/class/fiche_attr.class.php | 2 +-
3 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/include/class/card_attribut_mtable.class.php
b/include/class/card_attribut_mtable.class.php
index 2933dae..7b468f4 100644
--- a/include/class/card_attribut_mtable.class.php
+++ b/include/class/card_attribut_mtable.class.php
@@ -54,11 +54,13 @@ class Card_Attribut_MTable extends Manage_Table_SQL
["value"=>"select", "label"=>_("Choix")],
["value"=>"card", "label"=>_("Fiche")],
["value"=>"zone", "label"=>_("Zone de texte")],
+ ["value"=>"check", "label"=>_("Coche")],
["value"=>"poste", "label"=>_("Poste comptable")]
));
$this->set_col_tips("ad_search_followup", 77);
// to prevent a call to this function for each row
$this->dossier_id=Dossier::id();
+ $this->set_col_sort(1);
}
/**
diff --git a/include/class/fiche.class.php b/include/class/fiche.class.php
index a6a8e21..98aee88 100644
--- a/include/class/fiche.class.php
+++ b/include/class/fiche.class.php
@@ -29,6 +29,7 @@ require_once NOALYSS_INCLUDE.'/class/fiche_def.class.php';
require_once NOALYSS_INCLUDE.'/lib/iposte.class.php';
require_once NOALYSS_INCLUDE.'/class/acc_operation.class.php';
require_once NOALYSS_INCLUDE.'/class/acc_account.class.php';
+require_once NOALYSS_INCLUDE."/lib/input_switch.class.php";
/*! \file
* \brief define Class fiche, this class are using
@@ -502,6 +503,11 @@ class Fiche
$w->table = 1;
$bulle = Icon_Action::infobulle(14);
break;
+ case 'check':
+ $w=new InputSwitch("av_text".$r->ad_id);
+ $w->value=$r->av_text;
+ $w->value=(trim($w->value)=="")?1:$w->value;
+ break;
case 'select':
$w = new ISelect("av_text" . $attr->ad_id);
$w->value = $this->cn->make_array($attr->ad_extra);
@@ -641,6 +647,11 @@ class Fiche
$w->style=' class="itextarea"
style="margin:0px;width:100%"';
$w->value=$r->av_text;
break;
+ case 'check':
+ $w=new InputSwitch("av_text".$r->ad_id);
+ $w->value=$r->av_text;
+ $w->value=(trim($w->value)=="")?1:$w->value;
+ break;
case 'poste':
$w=new IPoste("av_text".$r->ad_id);
$w->set_attribute('ipopup', 'ipop_account');
@@ -711,6 +722,11 @@ class Fiche
$value=$x->display();
$w->value=$value;
break;
+ case 'check':
+ $w=new InputSwitch("av_text".$r->ad_id);
+ $w->value=$r->av_text;
+ $w->value=(trim($w->value)=="")?1:$w->value;
+ break;
default:
$w->value=$r->av_text;
}
diff --git a/include/class/fiche_attr.class.php
b/include/class/fiche_attr.class.php
index 7133a0a..ee71841 100644
--- a/include/class/fiche_attr.class.php
+++ b/include/class/fiche_attr.class.php
@@ -39,7 +39,7 @@ class Fiche_Attr extends Attr_def_SQL
if (strlen(trim($this->ad_type))==0)
throw new Exception('Le type ne peut pas ĂȘtre vide', 1);
$this->ad_type=strtolower($this->ad_type);
- if (in_array($this->ad_type, array('date', 'text', 'numeric', 'zone',
'poste', 'card', 'select'))==false)
+ if (in_array($this->ad_type, array('date', 'text', 'numeric', 'zone',
'poste', 'card', 'select','check'))==false)
throw new Exception('Le type doit ĂȘtre text, numeric,poste, card,
select ou date', 1);
if
(trim($this->ad_size)==''||isNumber($this->ad_size)==0||$this->ad_size>22)
{
- [Noalyss-commit] [noalyss] 49/119: tag - cosmetic, (continued)
- [Noalyss-commit] [noalyss] 49/119: tag - cosmetic, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 47/119: Tag and Group Tag, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 53/119: NEW Security : add tag, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 56/119: Cosmetic for cells for tag and contact, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 55/119: not used anymore javascript:void(0), Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 58/119: Missing file, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 62/119: FOLLOWUP : generate doc. add new tag, DOCUMENT_ID, TITLE, DESCRIPTION, LABELOP, COMMENT, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 72/119: Tag Limit column size , replace input_switch by check_box, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 61/119: Search Card Paginate, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 64/119: InPlace_Switch : do not echo , return a string instead, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 68/119: Add new type of attribute : check,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 81/119: Search card :typo, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 90/119: select_box cosmetic font, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 92/119: Follow-Up create doc new Tags COMMENTS, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 93/119: Follow-up new column "Status", Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 98/119: Follow up add followup action, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 103/119: Improve : Quick filter on history, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 84/119: Merge extension-crm, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 96/119: Cosmetic, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 100/119: Notice, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 101/119: Grand livre waiting box, Dany De Bontridder, 2020/10/26