14 |
* $Id$ |
* $Id$ |
15 |
* |
* |
16 |
* $Log$ |
* $Log$ |
17 |
|
* Revision 1.4 2003/05/10 18:02:13 jonen |
18 |
|
* + implemented multi-selection (special for multi-delete) |
19 |
|
* |
20 |
|
* Revision 1.3 2003/04/11 01:34:46 joko |
21 |
|
* don't show any form content on this negotation (does delete only by now) |
22 |
|
* |
23 |
|
* Revision 1.2 2003/04/11 00:59:10 joko |
24 |
|
* minor update regarding function rename |
25 |
|
* |
26 |
* Revision 1.1 2003/04/11 00:40:31 joko |
* Revision 1.1 2003/04/11 00:40:31 joko |
27 |
* initial commit |
* initial commit |
28 |
* |
* |
53 |
* |
* |
54 |
*/ |
*/ |
55 |
function FlexibleNegotiation($title, $options = array(), $negotiation_options = array()) { |
function FlexibleNegotiation($title, $options = array(), $negotiation_options = array()) { |
56 |
|
|
57 |
$this->_negotiation_options = $negotiation_options; |
$this->_negotiation_options = $negotiation_options; |
58 |
|
|
59 |
// change phpHtmlLib default behavior to change |
// change phpHtmlLib default behavior to change |
61 |
// TODO: integrate into negotiation options!? |
// TODO: integrate into negotiation options!? |
62 |
$_POST[FORM_VISITED] = 1; |
$_POST[FORM_VISITED] = 1; |
63 |
//$_POST[FORM_CONFIRM] = 1; |
//$_POST[FORM_CONFIRM] = 1; |
64 |
|
|
65 |
|
// on multi-selections we can't currently confirm relating on problems at var forwarding |
66 |
|
if(is_array($options[data_locator_meta][ident])) { |
67 |
|
$_POST[FORM_CONFIRM] = 1; |
68 |
|
} |
69 |
|
|
70 |
// call constructor of base class |
// call constructor of base class |
71 |
$this->EditDataItem($title, $options); |
$this->EditDataItem($title, $options); |
72 |
//$this->StandardFormContent($title, $PHP_SELF, 600); |
//$this->StandardFormContent($title, $PHP_SELF, 600); |
73 |
|
|
74 |
|
// disable any form content (we just need buttons) |
75 |
|
$this->_datasource = null; |
76 |
|
|
77 |
// debug |
// debug |
78 |
//print "options: " . Dumper($this->_options); |
//print "options: " . Dumper($this->_options); |
79 |
} |
} |
95 |
"nowrap" |
"nowrap" |
96 |
), |
), |
97 |
//form_submit('ecdfc', "Back") |
//form_submit('ecdfc', "Back") |
98 |
link::plain( url::viewrpcdatanode($this->_options[data_locator_meta][nodename]), 'Back' ) |
link::plain( url::viewdatanode($this->_options[data_locator_meta][nodename]), 'Back' ) |
99 |
//'abc' |
//'abc' |
100 |
); |
); |
101 |
return $div; |
return $div; |
112 |
*/ |
*/ |
113 |
function form_confirm( ) { |
function form_confirm( ) { |
114 |
|
|
115 |
|
//print "Duids: " . Dumper($this->_options[data_locator_meta][ident]); |
116 |
|
|
117 |
$this->add_hidden_element('ecmod', 'delete'); |
$this->add_hidden_element('ecmod', 'delete'); |
118 |
$this->add_hidden_element('ecdid', $this->_options[data_locator_meta][ident]); |
|
119 |
$this->add_hidden_element('ecdm', $this->_options[data_locator_meta][nodename]); |
// if ident is an array( multi-selection!) forward this |
120 |
|
// TODO: make it work!! Problem is that '$this->add_hidden_element' |
121 |
|
// adds an 'FEHidden' object which replaces '[]' at array vars with '_', what will not work at request handling |
122 |
|
if(is_array($this->_options[data_locator_meta][ident])) { |
123 |
|
$this->add_hidden_element('ecdid', $this->_options[data_locator_meta][nodename]); |
124 |
|
$this->add_hidden_element('ecdfa', 'delete'); |
125 |
|
foreach($this->_options[data_locator_meta][ident] as $key => $ident) { |
126 |
|
//$this->add_hidden_element("checkbox[".$key."]", $ident); |
127 |
|
} |
128 |
|
$this->add_hidden_element('checkbox', $this->_options[data_locator_meta][ident]); |
129 |
|
} else { |
130 |
|
$this->add_hidden_element('ecdid', $this->_options[data_locator_meta][ident]); |
131 |
|
$this->add_hidden_element('ecdm', $this->_options[data_locator_meta][nodename]); |
132 |
|
} |
133 |
|
|
134 |
$title = "Form Confirmation / " . $this->_options['caption']; |
$title = "Form Confirmation / " . $this->_options['caption']; |
135 |
$title .="( ".$this->_required_field_marker." ".$this->_required_field_text." )"; |
$title .="( ".$this->_required_field_marker." ".$this->_required_field_text." )"; |
171 |
*/ |
*/ |
172 |
function confirm_action() { |
function confirm_action() { |
173 |
|
|
174 |
|
//print "Guid(s): " . Dumper($this->_options['data_locator_meta']['ident']); |
175 |
|
|
176 |
// If user confirms action, issue delete request on current item. |
// If user confirms action, issue delete request on current item. |
177 |
$this->_options['data_locator_meta']['action'] = "delete"; |
$this->_options['data_locator_meta']['action'] = "delete"; |
178 |
$error = $this->data_prefetch(); |
$error = $this->data_prefetch(); |
179 |
|
|
180 |
|
// disable any form content (we just need buttons) |
181 |
$this->_datasource = null; |
$this->_datasource = null; |
182 |
|
|
183 |
$msg = "Action confirmed! Changes may take a while to propagate through all parts of the system."; |
$msg = "Action confirmed! Changes may take a while to propagate through all parts of the system."; |