PageRenderTime 168ms CodeModel.GetById 27ms RepoModel.GetById 1ms app.codeStats 2ms

/administrator/components/com_breezingforms/admin/element.html.php

https://bitbucket.org/izubizarreta/https-bitbucket.org-bityvip-alpes
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

  1. <?php
  2. /**
  3. * BreezingForms - A Joomla Forms Application
  4. * @version 1.8
  5. * @package BreezingForms
  6. * @copyright (C) 2008-2012 by Markus Bopp
  7. * @license Released under the terms of the GNU General Public License
  8. **/
  9. defined('_JEXEC') or die('Direct Access to this location is not allowed.');
  10. require_once($ff_compath.'/facileforms.process.php');
  11. jimport('joomla.version');
  12. $version = new JVersion();
  13. if(version_compare($version->getShortVersion(), '1.6', '>=') && version_compare($version->getShortVersion(), '3.0', '<')){
  14. echo '<link rel="stylesheet" href="'.JURI::root(true).'/administrator/components/com_breezingforms/admin/bluestork.fix.css" type="text/css" />';
  15. }
  16. class HTML_facileFormsElement
  17. {
  18. function newitem($option, $pkg, $form, $page)
  19. {
  20. $mainframe = JFactory::getApplication();
  21. $ff_mossite = JURI::base();
  22. ?>
  23. <div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
  24. <script type="text/javascript" src="<?php echo $ff_mossite; ?>/components/com_breezingforms/libraries/js/overlib_mini.js"></script>
  25. <form action="index.php" method="post" name="adminForm" id="adminForm" class="adminForm">
  26. <table cellpadding="4" cellspacing="1" border="0" class="adminform" style="width:300px;">
  27. <tr><th colspan="5" class="title">BreezingForms - <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NEWTYPE'); ?></th></tr>
  28. <tr>
  29. <td></td>
  30. <td valign="top">
  31. <fieldset><legend><strong><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_STATICS'); ?></strong></legend>
  32. <table cellpadding="4" cellspacing="1" border="0" class="adminform">
  33. <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>
  34. <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>
  35. <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>
  36. <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>
  37. <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>
  38. </table>
  39. </fieldset>
  40. <fieldset><legend><strong><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_BUTTONS'); ?></strong></legend>
  41. <table cellpadding="4" cellspacing="1" border="0" class="adminform">
  42. <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>
  43. <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>
  44. <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>
  45. </table>
  46. </fieldset>
  47. </td>
  48. <td valign="top">
  49. <fieldset><legend><strong><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_INPUTS'); ?></strong></legend>
  50. <table cellpadding="4" cellspacing="1" border="0" class="adminform">
  51. <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>
  52. <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>
  53. <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>
  54. <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>
  55. <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>
  56. <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>
  57. <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>
  58. <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>
  59. </table>
  60. </fieldset>
  61. </td>
  62. <td></td>
  63. </tr>
  64. <tr>
  65. <td></td>
  66. <td nowrap colspan="3" style="text-align:right">
  67. <input class="btn btn-primary" onclick="submitbutton('newedit');" type="submit" value="<?php echo htmlentities(BFText::_('COM_BREEZINGFORMS_TOOLBAR_CONTINUE'), ENT_QUOTES, 'UTF-8'); ?>"/>
  68. &nbsp;&nbsp;
  69. <input class="btn btn-primary" onclick="submitbutton('cancel');" type="submit" value="<?php echo htmlentities(BFText::_('COM_BREEZINGFORMS_TOOLBAR_CANCEL'), ENT_QUOTES, 'UTF-8'); ?>"/>
  70. </td>
  71. <td></td>
  72. </tr>
  73. </table>
  74. <input type="hidden" name="pkg" value="<?php echo $pkg; ?>" />
  75. <input type="hidden" name="option" value="<?php echo $option; ?>" />
  76. <input type="hidden" name="task" value="" />
  77. <input type="hidden" name="act" value="editpage" />
  78. <input type="hidden" name="form" value="<?php echo $form; ?>" />
  79. <input type="hidden" name="page" value="<?php echo $page; ?>" />
  80. </form>
  81. <?php
  82. } // newitem
  83. function displayType($type)
  84. {
  85. switch ($type) {
  86. case 'Static Text/HTML': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_STATICTEXT'); break;
  87. case 'Rectangle': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_RECTANGLE'); break;
  88. case 'Image': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_IMAGE'); break;
  89. case 'Tooltip': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_TOOLTIP'); break;
  90. case 'Query List': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_QUERYLIST'); break;
  91. case 'Regular Button': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_REGBUTTON'); break;
  92. case 'Graphic Button': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_GRAPHBUTTON'); break;
  93. case 'Icon': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_ICON'); break;
  94. case 'Checkbox': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_CHECKBOX'); break;
  95. case 'Radio Button': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_RADIO'); break;
  96. case 'Select List': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_SELECT'); break;
  97. case 'Text': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_TEXT'); break;
  98. case 'Textarea': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_TEXTAREA'); break;
  99. case 'File Upload': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_UPLOAD'); break;
  100. case 'Hidden Input': $disptype = BFText::_('COM_BREEZINGFORMS_ELEMENTS_HIDDEN'); break;
  101. default: $disptype = $type; break;
  102. } // switch
  103. return $disptype;
  104. } // displayType
  105. function edit($option, $tabpane, $pkg, &$row, &$lists)
  106. {
  107. global $ff_mossite, $ff_admsite, $ff_config;
  108. $mainframe = JFactory::getApplication();
  109. $ff_mossite = JURI::base();
  110. $action = $row->id ? BFText::_('COM_BREEZINGFORMS_ELEMENTS_EDIT') : BFText::_('COM_BREEZINGFORMS_ELEMENTS_ADD');
  111. $hasInit = false;
  112. switch ($row->type) {
  113. case 'Static Text/HTML':
  114. case 'Rectangle':
  115. case 'Image':
  116. case 'Tooltip':
  117. case 'Query List':
  118. case 'Regular Button':
  119. case 'Graphic Button':
  120. case 'Icon':
  121. case 'Captcha':
  122. break;
  123. default:
  124. $hasInit = true;
  125. } // switch
  126. $hasAction = false;
  127. switch ($row->type) {
  128. case 'Static Text/HTML':
  129. case 'Rectangle':
  130. case 'Image':
  131. case 'Tooltip':
  132. case 'Query List':
  133. case 'Hidden Input':
  134. case 'Captcha':
  135. break;
  136. default:
  137. $hasAction = true;
  138. } // switch
  139. $hasValidation = false;
  140. switch ($row->type) {
  141. case 'Static Text/HTML':
  142. case 'Rectangle':
  143. case 'Image':
  144. case 'Tooltip':
  145. case 'Query List':
  146. case 'Regular Button':
  147. case 'Graphic Button':
  148. case 'Icon':
  149. case 'Captcha':
  150. break;
  151. default:
  152. $hasValidation = true;
  153. } // switch
  154. ?>
  155. <script type="text/javascript" src="<?php echo $ff_admsite; ?>/admin/areautils.js"></script>
  156. <script type="text/javascript">
  157. <!--
  158. function checkIdentifier(value, name)
  159. {
  160. var invalidChars = /\W/;
  161. var error = '';
  162. if (value == '')
  163. error += "<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_ENTNAME'); ?>\n";
  164. else
  165. if (invalidChars.test(value))
  166. error += "<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_ENTIDENT'); ?>\n";
  167. return error;
  168. } // checkIdentifier
  169. var bf_submitbutton = function(pressbutton)
  170. {
  171. var form = document.adminForm;
  172. var error = '';
  173. if (pressbutton != 'cancel') {
  174. if (form.title.value == '')
  175. error += "<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_TITLEEMPTY'); ?>\n";
  176. error += checkIdentifier(form.name.value, 'name');
  177. } // if
  178. if (error != ''){
  179. alert(error);
  180. } else {
  181. <?php
  182. if ($row->type=='Query List') echo "\t\t\t\tsaveQueryList();\n";
  183. if ($row->type=='Static Text/HTML' && $ff_config->wysiwyg){
  184. jimport( 'joomla.html.editor' );
  185. $editor = JFactory::getEditor();
  186. echo $editor->save( 'data1' );
  187. }
  188. ?>
  189. submitform( pressbutton );
  190. } // if
  191. }; // submitbutton
  192. if(typeof Joomla != "undefined"){
  193. Joomla.submitbutton = bf_submitbutton;
  194. }
  195. submitbutton = bf_submitbutton;
  196. <?php
  197. if ($row->type == 'Graphic Button' || $row->type == 'Icon') {
  198. ?>
  199. function dispcaptiontext(value)
  200. {
  201. if(document.getElementById)
  202. if(document.getElementById('captiontext'))
  203. switch (value) {
  204. case '0':
  205. document.getElementById('captiontext').style.display = 'none';
  206. break;
  207. default:
  208. document.getElementById('captiontext').style.display = '';
  209. } // switch
  210. } // dispcaptiontext
  211. <?php
  212. }
  213. if ($row->type == 'Tooltip') {
  214. ?>
  215. function disptooltipurl(value)
  216. {
  217. if(document.getElementById)
  218. if(document.getElementById('tooltipurl'))
  219. switch (value) {
  220. case '0':
  221. case '1':
  222. document.getElementById('tooltipurl').style.display = 'none';
  223. break;
  224. default:
  225. document.getElementById('tooltipurl').style.display = '';
  226. } // switch
  227. } // disptooltipurl
  228. <?php
  229. } // if tooltip
  230. if ($row->type == 'Query List') {
  231. ?>
  232. function loadQueryList()
  233. {
  234. var form = document.adminForm;
  235. var text = trim(form.data1.value);
  236. var rows = text.split('\n');
  237. var rcnt = rows.length;
  238. var r;
  239. for (r = 0; r < rcnt; r++) rows[r] = trim(rows[r]);
  240. if (rcnt > 0) form.border.value = rows[0];
  241. if (rcnt > 1) form.cellspacing.value = rows[1];
  242. if (rcnt > 2) form.cellpadding.value = rows[2];
  243. if (rcnt > 3) form.trhclass.value = rows[3];
  244. if (rcnt > 4) form.tr1class.value = rows[4];
  245. if (rcnt > 5) form.tr2class.value = rows[5];
  246. if (rcnt > 6) form.trfclass.value = rows[6];
  247. if (rcnt > 7) form.tdfclass.value = rows[7];
  248. if (rcnt > 8 && rows[8]!='') form.pagenav.options[rows[8]].selected = true;
  249. qcolUnpack();
  250. } // loadQueryList
  251. function saveQueryList()
  252. {
  253. var form = document.adminForm;
  254. form.data1.value =
  255. trim(form.border.value) +'\n'+
  256. trim(form.cellspacing.value) +'\n'+
  257. trim(form.cellpadding.value) +'\n'+
  258. trim(form.trhclass.value) +'\n'+
  259. trim(form.tr1class.value) +'\n'+
  260. trim(form.tr2class.value) +'\n'+
  261. trim(form.trfclass.value) +'\n'+
  262. trim(form.tdfclass.value) +'\n'+
  263. trim(form.pagenav.value) +'\n';
  264. qcolPack();
  265. } // saveQueryList
  266. function showpagenav(height)
  267. {
  268. if (parseInt(height))
  269. document.getElementById('pagenavrow').style.display = '';
  270. else
  271. document.getElementById('pagenavrow').style.display = 'none';
  272. } // showpagenav
  273. function createQueryCode()
  274. {
  275. form = document.adminForm;
  276. name = form.name.value;
  277. if (name=='') {
  278. alert('Please enter the element name first.');
  279. return;
  280. } // if
  281. if (!confirm("<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_ASKCREATEQUERY'); ?>\n<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_EXISTAPP'); ?>")) return;
  282. code =
  283. "global $database;\n"+
  284. "\n"+
  285. "$database->setQuery(\n"+
  286. " \"select id, name, username, email \".\n"+
  287. " \"from #__users \".\n"+
  288. " \"order by id\"\n"+
  289. ");\n"+
  290. "$rows = $database->loadObjectList();\n";
  291. oldcode = form.data2.value;
  292. if (oldcode != '')
  293. form.data2.value =
  294. code+
  295. "\n// -------------- <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_OLDBELOW'); ?> --------------\n\n"+
  296. oldcode;
  297. else
  298. form.data2.value = code;
  299. codeAreaChange(form.data2);
  300. } // createQueryCode
  301. function trim(s)
  302. {
  303. while (s.length>0 && (s.charAt(0)==' '||s.charAt(0)=='\n'||s.charAt(0)=='\r'))
  304. s = s.substr(1,s.length-1);
  305. while (s.length>0 && (s.charAt(s.length-1)==' '||s.charAt(s.length-1)=='\n'||s.charAt(s.length-1)=='\r'))
  306. s = s.substr(0,s.length-1);
  307. return s;
  308. } // trim
  309. function expstring(text)
  310. {
  311. text = trim(text);
  312. var i;
  313. var o = '';
  314. for(i = 0; i < text.length; i++) {
  315. c = text.charAt(i);
  316. switch(c) {
  317. case '&' : o += '\\x26'; break;
  318. case '<' : o += '\\x3C'; break;
  319. case '>' : o += '\\x3E'; break;
  320. case '\'': o += '\\x27'; break;
  321. case '\\': o += '\\x5C'; break;
  322. case '"' : o += '\\x22'; break;
  323. case '\n': o += '\\n'; break;
  324. case '\r': o += '\\r'; break;
  325. default: o += c;
  326. } // switch
  327. } // for
  328. return o;
  329. } // expstring
  330. function htmlchars(text)
  331. {
  332. var i;
  333. var o = '';
  334. for(i = 0; i < text.length; i++) {
  335. c = text.charAt(i);
  336. switch(c) {
  337. case '&' : o += '&amp;'; break;
  338. case '<' : o += '&lt;'; break;
  339. case '>' : o += '&gt;'; break;
  340. case '"' : o += '&quot;'; break;
  341. default: o += c;
  342. } // switch
  343. } // for
  344. return o;
  345. } // htmlchars
  346. function impstring(text)
  347. {
  348. var str = '';
  349. var ss = 0;
  350. var s;
  351. var tl = text.length;
  352. var hexdigs = "0123456789abcdefABCDEF";
  353. while (ss < tl) {
  354. s = text.charAt(ss++);
  355. if (s == '\\') {
  356. if (ss < tl) s = text.charAt(ss++); else s = 0;
  357. switch (s) {
  358. case 0 : break;
  359. case 'e' : str += '\33'; break;
  360. case 't' : str += '\t'; break;
  361. case 'r' : str += '\r'; break;
  362. case 'n' : str += '\n'; break;
  363. case 'f' : str += '\f'; break;
  364. case 'x' : {
  365. if (ss < tl) s = text.charAt(ss++); else s = 0;
  366. var ch = '';
  367. while (hexdigs.indexOf(s)>=0 && ch.length < 2) {
  368. ch += s;
  369. if (ss < tl) s = text.charAt(ss++); else s = 0;
  370. } // while
  371. while (ch.length < 2) ch = '0'+ch;
  372. str += unescape('%'+ch);
  373. if (s) ss--;
  374. break;
  375. }
  376. default:
  377. str += s;
  378. } // switch
  379. } else
  380. str += s;
  381. } // while
  382. return str;
  383. } // impstring
  384. var qcolRows = new Array();
  385. var qcolRowCnt = 0;
  386. var qcolIndex = 0;
  387. var qcolTitle = 0;
  388. var qcolName = 1;
  389. var qcolClass1 = 2;
  390. var qcolClass2 = 3;
  391. var qcolClass3 = 4;
  392. var qcolWidth = 5;
  393. var qcolWidthmd = 6;
  394. var qcolThspan = 7;
  395. var qcolThalign = 8;
  396. var qcolThvalign = 9;
  397. var qcolThwrap = 10;
  398. var qcolAlign = 11;
  399. var qcolValign = 12;
  400. var qcolWrap = 13;
  401. var qcolValue = 14;
  402. var qcolSize = 15;
  403. var qcolCellCheckbox = 0;
  404. var qcolCellTitle = 1;
  405. var qcolCellName = 2;
  406. var qcolCellThattribs = 3;
  407. var qcolCellAttributes = 4;
  408. var qcolCellWidth = 5;
  409. var qcolCellOrderup = 6;
  410. var qcolCellOrderdown = 7;
  411. var qcolCellCount = 8;
  412. function qcolPack()
  413. {
  414. var r;
  415. var text = '';
  416. for (r = 0; r < qcolRowCnt; r++) {
  417. var c;
  418. var row = qcolRows[r];
  419. for (c = 0; c < row.length; c++) {
  420. if (c > 0) text += '&';
  421. text += expstring(row[c]);
  422. } // for
  423. text += '\n';
  424. } // for
  425. document.adminForm.data3.value = text;
  426. } // qcolPack
  427. function qcolUnpack()
  428. {
  429. var text = trim(document.adminForm.data3.value);
  430. var rows = text.split('\n');
  431. var r;
  432. qcolRowCnt = 0;
  433. for (r = 0; r < rows.length; r++) {
  434. if (rows[r] != '') {
  435. var vals = rows[r].split('&');
  436. var v;
  437. for (v = 0; v < vals.length; v++)
  438. vals[v] = impstring(vals[v]);
  439. qcolRows[qcolRowCnt++] = vals;
  440. } // if
  441. } // for
  442. qcolDisplay();
  443. } // qcolUnpack
  444. function qcolCheckAll(checked)
  445. {
  446. var r;
  447. for (r = 0; r < qcolRowCnt; r++)
  448. document.getElementById('cb'+r).checked = checked;
  449. document.getElementById('qcolCbAll').checked = checked;
  450. } // qcolCheckAll
  451. function qcolSelects()
  452. {
  453. var r;
  454. var s = 0;
  455. for (r = 0; r < qcolRowCnt; r++)
  456. if (document.getElementById('cb'+r).checked) s++;
  457. return s;
  458. } // qcolSelects
  459. function qcolDisplay()
  460. {
  461. var form = document.QueryColForm;
  462. var table = document.getElementById("qcolTable");
  463. var oldRows = table.rows.length-1;
  464. var r;
  465. var skip = 0;
  466. for (r = 0; r < qcolRowCnt; r++) {
  467. // get or create table row
  468. var row;
  469. if (r >= oldRows) {
  470. row = table.insertRow(r+1);
  471. row.className = 'row'+(r%2+1);
  472. var c;
  473. for (c = 0; c < qcolCellCount; c++) {
  474. row.insertCell(c);
  475. row.cells[c].noWrap = 'true';
  476. } // for
  477. row.cells[qcolCellOrderup].style.textAlign = 'right';
  478. } else
  479. row = table.rows[r+1];
  480. var data = qcolRows[r];
  481. var title = data[qcolTitle];
  482. if (title.length > 50) title = title.substr(0,47)+'...';
  483. row.cells[qcolCellCheckbox].innerHTML = '<input type="checkbox" id="cb'+r+'" name="cb'+r+'" value="'+r+'"/>';
  484. row.cells[qcolCellTitle ].innerHTML = '<a href="javascript:qcolEdit('+r+')">'+htmlchars(title)+'<\/a>';
  485. row.cells[qcolCellName ].innerHTML = data[qcolName];
  486. // header attribs
  487. var attr = '';
  488. var span = parseInt(data[qcolThspan]);
  489. if (skip > 0 || span < 1) {
  490. attr = '-';
  491. skip--;
  492. } else {
  493. if (span > 1) {
  494. attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_SPAN'); ?>('+span+') ';
  495. skip = span-1;
  496. } // if
  497. switch (data[qcolThalign]) {
  498. case '1': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_LEFT'); ?> '; break;
  499. case '2': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CENTER'); ?> '; break;
  500. case '3': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_RIGHT'); ?> '; break;
  501. case '4': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_JUSTIFY'); ?> '; break;
  502. default : ;
  503. } // switch
  504. switch (data[qcolThvalign]) {
  505. case '1': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_TOP'); ?> '; break;
  506. case '2': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_MIDDLE'); ?> '; break;
  507. case '3': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_BOTTOM'); ?> '; break;
  508. case '4': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_BASELINE'); ?> '; break;
  509. default : ;
  510. } // switch
  511. switch (data[qcolThwrap]) {
  512. case '1': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NOWRAP'); ?>'; break;
  513. default : ;
  514. } // switch
  515. } // if
  516. row.cells[qcolCellThattribs].innerHTML = attr;
  517. // data attribs
  518. attr = '';
  519. if (span < 1) {
  520. attr = '-';
  521. skip--;
  522. } else {
  523. switch (data[qcolAlign]) {
  524. case '1': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_LEFT'); ?> '; break;
  525. case '2': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CENTER'); ?> '; break;
  526. case '3': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_RIGHT'); ?> '; break;
  527. case '4': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_JUSTIFY'); ?> '; break;
  528. default : ;
  529. } // switch
  530. switch (data[qcolValign]) {
  531. case '1': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_TOP'); ?> '; break;
  532. case '2': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_MIDDLE'); ?> '; break;
  533. case '3': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_BOTTOM'); ?> '; break;
  534. case '4': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_BASELINE'); ?> '; break;
  535. default : ;
  536. } // switch
  537. switch (data[qcolWrap]) {
  538. case '1': attr += '<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NOWRAP'); ?>'; break;
  539. default : ;
  540. } // switch
  541. } // if
  542. row.cells[qcolCellAttributes].innerHTML = attr;
  543. // width
  544. attr = '';
  545. if (parseInt(data[qcolWidth]) > 0) {
  546. attr += data[qcolWidth];
  547. if (data[qcolWidthmd]=='1') attr += '%'; else attr += 'px';
  548. } // if
  549. row.cells[qcolCellWidth].innerHTML = attr;
  550. // ordering
  551. if (r > 0)
  552. row.cells[qcolCellOrderup].innerHTML = '<a href="javascript:qcolOrderup('+r+')"><img src="components/com_breezingforms/images/icons/uparrow.png" alt="^" border="0"/><\/a>';
  553. else
  554. row.cells[qcolCellOrderup].innerHTML = '';
  555. if (r < qcolRowCnt-1)
  556. row.cells[qcolCellOrderdown].innerHTML = '<a href="javascript:qcolOrderdown('+r+')"><img src="components/com_breezingforms/images/icons/downarrow.png" alt="v" border="0"/><\/a>';
  557. else
  558. row.cells[qcolCellOrderdown].innerHTML = '';
  559. } // for
  560. for (r = oldRows; r > qcolRowCnt; r--) table.deleteRow(r);
  561. qcolCheckAll(false);
  562. } // qcolDisplay
  563. function qcolEdit(index)
  564. {
  565. var form = document.QueryColForm;
  566. qcolIndex = index;
  567. var row = qcolRows[qcolIndex];
  568. var c = 0;
  569. form.colTitle.value = row[qcolTitle ];
  570. form.colName.value = row[qcolName ];
  571. form.colClass1.value = row[qcolClass1 ];
  572. form.colClass2.value = row[qcolClass2 ];
  573. form.colClass3.value = row[qcolClass3 ];
  574. form.colWidth.value = row[qcolWidth ];
  575. form.colWidthmd.value = row[qcolWidthmd ];
  576. form.colThspan.value = row[qcolThspan ];
  577. form.colThalign.value = row[qcolThalign ];
  578. form.colThvalign.value = row[qcolThvalign];
  579. form.colThwrap.value = row[qcolThwrap ];
  580. form.colAlign.value = row[qcolAlign ];
  581. form.colValign.value = row[qcolValign ];
  582. form.colWrap.value = row[qcolWrap ];
  583. form.colValue.value = row[qcolValue ];
  584. document.getElementById('QueryColDialog').style.display = '';
  585. form.colTitle.focus();
  586. MM_swapImage('colSave','','images/save_f2.png',1);
  587. MM_swapImgRestore();
  588. MM_swapImage('colCancel','','images/cancel_f2.png',1);
  589. MM_swapImgRestore();
  590. } // qcolEdit
  591. function qcolAdd()
  592. {
  593. var form = document.QueryColForm;
  594. qcolIndex = qcolRowCnt;
  595. form.colTitle.value = '';
  596. form.colName.value = '';
  597. form.colClass1.value = '';
  598. form.colClass2.value = '';
  599. form.colClass3.value = '';
  600. form.colWidth.value = '';
  601. form.colWidthmd.value = 0;
  602. form.colThspan.value = 1;
  603. form.colThalign.value = 0;
  604. form.colThvalign.value = 0;
  605. form.colThwrap.value = 0;
  606. form.colAlign.value = 0;
  607. form.colValign.value = 0;
  608. form.colWrap.value = 0;
  609. form.colValue.value = '\x3C?php return $value; ?\x3E';
  610. document.getElementById('QueryColDialog').style.display = '';
  611. form.colTitle.focus();
  612. MM_swapImage('colSave','','images/save_f2.png',1);
  613. MM_swapImgRestore();
  614. MM_swapImage('colCancel','','images/cancel_f2.png',1);
  615. MM_swapImgRestore();
  616. } // qcolAdd
  617. function qcolCopy()
  618. {
  619. if (!qcolSelects()) {
  620. alert('<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_SELECTCOLUMNS'); ?>');
  621. return;
  622. } // if
  623. var r;
  624. var newcnt = qcolRowCnt;
  625. for (r = 0; r < qcolRowCnt; r++) {
  626. if (document.getElementById('cb'+r).checked) {
  627. qcolRows[newcnt] = new Array();
  628. var x;
  629. for (x = 0; x < qcolRows[r].length; x++)
  630. qcolRows[newcnt][x] = qcolRows[r][x];
  631. newcnt++;
  632. } // if
  633. } // for
  634. qcolRowCnt = newcnt;
  635. qcolDisplay();
  636. } // qcolCopy
  637. function qcolDelete()
  638. {
  639. if (!qcolSelects()) {
  640. alert('<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_SELECTCOLUMNS'); ?>');
  641. return;
  642. } // if
  643. if (!confirm('<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_ASKDELCOLUMNS'); ?>')) return;
  644. var r;
  645. for (r = qcolRowCnt-1; r >= 0; r--) {
  646. if (document.getElementById('cb'+r).checked) {
  647. var r2;
  648. qcolRowCnt--;
  649. for (r2 = r; r2 < qcolRowCnt; r2++) qcolRows[r2] = qcolRows[r2+1];
  650. } // if
  651. } // for
  652. qcolDisplay();
  653. } // qcolDelete
  654. function qcolOrderup(index)
  655. {
  656. var row = qcolRows[index];
  657. qcolRows[index] = qcolRows[index-1];
  658. qcolRows[index-1] = row;
  659. qcolDisplay();
  660. } // qcolOrderup
  661. function qcolOrderdown(index)
  662. {
  663. var row = qcolRows[index];
  664. qcolRows[index] = qcolRows[index+1];
  665. qcolRows[index+1] = row;
  666. qcolDisplay();
  667. } // qcolOrderdown
  668. function qcolOk()
  669. {
  670. var form = document.QueryColForm;
  671. var error = '';
  672. if (form.colTitle.value == '')
  673. error += "<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_TITLEEMPTY'); ?>\n";
  674. error += checkIdentifier(form.colName.value, 'name');
  675. if (error != '') {
  676. alert(error);
  677. return;
  678. } // if
  679. document.getElementById("QueryColDialog").style.display = 'none';
  680. if (qcolIndex >= qcolRowCnt) {
  681. // add a new row to the table
  682. qcolRows[qcolRowCnt++] = new Array(
  683. form.colTitle.value,
  684. form.colName.value,
  685. form.colClass1.value,
  686. form.colClass2.value,
  687. form.colClass3.value,
  688. form.colWidth.value,
  689. form.colWidthmd.value,
  690. form.colThspan.value,
  691. form.colThalign.value,
  692. form.colThvalign.value,
  693. form.colThwrap.value,
  694. form.colAlign.value,
  695. form.colValign.value,
  696. form.colWrap.value,
  697. form.colValue.value
  698. );
  699. } else {
  700. // udate existing row
  701. var row = qcolRows[qcolIndex];
  702. row[qcolTitle ] = form.colTitle.value,
  703. row[qcolName ] = form.colName.value,
  704. row[qcolClass1 ] = form.colClass1.value,
  705. row[qcolClass2 ] = form.colClass2.value,
  706. row[qcolClass3 ] = form.colClass3.value,
  707. row[qcolWidth ] = form.colWidth.value,
  708. row[qcolWidthmd ] = form.colWidthmd.value,
  709. row[qcolThspan ] = form.colThspan.value,
  710. row[qcolThalign ] = form.colThalign.value,
  711. row[qcolThvalign] = form.colThvalign.value,
  712. row[qcolThwrap ] = form.colThwrap.value,
  713. row[qcolAlign ] = form.colAlign.value,
  714. row[qcolValign ] = form.colValign.value,
  715. row[qcolWrap ] = form.colWrap.value,
  716. row[qcolValue ] = form.colValue.value
  717. } // if
  718. qcolDisplay();
  719. } // qcolOk
  720. function qcolCancel()
  721. {
  722. document.getElementById("QueryColDialog").style.display = 'none';
  723. } // qcolCancel
  724. <?php
  725. } // if query list
  726. if ($hasInit) {
  727. ?>
  728. function dispinit(value)
  729. {
  730. if (document.getElementById('initexec'))
  731. switch (value) {
  732. case '1':
  733. document.getElementById('initexec').style.display = '';
  734. document.getElementById('initlib').style.display = '';
  735. document.getElementById('initcode').style.display = 'none';
  736. break;
  737. case '2':
  738. document.getElementById('initexec').style.display = '';
  739. document.getElementById('initlib').style.display = 'none';
  740. document.getElementById('initcode').style.display = '';
  741. break;
  742. default:
  743. document.getElementById('initexec').style.display = 'none';
  744. document.getElementById('initlib').style.display = 'none';
  745. document.getElementById('initcode').style.display = 'none';
  746. } // switch
  747. } // dispinit
  748. function createInitCode()
  749. {
  750. form = document.adminForm;
  751. name = form.name.value;
  752. if (name=='') {
  753. alert('Please enter the element name first.');
  754. return;
  755. } // if
  756. if (!confirm("<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CREAINIT'); ?>\n<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_EXISTAPP'); ?>")) return;
  757. code =
  758. "function ff_"+name+"_init(element, condition)\n"+
  759. "{\n"+
  760. " switch (condition) {\n";
  761. if (form.script1flag1.checked)
  762. code +=
  763. " case 'formentry':\n"+
  764. " break;\n";
  765. if (form.script1flag2.checked)
  766. code +=
  767. " case 'pageentry':\n"+
  768. " break;\n";
  769. code +=
  770. " default:;\n"+
  771. " } // switch\n"+
  772. "} // ff_"+name+"_init\n";
  773. oldcode = form.script1code.value;
  774. if (oldcode != '')
  775. form.script1code.value =
  776. code+
  777. "\n// -------------- <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_OLDBELOW'); ?> --------------\n\n"+
  778. oldcode;
  779. else
  780. form.script1code.value = code;
  781. codeAreaChange(form.script1code);
  782. } // createInitCode
  783. <?php
  784. } // if hasInit
  785. if ($hasAction) {
  786. ?>
  787. function dispaction(value)
  788. {
  789. if(document.getElementById)
  790. if(document.getElementById('actionact'))
  791. switch (value) {
  792. case '1':
  793. document.getElementById('actionact').style.display = '';
  794. document.getElementById('actionlib').style.display = '';
  795. document.getElementById('actioncode').style.display = 'none';
  796. break;
  797. case '2':
  798. document.getElementById('actionact').style.display = '';
  799. document.getElementById('actionlib').style.display = 'none';
  800. document.getElementById('actioncode').style.display = '';
  801. break;
  802. default:
  803. document.getElementById('actionact').style.display = 'none';
  804. document.getElementById('actionlib').style.display = 'none';
  805. document.getElementById('actioncode').style.display = 'none';
  806. } // switch
  807. } // dispaction
  808. function createActionCode()
  809. {
  810. form = document.adminForm;
  811. name = form.name.value;
  812. if (name=='') {
  813. alert('Please enter the element name first.');
  814. return;
  815. } // if
  816. if (!confirm("<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CREAACTION'); ?>\n<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_EXISTAPP'); ?>")) return;
  817. code =
  818. "function ff_"+name+"_action(element, action)\n"+
  819. "{\n"+
  820. " switch (action) {\n";
  821. if (form.script2flag1)
  822. if (form.script2flag1.checked)
  823. code +=
  824. " case 'click':\n"+
  825. " break;\n";
  826. if (form.script2flag2)
  827. if (form.script2flag2.checked)
  828. code +=
  829. " case 'blur':\n"+
  830. " break;\n";
  831. if (form.script2flag3)
  832. if (form.script2flag3.checked)
  833. code +=
  834. " case 'change':\n"+
  835. " break;\n";
  836. if (form.script2flag4)
  837. if (form.script2flag4.checked)
  838. code +=
  839. " case 'focus':\n"+
  840. " break;\n";
  841. if (form.script2flag5)
  842. if (form.script2flag5.checked)
  843. code +=
  844. " case 'select':\n"+
  845. " break;\n";
  846. code +=
  847. " default:;\n"+
  848. " } // switch\n"+
  849. "} // ff_"+name+"_action\n";
  850. oldcode = form.script2code.value;
  851. if (oldcode != '')
  852. form.script2code.value =
  853. code+
  854. "\n// -------------- <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_OLDBELOW'); ?> --------------\n\n"+
  855. oldcode;
  856. else
  857. form.script2code.value = code;
  858. codeAreaChange(form.script2code);
  859. } // createActionCode
  860. <?php
  861. } // if hasAction
  862. if ($hasValidation) {
  863. ?>
  864. function dispvalidation(value)
  865. {
  866. if(document.getElementById)
  867. if(document.getElementById('validationlib'))
  868. switch (value) {
  869. case '1':
  870. document.getElementById('validationmsg').style.display = '';
  871. document.getElementById('validationlib').style.display = '';
  872. document.getElementById('validationcode').style.display = 'none';
  873. break;
  874. case '2':
  875. document.getElementById('validationmsg').style.display = '';
  876. document.getElementById('validationlib').style.display = 'none';
  877. document.getElementById('validationcode').style.display = '';
  878. break;
  879. default:
  880. document.getElementById('validationmsg').style.display = 'none';
  881. document.getElementById('validationlib').style.display = 'none';
  882. document.getElementById('validationcode').style.display = 'none';
  883. } // switch
  884. } // dispvalidation
  885. function createValidationCode()
  886. {
  887. form = document.adminForm;
  888. name = form.name.value;
  889. if (name=='') {
  890. alert('Please enter the element name first.');
  891. return;
  892. } // if
  893. if (!confirm("<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CREAVALID'); ?>\n<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_EXISTAPP'); ?>")) return;
  894. code =
  895. "function ff_"+name+"_validation(element, message)\n"+
  896. "{\n"+
  897. " if (element_fails_my_test) {\n"+
  898. " if (message=='') message = element.name+\" faild in my test.\\n\"\n"+
  899. " ff_validationFocus(element.name);\n"+
  900. " return message;\n"+
  901. " } // if\n"+
  902. " return '';\n"+
  903. "} // ff_"+name+"_validation\n";
  904. oldcode = form.script3code.value;
  905. if (oldcode != '')
  906. form.script3code.value =
  907. code+
  908. "\n// -------------- <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_OLDBELOW'); ?> --------------\n\n"+
  909. oldcode;
  910. else
  911. form.script3code.value = code;
  912. codeAreaChange(form.script3code);
  913. } // createValidationCode
  914. <?php
  915. } // if hasValidation
  916. if ($row->type == 'Select List') {
  917. ?>
  918. function addOption()
  919. {
  920. form = document.SelectOptionForm;
  921. form.optionText.value = '';
  922. form.optionValue.value = '';
  923. form.optionSelected[0].checked = true;
  924. document.getElementById("SelectOptionDialog").style.display = '';
  925. form.optionText.focus();
  926. } // addOption
  927. function okOption()
  928. {
  929. form = document.SelectOptionForm;
  930. if (form.optionText.value=='') {
  931. alert("Please enter a text.");
  932. form.optionText.focus();
  933. return;
  934. } // if
  935. data = document.adminForm.data2;
  936. value = data.value;
  937. if (value != '')
  938. if (value.substr(value.length-1,1)!="\n")
  939. value += "\n";
  940. sel = '0;';
  941. if (form.optionSelected[1].checked) sel = '1;';
  942. value +=
  943. sel +
  944. form.optionText.value + ';' +
  945. form.optionValue.value;
  946. data.value = value;
  947. form.optionText.value = '';
  948. form.optionValue.value = '';
  949. form.optionSelected[0].checked = true;
  950. form.optionText.focus();
  951. } // addOption
  952. function quitOption()
  953. {
  954. document.getElementById("SelectOptionDialog").style.display = 'none';
  955. } // addOption
  956. <?php
  957. }
  958. ?>
  959. onload = function()
  960. {
  961. <?php
  962. if ($row->type=='Query List') echo "\t\t\tloadQueryList();\n";
  963. // because of mozilla browser problems, the widest elements must be shown first
  964. $s1size = $s2size = $s3size = $ff_config->areasmall;
  965. $nonbig = true;
  966. if ($hasInit && $row->script1cond==2) {
  967. echo "\t\t\tdispinit('2');\n";
  968. $s1size = $ff_config->areamedium;
  969. $nonbig = false;
  970. } // if
  971. if ($hasAction && $row->script2cond==2) {
  972. echo "\t\t\tdispaction('2');\n";
  973. if ($nonbig) {
  974. $s2size = $ff_config->areamedium;
  975. $nonbig = false;
  976. } // if
  977. } // if
  978. if ($hasValidation && $row->script3cond==2) {
  979. echo "\t\t\tdispvalidation('2');\n";
  980. if ($nonbig) $s3size = $ff_config->areamedium;
  981. } // if
  982. if ($hasInit && $row->script1cond==1) echo "\t\t\tdispinit('1');\n";
  983. if ($hasAction && $row->script2cond==1) echo "\t\t\tdispaction('1');\n";
  984. if ($hasValidation && $row->script3cond==1) echo "\t\t\tdispvalidation('1');\n";
  985. if (($row->type=='Graphic Button' || $row->type=='Icon') && $row->flag1!=0)
  986. echo "\t\t\tdispcaptiontext('".$row->flag1."');\n";
  987. if ($hasInit) echo "\t\t\tcodeAreaAdd('script1code', 'script1lines');\n";
  988. if ($hasAction) echo "\t\t\tcodeAreaAdd('script2code', 'script2lines');\n";
  989. if ($hasValidation) echo "\t\t\tcodeAreaAdd('script3code', 'script3lines');\n";
  990. if ($row->type=='Query List') echo "\t\t\tcodeAreaAdd('data2', 'data2lines');\n";
  991. switch ($tabpane) {
  992. case 1:
  993. case 2:
  994. echo "\t\t\ttabPane1.setSelectedIndex($tabpane);\n";
  995. break;
  996. default:
  997. echo "\t\t\tdocument.adminForm.title.focus();\n";
  998. } // switch
  999. ?>
  1000. } // onload
  1001. //-->
  1002. </script>
  1003. <div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
  1004. <script type="text/javascript" src="<?php echo $ff_mossite ?>/components/com_breezingforms/libraries/js/overlib_mini.js"></script>
  1005. <?php
  1006. if ($row->type == 'Select List') {
  1007. ?>
  1008. <div id="SelectOptionDialog" style="position:absolute;top:380px;left:45%;z-index:100;display:none;">
  1009. <table cellpadding="4" cellspacing="1" border="0" class="adminform" style="width:350px">
  1010. <form name='SelectOptionForm' onsubmit='okOption();return false;'>
  1011. <tr><th colspan="4" class="title">BreezingForms - <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NEWSELOPT'); ?></th></tr>
  1012. <tr>
  1013. <td></td>
  1014. <td><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_TEXT'); ?>:</td>
  1015. <td><input type="text" size="50" value="" name="optionText" class="inputbox"/></td>
  1016. <td></td>
  1017. </tr>
  1018. <tr>
  1019. <td></td>
  1020. <td><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_VALUE'); ?>:</td>
  1021. <td><input type="text" size="50" value="" name="optionValue" class="inputbox"/></td>
  1022. <td></td>
  1023. </tr>
  1024. <tr>
  1025. <td></td>
  1026. <td><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_SELECTED'); ?>:</td>
  1027. <td><?php echo JHTML::_('select.booleanlist', "optionSelected", "", 0); ?></td>
  1028. <td></td>
  1029. </tr>
  1030. <tr>
  1031. <td></td>
  1032. <td colspan="2" style="text-align:right">
  1033. <input type="button" value="<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_OKBUTTON'); ?>" onclick="okOption()" class="button btn btn-primary">
  1034. &nbsp;&nbsp;
  1035. <input type="button" value="<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_ABORTBUTT'); ?>" onclick="quitOption()" class="button btn btn-primary">
  1036. </td>
  1037. <td></td>
  1038. </tr>
  1039. </table>
  1040. </form>
  1041. </div>
  1042. <?php
  1043. } // if Select List
  1044. if ($row->type == 'Query List') {
  1045. ?>
  1046. <div id="QueryColDialog" style="background-color: #cccccc; position:absolute;top:120px;left:30%;z-index:100;display:none;">
  1047. <form action="#" name='QueryColForm' onsubmit="return false;">
  1048. <table cellpadding="4" cellspacing="1" border="0" class="adminform" style="width:550px">
  1049. <tr><th colspan="4" class="title">BreezingForms - <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_EDITQUERYCOL'); ?></th></tr>
  1050. <tr>
  1051. <td></td>
  1052. <td>
  1053. <fieldset><legend><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_HEADER'); ?></legend>
  1054. <table class="adminform">
  1055. <tr>
  1056. <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_TITLE'); ?>:</td>
  1057. <td nowrap>
  1058. <input type="text" size="50" maxlength="500" name="colTitle" class="inputbox"/>
  1059. <?php
  1060. echo bf_ToolTip(BFText::_('COM_BREEZINGFORMS_ELEMENTS_QCOLTIPTITLE'));
  1061. ?>
  1062. </td>
  1063. </tr>
  1064. <tr>
  1065. <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_CLASSFOR'); ?> &lt;th&gt;:</td>
  1066. <td nowrap>
  1067. <input type="text" size="30" maxlength="30" name="colClass1" class="inputbox"/>
  1068. </td>
  1069. </tr>
  1070. <tr>
  1071. <td nowrap>&lt;th&gt; <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_SPAN'); ?>:</td>
  1072. <td nowrap>
  1073. <input type="text" size="6" maxlength="6" name="colThspan" class="inputbox"/>
  1074. </td>
  1075. </tr>
  1076. <tr>
  1077. <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_ATTRIBUTES'); ?>:</td>
  1078. <td nowrap>
  1079. <select name="colThalign" size="1" class="inputbox">
  1080. <option value="0" selected="selected"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NONE'); ?></option>
  1081. <option value="1"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_LEFT'); ?></option>
  1082. <option value="2"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CENTER'); ?></option>
  1083. <option value="3"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_RIGHT'); ?></option>
  1084. <option value="4"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_JUSTIFY'); ?></option>
  1085. </select>
  1086. <select name="colThvalign" size="1" class="inputbox">
  1087. <option value="0" selected="selected"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NONE'); ?></option>
  1088. <option value="1"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_TOP'); ?></option>
  1089. <option value="2"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_MIDDLE'); ?></option>
  1090. <option value="3"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_BOTTOM'); ?></option>
  1091. <option value="4"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_BASELINE'); ?></option>
  1092. </select>
  1093. <select name="colThwrap" size="1" class="inputbox">
  1094. <option value="0" selected="selected"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NONE'); ?></option>
  1095. <option value="1"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NOWRAP'); ?></option>
  1096. </select>
  1097. </td>
  1098. </tr>
  1099. </table>
  1100. </fieldset>
  1101. </td>
  1102. <td></td>
  1103. </tr>
  1104. <tr>
  1105. <td></td>
  1106. <td>
  1107. <fieldset><legend><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_DATA'); ?></legend>
  1108. <table class="adminform">
  1109. <tr>
  1110. <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NAME'); ?>:</td>
  1111. <td nowrap>
  1112. <input type="text" size="30" maxlength="30" name="colName" class="inputbox"/>
  1113. <?php
  1114. echo bf_ToolTip(BFText::_('COM_BREEZINGFORMS_ELEMENTS_QCOLTIPNAME'));
  1115. ?>
  1116. </td>
  1117. </tr>
  1118. <tr>
  1119. <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_CLASSFOR'); ?> &lt;td(1)&gt;:</td>
  1120. <td nowrap>
  1121. <input type="text" size="30" maxlength="30" name="colClass2" class="inputbox"/>
  1122. </td>
  1123. </tr>
  1124. <tr>
  1125. <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_CLASSFOR'); ?> &lt;td(2)&gt;:</td>
  1126. <td nowrap>
  1127. <input type="text" size="30" maxlength="30" name="colClass3" class="inputbox"/>
  1128. </td>
  1129. </tr>
  1130. <tr>
  1131. <td valign="top" nowrap><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_WIDTH'); ?>:</td>
  1132. <td nowrap>
  1133. <input type="text" size="6" maxlength="6" name="colWidth" class="inputbox"/>
  1134. <br/>
  1135. <select name="colWidthmd" size="1" class="inputbox">
  1136. <option value="0" selected="selected">px</option>
  1137. <option value="1">%</option>
  1138. </select>
  1139. </td>
  1140. </tr>
  1141. <tr>
  1142. <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_ATTRIBUTES'); ?>:</td>
  1143. <td nowrap>
  1144. <select name="colAlign" size="1" class="inputbox">
  1145. <option value="0" selected="selected"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NONE'); ?></option>
  1146. <option value="1"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_LEFT'); ?></option>
  1147. <option value="2"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CENTER'); ?></option>
  1148. <option value="3"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_RIGHT'); ?></option>
  1149. <option value="4"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_JUSTIFY'); ?></option>
  1150. </select>
  1151. <select name="colValign" size="1" class="inputbox">
  1152. <option value="0" selected="selected"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NONE'); ?></option>
  1153. <option value="1"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_TOP'); ?></option>
  1154. <option value="2"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_MIDDLE'); ?></option>
  1155. <option value="3"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_BOTTOM'); ?></option>
  1156. <option value="4"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_BASELINE'); ?></option>
  1157. </select>
  1158. <select name="colWrap" size="1" class="inputbox">
  1159. <option value="0" selected="selected"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NONE'); ?></option>
  1160. <option value="1"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NOWRAP'); ?></option>
  1161. </select>
  1162. </td>
  1163. </tr>
  1164. <tr>
  1165. <td nowrap colspan="2">
  1166. <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_VALUE'); ?>:
  1167. <a href="#" onClick="document.QueryColForm.colValue.rows=<?php echo $ff_config->areasmall; ?>;">[<?php echo $ff_config->areasmall; ?>]</a>
  1168. <a href="#" onClick="document.QueryColForm.colValue.rows=<?php echo $ff_config->areamedium; ?>;">[<?php echo $ff_config->areamedium; ?>]</a>
  1169. <a href="#" onClick="document.QueryColForm.colValue.rows=<?php echo $ff_config->arealarge; ?>;">[<?php echo $ff_config->arealarge; ?>]</a>
  1170. <br/>
  1171. <textarea wrap="off" name="colValue" style="width:500px;" rows="<?php echo $ff_config->areasmall; ?>" class="inputbox"></textarea>
  1172. </td>
  1173. </tr>
  1174. </table>
  1175. </fieldset>
  1176. </td>
  1177. <td></td>
  1178. </tr>
  1179. <tr>
  1180. <td></td>
  1181. <td nowrap colspan="2" style="text-align:right">
  1182. <input class="btn btn-primary" onclick="qcolOk();" type="submit" value="<?php echo htmlentities(BFText::_('COM_BREEZINGFORMS_TOOLBAR_SAVE'), ENT_QUOTES, 'UTF-8'); ?>"/>
  1183. &nbsp;&nbsp;
  1184. <input class="btn btn-primary" onclick="qcolCancel();" type="submit" value="<?php echo htmlentities(BFText::_('COM_BREEZINGFORMS_TOOLBAR_CANCEL'), ENT_QUOTES, 'UTF-8'); ?>"/>
  1185. </td>
  1186. <td>&nbsp;</td>
  1187. </tr>
  1188. </table>
  1189. </form>
  1190. <br/>
  1191. <br/>
  1192. </div>
  1193. <?php
  1194. } // if Query List
  1195. ?>
  1196. <form action="index.php" method="post" name="adminForm" id="adminForm" class="adminForm">
  1197. <table cellpadding="0" cellspacing="0" border="0" class="adminform" style="width:775px;">
  1198. <tr><th colspan="3" class="title">BreezingForms - <?php echo $action; ?> <?php echo HTML_facileFormsElement::displayType($row->type); ?></th></tr>
  1199. <tr>
  1200. <td></td>
  1201. <td width="100%">
  1202. <?php
  1203. $tabs = new BFTabs(0);
  1204. $tabs->startPane("editPane");
  1205. $tabs->startTab(BFText::_('COM_BREEZINGFORMS_ELEMENTS_SETTINGS'),"tab_settings");
  1206. ?>
  1207. <table cellpadding="0" cellspacing="0" border="0" class="adminform">
  1208. <tr>
  1209. <td></td>
  1210. <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_TITLE'); ?>:</td>
  1211. <td nowrap>
  1212. <input type="text" size="50" maxlength="50" name="title" value="<?php echo $row->title; ?>" class="inputbox"/>
  1213. <?php
  1214. echo bf_ToolTip(BFText::_('COM_BREEZINGFORMS_ELEMENTS_TIPTITLE'));
  1215. ?>
  1216. </td>
  1217. <td></td>
  1218. </tr>
  1219. <tr>
  1220. <td></td>
  1221. <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_NAME'); ?>:</td>
  1222. <td nowrap>
  1223. <input type="text" size="30" maxlength="30" name="name" value="<?php echo $row->name ?>" class="inputbox"/>
  1224. <?php
  1225. echo bf_ToolTip(BFText::_('COM_BREEZINGFORMS_ELEMENTS_TIPNAME'));
  1226. ?>
  1227. </td>
  1228. <td></td>
  1229. </tr>
  1230. <?php
  1231. switch ($row->type) {
  1232. case 'Hidden Input':
  1233. break;
  1234. default:
  1235. ?>
  1236. <tr>
  1237. <td></td>
  1238. <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_CLASSFOR'); ?> &lt;div&gt;:</td>
  1239. <td nowrap>
  1240. <input type="text" size="30" maxlength="30" name="class1" value="<?php echo $row->class1; ?>" class="inputbox"/>
  1241. </td>
  1242. <td></td>
  1243. </tr>
  1244. <?php
  1245. break;
  1246. } // switch
  1247. $elemname = '';
  1248. switch ($row->type) {
  1249. case 'Image':
  1250. case 'Tooltip':
  1251. case 'Icon': $elemname = 'img'; break;
  1252. case 'Checkbox':
  1253. case 'Radio Button':
  1254. case 'Regular Button':
  1255. case 'Text':
  1256. case 'File Upload': $elemname = 'input'; break;
  1257. case 'Graphic Button': $elemname = 'button'; break;
  1258. case 'Select List': $elemname = 'select'; break;
  1259. case 'Textarea': $elemname = 'textarea'; break;
  1260. case 'Query List': $elemname = 'table'; break;
  1261. default:;
  1262. } // switch
  1263. if ($elemname != '') {
  1264. ?>
  1265. <tr>
  1266. <td></td>
  1267. <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_CLASSFOR'); ?> &lt;<?php echo $elemname; ?>&gt;:</td>
  1268. <td nowrap>
  1269. <input type="text" size="30" maxlength="30" name="class2" value="<?php echo $row->class2; ?>" class="inputbox"/>
  1270. </td>
  1271. <td></td>
  1272. </tr>
  1273. <?php
  1274. } // if
  1275. switch ($row->type) {
  1276. case 'Query List':
  1277. ?>
  1278. <tr>
  1279. <td></td>
  1280. <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_CLASSFOR'); ?> &lt;tr(header)&gt;:</td>
  1281. <td nowrap>
  1282. <input type="text" size="30" maxlength="30" name="trhclass" class="inputbox"/>
  1283. </td>
  1284. <td></td>
  1285. </tr>
  1286. <tr>
  1287. <td></td>
  1288. <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_CLASSFOR'); ?> &lt;tr(data1)&gt;:</td>
  1289. <td nowrap>
  1290. <input type="text" size="30" maxlength="30" name="tr1class" class="inputbox"/>
  1291. </td>
  1292. <td></td>
  1293. </tr>
  1294. <tr>
  1295. <td></td>
  1296. <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_CLASSFOR'); ?> &lt;tr(data2)&gt;:</td>
  1297. <td nowrap>
  1298. <input type="text" size="30" maxlength="30" name="tr2class" class="inputbox"/>
  1299. </td>
  1300. <td></td>
  1301. </tr>
  1302. <tr>
  1303. <td></td>
  1304. <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_CLASSFOR'); ?> &lt;tr(footer)&gt;:</td>
  1305. <td nowrap>
  1306. <input type="text" size="30" maxlength="30" name="trfclass" class="inputbox"/>
  1307. </td>
  1308. <td></td>
  1309. </tr>
  1310. <tr>
  1311. <td></td>
  1312. <td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_CLASSFOR'); ?> &lt;td(footer)&gt;

Large files files are truncated, but you can click here to view the full file