Menu

#23 FORM - working but dont modyfi - HELP

open
nobody
None
5
2015-03-02
2005-03-18
Aron
No

=================================
==============in script.js.php
=================================

//========FORM
function SPAW_form_click(editor,sender) {
SPAW_UpdateFields();
window.frames[editor+'_rEdit'].focus();

//-----------
// var forms =
active_rich.document.body.getElementsByTagName
("FORM");
var aControl = window.frames
[editor+'_rEdit'].document.selection.createRange();

if (window.frames
[editor+'_rEdit'].document.selection.type != "Control") {
aControl = aControl.parentElement();
} else {
aControl = aControl(0);
}
while ((aControl.tagName != 'FORM') &&
(aControl.tagName != 'BODY')) {
aControl = aControl.parentElement;
}
var modyfi=1;
if (aControl.tagName != 'FORM') {
modyfi=0;
// aControl.name='';
// aControl.value='';
// aControl.type='';
}

//-----------
var nt = showModalDialog('<?php echo $spaw_dir?
>dialogs/form.php?do='+modyfi+'&action=form&lang=' +
document.all[
'dialogHeight:250px; dialogWidth:366px; resizable:no;
status:no');

if(nt){

var selection = window.frames
[editor+'_rEdit'].document.selection.createRange();
//------------todo
selection.pasteHTML(unescape(nt));
//------------todo

SPAW_update_toolbar(editor, true);
}

}

//========FORM_TEXT
function SPAW_form_text_click(editor,sender) {
SPAW_UpdateFields();
window.frames[editor+'_rEdit'].focus();

// var highlightedText = window.frames
[editor+'_rEdit'].document.selection.createRange
().htmlText;
// var nt = showModalDialog('<?php echo $spaw_dir?
>dialogs/form.php?action=text&lang=' + document.all
['SPAW_'+edit

//-----------
var aControl = window.frames
[editor+'_rEdit'].document.selection.createRange();
if (window.frames
[editor+'_rEdit'].document.selection.type != "Control") {
aControl = aControl.parentElement();
} else {
aControl = aControl(0);
}
while ((aControl.tagName != 'INPUT') &&
(aControl.tagName != 'BODY')) {
aControl = aControl.parentElement;
}
var modyfi=1;
if (aControl.tagName != 'INPUT') {
modyfi=0;
aControl.name='';
aControl.value='';
aControl.size='';
aControl.type='';
aControl.maxLength='';
}
//-----------

var nt = showModalDialog('<?php echo $spaw_dir?
>dialogs/form.php?do='+modyfi+'&action=text&lang=' +
document.all[
'dialogHeight:350px; dialogWidth:550px; resizable:no;
status:no');

if(nt){

var selection = window.frames
[editor+'_rEdit'].document.selection.createRange();

if (aControl.tagName != 'INPUT') {
//new
selection.pasteHTML(unescape(nt));
}else{
//modyfi
aControl.name=nt.name;
aControl.value=nt.value;
aControl.size=nt.size;
aControl.type=nt.type;
aControl.maxLength=nt.maxLength;
}

SPAW_update_toolbar(editor, true);
}

}

//========FORM_TEXTAREA
function SPAW_form_textarea_click(editor,sender) {
SPAW_UpdateFields();
window.frames[editor+'_rEdit'].focus();

//-----------
var aControl = window.frames
[editor+'_rEdit'].document.selection.createRange();
if (window.frames
[editor+'_rEdit'].document.selection.type != "Control") {
aControl = aControl.parentElement();
} else {
aControl = aControl(0);
}
while ((aControl.tagName != 'TEXTAREA') &&
(aControl.tagName != 'BODY')) {
aControl = aControl.parentElement;
}
var modyfi=1;
if (aControl.tagName != 'TEXTAREA') {
modyfi=0;
aControl.name='';
aControl.rows='';
aControl.cols='';
}
//-----------

var nt = showModalDialog('<?php echo $spaw_dir?
>dialogs/form.php?
do='+modyfi+'&action=textarea&lang=' + document.
'dialogHeight:350px; dialogWidth:450px; resizable:no;
status:no');

if(nt){

var selection = window.frames
[editor+'_rEdit'].document.selection.createRange();

if (aControl.tagName != 'TEXTAREA') {
//new
selection.pasteHTML(unescape(nt));
}else{
//modyfi
aControl.name=nt.name;
aControl.rows=nt.rows;
aControl.cols=nt.cols;
}

SPAW_update_toolbar(editor, true);
}
}

//========FORM_BUTTON
function SPAW_form_button_click(editor,sender) {
SPAW_UpdateFields();

window.frames[editor+'_rEdit'].focus();
//-----------
var aControl = window.frames
[editor+'_rEdit'].document.selection.createRange();
if (window.frames
[editor+'_rEdit'].document.selection.type != "Control") {
aControl = aControl.parentElement();
} else {
aControl = aControl(0);
}
while ((aControl.tagName != 'INPUT') &&
(aControl.tagName != 'BODY')) {
aControl = aControl.parentElement;
}
var modyfi=1;
if (aControl.tagName != 'INPUT') {
modyfi=0;
aControl.name='';
aControl.value='';
aControl.type='';
}
//-----------

var nt = showModalDialog('<?php echo $spaw_dir?
>dialogs/form.php?do='+modyfi+'&action=button&lang='
+ document.all['SPAW_
'dialogHeight:350px; dialogWidth:450px; resizable:no;
status:no');

if(nt){
//insert
var selection = window.frames
[editor+'_rEdit'].document.selection.createRange();

if (aControl.tagName != 'INPUT') {
//new
selection.pasteHTML(unescape(nt));
}else{
//modyfi
aControl.value=nt.value;
aControl.name=nt.name;
// aControl.type=nt.type;
}
SPAW_update_toolbar(editor, true);
}

}

//========FORM_SELECT
function SPAW_form_select_click(editor,sender) {
SPAW_UpdateFields();
window.frames[editor+'_rEdit'].focus();

//-----------
var aControl = window.frames
[editor+'_rEdit'].document.selection.createRange();
if (window.frames
[editor+'_rEdit'].document.selection.type != "Control") {
aControl = aControl.parentElement();
} else {
aControl = aControl(0);
}
while ((aControl.tagName != 'SELECT') &&
(aControl.tagName != 'BODY')) {
aControl = aControl.parentElement;
}

aControl.item_text='';
aControl.item_value='';

var modyfi=1;
if (aControl.tagName != 'SELECT') {
modyfi=0;
//todo
aControl.name='';
aControl.value='';
}
//-----------

var nt = showModalDialog('<?php echo $spaw_dir?
>dialogs/form.php?do='+modyfi+'&action=select&lang='
+ document.al
'dialogHeight:450px; dialogWidth:450px; resizable:no;
status:no');

if(nt){

var selection = window.frames
[editor+'_rEdit'].document.selection.createRange();
// selection.pasteHTML(unescape(nt));

if (aControl.tagName != 'SELECT') {
//new
selection.pasteHTML(unescape(nt));
}else{
//modyfi
aControl.name=nt.name;
aControl.value=nt.value;
}

SPAW_update_toolbar(editor, true);
}

}

//========FORM_HIDDEN
function SPAW_form_hidden_click(editor,sender) {
SPAW_UpdateFields();
window.frames[editor+'_rEdit'].focus();

//-----------
var aControl = window.frames
[editor+'_rEdit'].document.selection.createRange();
if (window.frames
[editor+'_rEdit'].document.selection.type != "Control") {
aControl = aControl.parentElement();
} else {
aControl = aControl(0);
}
while ((aControl.tagName != 'INPUT') &&
(aControl.tagName != 'BODY')) {
aControl = aControl.parentElement;
}
var modyfi=1;
if (aControl.tagName != 'INPUT') {
modyfi=0;
aControl.name='';
aControl.value='';
}
//-----------

var nt = showModalDialog('<?php echo $spaw_dir?
>dialogs/form.php?do='+modyfi+'&action=hidden&lang='
+ document.al
'dialogHeight:450px; dialogWidth:450px; resizable:no;
status:no');

if(nt){

var selection = window.frames
[editor+'_rEdit'].document.selection.createRange();

if (aControl.tagName != 'INPUT') {
//new
selection.pasteHTML(unescape(nt));
}else{
//modyfi
aControl.name=nt.name;
aControl.value=nt.value;
}

SPAW_update_toolbar(editor, true);
}

}

//========FORM_CHECK
function SPAW_form_checkbox_click(editor,sender) {
SPAW_UpdateFields();
window.frames[editor+'_rEdit'].focus();

//-----------
var aControl = window.frames
[editor+'_rEdit'].document.selection.createRange();
if (window.frames
[editor+'_rEdit'].document.selection.type != "Control") {
aControl = aControl.parentElement();
} else {
aControl = aControl(0);
}
while ((aControl.tagName != 'INPUT') &&
(aControl.tagName != 'BODY')) {
aControl = aControl.parentElement;
}
var modyfi=1;
if (aControl.tagName != 'INPUT') {
modyfi=0;
aControl.name='';
aControl.value='';
aControl.checked='';
}
//-----------

var nt = showModalDialog('<?php echo $spaw_dir?
>dialogs/form.php?
do='+modyfi+'&action=checkbox&lang=' + document.
'dialogHeight:450px; dialogWidth:450px; resizable:no;
status:no');

if(nt){

var selection = window.frames
[editor+'_rEdit'].document.selection.createRange();

if (aControl.tagName != 'INPUT') {
//new
selection.pasteHTML(unescape(nt));
}else{
//modyfi
aControl.name=nt.name;
aControl.value=nt.value;
aControl.checked=nt.checked;
}
SPAW_update_toolbar(editor, true);
}

}

//========FORM_RADIO
function SPAW_form_radio_click(editor,sender) {
SPAW_UpdateFields();
window.frames[editor+'_rEdit'].focus();

//-----------
var aControl = window.frames
[editor+'_rEdit'].document.selection.createRange();
if (window.frames
[editor+'_rEdit'].document.selection.type != "Control") {
aControl = aControl.parentElement();
} else {
aControl = aControl(0);
}
while ((aControl.tagName != 'INPUT') &&
(aControl.tagName != 'BODY')) {
aControl = aControl.parentElement;
}
var modyfi=1;
if (aControl.tagName != 'INPUT') {
modyfi=0;
aControl.name='';
aControl.value='';
aControl.checked='';
}
//-----------
var nt = showModalDialog('<?php echo $spaw_dir?
>dialogs/form.php?do='+modyfi+'&action=radio&lang=' +
document.all
'dialogHeight:450px; dialogWidth:450px; resizable:no;
status:no');

if(nt){

var selection = window.frames
[editor+'_rEdit'].document.selection.createRange();
selection.pasteHTML(unescape(nt));

if (aControl.tagName != 'INPUT') {
//new
selection.pasteHTML(unescape(nt));
}else{
//modyfi
aControl.name=nt.name;
aControl.value=nt.value;
aControl.checked=nt.checked;
}
SPAW_update_toolbar(editor, true);
}

}

=================================
==============NEW FILE .../dialogs/form.php
=================================

<?php

// include wysiwyg config
include '../config/spaw_control.config.php';

include $spaw_root.'class/util.class.php';
include $spaw_root.'class/lang.class.php';

$theme = empty($HTTP_GET_VARS['theme'])?
$spaw_default_theme:$HTTP_GET_VARS['theme'];
$theme_path = $spaw_dir.'lib/themes/'.$theme.'/';

$l = new SPAW_Lang(empty($HTTP_POST_VARS
['lang'])?$HTTP_GET_VARS['lang']:$HTTP_POST_VARS
['lang']);
$l->setBlock('form');
//if ($action=="form"){
// $l->setBlock('form');
//}else if ($action=="form_text"){
// $l->setBlock('form_text');
//}else if ($action=="form_text"){
// $l->setBlock('form_textarea');
//}

if (!$action){
$action = 'form';
// $action = 'textarea';
}

?>
<html>
<head>

<title><?php echo $l->m('title')?></title>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Content-Type" content="text/html;
charset=<?php echo $l->getCharset()?>">
<link rel="stylesheet" type="text/css" href="<?php echo
$theme_path.'css/'?>dialog.css">
<script language="javascript" src="utils.js"></script>
<?

//========================================

===============================
//========================================
=========================================
===============================
?>

<script language="JavaScript">

//return parameters of the dialog window back to parent
window
function return_form_parameters(){

var text = '<form'
+ ' name="' +document.form_name.name.value+ '"'
+ ' method="' +document.form_name.method.value+ '"'
+ ' action="' +document.form_name.action.value+ '"'
+ '>&nbsp;'

text += '</FORM>\n';
window.returnValue = text;
window.close();
}

//return parameters of the dialog window back to parent
window
function return_form_text_parameters(){
<?
if (!$do){
?>
var text = '<input'
+ ' name="' +document.form_name.name.value+ '"'
+ ' value="' +document.form_name.value.value+ '"'
+ ' type="' +document.form_name.type.value+ '"'
+ ' size="' +document.form_name.size.value+ '"'
+ ' tabindex="'
+document.form_name.maxLength.value+ '"'
+ '>'
<?
}else{
?>
var text = new Array();
text.name=document.form_name.name.value;
text.value=document.form_name.value.value;
text.type=document.form_name.type.value;
text.size=document.form_name.size.value;
text.maxLength=document.form_name.maxLength.value;

<?
}
?>
window.returnValue = text;
window.close();
}

//return parameters of the dialog window back to parent
window
function return_form_textarea_parameters(){
<?
if (!$do){
?>
var text = '<textarea'
+ ' name="' +document.form_name.name.value+ '"'
+ ' rows="' +document.form_name.rows.value+ '"'
+ ' cols="' +document.form_name.cols.value+ '"'
+ '>'
+ document.form_name.value.value

text += '</textarea>\n';
<?
}else{
?>
var text = new Array();
text.name=document.form_name.name.value;
text.rows=document.form_name.rows.value;
text.cols=document.form_name.cols.value;
<?
}
?>

window.returnValue = text;
window.close();
}

function return_form_button_parameters(){
<?
if (!$do){
?>
var text = '<input'
+ ' name="' +document.form_name.name.value+ '"'
+ ' value="' +document.form_name.value.value+ '"'
+ ' type="' +document.form_name.type.value+ '"'

text += '>\n';
<?
}else{
?>
var text = new Array();
text.name=document.form_name.name.value;
text.value=document.form_name.value.value;
text.type=document.form_name.type.value;
<?
}
?>
window.returnValue = text;
window.close();
}

function return_form_select_parameters(){
<?
if (!$do){
?>
var text = '<select'
+ ' size="'+document.form_name.size.value+'"'
+ ' name="'+document.form_name.name.value+'"'

if (document.form_name.multiple.my_selected){
text += ' multiple '
}

text += ' >\n'

var options = document.form_name.items.options;
var new_opts = new Array();
for (var i=0; i<options.length; i++) {
text += '<option value="'
text += options[i].value+'">'
text += options[i].text
if (options[i].my_selected){
text += ' '+options[i].my_selected+' ';
}
text += '</option>'
// option['my_className'] = options[i].my_className;
}

text += ' \n</select>\n';
<?
}else{
?>
var text = new Array();
text.size=document.form_name.size.value;
text.name=document.form_name.name.value;
text.multiple=document.form_name.multiple.my_selecte
d;
<?
}
?>

window.returnValue = text;
window.close();
}

function return_form_hidden_parameters(){
<?
if (!$do){
?>
var text = '<input'
+ ' type="hidden" '
+ ' name="' +document.form_name.name.value+ '"'
+ ' value="' +document.form_name.value.value+ '"'

text += ' style="width: 40; height: 20; border: 2 dotted
#FF00FF;background-color: #eeeeee;">\n';
<?
}else{
?>
var text = new Array();
text.name=document.form_name.name.value;
text.value=document.form_name.value.value;
<?
}
?>
window.returnValue = text;
window.close();
}

function return_form_checkbox_parameters(){
<?
if (!$do){
?>
var text = '<input'
+ ' type="checkbox" '
+ ' name="'+document.form_name.name.value+'"'
+ ' value="'+document.form_name.value.value+'"'

if (document.form_name.checked.checked){
text += ' checked '
}

text += ' >\n';
<?
}else{
?>
var text = new Array();
text.name=document.form_name.name.value;
text.value=document.form_name.value.value;
text.checked=document.form_name.checked.checked;
<?
}
?>
window.returnValue = text;
window.close();
}

function return_form_radio_parameters(){
<?
if (!$do){
?>
var text = '<input'
+ ' type="radio"'
+ ' name="'+document.form_name.name.value+'"'
+ ' value="'+document.form_name.value.value+'"'

if (document.form_name.checked.checked){
text += ' checked '
}

text += ' >\n';
<?
}else{
?>
var text = new Array();
text.name=document.form_name.name.value;
text.value=document.form_name.value.value;
text.checked=document.form_name.checked.checked;
<?
}
?>
window.returnValue = text;
window.close();
}

//form==================================
function add_to_list(){
var list = form_name.items;
var item = document.createElement("option");
item.value = form_name.item_value.value;
item.text = form_name.item_text.value;
item.my_selected = form_name.selected.checked;
list.add(item);

list.focus();
change_list_buttons();

}

function change_list_buttons(){
var indx = form_name.items.selectedIndex;

if (indx < 0) {
form_name.b_up.disabled = true;
form_name.b_down.disabled = true;
form_name.b_delete.disabled = true;
form_name.b_update.disabled = true;

} else {

form_name.b_delete.disabled = false;
form_name.b_update.disabled = false;

if (indx == 0) {
form_name.b_up.disabled = true;

} else form_name.b_up.disabled = false;

if (indx == form_name.items.options.length-1) {
form_name.b_down.disabled = true;
} else form_name.b_down.disabled = false;

}

}

function list_changed(){
var indx = form_name.items.selectedIndex;
if (indx >= 0) {
var item = form_name.items.options[indx];

form_name.item_value.value = item.value;
form_name.item_text.value = item.text;
form_name.selected.checked = item.my_selected;

}
change_list_buttons();
}

//move selected item one position up
function list_item_up(){
var items = form_name.items;
var options = items.options;
var indx = items.selectedIndex;
if (indx < 0 || indx < 1) return;

var cur_item = options[indx];
var item = document.createElement("option");
item.value = cur_item.value;
item.text = cur_item.text;
item.my_selected = cur_item.my_selected;
item.my_className = cur_item.my_className;

// options[indx].removeNode(true);
options[indx] = null;
items.add(item, indx-1);
items.selectedIndex = indx-1;
items.focus();

change_list_buttons();
}

//move selected item one position down
function list_item_down(){
var items = form_name.items;
var options = items.options;
var indx = items.selectedIndex;

if (indx < 0 || indx == options.length-1) return;

var cur_item = options[indx];
var item = document.createElement("option");
item.value = cur_item.value;
item.text = cur_item.text;
item.my_selected = cur_item.my_selected;
item.my_className = cur_item.my_className;

// options[indx].removeNode(true);
options[indx] = null;
items.add(item, indx+1);
items.selectedIndex = indx+1;
items.focus();

change_list_buttons();
}
//delete selected item from list
function delete_from_list(){
var list = form_name.items;
var indx = list.selectedIndex;
var next_indx = list.lenght==1?-1:indx==list.length-1?
indx-1:indx;
// if (indx >= 0) form_name.items.options
[indx].removeNode(true); //does not work in IE5.0
if (indx >= 0) form_name.items.options[indx] = null;
list.selectedIndex = next_indx;
list_changed();
// change_list_buttons();
}

//update selected item
function update_list_item(){
var indx = form_name.items.selectedIndex;
if (indx >= 0) {
var item = form_name.items.options[indx];
item.value = form_name.item_value.value;
item.text = form_name.item_text.value;
item.my_selected = form_name.selected.checked;

form_name.items.focus();
}

}

//endform==================================

function cancelClick() {
window.close();
}

function _CloseOnEsc() {
if (event.keyCode == 27) {
window.close();
return;
}
}
//document.body.onkeypress = _CloseOnEsc;
document.onkeypress = _CloseOnEsc;

</script>

<?
//========================================
=========================================
===============================
//qqq=====================================
=========================================
==================================
//========================================
=========================================
===============================
?>
</head>

<body class="dialog" onload="
<?php
// echo 'init_form_dialog();';
// if($action == 'select') echo ' change_list_buttons();';

?>
">

<form name="form_name" id="form_name">

<table border="0" cellspacing="6" cellpadding="2"
width="100%" height="100%"><tr><td class="dialog">

<FIELDSET style="padding-top:0;padding-left:5;padding-
right:5;padding-bottom:5"><LEGEND><b>
<?php
//($l->m('Legend')) echo $l->m('Legend'); else echo $l->m
('PasteWord');
echo $l->m('Legend');
?>

</b></LEGEND>

<table border="0" cellspacing="0" cellpadding="0"
width="100%">

<?
//============
if ($action == 'form') :
?>

<tr><td colspan="8"><img src="spacer.gif" width="1"
height="5"></td></tr>

<!-- Name&Method -->
<tr style="border:'1px dashed #FF0000'">
<td align="right"><?php echo $l->m('Name'); ?>:</td>
<td width="5">&nbsp;</td>
<td width="80"><input name="name" type="text"
value="" size="10" maxlength="50"></td>
<td width="32">&nbsp;</td>

<td align="right" style="width:100%"><?php echo $l->m
('Method'); ?>:</td>
<td width="5">&nbsp;</td>
<td>
<select name="method">
<option value=""></option>
<option value="get">get</option>
<option value="post">post</option>
</select>
</td>

</tr>
<!-- Name&Method -->

<tr><td colspan="8"><img src="spacer.gif" width="1"
height="15"></td></tr>

<!-- Action -->
<tr>

<td align="right"><?php echo $l->m('Action'); ?>:</td>
<td width="5">&nbsp;</td>
<td colspan="7"><input name="action" type="text"
value="" size="31" style="width:100%"></td>

</tr>
<!-- Action -->
<?
endif;
//==
if ($action == 'text') :

?>

<tr><td align="center"><table border="0"
cellspacing="0" cellpadding="0" width="1">

<tr><td colspan="8"><img src="spacer.gif" width="1"
height="5"></td></tr>

<!-- Text Field Attributes -->
<tr>

<td align="right"><?php echo $l->m('Name'); ?>:</td>
<td width="5">&nbsp;</td>
<td><input name="name" type="text" value="" size="8"
maxlength="50"></td>

</tr>

<tr><td colspan="8" width="100%"><img
src="spacer.gif" width="1" height="15"></td></tr>

<tr>

<td align="right"><?php echo $l->m('Value'); ?>:</td>
<td width="5">&nbsp;</td>
<td><input name="value" type="text" value=""
size="8"></td>

</tr>

<tr><td colspan="8"><img src="spacer.gif" width="1"
height="15"></td></tr>

<tr>

<td align="right"><?php echo $l->m('Type'); ?>:</td>
<td width="5">&nbsp;</td>
<td>
<select name="type">
<option value=""></option>
<option value="text">text</option>
<option value="password">password</option>
</select>
</td>

</tr>

<tr><td colspan="8"><img src="spacer.gif" width="1"
height="15"></td></tr>

<tr>

<td align="right"><?php echo $l->m('CharWidth'); ?
>:</td>
<td width="5">&nbsp;</td>
<td width="1"><input name="size" type="text" value=""
size="3" maxlength="3"></td>

</tr>

<tr><td colspan="8"><img src="spacer.gif" width="1"
height="15"></td></tr>

<tr>

<td align="right"><?php echo $l->m('MaxChars'); ?
>:</td>
<td width="5">&nbsp;</td>
<td width="80" vAlign="center"><input
name="maxLength" type="text" value="" size="3"
maxlength="3"></td>

</tr>

<tr><td colspan="8"><input type="text"
name="className" value=""
style="width:1;height:1;visibility:hidden"></td></tr>
<!-- Text Field Attributes -->

</table></td></tr>

<script language="JavaScript">
var iProps = window.dialogArguments;

if (iProps.name) {
document.form_name.name.value=iProps.name;
document.form_name.value.value=iProps.value;
document.form_name.type.value=iProps.type;
document.form_name.value.size=iProps.size;
document.form_name.value.maxLength=iProps.maxLeng
th;
}
</script>

<?
endif;
//==

if ($action == 'button') :
?>

<tr><td align="center"><table border="0"
cellspacing="0" cellpadding="0">

<tr><td colspan="8"><img src="spacer.gif" width="1"
height="5"></td></tr>

<!-- Text Field Attributes -->
<tr>

<td align="right"><?php echo $l->m('Name'); ?>:</td>
<td width="5">&nbsp;</td>
<td width="80"><input name="name" type="text"
value="" size="10" maxlength="50"></td>
<td width="5">&nbsp;</td>

</tr>

<tr><td colspan="8"><img src="spacer.gif" width="1"
height="15"></td></tr>

<tr>

<td align="right"><?php echo $l->m('Value'); ?>:</td>
<td width="5">&nbsp;</td>
<td width="80"><input name="value" type="text"
value="" size="10"></td>

</tr>

<tr><td colspan="8"><img src="spacer.gif" width="1"
height="15"></td></tr>

<tr>

<td align="right"><?php echo $l->m('Type'); ?>:</td>
<td width="5">&nbsp;</td>
<td>
<select name="type">
<option value="button">button</option>
<option value="reset">reset</option>
<option value="submit">submit</option>
</select>
</td>

</tr>

<tr><td><input type="text" name="className" value=""
style="width:1;height:1;visibility:hidden"></td></tr>
<!-- Text Field Attributes -->

</table></td></tr>

<script language="JavaScript">
var iProps = window.dialogArguments;

if (iProps.name) {
document.form_name.name.value=iProps.name;
document.form_name.value.value=iProps.value;
}

</script>

<?

endif;
//==

if ($action == 'hidden') :
?>

<tr><td colspan="8"><img src="spacer.gif" width="1"
height="5"></td></tr>

<tr><td align="center"><table border="0"
cellspacing="0" cellpadding="0">

<!-- Name&Value -->
<tr>
<td align="right"><?php echo $l->m('Name'); ?>:</td>
<td width="5">&nbsp;</td>
<td><input name="name" type="text" value=""
size="10" maxlength="50"></td>
</tr>
<tr><td colspan="8"><img src="spacer.gif" width="1"
height="15"></td></tr>

<tr>
<td align="right"><?php echo $l->m('Value'); ?>:</td>
<td width="5">&nbsp;</td>
<td><input name="value" type="text" value=""
size="10"></td>

</tr>
<!-- Name&Value -->

</table>

<script language="JavaScript">
var iProps = window.dialogArguments;

if (iProps.name) {
document.form_name.name.value=iProps.name;
document.form_name.value.value=iProps.value;
}

</script>

</td></tr>

<?

endif;
//==

if ($action == 'textarea') :
?>

<tr><td align="center"><table border="0"
cellspacing="0" cellpadding="0" width="1">

<tr><td colspan="8"><img src="spacer.gif" width="1"
height="5"></td></tr>

<!-- Name&Value -->
<tr>
<td align="right"><?php echo $l->m('Name'); ?>:</td>
<td width="5">&nbsp;</td>
<td><input name="name" type="text" value=""
style="width:120" maxlength="50"></td>

</tr>
<tr><td colspan="8"><img src="spacer.gif" width="1"
height="15"></td></tr>

<tr>

<td align="right"><?php echo $l->m('Rows'); ?>:</td>
<td width="5">&nbsp;</td>
<td><input name="rows" type="text" value="" size="3"
maxlength="3"></td>

</tr>

<tr><td colspan="8"><img src="spacer.gif" width="1"
height="15"></td></tr>

<tr>

<td align="right"><?php echo $l->m('Columns'); ?
>:</td>
<td width="5">&nbsp;</td>
<td><input name="cols" type="text" value="" size="3"
maxlength="3"></td>

</tr>

<tr><td colspan="8"><img src="spacer.gif" width="1"
height="15"></td></tr>

<tr>

<td align="right"><?php echo $l->m('Value'); ?>:</td>
<td width="5">&nbsp;</td>
<td><textarea name="value"
style="width:120;height:70"></textarea></td>

</tr>

<!-- Name&Value -->

</table>

<script language="JavaScript">
var iProps = window.dialogArguments;

if (iProps.name) {
document.form_name.name.value=iProps.name;
document.form_name.rows.value=iProps.rows;
document.form_name.cols.value=iProps.cols;
document.form_name.value.value=iProps.value;
}
</script>

</td></tr>
<tr><td><input type="text" name="className" value=""
style="width:1;height:1;visibility:hidden"></td></tr>

<?

endif;
//==

if ($action == 'checkbox' || $action == 'radio') :
?>

<tr><td align="center"><table border="0"
cellspacing="0" cellpadding="0" width="1">

<tr><td colspan="8"><img src="spacer.gif" width="1"
height="5"></td></tr>

<!-- CheckBox/Radio Button Attributes -->
<tr>

<td align="right"><?php echo $l->m('Name'); ?>:</td>
<td width="5">&nbsp;</td>
<td><input name="name" type="text" value=""
size="10" maxlength="50"></td>
<td width="5">&nbsp;</td>

</tr>

<tr><td colspan="8"><img src="spacer.gif" width="1"
height="15"></td></tr>

<tr>

<td align="right"><?php echo $l->m('Value'); ?>:</td>
<td width="5">&nbsp;</td>
<td><input name="value" type="text" value=""
size="10"></td>

</tr>

<tr><td colspan="8"><img src="spacer.gif" width="1"
height="15"></td></tr>

<tr>

<td align="right"><?php echo $l->m('Checked'); ?
>:</td>
<td width="5">&nbsp;</td>
<td>
<input type="checkbox" name="checked"
value="checked">
</td>

</tr>

<tr><td><input type="text" name="className" value=""
style="width:1;height:1;visibility:hidden"></td></tr>
<tr><td><input type="text" name="type" value="<?php
echo $action; ?>"
style="width:1;height:1;visibility:hidden"></td></tr>
<!-- CheckBox/Radio Button Attributes -->

</table>

<script language="JavaScript">
var iProps = window.dialogArguments;

if (iProps.name) {
document.form_name.name.value=iProps.name;
document.form_name.value.value=iProps.value;
document.form_name.checked.value=iProps.checked;
}

</script>

</td></tr>

<?

endif;
//==
if ($action == 'select') :
?>

<tr><td colspan="7"><img src="spacer.gif" width="1"
height="5"></td></tr>

<!-- Attributes -->
<tr>
<td align="right"><?php echo $l->m('Name'); ?>:</td>
<td width="5">&nbsp;</td>
<td><input name="name" type="text" value=""
size="10" maxlength="50"></td>
<td width="20">&nbsp;</td>
<td align="right"><?php echo $l->m('Size'); ?>:</td>
<td width="5">&nbsp;</td>
<td><input name="size" type="text" value="" size="3"
maxlength="50"></td>

</tr>

<tr>

<td colspan="4"></td>

<td align="right"><?php echo $l->m('Multiple'); ?>:</td>
<td width="5">&nbsp;</td>
<td><input type="checkbox" name="multiple"></td>

</tr>
<!-- Attributes -->

<tr>

<td colspan="7">

<table border="0" cellpadding="0" cellspacing="0"
width="100%" height="100%">
<tr>

<td rowspan="2" vAlign="top">
<?php echo $l->m('Items'); ?>:<br>
<select name="items" size="9" style="<?php if
($browser == 'ns') echo 'height:150px;'; ?>width:100px"
onchange="list_changed()
</select>
</td>

<td vAlign="top">
<img src="spacer.gif" width="1" height="16"><br>

<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="right">
<?php echo $l->m('Text'); ?>:
</td>
<td width="5">&nbsp;</td>
<td><input name="item_text" type="text" value=""
size="10" maxlength="50"></td>
</tr>
<tr>
<td align="right">
<?php echo $l->m('Value'); ?>:
</td>
<td width="5">&nbsp;</td>
<td><input name="item_value" type="text" value=""
size="10" maxlength="50"></td>
</tr>
<tr>
<td align="right">
<?php echo $l->m('Selected'); ?>:
</td>
<td width="5">&nbsp;</td>
<td><input type="checkbox" name="selected"></td>
</tr>
</table>

</td>

</tr>

<tr>
<td align="center">

<table border="0" cellpadding="0" cellspacing="0"
width="100%" height="100%">
<tr>

<td align="center">
<input type="Button" name="b_up" value="<?php echo
$l->m('Up'); ?>" onclick="list_item_up();"><br>
<input type="Button" name="b_down" value="<?php
echo $l->m('Down'); ?>" onclick="list_item_down();">
</td>
<td align="left">
<input type="Button" value="<?php echo $l->m('Add'); ?
>" onclick="add_to_list();"><br>
<input type="Button" name="b_delete" value="<?php
echo $l->m('Delete'); ?>" onclick="delete_from_list
();"><br>
<input type="Button" name="b_update" value="<?php
echo $l->m('Update'); ?>" onclick="update_list_item();">
</td>

</tr>
</table>

</td>
</tr>

<tr><td><input type="text" name="className" value=""
style="width:1;height:1;visibility:hidden"></td></tr>

</table>
<script language="JavaScript">
var iProps = window.dialogArguments;

if (iProps.name) {
document.form_name.name.value=iProps.name;
document.form_name.size.value=iProps.size;
document.form_name.multiple.value=iProps.multiple;
document.form_name.items.value=iProps.items;
document.form_name.item_text.value=iProps.item_text;
document.form_name.item_value.value=iProps.item_valu
e;
document.form_name.selected.value=iProps.selected;
}

</script>

</td>

</tr>

<?

endif;
//==

if ($action == 'snippet') :
?>

<tr><td colspan="8"><img src="spacer.gif" width="1"
height="5"></td></tr>

<!-- Snippets -->
<tr>
<td align="right"><?php echo $l->m('Preview'); ?>:</td>
<td width="5">&nbsp;</td>
<td><iframe id="snippet_preview" src="" border="1"
style="width:100%;height:200;background:white"></ifram
e></td>

</tr>

<tr><td colspan="8"><img src="spacer.gif" width="1"
height="15"></td></tr>

<tr>
<td align="right"><?php echo $l->m('Snippet'); ?>:</td>
<td width="5">&nbsp;</td>
<td><select name="snippet" stype="height:50"
onChange="preview_snippet();"></select>
</td>

</tr>

<!-- Snippets -->

<?
endif;
//==
if ($action == 'paste_word') :
?>

<tr><td colspan="8"><img src="spacer.gif" width="1"
height="5"></td></tr>

<!-- Text to paste -->
<tr>
<td><iframe id="snippet_preview" src="" border="1"
style="width:100%;height:200;background:white"></ifram
e></td>
</tr>

<!-- Text to paste -->

<?

endif;
//==
?>

</table>

</FIELDSET>

<table border="0" cellspacing="0" cellpadding="0"
width="100%">

<tr><td><img src="spacer.gif" width="1"
height="10"></td></tr>

<tr align="center"><td vAlign="center">
<?
if ($action=="form"){
?>
<input type="Button" value="<?php echo $l->m('Ok'); ?
>" onclick="return_form_parameters();">
<?
}else if ($action=="text"){
?>
<input type="Button" value="<?php echo $l->m('Ok'); ?
>" onclick="return_form_text_parameters();">
<?
}else if ($action=="textarea"){
?>
<input type="Button" value="<?php echo $l->m('Ok'); ?
>" onclick="return_form_textarea_parameters();">
<?
}else if ($action=="button"){
?>
<input type="Button" value="<?php echo $l->m('Ok'); ?
>" onclick="return_form_button_parameters();">
<?
}else if ($action=="select"){
?>
<input type="Button" value="<?php echo $l->m('Ok'); ?
>" onclick="return_form_select_parameters();">
<?
}else if ($action=="hidden"){
?>
<input type="Button" value="<?php echo $l->m('Ok'); ?
>" onclick="return_form_hidden_parameters();">
<?
}else if ($action=="checkbox"){
?>
<input type="Button" value="<?php echo $l->m('Ok'); ?
>" onclick="return_form_checkbox_parameters();">
<?
}else if ($action=="radio"){
?>
<input type="Button" value="<?php echo $l->m('Ok'); ?
>" onclick="return_form_radio_parameters();">
<?
}
?>

<input type="Button" value="<?php echo $l->m
('Cancel'); ?>" onclick="cancelClick();">

</td></tr>

<tr><td><img src="spacer.gif" width="1"
height="5"></td></tr>

</table>

</td></tr></table>
</form>

</body>
</html>

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.