noalyss Version-9
action_display_short.php
Go to the documentation of this file.
1<?php
2/*
3 * * Copyright (C) 2015 Dany De Bontridder <dany@alchimerys.be>
4*
5* This program is free software; you can redistribute it and/or
6* modify it under the terms of the GNU General Public License
7* as published by the Free Software Foundation; either version 2
8* of the License, or (at your option) any later version.
9*
10* This program is distributed in the hope that it will be useful,
11* but WITHOUT ANY WARRANTY; without even the implied warranty of
12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13* GNU General Public License for more details.
14*
15* You should have received a copy of the GNU General Public License
16* along with this program; if not, write to the Free Software
17* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 *
20 */
21
22
23/**
24 * @file
25 * @brief call from follow_up::display_short display a small form to
26 * enter a new event
27 */
28global $g_user;
29// Date of the event
30$date=new IDate("date_event");
31$date->id="date_event_action_short";
32$title=new IText('title_event');
33$title->size="60";
34$title->css_isze="60%";
35// Description
36$summary=new ITextarea('summary');
37$summary->style='class="itextarea" style="padding:0px;margin:0px"';
38
39// Type of document / event
40$type=new ISelect("type_event");
41$type->name="type_event";
42$type->value=$cn->make_array("select dt_id,dt_value from document_type order by dt_value", 1);
43$type->selected=0;
44
45// Available for the profile
46$profile=new ISelect('event_group');
47$profile->value=$cn->make_array("select p_id as value, ".
48 "p_name as label ".
49 " from profile "
50 . "where "
51 . "p_id in "
52 . $g_user->sql_writable_profile()
53 . "order by 2");
54
55// priority
56$priority=new ISelect('event_priority');
57$priority->value=array(
58 array('value'=>1, 'label'=>_('Haute')),
59 array('value'=>2, 'label'=>_('Moyenne')),
60 array('value'=>3, 'label'=>_('Basse'))
61 );
62$priority->selected=2;
63
64// Card
65$dest=new ICard('dest');
66$dest->jrn=0;
67$dest->name='dest';
68$dest->value="";
69$dest->label="";
70$list_recipient=$cn->make_list('select fd_id from fiche_def where frd_id in (14,25,8,9,16)');
72$dest->set_attribute('typecard', $list_recipient);
73$dest->set_dblclick("fill_ipopcard(this);");
74$dest->set_attribute('ipopup', 'ipopcard');
75$dest->style=' style="vertical-align:0%"';
76
77// Hours
78$hour=new IText('hour_event');
79$hour->size=5;
80
81echo HtmlInput::title_box(_('Nouvel événement'), 'action_add_div',"close","","y");
82?>
83<span class="notice" style="float:right" id="action_add_frm_info"></span>
84<form method="get" style="margin-left:5%;margin-right: 10%" id="action_add_frm" onsubmit="action_save_short(<?php echo Dossier::id()?>);return false">
85 <span>
86 <?php echo _('Date')." ". $date->input()?>
87 </span>
88 <span>
89 <?php echo _('Heure')." ". $hour->input()?>
90 </span>
91 <span>
92 <?php echo _('Type évenement')?>
93<?php echo $type->input();?>
94 </span>
95 <p></p>
96 <span>
97<?php echo _('Destinataire')?> <?php echo $dest->input();?>
98 </span>
99 <span>
100 <?php echo _('Priorité')?>
101<?php echo $priority->input()?>
102 </span>
103 <span>
104 <?php echo _('groupe')?>
105<?php echo $profile->input()?>
106
107 </span>
108<p>
109 <span>
110 <?php echo _('Sujet')?>
111 <?php echo $title->input()?>
112 </span>
113</p>
114<span > <?php echo _("Description")?>
115</span>
116<p>
117 <?php echo $summary->input()?>
118</p>
119<?php
120echo HtmlInput::hidden('gDossier',Dossier::id());
121echo HtmlInput::hidden('op','action_save');
122?>
123<p style="text-align: center">
124<ol style="list-style: none">
125 <li style="display:inline">
126 <?php echo HtmlInput::submit("action_add_submit", _('Valider'));?>
127 </li>
128 <li style="display:inline">
129 <?php echo HtmlInput::button_close("action_add_div")?>
130 </li>
131
132</ol>
133
134</p>
135</form>
span($p_string, $p_extra='')
Definition: ac_common.php:43
p($p_string)
Definition: ac_common.php:39
$summary style
global $g_user
static id()
return the 'gDossier' value after a check
static button_close($div_name, $class='smallbutton')
close button for the HTML popup
static hidden($p_name, $p_value, $p_id="")
static title_box($p_name, $p_div, $p_mod="close", $p_js="", $p_draggable="n", $p_enlarge='n')
Title for boxes, you can customize the symbol thanks symbol with the mode "custom".
static submit($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
Input HTML for the card show buttons, in the file, you have to add card.js How to use :
Html Input : Input a date format dd.mm.yyyy The property title should be set to indicate what it is e...
Definition: idate.class.php:34
Html Input , create a tag <SELECT> ... </SELECT> if readonly == true then display the label correspon...
Html Input.
Definition: itext.class.php:30
Manage the TEXTAREA html element.