/administrator/components/com_breezingforms/admin/element.html.php
PHP | 3212 lines | 3055 code | 131 blank | 26 comment | 395 complexity | 69d2ba5aa6ec731140eedd3ed3ce7641 MD5 | raw file
Possible License(s): GPL-2.0, BSD-3-Clause, LGPL-2.1, MIT, LGPL-3.0, LGPL-2.0, JSON
Large files files are truncated, but you can click here to view the full file
- <?php
- /**
- * BreezingForms - A Joomla Forms Application
- * @version 1.8
- * @package BreezingForms
- * @copyright (C) 2008-2012 by Markus Bopp
- * @license Released under the terms of the GNU General Public License
- **/
- defined('_JEXEC') or die('Direct Access to this location is not allowed.');
- require_once($ff_compath.'/facileforms.process.php');
- jimport('joomla.version');
- $version = new JVersion();
- if(version_compare($version->getShortVersion(), '1.6', '>=') && version_compare($version->getShortVersion(), '3.0', '<')){
- echo '<link rel="stylesheet" href="'.JURI::root(true).'/administrator/components/com_breezingforms/admin/bluestork.fix.css" type="text/css" />';
- }
- class HTML_facileFormsElement
- {
- function newitem($option, $pkg, $form, $page)
- {
- $mainframe = JFactory::getApplication();
- $ff_mossite = JURI::base();
- ?>
- <div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
- <script type="text/javascript" src="<?php echo $ff_mossite; ?>/components/com_breezingforms/libraries/js/overlib_mini.js"></script>
- <form action="index.php" method="post" name="adminForm" id="adminForm" class="adminForm">
- <table cellpadding="4" cellspacing="1" border="0" class="adminform" style="width:300px;">
- <tr><th colspan="5" class="title">BreezingForms - <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NEWTYPE'); ?></th></tr>
- <tr>
- <td></td>
- <td valign="top">
- <fieldset><legend><strong><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_STATICS'); ?></strong></legend>
- <table cellpadding="4" cellspacing="1" border="0" class="adminform">
- <tr><td nowrap><input type="radio" id="newtype1" name="newtype" value='Static Text/HTML' checked="checked"/><label for="newtype1"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_STATICTEXT'); ?></label></td></tr>
- <tr><td nowrap><input type="radio" id="newtype2" name="newtype" value='Rectangle'/><label for="newtype2"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_RECTANGLE'); ?></label></td></tr>
- <tr><td nowrap><input type="radio" id="newtype3" name="newtype" value='Image'/><label for="newtype3"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_IMAGE'); ?></label></td></tr>
- <tr><td nowrap><input type="radio" id="newtype4" name="newtype" value='Tooltip'/><label for="newtype4"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_TOOLTIP'); ?></label></td></tr>
- <tr><td nowrap><input type="radio" id="newtype5" name="newtype" value='Captcha'/><label for="newtype4"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CAPTCHA'); ?></label></td></tr>
- </table>
- </fieldset>
- <fieldset><legend><strong><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_BUTTONS'); ?></strong></legend>
- <table cellpadding="4" cellspacing="1" border="0" class="adminform">
- <tr><td nowrap><input type="radio" id="newtype10" name="newtype" value='Regular Button'/><label for="newtype10"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_REGBUTTON'); ?></label></td></tr>
- <tr><td nowrap><input type="radio" id="newtype11" name="newtype" value='Graphic Button'/><label for="newtype11"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_GRAPHBUTTON'); ?></label></td></tr>
- <tr><td nowrap><input type="radio" id="newtype12" name="newtype" value='Icon'/><label for="newtype12"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_ICON'); ?></label></td></tr>
- </table>
- </fieldset>
- </td>
- <td valign="top">
- <fieldset><legend><strong><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_INPUTS'); ?></strong></legend>
- <table cellpadding="4" cellspacing="1" border="0" class="adminform">
- <tr><td nowrap><input type="radio" id="newtype20" name="newtype" value='Checkbox'/><label for="newtype20"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CHECKBOX'); ?></label></td></tr>
- <tr><td nowrap><input type="radio" id="newtype21" name="newtype" value='Radio Button'/><label for="newtype21"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_RADIO'); ?></label></td></tr>
- <tr><td nowrap><input type="radio" id="newtype22" name="newtype" value='Text'/><label for="newtype22"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_TEXT'); ?></label></td></tr>
- <tr><td nowrap><input type="radio" id="newtype23" name="newtype" value='Textarea'/><label for="newtype23"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_TEXTAREA'); ?></label></td></tr>
- <tr><td nowrap><input type="radio" id="newtype24" name="newtype" value='Select List'/><label for="newtype24"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_SELECT'); ?></label></td></tr>
- <tr><td nowrap><input type="radio" id="newtype25" name="newtype" value='Query List'/><label for="newtype25"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_QUERYLIST'); ?></label></td></tr>
- <tr><td nowrap><input type="radio" id="newtype26" name="newtype" value='File Upload'/><label for="newtype26"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_UPLOAD'); ?></label></td></tr>
- <tr><td nowrap><input type="radio" id="newtype27" name="newtype" value='Hidden Input'/><label for="newtype27"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_HIDDEN'); ?></label></td></tr>
- </table>
- </fieldset>
- </td>
- <td></td>
- </tr>
- <tr>
- <td></td>
- <td nowrap colspan="3" style="text-align:right">
- <input class="btn btn-primary" onclick="submitbutton('newedit');" type="submit" value="<?php echo htmlentities(BFText::_('COM_BREEZINGFORMS_TOOLBAR_CONTINUE'), ENT_QUOTES, 'UTF-8'); ?>"/>
-
- <input class="btn btn-primary" onclick="submitbutton('cancel');" type="submit" value="<?php echo htmlentities(BFText::_('COM_BREEZINGFORMS_TOOLBAR_CANCEL'), ENT_QUOTES, 'UTF-8'); ?>"/>
- </td>
- <td></td>
- </tr>
- </table>
- <input type="hidden" name="pkg" value="<?php echo $pkg; ?>" />
- <input type="hidden" name="option" value="<?php echo $option; ?>" />
- <input type="hidden" name="task" value="" />
- <input type="hidden" name="act" value="editpage" />
- <input type="hidden" name="form" value="<?php echo $form; ?>" />
- <input type="hidden" name="page" value="<?php echo $page; ?>" />
- </form>
- <?php
- } // newitem
- function displayType($type)
- {
- switch ($type) {
- case 'Static Text/HTML': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_STATICTEXT'); break;
- case 'Rectangle': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_RECTANGLE'); break;
- case 'Image': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_IMAGE'); break;
- case 'Tooltip': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_TOOLTIP'); break;
- case 'Query List': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_QUERYLIST'); break;
- case 'Regular Button': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_REGBUTTON'); break;
- case 'Graphic Button': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_GRAPHBUTTON'); break;
- case 'Icon': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_ICON'); break;
- case 'Checkbox': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_CHECKBOX'); break;
- case 'Radio Button': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_RADIO'); break;
- case 'Select List': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_SELECT'); break;
- case 'Text': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_TEXT'); break;
- case 'Textarea': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_TEXTAREA'); break;
- case 'File Upload': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_UPLOAD'); break;
- case 'Hidden Input': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_HIDDEN'); break;
- default: $disptype = $type; break;
- } // switch
- return $disptype;
- } // displayType
- function edit($option, $tabpane, $pkg, &$row, &$lists)
- {
- global $ff_mossite, $ff_admsite, $ff_config;
- $mainframe = JFactory::getApplication();
- $ff_mossite = JURI::base();
- $action = $row->id ? BFText::_('COM_BREEZINGFORMS_ELEMENTS_EDIT') : BFText::_('COM_BREEZINGFORMS_ELEMENTS_ADD');
- $hasInit = false;
- switch ($row->type) {
- case 'Static Text/HTML':
- case 'Rectangle':
- case 'Image':
- case 'Tooltip':
- case 'Query List':
- case 'Regular Button':
- case 'Graphic Button':
- case 'Icon':
- case 'Captcha':
- break;
- default:
- $hasInit = true;
- } // switch
- $hasAction = false;
- switch ($row->type) {
- case 'Static Text/HTML':
- case 'Rectangle':
- case 'Image':
- case 'Tooltip':
- case 'Query List':
- case 'Hidden Input':
- case 'Captcha':
- break;
- default:
- $hasAction = true;
- } // switch
- $hasValidation = false;
- switch ($row->type) {
- case 'Static Text/HTML':
- case 'Rectangle':
- case 'Image':
- case 'Tooltip':
- case 'Query List':
- case 'Regular Button':
- case 'Graphic Button':
- case 'Icon':
- case 'Captcha':
- break;
- default:
- $hasValidation = true;
- } // switch
- ?>
- <script type="text/javascript" src="<?php echo $ff_admsite; ?>/admin/areautils.js"></script>
- <script type="text/javascript">
- <!--
- function checkIdentifier(value, name)
- {
- var invalidChars = /\W/;
- var error = '';
- if (value == '')
- error += "<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_ENTNAME'); ?>\n";
- else
- if (invalidChars.test(value))
- error += "<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_ENTIDENT'); ?>\n";
- return error;
- } // checkIdentifier
- var bf_submitbutton = function(pressbutton)
- {
- var form = document.adminForm;
- var error = '';
- if (pressbutton != 'cancel') {
- if (form.title.value == '')
- error += "<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_TITLEEMPTY'); ?>\n";
- error += checkIdentifier(form.name.value, 'name');
- } // if
-
- if (error != ''){
- alert(error);
- } else {
- <?php
- if ($row->type=='Query List') echo "\t\t\t\tsaveQueryList();\n";
- if ($row->type=='Static Text/HTML' && $ff_config->wysiwyg){
- jimport( 'joomla.html.editor' );
- $editor = JFactory::getEditor();
- echo $editor->save( 'data1' );
- }
- ?>
- submitform( pressbutton );
- } // if
- }; // submitbutton
- if(typeof Joomla != "undefined"){
- Joomla.submitbutton = bf_submitbutton;
- }
- submitbutton = bf_submitbutton;
- <?php
- if ($row->type == 'Graphic Button' || $row->type == 'Icon') {
- ?>
- function dispcaptiontext(value)
- {
- if(document.getElementById)
- if(document.getElementById('captiontext'))
- switch (value) {
- case '0':
- document.getElementById('captiontext').style.display = 'none';
- break;
- default:
- document.getElementById('captiontext').style.display = '';
- } // switch
- } // dispcaptiontext
- <?php
- }
- if ($row->type == 'Tooltip') {
- ?>
- function disptooltipurl(value)
- {
- if(document.getElementById)
- if(document.getElementById('tooltipurl'))
- switch (value) {
- case '0':
- case '1':
- document.getElementById('tooltipurl').style.display = 'none';
- break;
- default:
- document.getElementById('tooltipurl').style.display = '';
- } // switch
- } // disptooltipurl
- <?php
- } // if tooltip
- if ($row->type == 'Query List') {
- ?>
- function loadQueryList()
- {
- var form = document.adminForm;
- var text = trim(form.data1.value);
- var rows = text.split('\n');
- var rcnt = rows.length;
- var r;
- for (r = 0; r < rcnt; r++) rows[r] = trim(rows[r]);
- if (rcnt > 0) form.border.value = rows[0];
- if (rcnt > 1) form.cellspacing.value = rows[1];
- if (rcnt > 2) form.cellpadding.value = rows[2];
- if (rcnt > 3) form.trhclass.value = rows[3];
- if (rcnt > 4) form.tr1class.value = rows[4];
- if (rcnt > 5) form.tr2class.value = rows[5];
- if (rcnt > 6) form.trfclass.value = rows[6];
- if (rcnt > 7) form.tdfclass.value = rows[7];
- if (rcnt > 8 && rows[8]!='') form.pagenav.options[rows[8]].selected = true;
- qcolUnpack();
- } // loadQueryList
- function saveQueryList()
- {
- var form = document.adminForm;
- form.data1.value =
- trim(form.border.value) +'\n'+
- trim(form.cellspacing.value) +'\n'+
- trim(form.cellpadding.value) +'\n'+
- trim(form.trhclass.value) +'\n'+
- trim(form.tr1class.value) +'\n'+
- trim(form.tr2class.value) +'\n'+
- trim(form.trfclass.value) +'\n'+
- trim(form.tdfclass.value) +'\n'+
- trim(form.pagenav.value) +'\n';
- qcolPack();
- } // saveQueryList
- function showpagenav(height)
- {
- if (parseInt(height))
- document.getElementById('pagenavrow').style.display = '';
- else
- document.getElementById('pagenavrow').style.display = 'none';
- } // showpagenav
- function createQueryCode()
- {
- form = document.adminForm;
- name = form.name.value;
- if (name=='') {
- alert('Please enter the element name first.');
- return;
- } // if
- if (!confirm("<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_ASKCREATEQUERY'); ?>\n<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_EXISTAPP'); ?>")) return;
- code =
- "global $database;\n"+
- "\n"+
- "$database->setQuery(\n"+
- " \"select id, name, username, email \".\n"+
- " \"from #__users \".\n"+
- " \"order by id\"\n"+
- ");\n"+
- "$rows = $database->loadObjectList();\n";
- oldcode = form.data2.value;
- if (oldcode != '')
- form.data2.value =
- code+
- "\n// -------------- <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_OLDBELOW'); ?> --------------\n\n"+
- oldcode;
- else
- form.data2.value = code;
- codeAreaChange(form.data2);
- } // createQueryCode
- function trim(s)
- {
- while (s.length>0 && (s.charAt(0)==' '||s.charAt(0)=='\n'||s.charAt(0)=='\r'))
- s = s.substr(1,s.length-1);
- while (s.length>0 && (s.charAt(s.length-1)==' '||s.charAt(s.length-1)=='\n'||s.charAt(s.length-1)=='\r'))
- s = s.substr(0,s.length-1);
- return s;
- } // trim
- function expstring(text)
- {
- text = trim(text);
- var i;
- var o = '';
- for(i = 0; i < text.length; i++) {
- c = text.charAt(i);
- switch(c) {
- case '&' : o += '\\x26'; break;
- case '<' : o += '\\x3C'; break;
- case '>' : o += '\\x3E'; break;
- case '\'': o += '\\x27'; break;
- case '\\': o += '\\x5C'; break;
- case '"' : o += '\\x22'; break;
- case '\n': o += '\\n'; break;
- case '\r': o += '\\r'; break;
- default: o += c;
- } // switch
- } // for
- return o;
- } // expstring
- function htmlchars(text)
- {
- var i;
- var o = '';
- for(i = 0; i < text.length; i++) {
- c = text.charAt(i);
- switch(c) {
- case '&' : o += '&'; break;
- case '<' : o += '<'; break;
- case '>' : o += '>'; break;
- case '"' : o += '"'; break;
- default: o += c;
- } // switch
- } // for
- return o;
- } // htmlchars
- function impstring(text)
- {
- var str = '';
- var ss = 0;
- var s;
- var tl = text.length;
- var hexdigs = "0123456789abcdefABCDEF";
- while (ss < tl) {
- s = text.charAt(ss++);
- if (s == '\\') {
- if (ss < tl) s = text.charAt(ss++); else s = 0;
- switch (s) {
- case 0 : break;
- case 'e' : str += '\33'; break;
- case 't' : str += '\t'; break;
- case 'r' : str += '\r'; break;
- case 'n' : str += '\n'; break;
- case 'f' : str += '\f'; break;
- case 'x' : {
- if (ss < tl) s = text.charAt(ss++); else s = 0;
- var ch = '';
- while (hexdigs.indexOf(s)>=0 && ch.length < 2) {
- ch += s;
- if (ss < tl) s = text.charAt(ss++); else s = 0;
- } // while
- while (ch.length < 2) ch = '0'+ch;
- str += unescape('%'+ch);
- if (s) ss--;
- break;
- }
- default:
- str += s;
- } // switch
- } else
- str += s;
- } // while
- return str;
- } // impstring
- var qcolRows = new Array();
- var qcolRowCnt = 0;
- var qcolIndex = 0;
- var qcolTitle = 0;
- var qcolName = 1;
- var qcolClass1 = 2;
- var qcolClass2 = 3;
- var qcolClass3 = 4;
- var qcolWidth = 5;
- var qcolWidthmd = 6;
- var qcolThspan = 7;
- var qcolThalign = 8;
- var qcolThvalign = 9;
- var qcolThwrap = 10;
- var qcolAlign = 11;
- var qcolValign = 12;
- var qcolWrap = 13;
- var qcolValue = 14;
- var qcolSize = 15;
- var qcolCellCheckbox = 0;
- var qcolCellTitle = 1;
- var qcolCellName = 2;
- var qcolCellThattribs = 3;
- var qcolCellAttributes = 4;
- var qcolCellWidth = 5;
- var qcolCellOrderup = 6;
- var qcolCellOrderdown = 7;
- var qcolCellCount = 8;
- function qcolPack()
- {
- var r;
- var text = '';
- for (r = 0; r < qcolRowCnt; r++) {
- var c;
- var row = qcolRows[r];
- for (c = 0; c < row.length; c++) {
- if (c > 0) text += '&';
- text += expstring(row[c]);
- } // for
- text += '\n';
- } // for
- document.adminForm.data3.value = text;
- } // qcolPack
- function qcolUnpack()
- {
- var text = trim(document.adminForm.data3.value);
- var rows = text.split('\n');
- var r;
- qcolRowCnt = 0;
- for (r = 0; r < rows.length; r++) {
- if (rows[r] != '') {
- var vals = rows[r].split('&');
- var v;
- for (v = 0; v < vals.length; v++)
- vals[v] = impstring(vals[v]);
- qcolRows[qcolRowCnt++] = vals;
- } // if
- } // for
- qcolDisplay();
- } // qcolUnpack
- function qcolCheckAll(checked)
- {
- var r;
- for (r = 0; r < qcolRowCnt; r++)
- document.getElementById('cb'+r).checked = checked;
- document.getElementById('qcolCbAll').checked = checked;
- } // qcolCheckAll
- function qcolSelects()
- {
- var r;
- var s = 0;
- for (r = 0; r < qcolRowCnt; r++)
- if (document.getElementById('cb'+r).checked) s++;
- return s;
- } // qcolSelects
- function qcolDisplay()
- {
- var form = document.QueryColForm;
- var table = document.getElementById("qcolTable");
- var oldRows = table.rows.length-1;
- var r;
- var skip = 0;
- for (r = 0; r < qcolRowCnt; r++) {
- // get or create table row
- var row;
- if (r >= oldRows) {
- row = table.insertRow(r+1);
- row.className = 'row'+(r%2+1);
- var c;
- for (c = 0; c < qcolCellCount; c++) {
- row.insertCell(c);
- row.cells[c].noWrap = 'true';
- } // for
- row.cells[qcolCellOrderup].style.textAlign = 'right';
- } else
- row = table.rows[r+1];
- var data = qcolRows[r];
- var title = data[qcolTitle];
- if (title.length > 50) title = title.substr(0,47)+'...';
- row.cells[qcolCellCheckbox].innerHTML = '<input type="checkbox" id="cb'+r+'" name="cb'+r+'" value="'+r+'"/>';
- row.cells[qcolCellTitle ].innerHTML = '<a href="javascript:qcolEdit('+r+')">'+htmlchars(title)+'<\/a>';
- row.cells[qcolCellName ].innerHTML = data[qcolName];
- // header attribs
- var attr = '';
- var span = parseInt(data[qcolThspan]);
- if (skip > 0 || span < 1) {
- attr = '-';
- skip--;
- } else {
- if (span > 1) {
- attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_SPAN'); ?>('+span+') ';
- skip = span-1;
- } // if
- switch (data[qcolThalign]) {
- case '1': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_LEFT'); ?> '; break;
- case '2': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CENTER'); ?> '; break;
- case '3': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_RIGHT'); ?> '; break;
- case '4': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_JUSTIFY'); ?> '; break;
- default : ;
- } // switch
- switch (data[qcolThvalign]) {
- case '1': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_TOP'); ?> '; break;
- case '2': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_MIDDLE'); ?> '; break;
- case '3': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_BOTTOM'); ?> '; break;
- case '4': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_BASELINE'); ?> '; break;
- default : ;
- } // switch
- switch (data[qcolThwrap]) {
- case '1': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NOWRAP'); ?>'; break;
- default : ;
- } // switch
- } // if
- row.cells[qcolCellThattribs].innerHTML = attr;
- // data attribs
- attr = '';
- if (span < 1) {
- attr = '-';
- skip--;
- } else {
- switch (data[qcolAlign]) {
- case '1': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_LEFT'); ?> '; break;
- case '2': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CENTER'); ?> '; break;
- case '3': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_RIGHT'); ?> '; break;
- case '4': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_JUSTIFY'); ?> '; break;
- default : ;
- } // switch
- switch (data[qcolValign]) {
- case '1': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_TOP'); ?> '; break;
- case '2': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_MIDDLE'); ?> '; break;
- case '3': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_BOTTOM'); ?> '; break;
- case '4': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_BASELINE'); ?> '; break;
- default : ;
- } // switch
- switch (data[qcolWrap]) {
- case '1': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NOWRAP'); ?>'; break;
- default : ;
- } // switch
- } // if
- row.cells[qcolCellAttributes].innerHTML = attr;
- // width
- attr = '';
- if (parseInt(data[qcolWidth]) > 0) {
- attr += data[qcolWidth];
- if (data[qcolWidthmd]=='1') attr += '%'; else attr += 'px';
- } // if
- row.cells[qcolCellWidth].innerHTML = attr;
- // ordering
- if (r > 0)
- row.cells[qcolCellOrderup].innerHTML = '<a href="javascript:qcolOrderup('+r+')"><img src="components/com_breezingforms/images/icons/uparrow.png" alt="^" border="0"/><\/a>';
- else
- row.cells[qcolCellOrderup].innerHTML = '';
- if (r < qcolRowCnt-1)
- row.cells[qcolCellOrderdown].innerHTML = '<a href="javascript:qcolOrderdown('+r+')"><img src="components/com_breezingforms/images/icons/downarrow.png" alt="v" border="0"/><\/a>';
- else
- row.cells[qcolCellOrderdown].innerHTML = '';
- } // for
- for (r = oldRows; r > qcolRowCnt; r--) table.deleteRow(r);
- qcolCheckAll(false);
- } // qcolDisplay
- function qcolEdit(index)
- {
- var form = document.QueryColForm;
- qcolIndex = index;
- var row = qcolRows[qcolIndex];
- var c = 0;
- form.colTitle.value = row[qcolTitle ];
- form.colName.value = row[qcolName ];
- form.colClass1.value = row[qcolClass1 ];
- form.colClass2.value = row[qcolClass2 ];
- form.colClass3.value = row[qcolClass3 ];
- form.colWidth.value = row[qcolWidth ];
- form.colWidthmd.value = row[qcolWidthmd ];
- form.colThspan.value = row[qcolThspan ];
- form.colThalign.value = row[qcolThalign ];
- form.colThvalign.value = row[qcolThvalign];
- form.colThwrap.value = row[qcolThwrap ];
- form.colAlign.value = row[qcolAlign ];
- form.colValign.value = row[qcolValign ];
- form.colWrap.value = row[qcolWrap ];
- form.colValue.value = row[qcolValue ];
- document.getElementById('QueryColDialog').style.display = '';
- form.colTitle.focus();
- MM_swapImage('colSave','','images/save_f2.png',1);
- MM_swapImgRestore();
- MM_swapImage('colCancel','','images/cancel_f2.png',1);
- MM_swapImgRestore();
- } // qcolEdit
- function qcolAdd()
- {
- var form = document.QueryColForm;
- qcolIndex = qcolRowCnt;
- form.colTitle.value = '';
- form.colName.value = '';
- form.colClass1.value = '';
- form.colClass2.value = '';
- form.colClass3.value = '';
- form.colWidth.value = '';
- form.colWidthmd.value = 0;
- form.colThspan.value = 1;
- form.colThalign.value = 0;
- form.colThvalign.value = 0;
- form.colThwrap.value = 0;
- form.colAlign.value = 0;
- form.colValign.value = 0;
- form.colWrap.value = 0;
- form.colValue.value = '\x3C?php return $value; ?\x3E';
- document.getElementById('QueryColDialog').style.display = '';
- form.colTitle.focus();
- MM_swapImage('colSave','','images/save_f2.png',1);
- MM_swapImgRestore();
- MM_swapImage('colCancel','','images/cancel_f2.png',1);
- MM_swapImgRestore();
- } // qcolAdd
- function qcolCopy()
- {
- if (!qcolSelects()) {
- alert('<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_SELECTCOLUMNS'); ?>');
- return;
- } // if
- var r;
- var newcnt = qcolRowCnt;
- for (r = 0; r < qcolRowCnt; r++) {
- if (document.getElementById('cb'+r).checked) {
- qcolRows[newcnt] = new Array();
- var x;
- for (x = 0; x < qcolRows[r].length; x++)
- qcolRows[newcnt][x] = qcolRows[r][x];
- newcnt++;
- } // if
- } // for
- qcolRowCnt = newcnt;
- qcolDisplay();
- } // qcolCopy
- function qcolDelete()
- {
- if (!qcolSelects()) {
- alert('<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_SELECTCOLUMNS'); ?>');
- return;
- } // if
- if (!confirm('<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_ASKDELCOLUMNS'); ?>')) return;
- var r;
- for (r = qcolRowCnt-1; r >= 0; r--) {
- if (document.getElementById('cb'+r).checked) {
- var r2;
- qcolRowCnt--;
- for (r2 = r; r2 < qcolRowCnt; r2++) qcolRows[r2] = qcolRows[r2+1];
- } // if
- } // for
- qcolDisplay();
- } // qcolDelete
- function qcolOrderup(index)
- {
- var row = qcolRows[index];
- qcolRows[index] = qcolRows[index-1];
- qcolRows[index-1] = row;
- qcolDisplay();
- } // qcolOrderup
- function qcolOrderdown(index)
- {
- var row = qcolRows[index];
- qcolRows[index] = qcolRows[index+1];
- qcolRows[index+1] = row;
- qcolDisplay();
- } // qcolOrderdown
- function qcolOk()
- {
- var form = document.QueryColForm;
- var error = '';
- if (form.colTitle.value == '')
- error += "<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_TITLEEMPTY'); ?>\n";
- error += checkIdentifier(form.colName.value, 'name');
- if (error != '') {
- alert(error);
- return;
- } // if
- document.getElementById("QueryColDialog").style.display = 'none';
- if (qcolIndex >= qcolRowCnt) {
- // add a new row to the table
- qcolRows[qcolRowCnt++] = new Array(
- form.colTitle.value,
- form.colName.value,
- form.colClass1.value,
- form.colClass2.value,
- form.colClass3.value,
- form.colWidth.value,
- form.colWidthmd.value,
- form.colThspan.value,
- form.colThalign.value,
- form.colThvalign.value,
- form.colThwrap.value,
- form.colAlign.value,
- form.colValign.value,
- form.colWrap.value,
- form.colValue.value
- );
- } else {
- // udate existing row
- var row = qcolRows[qcolIndex];
- row[qcolTitle ] = form.colTitle.value,
- row[qcolName ] = form.colName.value,
- row[qcolClass1 ] = form.colClass1.value,
- row[qcolClass2 ] = form.colClass2.value,
- row[qcolClass3 ] = form.colClass3.value,
- row[qcolWidth ] = form.colWidth.value,
- row[qcolWidthmd ] = form.colWidthmd.value,
- row[qcolThspan ] = form.colThspan.value,
- row[qcolThalign ] = form.colThalign.value,
- row[qcolThvalign] = form.colThvalign.value,
- row[qcolThwrap ] = form.colThwrap.value,
- row[qcolAlign ] = form.colAlign.value,
- row[qcolValign ] = form.colValign.value,
- row[qcolWrap ] = form.colWrap.value,
- row[qcolValue ] = form.colValue.value
- } // if
- qcolDisplay();
- } // qcolOk
- function qcolCancel()
- {
- document.getElementById("QueryColDialog").style.display = 'none';
- } // qcolCancel
- <?php
- } // if query list
- if ($hasInit) {
- ?>
- function dispinit(value)
- {
- if (document.getElementById('initexec'))
- switch (value) {
- case '1':
- document.getElementById('initexec').style.display = '';
- document.getElementById('initlib').style.display = '';
- document.getElementById('initcode').style.display = 'none';
- break;
- case '2':
- document.getElementById('initexec').style.display = '';
- document.getElementById('initlib').style.display = 'none';
- document.getElementById('initcode').style.display = '';
- break;
- default:
- document.getElementById('initexec').style.display = 'none';
- document.getElementById('initlib').style.display = 'none';
- document.getElementById('initcode').style.display = 'none';
- } // switch
- } // dispinit
- function createInitCode()
- {
- form = document.adminForm;
- name = form.name.value;
- if (name=='') {
- alert('Please enter the element name first.');
- return;
- } // if
- if (!confirm("<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CREAINIT'); ?>\n<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_EXISTAPP'); ?>")) return;
- code =
- "function ff_"+name+"_init(element, condition)\n"+
- "{\n"+
- " switch (condition) {\n";
- if (form.script1flag1.checked)
- code +=
- " case 'formentry':\n"+
- " break;\n";
- if (form.script1flag2.checked)
- code +=
- " case 'pageentry':\n"+
- " break;\n";
- code +=
- " default:;\n"+
- " } // switch\n"+
- "} // ff_"+name+"_init\n";
- oldcode = form.script1code.value;
- if (oldcode != '')
- form.script1code.value =
- code+
- "\n// -------------- <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_OLDBELOW'); ?> --------------\n\n"+
- oldcode;
- else
- form.script1code.value = code;
- codeAreaChange(form.script1code);
- } // createInitCode
- <?php
- } // if hasInit
- if ($hasAction) {
- ?>
- function dispaction(value)
- {
- if(document.getElementById)
- if(document.getElementById('actionact'))
- switch (value) {
- case '1':
- document.getElementById('actionact').style.display = '';
- document.getElementById('actionlib').style.display = '';
- document.getElementById('actioncode').style.display = 'none';
- break;
- case '2':
- document.getElementById('actionact').style.display = '';
- document.getElementById('actionlib').style.display = 'none';
- document.getElementById('actioncode').style.display = '';
- break;
- default:
- document.getElementById('actionact').style.display = 'none';
- document.getElementById('actionlib').style.display = 'none';
- document.getElementById('actioncode').style.display = 'none';
- } // switch
- } // dispaction
- function createActionCode()
- {
- form = document.adminForm;
- name = form.name.value;
- if (name=='') {
- alert('Please enter the element name first.');
- return;
- } // if
- if (!confirm("<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CREAACTION'); ?>\n<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_EXISTAPP'); ?>")) return;
- code =
- "function ff_"+name+"_action(element, action)\n"+
- "{\n"+
- " switch (action) {\n";
- if (form.script2flag1)
- if (form.script2flag1.checked)
- code +=
- " case 'click':\n"+
- " break;\n";
- if (form.script2flag2)
- if (form.script2flag2.checked)
- code +=
- " case 'blur':\n"+
- " break;\n";
- if (form.script2flag3)
- if (form.script2flag3.checked)
- code +=
- " case 'change':\n"+
- " break;\n";
- if (form.script2flag4)
- if (form.script2flag4.checked)
- code +=
- " case 'focus':\n"+
- " break;\n";
- if (form.script2flag5)
- if (form.script2flag5.checked)
- code +=
- " case 'select':\n"+
- " break;\n";
- code +=
- " default:;\n"+
- " } // switch\n"+
- "} // ff_"+name+"_action\n";
- oldcode = form.script2code.value;
- if (oldcode != '')
- form.script2code.value =
- code+
- "\n// -------------- <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_OLDBELOW'); ?> --------------\n\n"+
- oldcode;
- else
- form.script2code.value = code;
- codeAreaChange(form.script2code);
- } // createActionCode
- <?php
- } // if hasAction
- if ($hasValidation) {
- ?>
- function dispvalidation(value)
- {
- if(document.getElementById)
- if(document.getElementById('validationlib'))
- switch (value) {
- case '1':
- document.getElementById('validationmsg').style.display = '';
- document.getElementById('validationlib').style.display = '';
- document.getElementById('validationcode').style.display = 'none';
- break;
- case '2':
- document.getElementById('validationmsg').style.display = '';
- document.getElementById('validationlib').style.display = 'none';
- document.getElementById('validationcode').style.display = '';
- break;
- default:
- document.getElementById('validationmsg').style.display = 'none';
- document.getElementById('validationlib').style.display = 'none';
- document.getElementById('validationcode').style.display = 'none';
- } // switch
- } // dispvalidation
- function createValidationCode()
- {
- form = document.adminForm;
- name = form.name.value;
- if (name=='') {
- alert('Please enter the element name first.');
- return;
- } // if
- if (!confirm("<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CREAVALID'); ?>\n<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_EXISTAPP'); ?>")) return;
- code =
- "function ff_"+name+"_validation(element, message)\n"+
- "{\n"+
- " if (element_fails_my_test) {\n"+
- " if (message=='') message = element.name+\" faild in my test.\\n\"\n"+
- " ff_validationFocus(element.name);\n"+
- " return message;\n"+
- " } // if\n"+
- " return '';\n"+
- "} // ff_"+name+"_validation\n";
- oldcode = form.script3code.value;
- if (oldcode != '')
- form.script3code.value =
- code+
- "\n// -------------- <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_OLDBELOW'); ?> --------------\n\n"+
- oldcode;
- else
- form.script3code.value = code;
- codeAreaChange(form.script3code);
- } // createValidationCode
- <?php
- } // if hasValidation
- if ($row->type == 'Select List') {
- ?>
- function addOption()
- {
- form = document.SelectOptionForm;
- form.optionText.value = '';
- form.optionValue.value = '';
- form.optionSelected[0].checked = true;
- document.getElementById("SelectOptionDialog").style.display = '';
- form.optionText.focus();
- } // addOption
- function okOption()
- {
- form = document.SelectOptionForm;
- if (form.optionText.value=='') {
- alert("Please enter a text.");
- form.optionText.focus();
- return;
- } // if
- data = document.adminForm.data2;
- value = data.value;
- if (value != '')
- if (value.substr(value.length-1,1)!="\n")
- value += "\n";
- sel = '0;';
- if (form.optionSelected[1].checked) sel = '1;';
- value +=
- sel +
- form.optionText.value + ';' +
- form.optionValue.value;
- data.value = value;
- form.optionText.value = '';
- form.optionValue.value = '';
- form.optionSelected[0].checked = true;
- form.optionText.focus();
- } // addOption
- function quitOption()
- {
- document.getElementById("SelectOptionDialog").style.display = 'none';
- } // addOption
- <?php
- }
- ?>
- onload = function()
- {
- <?php
- if ($row->type=='Query List') echo "\t\t\tloadQueryList();\n";
- // because of mozilla browser problems, the widest elements must be shown first
- $s1size = $s2size = $s3size = $ff_config->areasmall;
- $nonbig = true;
- if ($hasInit && $row->script1cond==2) {
- echo "\t\t\tdispinit('2');\n";
- $s1size = $ff_config->areamedium;
- $nonbig = false;
- } // if
- if ($hasAction && $row->script2cond==2) {
- echo "\t\t\tdispaction('2');\n";
- if ($nonbig) {
- $s2size = $ff_config->areamedium;
- $nonbig = false;
- } // if
- } // if
- if ($hasValidation && $row->script3cond==2) {
- echo "\t\t\tdispvalidation('2');\n";
- if ($nonbig) $s3size = $ff_config->areamedium;
- } // if
- if ($hasInit && $row->script1cond==1) echo "\t\t\tdispinit('1');\n";
- if ($hasAction && $row->script2cond==1) echo "\t\t\tdispaction('1');\n";
- if ($hasValidation && $row->script3cond==1) echo "\t\t\tdispvalidation('1');\n";
- if (($row->type=='Graphic Button' || $row->type=='Icon') && $row->flag1!=0)
- echo "\t\t\tdispcaptiontext('".$row->flag1."');\n";
- if ($hasInit) echo "\t\t\tcodeAreaAdd('script1code', 'script1lines');\n";
- if ($hasAction) echo "\t\t\tcodeAreaAdd('script2code', 'script2lines');\n";
- if ($hasValidation) echo "\t\t\tcodeAreaAdd('script3code', 'script3lines');\n";
- if ($row->type=='Query List') echo "\t\t\tcodeAreaAdd('data2', 'data2lines');\n";
- switch ($tabpane) {
- case 1:
- case 2:
- echo "\t\t\ttabPane1.setSelectedIndex($tabpane);\n";
- break;
- default:
- echo "\t\t\tdocument.adminForm.title.focus();\n";
- } // switch
- ?>
- } // onload
- //-->
- </script>
-
- <div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
- <script type="text/javascript" src="<?php echo $ff_mossite ?>/components/com_breezingforms/libraries/js/overlib_mini.js"></script>
- <?php
- if ($row->type == 'Select List') {
- ?>
- <div id="SelectOptionDialog" style="position:absolute;top:380px;left:45%;z-index:100;display:none;">
- <table cellpadding="4" cellspacing="1" border="0" class="adminform" style="width:350px">
- <form name='SelectOptionForm' onsubmit='okOption();return false;'>
- <tr><th colspan="4" class="title">BreezingForms - <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NEWSELOPT'); ?></th></tr>
- <tr>
- <td></td>
- <td><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_TEXT'); ?>:</td>
- <td><input type="text" size="50" value="" name="optionText" class="inputbox"/></td>
- <td></td>
- </tr>
- <tr>
- <td></td>
- <td><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_VALUE'); ?>:</td>
- <td><input type="text" size="50" value="" name="optionValue" class="inputbox"/></td>
- <td></td>
- </tr>
- <tr>
- <td></td>
- <td><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_SELECTED'); ?>:</td>
- <td><?php echo JHTML::_('select.booleanlist', "optionSelected", "", 0); ?></td>
- <td></td>
- </tr>
- <tr>
- <td></td>
- <td colspan="2" style="text-align:right">
- <input type="button" value="<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_OKBUTTON'); ?>" onclick="okOption()" class="button btn btn-primary">
-
- <input type="button" value="<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_ABORTBUTT'); ?>" onclick="quitOption()" class="button btn btn-primary">
- </td>
- <td></td>
- </tr>
- </table>
- </form>
- </div>
- <?php
- } // if Select List
- if ($row->type == 'Query List') {
- ?>
- <div id="QueryColDialog" style="background-color: #cccccc; position:absolute;top:120px;left:30%;z-index:100;display:none;">
- <form action="#" name='QueryColForm' onsubmit="return false;">
- <table cellpadding="4" cellspacing="1" border="0" class="adminform" style="width:550px">
- <tr><th colspan="4" class="title">BreezingForms - <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_EDITQUERYCOL'); ?></th></tr>
- <tr>
- <td></td>
- <td>
- <fieldset><legend><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_HEADER'); ?></legend>
- <table class="adminform">
- <tr>
- <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_TITLE'); ?>:</td>
- <td nowrap>
- <input type="text" size="50" maxlength="500" name="colTitle" class="inputbox"/>
- <?php
- echo bf_ToolTip(BFText::_('COM_BREEZINGFORMS_ELEMENTS_QCOLTIPTITLE'));
- ?>
- </td>
- </tr>
- <tr>
- <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_CLASSFOR'); ?> <th>:</td>
- <td nowrap>
- <input type="text" size="30" maxlength="30" name="colClass1" class="inputbox"/>
- </td>
- </tr>
- <tr>
- <td nowrap><th> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_SPAN'); ?>:</td>
- <td nowrap>
- <input type="text" size="6" maxlength="6" name="colThspan" class="inputbox"/>
- </td>
- </tr>
- <tr>
- <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_ATTRIBUTES'); ?>:</td>
- <td nowrap>
- <select name="colThalign" size="1" class="inputbox">
- <option value="0" selected="selected"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NONE'); ?></option>
- <option value="1"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_LEFT'); ?></option>
- <option value="2"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CENTER'); ?></option>
- <option value="3"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_RIGHT'); ?></option>
- <option value="4"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_JUSTIFY'); ?></option>
- </select>
- <select name="colThvalign" size="1" class="inputbox">
- <option value="0" selected="selected"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NONE'); ?></option>
- <option value="1"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_TOP'); ?></option>
- <option value="2"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_MIDDLE'); ?></option>
- <option value="3"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_BOTTOM'); ?></option>
- <option value="4"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_BASELINE'); ?></option>
- </select>
- <select name="colThwrap" size="1" class="inputbox">
- <option value="0" selected="selected"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NONE'); ?></option>
- <option value="1"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NOWRAP'); ?></option>
- </select>
- </td>
- </tr>
- </table>
- </fieldset>
- </td>
- <td></td>
- </tr>
- <tr>
- <td></td>
- <td>
- <fieldset><legend><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_DATA'); ?></legend>
- <table class="adminform">
- <tr>
- <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NAME'); ?>:</td>
- <td nowrap>
- <input type="text" size="30" maxlength="30" name="colName" class="inputbox"/>
- <?php
- echo bf_ToolTip(BFText::_('COM_BREEZINGFORMS_ELEMENTS_QCOLTIPNAME'));
- ?>
- </td>
- </tr>
- <tr>
- <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_CLASSFOR'); ?> <td(1)>:</td>
- <td nowrap>
- <input type="text" size="30" maxlength="30" name="colClass2" class="inputbox"/>
- </td>
- </tr>
- <tr>
- <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_CLASSFOR'); ?> <td(2)>:</td>
- <td nowrap>
- <input type="text" size="30" maxlength="30" name="colClass3" class="inputbox"/>
- </td>
- </tr>
- <tr>
- <td valign="top" nowrap><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_WIDTH'); ?>:</td>
- <td nowrap>
- <input type="text" size="6" maxlength="6" name="colWidth" class="inputbox"/>
- <br/>
- <select name="colWidthmd" size="1" class="inputbox">
- <option value="0" selected="selected">px</option>
- <option value="1">%</option>
- </select>
- </td>
- </tr>
- <tr>
- <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_ATTRIBUTES'); ?>:</td>
- <td nowrap>
- <select name="colAlign" size="1" class="inputbox">
- <option value="0" selected="selected"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NONE'); ?></option>
- <option value="1"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_LEFT'); ?></option>
- <option value="2"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CENTER'); ?></option>
- <option value="3"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_RIGHT'); ?></option>
- <option value="4"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_JUSTIFY'); ?></option>
- </select>
- <select name="colValign" size="1" class="inputbox">
- <option value="0" selected="selected"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NONE'); ?></option>
- <option value="1"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_TOP'); ?></option>
- <option value="2"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_MIDDLE'); ?></option>
- <option value="3"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_BOTTOM'); ?></option>
- <option value="4"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_BASELINE'); ?></option>
- </select>
- <select name="colWrap" size="1" class="inputbox">
- <option value="0" selected="selected"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NONE'); ?></option>
- <option value="1"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NOWRAP'); ?></option>
- </select>
- </td>
- </tr>
- <tr>
- <td nowrap colspan="2">
- <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_VALUE'); ?>:
- <a href="#" onClick="document.QueryColForm.colValue.rows=<?php echo $ff_config->areasmall; ?>;">[<?php echo $ff_config->areasmall; ?>]</a>
- <a href="#" onClick="document.QueryColForm.colValue.rows=<?php echo $ff_config->areamedium; ?>;">[<?php echo $ff_config->areamedium; ?>]</a>
- <a href="#" onClick="document.QueryColForm.colValue.rows=<?php echo $ff_config->arealarge; ?>;">[<?php echo $ff_config->arealarge; ?>]</a>
- <br/>
- <textarea wrap="off" name="colValue" style="width:500px;" rows="<?php echo $ff_config->areasmall; ?>" class="inputbox"></textarea>
- </td>
- </tr>
- </table>
- </fieldset>
- </td>
- <td></td>
- </tr>
- <tr>
- <td></td>
- <td nowrap colspan="2" style="text-align:right">
-
- <input class="btn btn-primary" onclick="qcolOk();" type="submit" value="<?php echo htmlentities(BFText::_('COM_BREEZINGFORMS_TOOLBAR_SAVE'), ENT_QUOTES, 'UTF-8'); ?>"/>
-
- <input class="btn btn-primary" onclick="qcolCancel();" type="submit" value="<?php echo htmlentities(BFText::_('COM_BREEZINGFORMS_TOOLBAR_CANCEL'), ENT_QUOTES, 'UTF-8'); ?>"/>
-
- </td>
- <td> </td>
- </tr>
- </table>
- </form>
- <br/>
- <br/>
- </div>
- <?php
- } // if Query List
- ?>
- <form action="index.php" method="post" name="adminForm" id="adminForm" class="adminForm">
- <table cellpadding="0" cellspacing="0" border="0" class="adminform" style="width:775px;">
- <tr><th colspan="3" class="title">BreezingForms - <?php echo $action; ?> <?php echo HTML_facileFormsElement::displayType($row->type); ?></th></tr>
- <tr>
- <td></td>
- <td width="100%">
- <?php
- $tabs = new BFTabs(0);
- $tabs->startPane("editPane");
- $tabs->startTab(BFText::_('COM_BREEZINGFORMS_ELEMENTS_SETTINGS'),"tab_settings");
- ?>
- <table cellpadding="0" cellspacing="0" border="0" class="adminform">
- <tr>
- <td></td>
- <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_TITLE'); ?>:</td>
- <td nowrap>
- <input type="text" size="50" maxlength="50" name="title" value="<?php echo $row->title; ?>" class="inputbox"/>
- <?php
- echo bf_ToolTip(BFText::_('COM_BREEZINGFORMS_ELEMENTS_TIPTITLE'));
- ?>
- </td>
- <td></td>
- </tr>
- <tr>
- <td></td>
- <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NAME'); ?>:</td>
- <td nowrap>
- <input type="text" size="30" maxlength="30" name="name" value="<?php echo $row->name ?>" class="inputbox"/>
- <?php
- echo bf_ToolTip(BFText::_('COM_BREEZINGFORMS_ELEMENTS_TIPNAME'));
- ?>
- </td>
- <td></td>
- </tr>
- <?php
- switch ($row->type) {
- case 'Hidden Input':
- break;
- default:
- ?>
- <tr>
- <td></td>
- <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_CLASSFOR'); ?> <div>:</td>
- <td nowrap>
- <input type="text" size="30" maxlength="30" name="class1" value="<?php echo $row->class1; ?>" class="inputbox"/>
- </td>
- <td></td>
- </tr>
- <?php
- break;
- } // switch
- $elemname = '';
- switch ($row->type) {
- case 'Image':
- case 'Tooltip':
- case 'Icon': $elemname = 'img'; break;
- case 'Checkbox':
- case 'Radio Button':
- case 'Regular Button':
- case 'Text':
- case 'File Upload': $elemname = 'input'; break;
- case 'Graphic Button': $elemname = 'button'; break;
- case 'Select List': $elemname = 'select'; break;
- case 'Textarea': $elemname = 'textarea'; break;
- case 'Query List': $elemname = 'table'; break;
- default:;
- } // switch
- if ($elemname != '') {
- ?>
- <tr>
- <td></td>
- <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_CLASSFOR'); ?> <<?php echo $elemname; ?>>:</td>
- <td nowrap>
- <input type="text" size="30" maxlength="30" name="class2" value="<?php echo $row->class2; ?>" class="inputbox"/>
- </td>
- <td></td>
- </tr>
- <?php
- } // if
- switch ($row->type) {
- case 'Query List':
- ?>
- <tr>
- <td></td>
- <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_CLASSFOR'); ?> <tr(header)>:</td>
- <td nowrap>
- <input type="text" size="30" maxlength="30" name="trhclass" class="inputbox"/>
- </td>
- <td></td>
- </tr>
- <tr>
- <td></td>
- <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_CLASSFOR'); ?> <tr(data1)>:</td>
- <td nowrap>
- <input type="text" size="30" maxlength="30" name="tr1class" class="inputbox"/>
- </td>
- <td></td>
- </tr>
- <tr>
- <td></td>
- <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_CLASSFOR'); ?> <tr(data2)>:</td>
- <td nowrap>
- <input type="text" size="30" maxlength="30" name="tr2class" class="inputbox"/>
- </td>
- <td></td>
- </tr>
- <tr>
- <td></td>
- <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_CLASSFOR'); ?> <tr(footer)>:</td>
- <td nowrap>
- <input type="text" size="30" maxlength="30" name="trfclass" class="inputbox"/>
- </td>
- <td></td>
- </tr>
- <tr>
- <td></td>
- <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_CLASSFOR'); ?> <td(footer)>…
Large files files are truncated, but you can click here to view the full file