PageRenderTime 71ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 1ms

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

https://bitbucket.org/izubizarreta/https-bitbucket.org-bityvip-alpes
PHP | 3651 lines | 3255 code | 255 blank | 141 comment | 358 complexity | 09663ab165743d62709b852993aeddda MD5 | raw file
Possible License(s): GPL-2.0, BSD-3-Clause, LGPL-2.1, MIT, LGPL-3.0, LGPL-2.0, JSON
  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. class QuickModeHtml{
  11. public static function showApplication($formId = 0, $formName, $formTitle, $formDesc, $formEmailntf, $formEmailadr, $dataObjectString, $elementScripts, $themes){
  12. JHTML::_('behavior.keepalive');
  13. JHTML::_('behavior.modal');
  14. $iconBase = '../administrator/components/com_breezingforms/libraries/jquery/themes/quickmode/i/';
  15. ?>
  16. <style>
  17. <!--
  18. #menutab { float: left; width: 500px; height: 100%; }
  19. -->
  20. </style>
  21. <?php
  22. JFactory::getDocument()->addStyleSheet( JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/themes/quickmode/quickmode.all.css' );
  23. JFactory::getDocument()->addStyleSheet( JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/jtree/tree_component.css' );
  24. ?>
  25. <script>var moobackup = $;</script>
  26. <script>var moobackup2 = $$;</script>
  27. <script type="text/javascript" src="<?php echo JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/jtree/' ;?>_lib.js"></script>
  28. <script type="text/javascript" src="<?php echo JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/jtree/' ;?>tree_component.min.js"></script>
  29. <script
  30. type="text/javascript"
  31. src="<?php echo JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/' ;?>jq-ui.min.js"></script>
  32. <script
  33. type="text/javascript"
  34. src="<?php echo JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/plugins/' ;?>base64.js"></script>
  35. <script
  36. type="text/javascript"
  37. src="<?php echo JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/plugins/' ;?>json.js"></script>
  38. <script
  39. type="text/javascript"
  40. src="<?php echo JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/plugins/' ;?>md5.js"></script>
  41. <script
  42. type="text/javascript"
  43. src="<?php echo JURI::root()?>components/com_breezingforms/libraries/jquery/center.js"></script>
  44. <script>$ = moobackup;</script>
  45. <script>$$ = moobackup2;</script>
  46. <script type="text/javascript">
  47. String.prototype.bfendsWith = function(suffix) {
  48. return this.match(suffix+"$") == suffix;
  49. };
  50. var app = null;
  51. function BF_QuickModeApp(){
  52. JQuery("link").each(function(){
  53. // jquery easy workaround
  54. var _xj = 'j';
  55. var _xq = 'q';
  56. var _xu = 'u';
  57. var _xe = 'e';
  58. var _xr = 'r';
  59. var _xy = 'y';
  60. if( JQuery(this).attr('href').bfendsWith(_xj+_xq+_xu+_xe+_xr+_xy+'-ui.css') ){
  61. JQuery(this).attr('disabled', 'disabled');
  62. JQuery(this).remove();
  63. }
  64. });
  65. var selectedTreeElement = null;
  66. var copyTreeElement = null;
  67. var appScope = this;
  68. this.elementScripts = <?php echo Zend_Json::encode($elementScripts)?>;
  69. this.dataObject = <?php echo str_replace("..\\/administrator\\/components\\/com_facileforms", "..\\/administrator\\/components\\/com_breezingforms",$dataObjectString) ?>;
  70. <?php require_once(JPATH_SITE . '/administrator/components/com_breezingforms/admin/quickmode-elements-js.php'); ?>
  71. /**
  72. Helper methods
  73. */
  74. this.getNodeClass = function(node){
  75. if(JQuery(node).attr('class')){
  76. var splitted = JQuery(appScope.selectedTreeElement).attr('class').split(' ');
  77. if(splitted.length != 0){
  78. return splitted[0];
  79. }
  80. }
  81. return '';
  82. };
  83. this.setProperties = function(node, props){
  84. var item = this.findDataObjectItem(JQuery(node).attr('id'), appScope.dataObject);
  85. item.properties = props;
  86. };
  87. this.getProperties = function(node){
  88. var item = this.findDataObjectItem(JQuery(node).attr('id'), appScope.dataObject)
  89. return item.properties;
  90. };
  91. /**
  92. searches for the id in a given object item.
  93. */
  94. this.findDataObjectItem = function(id, startObj){
  95. if( id && startObj && startObj.attributes && startObj.attributes.id ){
  96. if( startObj.attributes.id == id ){
  97. return startObj;
  98. } else {
  99. if(startObj.children){
  100. var child = null;
  101. for(var i = 0; i < startObj.children.length; i++){
  102. child = appScope.findDataObjectItem(id, startObj.children[i]);
  103. if(child){
  104. return child;
  105. }
  106. }
  107. }
  108. }
  109. return null;
  110. }
  111. return null;
  112. };
  113. this.getItemsFlattened = function(startObj, arr){
  114. if( startObj && startObj.properties && startObj.properties.type == 'element' ){
  115. arr.push(startObj);
  116. }
  117. if(startObj.children){
  118. var child = null;
  119. for(var i = 0; i < startObj.children.length; i++){
  120. appScope.getItemsFlattened(startObj.children[i], arr);
  121. }
  122. }
  123. };
  124. this.replaceDataObjectItem = function(id, replacement, startObj){
  125. if( id && startObj && startObj.attributes && startObj.attributes.id ){
  126. if(startObj.children){
  127. var child = null;
  128. for(var i = 0; i < startObj.children.length; i++){
  129. if(startObj.children[i].attributes.id == id){
  130. startObj.children[i] = replacement;
  131. break;
  132. }
  133. appScope.replaceDataObjectItem(id, replacement, startObj.children[i]);
  134. }
  135. }
  136. }
  137. }
  138. /**
  139. searches for the id in a given object item and deletes it.
  140. returns the deleted child.
  141. */
  142. this.deleteDataObjectItem = function(id, startObj, previous){
  143. if( id && startObj && startObj.attributes && startObj.attributes.id ){
  144. if( startObj.attributes.id == id ){
  145. if(previous){
  146. var newChildren = new Array();
  147. for(var j = 0; j < previous.children.length; j++){
  148. if(previous.children[j].attributes.id != startObj.attributes.id){
  149. newChildren.push(previous.children[j]);
  150. }
  151. }
  152. previous.children = newChildren;
  153. }
  154. return startObj;
  155. } else {
  156. if(startObj.children){
  157. var child = null;
  158. for(var i = 0; i < startObj.children.length; i++){
  159. child = appScope.deleteDataObjectItem(id, startObj.children[i], startObj);
  160. if(child){
  161. return child;
  162. }
  163. }
  164. }
  165. }
  166. return null;
  167. }
  168. return null;
  169. };
  170. this.moveDataObjectItem = function( sourceId, targetId, index, obj ){
  171. var source = appScope.deleteDataObjectItem(sourceId, obj);
  172. var target = appScope.findDataObjectItem( targetId, obj );
  173. if(target && !target.children && ( target.attributes['class'] == 'bfQuickModePageClass' || target.attributes['class'] == 'bfQuickModeSectionClass' || target.attributes['class'] == 'bfQuickModeRootClass' )){
  174. target.children = new Array();
  175. }
  176. if(target && target.children){
  177. target.children.splice(index,0,source);
  178. if(target.attributes['class'] == 'bfQuickModeRootClass'){
  179. for(var i = 0; i < target.children.length; i++){
  180. var mdata = appScope.getProperties(JQuery('#'+target.children[i].attributes.id));
  181. if(mdata){
  182. if(target.children[i].attributes['class'] == 'bfQuickModePageClass'){
  183. target.children[i].attributes.id = 'bfQuickModePage' + (i+1);
  184. target.children[i].data.title = "<?php echo addslashes( BFText::_('COM_BREEZINGFORMS_PAGE') ) ?> " + (i+1);
  185. target.children[i].properties.pageNumber = i + 1;
  186. }
  187. }
  188. }
  189. }
  190. return true;
  191. }
  192. return false;
  193. };
  194. this.insertElementInto = function (source, target){
  195. if(target && target.children){
  196. if(target.attributes['class'] == 'bfQuickModeSectionClass' || target.attributes['class'] == 'bfQuickModePageClass'){
  197. this.recreatedIds(source);
  198. target.children.push(source);
  199. }
  200. }
  201. };
  202. this.recreatedIds = function(startObj){
  203. if( startObj && startObj.attributes && startObj.attributes.id ){
  204. if(startObj.attributes['class'] == 'bfQuickModeSectionClass'){
  205. type = 'bfQuickModeSection';
  206. } else {
  207. type = 'bfQuickMode';
  208. }
  209. var id = type + ( Math.floor(Math.random() * 100000) );
  210. startObj.attributes.id = id;
  211. if(startObj.attributes['class'] == 'bfQuickModeSectionClass'){
  212. startObj.properties.name = id;
  213. } else {
  214. startObj.properties.bfName = id;
  215. startObj.properties.dbId = 0;
  216. }
  217. startObj.properties.name = id;
  218. if(startObj.children){
  219. var child = null;
  220. for(var i = 0; i < startObj.children.length; i++){
  221. child = appScope.recreatedIds(startObj.children[i]);
  222. if(child){
  223. return child;
  224. }
  225. }
  226. }
  227. return null;
  228. }
  229. return null;
  230. };
  231. /**
  232. Element properties
  233. */
  234. // TEXTFIELD
  235. this.saveTextProperties = function(mdata, item){
  236. mdata.value = JQuery('#bfElementTypeTextValue').val();
  237. mdata.bfName = JQuery('#bfElementName').val();
  238. mdata.logging = JQuery('#bfElementAdvancedLogging').attr('checked');
  239. mdata.label = JQuery('#bfElementLabel').val();
  240. mdata.maxLength = JQuery('#bfElementTypeTextMaxLength').val();
  241. mdata.hint = JQuery('#bfElementTypeTextHint').val();
  242. mdata.password = JQuery('#bfElementAdvancedPassword').attr('checked');
  243. mdata.readonly = JQuery('#bfElementAdvancedReadOnly').attr('checked');
  244. mdata.mailback = JQuery('#bfElementAdvancedMailback').attr('checked');
  245. mdata.mailbackAsSender = JQuery('#bfElementAdvancedMailbackAsSender').attr('checked');
  246. mdata.mailbackfile = JQuery('#bfElementAdvancedMailbackfile').val();
  247. mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
  248. mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
  249. mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
  250. mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
  251. mdata.hideLabel = JQuery('#bfElementAdvancedHideLabel').attr('checked');
  252. mdata.size = JQuery('#bfElementTypeTextSize').val();
  253. mdata.orderNumber = JQuery('#bfElementOrderNumber').val();
  254. mdata.required = JQuery('#bfElementValidationRequired').attr('checked');
  255. item.properties = mdata;
  256. };
  257. this.populateTextProperties = function(mdata){
  258. JQuery('#bfElementTypeTextValue').val(mdata.value);
  259. JQuery('#bfElementName').val(mdata.bfName);
  260. JQuery('#bfElementLabel').val(mdata.label);
  261. JQuery('#bfElementAdvancedLogging').attr('checked', mdata.logging);
  262. JQuery('#bfElementTypeTextMaxLength').val(mdata.maxLength);
  263. JQuery('#bfElementTypeTextHint').val(mdata.hint);
  264. JQuery('#bfElementAdvancedPassword').attr('checked', mdata.password);
  265. JQuery('#bfElementAdvancedReadOnly').attr('checked', mdata.readonly);
  266. JQuery('#bfElementAdvancedMailback').attr('checked', mdata.mailback);
  267. JQuery('#bfElementAdvancedMailbackAsSender').attr('checked', mdata.mailbackAsSender);
  268. JQuery('#bfElementAdvancedMailbackfile').val(mdata.mailbackfile);
  269. JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
  270. JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
  271. JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
  272. JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
  273. JQuery('#bfElementAdvancedHideLabel').attr('checked', mdata.hideLabel);
  274. JQuery('#bfElementTypeTextSize').val(mdata.size);
  275. JQuery('#bfElementOrderNumber').val(mdata.orderNumber);
  276. JQuery('#bfElementValidationRequired').attr('checked', mdata.required);
  277. };
  278. // TEXTAREA
  279. this.saveTextareaProperties = function(mdata, item){
  280. mdata.value = JQuery('#bfElementTypeTextareaValue').val();
  281. mdata.is_html = JQuery('#bfElementTypeTextareaIsHtml').attr('checked');
  282. mdata.bfName = JQuery('#bfElementName').val();
  283. mdata.logging = JQuery('#bfElementTextareaAdvancedLogging').attr('checked');
  284. mdata.label = JQuery('#bfElementLabel').val();
  285. mdata.hint = JQuery('#bfElementTypeTextareaHint').val();
  286. mdata.width = JQuery('#bfElementTypeTextareaWidth').val();
  287. mdata.height = JQuery('#bfElementTypeTextareaHeight').val();
  288. mdata.maxlength = JQuery('#bfElementTypeTextareaMaxLength').val();
  289. mdata.showMaxlengthCounter = JQuery('#bfElementTypeTextareaMaxLengthShow').attr('checked');
  290. mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
  291. mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
  292. mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
  293. mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
  294. mdata.hideLabel = JQuery('#bfElementTextareaAdvancedHideLabel').attr('checked');
  295. mdata.orderNumber = JQuery('#bfElementTextareaAdvancedOrderNumber').val();
  296. mdata.required = JQuery('#bfElementValidationRequired').attr('checked');
  297. item.properties = mdata;
  298. };
  299. this.populateTextareaProperties = function(mdata){
  300. JQuery('#bfElementTypeTextareaValue').val(mdata.value);
  301. JQuery('#bfElementTypeTextareaIsHtml').attr('checked', mdata.is_html);
  302. JQuery('#bfElementName').val(mdata.bfName);
  303. JQuery('#bfElementLabel').val(mdata.label);
  304. JQuery('#bfElementTextareaAdvancedLogging').attr('checked', mdata.logging);
  305. JQuery('#bfElementTypeTextareaHint').val(mdata.hint);
  306. JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
  307. JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
  308. JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
  309. JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
  310. JQuery('#bfElementTextareaAdvancedHideLabel').attr('checked', mdata.hideLabel);
  311. JQuery('#bfElementTypeTextareaWidth').val(mdata.width);
  312. JQuery('#bfElementTypeTextareaHeight').val(mdata.height);
  313. JQuery('#bfElementTypeTextareaIsHtml').val(mdata.is_html);
  314. // compat 723
  315. if(typeof mdata.maxlength == "undefined"){
  316. mdata["maxlength"] = 0;
  317. }
  318. if(typeof mdata.showMaxlengthCounter == "undefined"){
  319. mdata["showMaxlengthCounter"] = true;
  320. }
  321. // end compat 723
  322. JQuery('#bfElementTypeTextareaMaxLength').val(!isNaN(mdata.maxlength) ? mdata.maxlength : 0);
  323. JQuery('#bfElementTypeTextareaMaxLengthShow').attr('checked', mdata.showMaxlengthCounter);
  324. JQuery('#bfElementTextareaAdvancedOrderNumber').val(mdata.orderNumber);
  325. JQuery('#bfElementValidationRequired').attr('checked', mdata.required);
  326. };
  327. // RADIOS
  328. this.saveRadioGroupProperties = function(mdata, item){
  329. // dynamic properties
  330. mdata.group = JQuery('#bfElementTypeRadioGroupGroups').val();
  331. mdata.readonly = JQuery('#bfElementTypeRadioGroupReadonly').attr('checked');
  332. mdata.wrap = JQuery('#bfElementTypeRadioGroupWrap').attr('checked');
  333. mdata.hint = JQuery('#bfElementTypeRadioGroupHint').val();
  334. mdata.hideLabel = JQuery('#bfElementRadioGroupAdvancedHideLabel').attr('checked');
  335. mdata.logging = JQuery('#bfElementRadioGroupAdvancedLogging').attr('checked');
  336. mdata.orderNumber = JQuery('#bfElementRadioGroupAdvancedOrderNumber').val();
  337. // static properties
  338. mdata.bfName = JQuery('#bfElementName').val();
  339. mdata.label = JQuery('#bfElementLabel').val();
  340. mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
  341. mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
  342. mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
  343. mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
  344. mdata.required = JQuery('#bfElementValidationRequired').attr('checked');
  345. item.properties = mdata;
  346. };
  347. this.populateRadioGroupProperties = function(mdata){
  348. // dynamic properties
  349. JQuery('#bfElementTypeRadioGroupGroups').val(mdata.group);
  350. JQuery('#bfElementTypeRadioGroupReadonly').attr('checked', mdata.readonly);
  351. JQuery('#bfElementTypeRadioGroupWrap').attr('checked', mdata.wrap);
  352. JQuery('#bfElementTypeRadioGroupHint').val(mdata.hint);
  353. JQuery('#bfElementRadioGroupAdvancedHideLabel').attr('checked', mdata.hideLabel);
  354. JQuery('#bfElementRadioGroupAdvancedLogging').attr('checked', mdata.logging);
  355. JQuery('#bfElementRadioGroupAdvancedOrderNumber').val(mdata.orderNumber);
  356. // static properties
  357. JQuery('#bfElementName').val(mdata.bfName);
  358. JQuery('#bfElementLabel').val(mdata.label);
  359. JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
  360. JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
  361. JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
  362. JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
  363. JQuery('#bfElementValidationRequired').attr('checked', mdata.required);
  364. };
  365. // Checkboxgroup
  366. this.saveCheckboxGroupProperties = function(mdata, item){
  367. // dynamic properties
  368. mdata.group = JQuery('#bfElementTypeCheckboxGroupGroups').val();
  369. mdata.readonly = JQuery('#bfElementTypeCheckboxGroupReadonly').attr('checked');
  370. mdata.wrap = JQuery('#bfElementTypeCheckboxGroupWrap').attr('checked');
  371. mdata.hint = JQuery('#bfElementTypeCheckboxGroupHint').val();
  372. mdata.hideLabel = JQuery('#bfElementCheckboxGroupAdvancedHideLabel').attr('checked');
  373. mdata.logging = JQuery('#bfElementCheckboxGroupAdvancedLogging').attr('checked');
  374. mdata.orderNumber = JQuery('#bfElementCheckboxGroupAdvancedOrderNumber').val();
  375. // static properties
  376. mdata.bfName = JQuery('#bfElementName').val();
  377. mdata.label = JQuery('#bfElementLabel').val();
  378. mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
  379. mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
  380. mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
  381. mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
  382. mdata.required = JQuery('#bfElementValidationRequired').attr('checked');
  383. item.properties = mdata;
  384. };
  385. this.populateCheckboxGroupProperties = function(mdata){
  386. // dynamic properties
  387. JQuery('#bfElementTypeCheckboxGroupGroups').val(mdata.group);
  388. JQuery('#bfElementTypeCheckboxGroupReadonly').attr('checked', mdata.readonly);
  389. JQuery('#bfElementTypeCheckboxGroupWrap').attr('checked', mdata.wrap);
  390. JQuery('#bfElementTypeCheckboxGroupHint').val(mdata.hint);
  391. JQuery('#bfElementCheckboxGroupAdvancedHideLabel').attr('checked', mdata.hideLabel);
  392. JQuery('#bfElementCheckboxGroupAdvancedLogging').attr('checked', mdata.logging);
  393. JQuery('#bfElementCheckboxGroupAdvancedOrderNumber').val(mdata.orderNumber);
  394. // static properties
  395. JQuery('#bfElementName').val(mdata.bfName);
  396. JQuery('#bfElementLabel').val(mdata.label);
  397. JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
  398. JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
  399. JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
  400. JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
  401. JQuery('#bfElementValidationRequired').attr('checked', mdata.required);
  402. };
  403. // Checkbox
  404. this.saveCheckboxProperties = function(mdata, item){
  405. // dynamic properties
  406. mdata.value = JQuery('#bfElementTypeCheckboxValue').val() == '' ? 'checked' : JQuery('#bfElementTypeCheckboxValue').val();
  407. mdata.checked = JQuery('#bfElementTypeCheckboxChecked').attr('checked');
  408. mdata.readonly = JQuery('#bfElementTypeCheckboxReadonly').attr('checked');
  409. mdata.mailbackAccept = JQuery('#bfElementCheckboxAdvancedMailbackAccept').attr('checked');
  410. mdata.mailbackConnectWith = JQuery('#bfElementCheckboxAdvancedMailbackConnectWith').val();
  411. mdata.hint = JQuery('#bfElementTypeCheckboxHint').val();
  412. mdata.hideLabel = JQuery('#bfElementCheckboxAdvancedHideLabel').attr('checked');
  413. mdata.logging = JQuery('#bfElementCheckboxAdvancedLogging').attr('checked');
  414. mdata.orderNumber = JQuery('#bfElementCheckboxAdvancedOrderNumber').val();
  415. // static properties
  416. mdata.bfName = JQuery('#bfElementName').val();
  417. mdata.label = JQuery('#bfElementLabel').val();
  418. mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
  419. mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
  420. mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
  421. mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
  422. mdata.required = JQuery('#bfElementValidationRequired').attr('checked');
  423. item.properties = mdata;
  424. };
  425. this.populateCheckboxProperties = function(mdata){
  426. // dynamic properties
  427. JQuery('#bfElementTypeCheckboxValue').val(mdata.value);
  428. JQuery('#bfElementTypeCheckboxChecked').attr('checked', mdata.checked);
  429. JQuery('#bfElementCheckboxAdvancedMailbackAccept').attr('checked', mdata.mailbackAccept);
  430. JQuery('#bfElementCheckboxAdvancedMailbackConnectWith').val(mdata.mailbackConnectWith);
  431. JQuery('#bfElementTypeCheckboxReadonly').attr('checked', mdata.readonly);
  432. JQuery('#bfElementTypeCheckboxHint').val(mdata.hint);
  433. JQuery('#bfElementCheckboxAdvancedHideLabel').attr('checked', mdata.hideLabel);
  434. JQuery('#bfElementCheckboxAdvancedLogging').attr('checked', mdata.logging);
  435. JQuery('#bfElementCheckboxAdvancedOrderNumber').val(mdata.orderNumber);
  436. // static properties
  437. JQuery('#bfElementName').val(mdata.bfName);
  438. JQuery('#bfElementLabel').val(mdata.label);
  439. JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
  440. JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
  441. JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
  442. JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
  443. JQuery('#bfElementValidationRequired').attr('checked', mdata.required);
  444. };
  445. // Select
  446. this.saveSelectProperties = function(mdata, item){
  447. // dynamic properties
  448. mdata.list = JQuery('#bfElementTypeSelectList').val();
  449. mdata.width = JQuery('#bfElementTypeSelectListWidth').val();
  450. mdata.height = JQuery('#bfElementTypeSelectListHeight').val();
  451. mdata.readonly = JQuery('#bfElementTypeSelectReadonly').attr('checked');
  452. mdata.multiple = JQuery('#bfElementTypeSelectMultiple').attr('checked');
  453. mdata.mailback = JQuery('#bfElementSelectAdvancedMailback').attr('checked');
  454. mdata.hint = JQuery('#bfElementTypeSelectHint').val();
  455. mdata.hideLabel = JQuery('#bfElementSelectAdvancedHideLabel').attr('checked');
  456. mdata.logging = JQuery('#bfElementSelectAdvancedLogging').attr('checked');
  457. mdata.orderNumber = JQuery('#bfElementSelectAdvancedOrderNumber').val();
  458. // static properties
  459. mdata.bfName = JQuery('#bfElementName').val();
  460. mdata.label = JQuery('#bfElementLabel').val();
  461. mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
  462. mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
  463. mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
  464. mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
  465. mdata.required = JQuery('#bfElementValidationRequired').attr('checked');
  466. item.properties = mdata;
  467. };
  468. this.populateSelectProperties = function(mdata){
  469. // dynamic properties
  470. JQuery('#bfElementTypeSelectList').val(mdata.list);
  471. // compat 723
  472. if(typeof mdata.width == "undefined"){
  473. mdata['width'] = '';
  474. }
  475. if(typeof mdata.height == "undefined"){
  476. mdata['height'] = '';
  477. }
  478. // compat 723 end
  479. JQuery('#bfElementTypeSelectListWidth').val(mdata.width);
  480. JQuery('#bfElementTypeSelectListHeight').val(mdata.height);
  481. JQuery('#bfElementTypeSelectReadonly').attr('checked', mdata.readonly);
  482. JQuery('#bfElementTypeSelectMultiple').attr('checked', mdata.multiple);
  483. JQuery('#bfElementSelectAdvancedMailback').attr('checked', mdata.mailback);
  484. JQuery('#bfElementTypeSelectHint').val(mdata.hint);
  485. JQuery('#bfElementSelectAdvancedHideLabel').attr('checked', mdata.hideLabel);
  486. JQuery('#bfElementSelectAdvancedLogging').attr('checked', mdata.logging);
  487. JQuery('#bfElementSelectAdvancedOrderNumber').val(mdata.orderNumber);
  488. // static properties
  489. JQuery('#bfElementName').val(mdata.bfName);
  490. JQuery('#bfElementLabel').val(mdata.label);
  491. JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
  492. JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
  493. JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
  494. JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
  495. JQuery('#bfElementValidationRequired').attr('checked', mdata.required);
  496. };
  497. // File
  498. this.saveFileProperties = function(mdata, item){
  499. // dynamic properties
  500. mdata.uploadDirectory = JQuery('#bfElementFileAdvancedUploadDirectory').val();
  501. mdata.timestamp = JQuery('#bfElementFileAdvancedTimestamp').attr('checked');
  502. mdata.allowedFileExtensions = JQuery('#bfElementFileAdvancedAllowedFileExtensions').val();
  503. mdata.attachToUserMail = JQuery('#bfElementFileAdvancedAttachToUserMail').attr('checked');
  504. mdata.attachToAdminMail = JQuery('#bfElementFileAdvancedAttachToAdminMail').attr('checked');
  505. mdata.readonly = JQuery('#bfElementTypeFileReadonly').attr('checked');
  506. mdata.hint = JQuery('#bfElementTypeFileHint').val();
  507. mdata.useUrl = JQuery('#bfElementFileAdvancedUseUrl').attr('checked');
  508. mdata.useUrlDownloadDirectory = JQuery('#bfElementFileAdvancedUseUrlDownloadDirectory').val();
  509. mdata.hideLabel = JQuery('#bfElementFileAdvancedHideLabel').attr('checked');
  510. mdata.logging = JQuery('#bfElementFileAdvancedLogging').attr('checked');
  511. mdata.orderNumber = JQuery('#bfElementFileAdvancedOrderNumber').val();
  512. mdata.flashUploader = JQuery('#bfElementFileAdvancedFlashUploader').attr('checked');
  513. mdata.flashUploaderMulti = JQuery('#bfElementFileAdvancedFlashUploaderMulti').attr('checked');
  514. mdata.flashUploaderBytes = JQuery('#bfElementFileAdvancedFlashUploaderBytes').val();
  515. mdata.flashUploaderWidth = JQuery('#bfElementFileAdvancedFlashUploaderWidth').val();
  516. mdata.flashUploaderHeight = JQuery('#bfElementFileAdvancedFlashUploaderHeight').val();
  517. mdata.flashUploaderTransparent = JQuery('#bfElementFileAdvancedFlashUploaderTransparent').attr('checked');
  518. // static properties
  519. mdata.bfName = JQuery('#bfElementName').val();
  520. mdata.label = JQuery('#bfElementLabel').val();
  521. mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
  522. mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
  523. mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
  524. mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
  525. mdata.required = JQuery('#bfElementValidationRequired').attr('checked');
  526. item.properties = mdata;
  527. };
  528. this.populateFileProperties = function(mdata){
  529. // dynamic properties
  530. JQuery('#bfElementFileAdvancedUploadDirectory').val(mdata.uploadDirectory);
  531. JQuery('#bfElementFileAdvancedTimestamp').attr('checked', mdata.timestamp);
  532. JQuery('#bfElementFileAdvancedAllowedFileExtensions').val(mdata.allowedFileExtensions);
  533. JQuery('#bfElementFileAdvancedAttachToUserMail').attr('checked', mdata.attachToUserMail);
  534. JQuery('#bfElementFileAdvancedAttachToAdminMail').attr('checked', mdata.attachToAdminMail);
  535. JQuery('#bfElementTypeFileReadonly').attr('checked', mdata.readonly);
  536. JQuery('#bfElementTypeFileHint').val(mdata.hint);
  537. JQuery('#bfElementFileAdvancedHideLabel').attr('checked', mdata.hideLabel);
  538. if(mdata.useUrl && mdata.useUrlDownloadDirectory == ''){
  539. mdata.useUrlDownloadDirectory = '<?php echo JURI::root() . 'media/breezingforms/uploads' ;?>';
  540. }
  541. JQuery('#bfElementFileAdvancedUseUrl').attr('checked', mdata.useUrl);
  542. JQuery('#bfElementFileAdvancedUseUrlDownloadDirectory').val(mdata.useUrlDownloadDirectory);
  543. JQuery('#bfElementFileAdvancedLogging').attr('checked', mdata.logging);
  544. JQuery('#bfElementFileAdvancedOrderNumber').val(mdata.orderNumber);
  545. JQuery('#bfElementFileAdvancedFlashUploader').attr('checked', mdata.flashUploader);
  546. JQuery('#bfElementFileAdvancedFlashUploaderMulti').attr('checked', mdata.flashUploaderMulti);
  547. JQuery('#bfElementFileAdvancedFlashUploaderBytes').val(mdata.flashUploaderBytes);
  548. JQuery('#bfElementFileAdvancedFlashUploaderWidth').val(mdata.flashUploaderWidth);
  549. JQuery('#bfElementFileAdvancedFlashUploaderHeight').val(mdata.flashUploaderHeight);
  550. JQuery('#bfElementFileAdvancedFlashUploaderTransparent').attr('checked', mdata.flashUploaderTransparent);
  551. // static properties
  552. JQuery('#bfElementName').val(mdata.bfName);
  553. JQuery('#bfElementLabel').val(mdata.label);
  554. JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
  555. JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
  556. JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
  557. JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
  558. JQuery('#bfElementValidationRequired').attr('checked', mdata.required);
  559. };
  560. // SUBMIT BUTTON
  561. this.saveSubmitButtonProperties = function(mdata, item){
  562. // dynamic properties
  563. mdata.src = JQuery('#bfElementSubmitButtonAdvancedSrc').val();
  564. mdata.value = JQuery('#bfElementTypeSubmitButtonValue').val();
  565. mdata.hint = JQuery('#bfElementTypeSubmitButtonHint').val();
  566. mdata.hideLabel = JQuery('#bfElementSubmitButtonAdvancedHideLabel').attr('checked');
  567. // static properties
  568. mdata.bfName = JQuery('#bfElementName').val();
  569. mdata.label = JQuery('#bfElementLabel').val();
  570. mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
  571. mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
  572. mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
  573. mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
  574. item.properties = mdata;
  575. };
  576. this.populateSubmitButtonProperties = function(mdata){
  577. // dynamic properties
  578. JQuery('#bfElementSubmitButtonAdvancedSrc').val(mdata.src);
  579. JQuery('#bfElementTypeSubmitButtonValue').val(mdata.value);
  580. JQuery('#bfElementTypeSubmitButtonHint').val(mdata.hint);
  581. JQuery('#bfElementSubmitButtonAdvancedHideLabel').attr('checked', mdata.hideLabel);
  582. // static properties
  583. JQuery('#bfElementName').val(mdata.bfName);
  584. JQuery('#bfElementLabel').val(mdata.label);
  585. JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
  586. JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
  587. JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
  588. JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
  589. };
  590. // CAPTCHA
  591. this.saveCaptchaProperties = function(mdata, item){
  592. // dynamic properties
  593. mdata.hint = JQuery('#bfElementTypeCaptchaHint').val();
  594. mdata.hideLabel = JQuery('#bfElementCaptchaAdvancedHideLabel').attr('checked');
  595. // static properties
  596. mdata.bfName = JQuery('#bfElementName').val();
  597. mdata.label = JQuery('#bfElementLabel').val();
  598. mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
  599. mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
  600. mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
  601. mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
  602. item.properties = mdata;
  603. };
  604. // RECAPTCHA
  605. this.saveReCaptchaProperties = function(mdata, item){
  606. // dynamic properties
  607. mdata.hint = JQuery('#bfElementTypeReCaptchaHint').val();
  608. mdata.hideLabel = JQuery('#bfElementReCaptchaAdvancedHideLabel').attr('checked');
  609. mdata.pubkey = JQuery('#bfElementTypeReCaptchaPubkey').val();
  610. mdata.privkey = JQuery('#bfElementTypeReCaptchaPrivkey').val();
  611. mdata.theme = JQuery('#bfElementTypeReCaptchaTheme').val();
  612. // static properties
  613. mdata.bfName = JQuery('#bfElementName').val();
  614. mdata.label = JQuery('#bfElementLabel').val();
  615. mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
  616. mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
  617. mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
  618. mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
  619. item.properties = mdata;
  620. };
  621. this.populateReCaptchaProperties = function(mdata){
  622. // dynamic properties
  623. JQuery('#bfElementTypeReCaptchaHint').val(mdata.hint);
  624. JQuery('#bfElementReCaptchaAdvancedHideLabel').attr('checked', mdata.hideLabel);
  625. JQuery('#bfElementTypeReCaptchaPubkey').val(mdata.pubkey);
  626. JQuery('#bfElementTypeReCaptchaPrivkey').val(mdata.privkey);
  627. JQuery('#bfElementTypeReCaptchaTheme').val(mdata.theme);
  628. // static properties
  629. JQuery('#bfElementName').val(mdata.bfName);
  630. JQuery('#bfElementLabel').val(mdata.label);
  631. JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
  632. JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
  633. JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
  634. JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
  635. };
  636. this.populateCaptchaProperties = function(mdata){
  637. // dynamic properties
  638. JQuery('#bfElementTypeCaptchaHint').val(mdata.hint);
  639. JQuery('#bfElementCaptchaAdvancedHideLabel').attr('checked', mdata.hideLabel);
  640. // static properties
  641. JQuery('#bfElementName').val(mdata.bfName);
  642. JQuery('#bfElementLabel').val(mdata.label);
  643. JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
  644. JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
  645. JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
  646. JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
  647. };
  648. // CALENDAR
  649. this.saveCalendarProperties = function(mdata, item){
  650. // dynamic properties
  651. mdata.format = JQuery('#bfElementTypeCalendarFormat').val();
  652. mdata.value = JQuery('#bfElementTypeCalendarValue').val();
  653. mdata.size = JQuery('#bfElementTypeCalendarSize').val();
  654. mdata.hint = JQuery('#bfElementTypeCalendarHint').val();
  655. mdata.hideLabel = JQuery('#bfElementCalendarAdvancedHideLabel').attr('checked');
  656. // static properties
  657. mdata.bfName = JQuery('#bfElementName').val();
  658. mdata.label = JQuery('#bfElementLabel').val();
  659. mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
  660. mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
  661. mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
  662. mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
  663. mdata.required = JQuery('#bfElementValidationRequired').attr('checked');
  664. item.properties = mdata;
  665. };
  666. this.populateCalendarProperties = function(mdata){
  667. // dynamic properties
  668. JQuery('#bfElementTypeCalendarFormat').val(mdata.format);
  669. JQuery('#bfElementTypeCalendarValue').val(mdata.value);
  670. JQuery('#bfElementTypeCalendarSize').val(mdata.size);
  671. JQuery('#bfElementTypeCalendarHint').val(mdata.hint);
  672. JQuery('#bfElementCalendarAdvancedHideLabel').attr('checked', mdata.hideLabel);
  673. // static properties
  674. JQuery('#bfElementName').val(mdata.bfName);
  675. JQuery('#bfElementLabel').val(mdata.label);
  676. JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
  677. JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
  678. JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
  679. JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
  680. JQuery('#bfElementValidationRequired').attr('checked', mdata.required);
  681. };
  682. // Hidden
  683. this.saveHiddenProperties = function(mdata, item){
  684. // dynamic properties
  685. mdata.value = JQuery('#bfElementTypeHiddenValue').val();
  686. mdata.logging = JQuery('#bfElementHiddenAdvancedLogging').attr('checked');
  687. mdata.orderNumber = JQuery('#bfElementHiddenAdvancedOrderNumber').val();
  688. // static properties
  689. mdata.bfName = JQuery('#bfElementName').val();
  690. mdata.label = JQuery('#bfElementLabel').val();
  691. mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
  692. mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
  693. mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
  694. mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
  695. item.properties = mdata;
  696. };
  697. this.populateHiddenProperties = function(mdata){
  698. // dynamic properties
  699. JQuery('#bfElementTypeHiddenValue').val(mdata.value);
  700. JQuery('#bfElementHiddenAdvancedLogging').attr('checked', mdata.logging);
  701. JQuery('#bfElementHiddenAdvancedOrderNumber').val(mdata.orderNumber);
  702. // static properties
  703. JQuery('#bfElementName').val(mdata.bfName);
  704. JQuery('#bfElementLabel').val(mdata.label);
  705. JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
  706. JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
  707. JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
  708. JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
  709. };
  710. // SUMMARIZE
  711. this.saveSummarizeProperties = function(mdata, item){
  712. // dynamic properties
  713. var val = JQuery('#bfElementTypeSummarizeConnectWith').val();
  714. if(val != ''){
  715. var name = val.split(":")[0];
  716. var type = val.split(":")[1];
  717. mdata.connectWith = name;
  718. mdata.connectType = type;
  719. }
  720. mdata.useElementLabel = JQuery('#bfElementTypeSummarizeUseElementLabel').attr('checked');
  721. mdata.hideIfEmpty = JQuery('#bfElementTypeSummarizeHideIfEmpty').attr('checked');
  722. mdata.fieldCalc = JQuery('#bfElementAdvancedSummarizeCalc').val();
  723. mdata.emptyMessage = JQuery('#bfElementTypeSummarizeEmptyMessage').val();
  724. if(mdata.useElementLabel){
  725. var items = new Array();
  726. appScope.getItemsFlattened(appScope.dataObject, items);
  727. for(var i = 0; i < items.length;i++){
  728. if(items[i].properties.bfName == name){
  729. JQuery('#bfElementLabel').val(items[i].properties.label);
  730. break;
  731. }
  732. }
  733. }
  734. // static properties
  735. mdata.bfName = JQuery('#bfElementName').val();
  736. mdata.label = JQuery('#bfElementLabel').val();
  737. mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
  738. mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
  739. mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
  740. item.properties = mdata;
  741. };
  742. this.populateSummarizeProperties = function(mdata){
  743. var items = new Array();
  744. appScope.getItemsFlattened(appScope.dataObject, items);
  745. JQuery('#bfElementTypeSummarizeConnectWith').empty();
  746. var option = document.createElement('option');
  747. JQuery(option).val('');
  748. JQuery(option).text("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_CHOOSE_ONE')); ?>");
  749. JQuery('#bfElementTypeSummarizeConnectWith').append(option);
  750. for(var i = 0; i < items.length;i++){
  751. switch(items[i].properties.bfType){
  752. case 'bfTextfield':
  753. case 'bfTextarea':
  754. case 'bfRadioGroup':
  755. case 'bfCheckboxGroup':
  756. case 'bfCheckbox':
  757. case 'bfSelect':
  758. case 'bfFile':
  759. case 'bfHidden':
  760. case 'bfCalendar':
  761. var option = document.createElement('option');
  762. JQuery(option).val(items[i].properties.bfName + ":" + items[i].properties.bfType);
  763. JQuery(option).text(items[i].properties.label + " ("+items[i].properties.bfName+")");
  764. JQuery('#bfElementTypeSummarizeConnectWith').append(option);
  765. break;
  766. }
  767. }
  768. // dynamic properties
  769. JQuery('#bfElementTypeSummarizeConnectWith').val(mdata.connectWith+":"+mdata.connectType);
  770. JQuery('#bfElementTypeSummarizeEmptyMesssage').val(mdata.emptyMessage);
  771. JQuery('#bfElementTypeSummarizeUseElementLabel').attr('checked', mdata.useElementLabel);
  772. JQuery('#bfElementTypeSummarizeEmptyMessage').val(mdata.emptyMessage);
  773. JQuery('#bfElementTypeSummarizeHideIfEmpty').attr('checked', mdata.hideIfEmpty);
  774. JQuery('#bfElementAdvancedSummarizeCalc').val(mdata.fieldCalc);
  775. // static properties
  776. JQuery('#bfElementName').val(mdata.bfName);
  777. JQuery('#bfElementLabel').val(mdata.label);
  778. JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
  779. JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
  780. JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
  781. };
  782. // PAYPAL BUTTON
  783. this.savePayPalProperties = function(mdata, item){
  784. // dynamic properties
  785. // DEFAULT
  786. // account
  787. mdata.business = JQuery('#bfElementTypePayPalBusiness').val();
  788. mdata.token = JQuery('#bfElementTypePayPalToken').val();
  789. mdata.itemname = JQuery('#bfElementTypePayPalItemname').val();
  790. mdata.itemnumber = JQuery('#bfElementTypePayPalItemnumber').val();
  791. mdata.amount = JQuery('#bfElementTypePayPalAmount').val();
  792. mdata.tax = JQuery('#bfElementTypePayPalTax').val();
  793. mdata.thankYouPage = JQuery('#bfElementTypePayPalThankYouPage').val();
  794. mdata.locale = JQuery('#bfElementTypePayPalLocale').val();
  795. mdata.currencyCode = JQuery('#bfElementTypePayPalCurrencyCode').val();
  796. mdata.sendNotificationAfterPayment = JQuery('#bfElementTypePayPalSendNotificationAfterPayment').attr('checked');
  797. // ADVANCED
  798. mdata.useIpn = JQuery('#bfElementPayPalAdvancedUseIpn').attr('checked');
  799. mdata.image = JQuery('#bfElementPayPalAdvancedImage').val();
  800. // testaccount
  801. mdata.testaccount = JQuery('#bfElementPayPalAdvancedTestaccount').attr('checked');
  802. mdata.testBusiness = JQuery('#bfElementPayPalAdvancedTestBusiness').val();
  803. mdata.testToken = JQuery('#bfElementPayPalAdvancedTestToken').val();
  804. // file
  805. mdata.downloadableFile = JQuery('#bfElementPayPalAdvancedDownloadableFile').attr('checked');
  806. mdata.filepath = JQuery('#bfElementPayPalAdvancedFilepath').val();
  807. mdata.downloadTries = JQuery('#bfElementPayPalAdvancedDownloadTries').val();
  808. // OTHER ADVANCED
  809. mdata.hint = JQuery('#bfElementTypePayPalHint').val();
  810. mdata.hideLabel = JQuery('#bfElementPayPalAdvancedHideLabel').attr('checked');
  811. // static properties
  812. mdata.bfName = JQuery('#bfElementName').val();
  813. mdata.label = JQuery('#bfElementLabel').val();
  814. mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
  815. mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
  816. mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
  817. mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
  818. item.properties = mdata;
  819. };
  820. this.populatePayPalProperties = function(mdata){
  821. // dynamic properties
  822. // DEFAULT
  823. // account
  824. JQuery('#bfElementTypePayPalBusiness').val(mdata.business);
  825. JQuery('#bfElementTypePayPalToken').val(mdata.token);
  826. JQuery('#bfElementTypePayPalItemname').val(mdata.itemname);
  827. JQuery('#bfElementTypePayPalItemnumber').val(mdata.itemnumber);
  828. JQuery('#bfElementTypePayPalAmount').val(mdata.amount);
  829. JQuery('#bfElementTypePayPalTax').val(mdata.tax);
  830. JQuery('#bfElementTypePayPalThankYouPage').val(mdata.thankYouPage);
  831. JQuery('#bfElementTypePayPalLocale').val(mdata.locale);
  832. JQuery('#bfElementTypePayPalCurrencyCode').val(mdata.currencyCode);
  833. JQuery('#bfElementTypePayPalSendNotificationAfterPayment').attr('checked', mdata.sendNotificationAfterPayment);
  834. // ADVANCED
  835. JQuery('#bfElementPayPalAdvancedImage').val(mdata.image);
  836. // testaccount
  837. JQuery('#bfElementPayPalAdvancedTestaccount').attr('checked', mdata.testaccount);
  838. JQuery('#bfElementPayPalAdvancedTestBusiness').val(mdata.testBusiness);
  839. JQuery('#bfElementPayPalAdvancedTestToken').val(mdata.testToken);
  840. // file
  841. JQuery('#bfElementPayPalAdvancedDownloadableFile').attr('checked', mdata.downloadableFile);
  842. JQuery('#bfElementPayPalAdvancedFilepath').val(mdata.filepath);
  843. JQuery('#bfElementPayPalAdvancedDownloadTries').val(mdata.downloadTries);
  844. if(typeof mdata.useIpn == "undefined"){
  845. mdata['useIpn'] = false;
  846. }
  847. JQuery('#bfElementPayPalAdvancedUseIpn').attr('checked', mdata.useIpn);
  848. JQuery('#bfElementTypePayPalHint').val(mdata.hint);
  849. JQuery('#bfElementPayPalAdvancedHideLabel').attr('checked', mdata.hideLabel);
  850. // static properties
  851. JQuery('#bfElementName').val(mdata.bfName);
  852. JQuery('#bfElementLabel').val(mdata.label);
  853. JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
  854. JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
  855. JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
  856. JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
  857. };
  858. // SOFORTUEBERWEISUNG BUTTON
  859. this.saveSofortueberweisungProperties = function(mdata, item){
  860. // dynamic properties
  861. // DEFAULT
  862. // account
  863. mdata.user_id = JQuery('#bfElementTypeSofortueberweisungUserId').val();
  864. mdata.project_id = JQuery('#bfElementTypeSofortueberweisungProjectId').val();
  865. mdata.project_password = JQuery('#bfElementTypeSofortueberweisungProjectPassword').val();
  866. mdata.reason_1 = JQuery('#bfElementTypeSofortueberweisungReason1').val();
  867. mdata.reason_2 = JQuery('#bfElementTypeSofortueberweisungReason2').val();
  868. mdata.amount = JQuery('#bfElementTypeSofortueberweisungAmount').val();
  869. mdata.thankYouPage = JQuery('#bfElementTypeSofortueberweisungThankYouPage').val();
  870. mdata.language_id = JQuery('#bfElementTypeSofortueberweisungLanguageId').val();
  871. mdata.currency_id = JQuery('#bfElementTypeSofortueberweisungCurrencyId').val();
  872. mdata.mailback = JQuery('#bfElementTypeSofortueberweisungMailback').attr('checked');
  873. // ADVANCED
  874. mdata.image = JQuery('#bfElementSofortueberweisungAdvancedImage').val();
  875. // file
  876. mdata.downloadableFile = JQuery('#bfElementSofortueberweisungAdvancedDownloadableFile').attr('checked');
  877. mdata.filepath = JQuery('#bfElementSofortueberweisungAdvancedFilepath').val();
  878. mdata.downloadTries = JQuery('#bfElementSofortueberweisungAdvancedDownloadTries').val();
  879. // OTHER ADVANCED
  880. mdata.hint = JQuery('#bfElementTypeSofortueberweisungHint').val();
  881. mdata.hideLabel = JQuery('#bfElementSofortueberweisungAdvancedHideLabel').attr('checked');
  882. // static properties
  883. mdata.bfName = JQuery('#bfElementName').val();
  884. mdata.label = JQuery('#bfElementLabel').val();
  885. mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
  886. mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
  887. mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
  888. mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
  889. item.properties = mdata;
  890. };
  891. this.populateSofortueberweisungProperties = function(mdata){
  892. // dynamic properties
  893. // DEFAULT
  894. // account
  895. JQuery('#bfElementTypeSofortueberweisungUserId').val(mdata.user_id);
  896. JQuery('#bfElementTypeSofortueberweisungProjectId').val(mdata.project_id);
  897. JQuery('#bfElementTypeSofortueberweisungProjectPassword').val(mdata.project_password);
  898. JQuery('#bfElementTypeSofortueberweisungReason1').val(mdata.reason_1);
  899. JQuery('#bfElementTypeSofortueberweisungReason2').val(mdata.reason_2);
  900. JQuery('#bfElementTypeSofortueberweisungAmount').val(mdata.amount);
  901. JQuery('#bfElementTypeSofortueberweisungThankYouPage').val(mdata.thankYouPage);
  902. JQuery('#bfElementTypeSofortueberweisungLanguageId').val(mdata.language_id);
  903. JQuery('#bfElementTypeSofortueberweisungCurrencyId').val(mdata.currency_id);
  904. JQuery('#bfElementTypeSofortueberweisungMailback').attr('checked', mdata.mailback);
  905. // ADVANCED
  906. JQuery('#bfElementSofortueberweisungAdvancedImage').val(mdata.image);
  907. // file
  908. JQuery('#bfElementSofortueberweisungAdvancedDownloadableFile').attr('checked', mdata.downloadableFile);
  909. JQuery('#bfElementSofortueberweisungAdvancedFilepath').val(mdata.filepath);
  910. JQuery('#bfElementSofortueberweisungAdvancedDownloadTries').val(mdata.downloadTries);
  911. // OTHER ADVANCED
  912. JQuery('#bfElementTypeSofortueberweisungHint').val(mdata.hint);
  913. JQuery('#bfElementSofortueberweisungAdvancedHideLabel').attr('checked', mdata.hideLabel);
  914. // static properties
  915. JQuery('#bfElementName').val(mdata.bfName);
  916. JQuery('#bfElementLabel').val(mdata.label);
  917. JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
  918. JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
  919. JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
  920. JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
  921. };
  922. this.saveSelectedElementProperties = function(){
  923. if(appScope.selectedTreeElement){
  924. var mdata = appScope.getProperties(appScope.selectedTreeElement);
  925. if(mdata){
  926. var item = appScope.findDataObjectItem(JQuery(appScope.selectedTreeElement).attr('id'), appScope.dataObject);
  927. if(item){
  928. switch(mdata.bfType){
  929. case 'bfSummarize':
  930. appScope.saveSummarizeProperties(mdata, item);
  931. break;
  932. case 'bfHidden':
  933. appScope.saveHiddenProperties(mdata, item);
  934. appScope.saveValidation(mdata, item);
  935. appScope.saveInit(mdata, item);
  936. break;
  937. case 'bfTextfield':
  938. appScope.saveTextProperties(mdata, item);
  939. appScope.saveValidation(mdata, item);
  940. appScope.saveInit(mdata, item);
  941. appScope.saveAction(mdata, item);
  942. break;
  943. case 'bfTextarea':
  944. appScope.saveTextareaProperties(mdata, item);
  945. appScope.saveValidation(mdata, item);
  946. appScope.saveInit(mdata, item);
  947. appScope.saveAction(mdata, item);
  948. break;
  949. case 'bfRadioGroup':
  950. appScope.saveRadioGroupProperties(mdata, item);
  951. appScope.saveValidation(mdata, item);
  952. appScope.saveInit(mdata, item);
  953. appScope.saveAction(mdata, item);
  954. break;
  955. case 'bfSubmitButton':
  956. appScope.saveSubmitButtonProperties(mdata, item);
  957. appScope.saveAction(mdata, item);
  958. break;
  959. case 'bfPayPal':
  960. appScope.savePayPalProperties(mdata, item);
  961. appScope.saveAction(mdata, item);
  962. break;
  963. case 'bfSofortueberweisung':
  964. appScope.saveSofortueberweisungProperties(mdata, item);
  965. appScope.saveAction(mdata, item);
  966. break;
  967. case 'bfCaptcha':
  968. appScope.saveCaptchaProperties(mdata, item);
  969. appScope.saveAction(mdata, item);
  970. break;
  971. case 'bfReCaptcha':
  972. appScope.saveReCaptchaProperties(mdata, item);
  973. appScope.saveAction(mdata, item);
  974. break;
  975. case 'bfCalendar':
  976. appScope.saveCalendarProperties(mdata, item);
  977. appScope.saveValidation(mdata, item);
  978. break;
  979. case 'bfCheckboxGroup':
  980. appScope.saveCheckboxGroupProperties(mdata, item);
  981. appScope.saveValidation(mdata, item);
  982. appScope.saveInit(mdata, item);
  983. appScope.saveAction(mdata, item);
  984. break;
  985. case 'bfCheckbox':
  986. appScope.saveCheckboxProperties(mdata, item);
  987. appScope.saveValidation(mdata, item);
  988. appScope.saveInit(mdata, item);
  989. appScope.saveAction(mdata, item);
  990. break;
  991. case 'bfSelect':
  992. appScope.saveSelectProperties(mdata, item);
  993. appScope.saveValidation(mdata, item);
  994. appScope.saveInit(mdata, item);
  995. appScope.saveAction(mdata, item);
  996. break;
  997. case 'bfFile':
  998. appScope.saveFileProperties(mdata, item);
  999. appScope.saveValidation(mdata, item);
  1000. appScope.saveInit(mdata, item);
  1001. appScope.saveAction(mdata, item);
  1002. break;
  1003. }
  1004. }
  1005. }
  1006. }
  1007. };
  1008. this.saveValidation = function(mdata, item){
  1009. mdata.validationId = JQuery('#bfValidationScriptSelection').val();
  1010. mdata.validationCode = JQuery('#bfValidationCode').val();
  1011. mdata.validationMessage = JQuery('#bfValidationMessage').val();
  1012. if(JQuery('#bfValidationTypeLibrary').get(0).checked){
  1013. mdata.validationCondition = 1;
  1014. for(var i = 0; i < appScope.elementScripts.validation.length;i++){
  1015. if(appScope.elementScripts.validation[i].id == JQuery('#bfValidationScriptSelection').val()){
  1016. mdata.validationFunctionName = appScope.elementScripts.validation[i].name;
  1017. break;
  1018. }
  1019. }
  1020. } else if(JQuery('#bfValidationTypeCustom').get(0).checked){
  1021. mdata.validationCondition = 2;
  1022. mdata.validationFunctionName = 'ff_' + mdata.bfName + '_validation';
  1023. } else {
  1024. mdata.validationCondition = 0;
  1025. }
  1026. item.properties = mdata;
  1027. };
  1028. this.saveInit = function(mdata, item){
  1029. if(JQuery('#bfInitFormEntry').get(0).checked){
  1030. mdata.initFormEntry = 1;
  1031. } else {
  1032. mdata.initFormEntry = 0;
  1033. }
  1034. if(JQuery('#bfInitPageEntry').get(0).checked){
  1035. mdata.initPageEntry = 1;
  1036. } else {
  1037. mdata.initPageEntry = 0;
  1038. }
  1039. mdata.initId = JQuery('#bfInitScriptSelection').val();
  1040. mdata.initCode = JQuery('#bfInitCode').val();
  1041. if(JQuery('#bfInitTypeLibrary').get(0).checked){
  1042. mdata.initCondition = 1;
  1043. for(var i = 0; i < appScope.elementScripts.init.length;i++){
  1044. if(appScope.elementScripts.init[i].id == JQuery('#bfInitScriptSelection').val()){
  1045. mdata.initScript = appScope.elementScripts.init[i].name;
  1046. break;
  1047. }
  1048. }
  1049. } else if(JQuery('#bfInitTypeCustom').get(0).checked){
  1050. mdata.initCondition = 2;
  1051. mdata.initFunctionName = 'ff_' + mdata.bfName + '_init';
  1052. } else {
  1053. mdata.initCondition = 0;
  1054. }
  1055. item.properties = mdata;
  1056. };
  1057. this.saveAction = function(mdata, item){
  1058. mdata.actionId = JQuery('#bfActionsScriptSelection').val();
  1059. mdata.actionCode = JQuery('#bfActionCode').val();
  1060. if(JQuery('#bfActionTypeLibrary').get(0).checked){
  1061. mdata.actionCondition = 1;
  1062. for(var i = 0; i < appScope.elementScripts.action.length;i++){
  1063. if(appScope.elementScripts.action[i].id == JQuery('#bfActionsScriptSelection').val()){
  1064. mdata.actionFunctionName = appScope.elementScripts.action[i].name;
  1065. break;
  1066. }
  1067. }
  1068. } else if(JQuery('#bfActionTypeCustom').get(0).checked){
  1069. mdata.actionCondition = 2;
  1070. mdata.actionFunctionName = 'ff_' + mdata.bfName + '_action';
  1071. } else {
  1072. mdata.actionCondition = 0;
  1073. }
  1074. if(JQuery('#bfActionClick').get(0).checked && mdata.actionCondition > 0){
  1075. mdata.actionClick = 1;
  1076. } else {
  1077. mdata.actionClick = 0;
  1078. }
  1079. if(JQuery('#bfActionBlur').get(0).checked && mdata.actionCondition > 0){
  1080. mdata.actionBlur = 1;
  1081. } else {
  1082. mdata.actionBlur = 0;
  1083. }
  1084. if(JQuery('#bfActionChange').get(0).checked && mdata.actionCondition > 0){
  1085. mdata.actionChange = 1;
  1086. } else {
  1087. mdata.actionChange = 0;
  1088. }
  1089. if(JQuery('#bfActionFocus').get(0).checked && mdata.actionCondition > 0){
  1090. mdata.actionFocus = 1;
  1091. } else {
  1092. mdata.actionFocus = 0;
  1093. }
  1094. if(JQuery('#bfActionSelect').get(0).checked && mdata.actionCondition > 0){
  1095. mdata.actionSelect = 1;
  1096. } else {
  1097. mdata.actionSelect = 0;
  1098. }
  1099. item.properties = mdata;
  1100. };
  1101. this.populateSelectedElementProperties = function(){
  1102. if(appScope.selectedTreeElement){
  1103. var mdata = appScope.getProperties(appScope.selectedTreeElement);
  1104. // compat 723
  1105. if(typeof mdata.off == "undefined"){
  1106. mdata['off'] = false;
  1107. }
  1108. // compat 723 end
  1109. if(mdata){
  1110. var item = appScope.findDataObjectItem(JQuery(appScope.selectedTreeElement).attr('id'), appScope.dataObject);
  1111. if(item){
  1112. item.data.title = mdata.label;
  1113. JQuery('#bfValidationScript').css('display','none');
  1114. JQuery('#bfInitScript').css('display','none');
  1115. JQuery('#bfActionScript').css('display','none');
  1116. JQuery('#bfElementTypeText').css('display','none');
  1117. JQuery('#bfElementTypeTextarea').css('display','none');
  1118. JQuery('#bfElementTypeRadioGroup').css('display','none');
  1119. JQuery('#bfElementTypeSubmitButton').css('display','none');
  1120. JQuery('#bfElementTypePayPal').css('display','none');
  1121. JQuery('#bfElementTypeSofortueberweisung').css('display','none');
  1122. JQuery('#bfElementTypeCaptcha').css('display','none');
  1123. JQuery('#bfElementTypeReCaptcha').css('display','none');
  1124. JQuery('#bfElementTypeCalendar').css('display','none');
  1125. JQuery('#bfElementTypeCheckboxGroup').css('display','none');
  1126. JQuery('#bfElementTypeCheckbox').css('display','none');
  1127. JQuery('#bfElementTypeSelect').css('display','none');
  1128. JQuery('#bfElementTypeFile').css('display','none');
  1129. JQuery('#bfElementTypeHidden').css('display','none');
  1130. JQuery('#bfElementTypeSummarize').css('display','none');
  1131. JQuery('#bfElementTypeTextAdvanced').css('display','none');
  1132. JQuery('#bfElementTypeTextareaAdvanced').css('display','none');
  1133. JQuery('#bfElementTypeRadioGroupAdvanced').css('display','none');
  1134. JQuery('#bfElementTypeSubmitButtonAdvanced').css('display','none');
  1135. JQuery('#bfElementTypePayPalAdvanced').css('display','none');
  1136. JQuery('#bfElementTypeSofortueberweisungAdvanced').css('display','none');
  1137. JQuery('#bfElementTypeCaptchaAdvanced').css('display','none');
  1138. JQuery('#bfElementTypeReCaptchaAdvanced').css('display','none');
  1139. JQuery('#bfElementTypeCalendarAdvanced').css('display','none');
  1140. JQuery('#bfElementTypeCheckboxGroupAdvanced').css('display','none');
  1141. JQuery('#bfElementTypeCheckboxAdvanced').css('display','none');
  1142. JQuery('#bfElementTypeSelectAdvanced').css('display','none');
  1143. JQuery('#bfElementTypeFileAdvanced').css('display','none');
  1144. JQuery('#bfElementTypeHiddenAdvanced').css('display','none');
  1145. JQuery('#bfElementTypeSummarizeAdvanced').css('display','none');
  1146. JQuery('#bfElementValidationRequiredSet').css('display','none');
  1147. JQuery('#bfAdvancedLeaf').css('display','');
  1148. JQuery('#bfHideInMailback').css('display','');
  1149. switch(mdata.bfType){
  1150. case 'bfSummarize':
  1151. JQuery('#bfHideInMailback').css('display','none');
  1152. JQuery('#bfElementType').val('bfElementTypeSummarize');
  1153. appScope.populateSummarizeProperties(mdata);
  1154. break;
  1155. case 'bfHidden':
  1156. JQuery('#bfElementType').val('bfElementTypeHidden');
  1157. JQuery('#bfAdvancedLeaf').css('display','none');
  1158. appScope.populateHiddenProperties(mdata);
  1159. appScope.populateElementValidationScript();
  1160. appScope.populateElementInitScript();
  1161. break;
  1162. case 'bfTextfield':
  1163. JQuery('#bfElementType').val('bfElementTypeText');
  1164. appScope.populateTextProperties(mdata);
  1165. appScope.populateElementValidationScript();
  1166. appScope.populateElementInitScript();
  1167. appScope.populateElementActionScript();
  1168. break;
  1169. case 'bfTextarea':
  1170. JQuery('#bfElementType').val('bfElementTypeTextarea');
  1171. appScope.populateTextareaProperties(mdata);
  1172. appScope.populateElementValidationScript();
  1173. appScope.populateElementInitScript();
  1174. appScope.populateElementActionScript();
  1175. break;
  1176. case 'bfRadioGroup':
  1177. JQuery('#bfElementType').val('bfElementTypeRadioGroup');
  1178. appScope.populateRadioGroupProperties(mdata);
  1179. appScope.populateElementValidationScript();
  1180. appScope.populateElementInitScript();
  1181. appScope.populateElementActionScript();
  1182. break;
  1183. case 'bfSubmitButton':
  1184. JQuery('#bfElementType').val('bfElementTypeSubmitButton');
  1185. appScope.populateSubmitButtonProperties(mdata);
  1186. appScope.populateElementActionScript();
  1187. break;
  1188. case 'bfPayPal':
  1189. JQuery('#bfElementType').val('bfElementTypePayPal');
  1190. appScope.populatePayPalProperties(mdata);
  1191. appScope.populateElementActionScript();
  1192. break;
  1193. case 'bfSofortueberweisung':
  1194. JQuery('#bfElementType').val('bfElementTypeSofortueberweisung');
  1195. appScope.populateSofortueberweisungProperties(mdata);
  1196. appScope.populateElementActionScript();
  1197. break;
  1198. case 'bfCaptcha':
  1199. JQuery('#bfHideInMailback').css('display','none');
  1200. JQuery('#bfElementType').val('bfElementTypeCaptcha');
  1201. appScope.populateCaptchaProperties(mdata);
  1202. break;
  1203. case 'bfReCaptcha':
  1204. JQuery('#bfHideInMailback').css('display','none');
  1205. JQuery('#bfElementType').val('bfElementTypeReCaptcha');
  1206. appScope.populateReCaptchaProperties(mdata);
  1207. break;
  1208. case 'bfCalendar':
  1209. JQuery('#bfElementType').val('bfElementTypeCalendar');
  1210. appScope.populateCalendarProperties(mdata);
  1211. appScope.populateElementValidationScript();
  1212. break;
  1213. case 'bfCheckboxGroup':
  1214. JQuery('#bfElementType').val('bfElementTypeCheckboxGroup');
  1215. appScope.populateCheckboxGroupProperties(mdata);
  1216. appScope.populateElementValidationScript();
  1217. appScope.populateElementInitScript();
  1218. appScope.populateElementActionScript();
  1219. break;
  1220. case 'bfCheckbox':
  1221. JQuery('#bfElementType').val('bfElementTypeCheckbox');
  1222. appScope.populateCheckboxProperties(mdata);
  1223. appScope.populateElementValidationScript();
  1224. appScope.populateElementInitScript();
  1225. appScope.populateElementActionScript();
  1226. break;
  1227. case 'bfSelect':
  1228. JQuery('#bfElementType').val('bfElementTypeSelect');
  1229. appScope.populateSelectProperties(mdata);
  1230. appScope.populateElementValidationScript();
  1231. appScope.populateElementInitScript();
  1232. appScope.populateElementActionScript();
  1233. break;
  1234. case 'bfFile':
  1235. JQuery('#bfElementType').val('bfElementTypeFile');
  1236. appScope.populateFileProperties(mdata);
  1237. appScope.populateElementValidationScript();
  1238. appScope.populateElementInitScript();
  1239. appScope.populateElementActionScript();
  1240. break;
  1241. }
  1242. if(JQuery('#bfElementType').val() != ''){
  1243. JQuery('#bfElementTypeClass').css('display','none');
  1244. JQuery('#'+JQuery('#bfElementType').val()).css('display','');
  1245. JQuery('#'+JQuery('#bfElementType').val()+"Advanced").css('display','');
  1246. if(mdata.bfType != 'bfHidden'){
  1247. JQuery('#bfElementValidationRequiredSet').css('display','');
  1248. }
  1249. }
  1250. }
  1251. }
  1252. }
  1253. };
  1254. this.populateElementValidationScript = function(){
  1255. var mdata = appScope.getProperties(appScope.selectedTreeElement);
  1256. if(mdata){
  1257. JQuery('#bfValidationScript').css('display','');
  1258. JQuery('#bfValidationScriptSelection').empty();
  1259. for(var i = 0; i < appScope.elementScripts.validation.length;i++){
  1260. var option = document.createElement('option');
  1261. JQuery(option).val(appScope.elementScripts.validation[i].id);
  1262. JQuery(option).text(appScope.elementScripts.validation[i].package + '::' + appScope.elementScripts.validation[i].name);
  1263. if(appScope.elementScripts.validation[i].id == mdata.validationId){
  1264. JQuery(option).get(0).setAttribute('selected', true);
  1265. }
  1266. JQuery('#bfValidationScriptSelection').append(option);
  1267. }
  1268. JQuery('#bfValidationMessage').val(mdata.validationMessage);
  1269. JQuery('#bfValidationCode').val(mdata.validationCode);
  1270. switch(mdata.validationCondition){
  1271. case 1:
  1272. JQuery('.bfValidationType').attr('checked','');
  1273. JQuery('#bfValidationTypeLibrary').attr('checked',true);
  1274. JQuery('#bfValidationScriptLibrary').css('display','');
  1275. JQuery('#bfValidationScriptCustom').css('display','none');
  1276. JQuery('#bfValidationScriptFlags').css('display','');
  1277. JQuery('#bfValidationScriptLibrary').css('display','');
  1278. JQuery('#bfValidationScriptCustom').css('display','none');
  1279. appScope.setValidationScriptDescription();
  1280. break;
  1281. case 2:
  1282. JQuery('.bfValidationType').attr('checked','');
  1283. JQuery('#bfValidationTypeCustom').attr('checked',true);
  1284. JQuery('#bfValidationScriptFlags').css('display','');
  1285. JQuery('#bfValidationScriptLibrary').css('display','none');
  1286. JQuery('#bfValidationScriptCustom').css('display','');
  1287. break;
  1288. default:
  1289. JQuery('.bfValidationType').attr('checked','');
  1290. JQuery('#bfValidationTypeNone').attr('checked',true);
  1291. JQuery('#bfValidationScriptFlags').css('display','none');
  1292. JQuery('#bfValidationScriptLibrary').css('display','none');
  1293. JQuery('#bfValidationScriptCustom').css('display','none');
  1294. }
  1295. }
  1296. };
  1297. this.populateElementInitScript = function(){
  1298. var mdata = appScope.getProperties(appScope.selectedTreeElement);
  1299. if(mdata){
  1300. JQuery('#bfInitScript').css('display','');
  1301. JQuery('#bfInitScriptSelection').empty();
  1302. for(var i = 0; i < appScope.elementScripts.init.length;i++){
  1303. var option = document.createElement('option');
  1304. JQuery(option).val(appScope.elementScripts.init[i].id);
  1305. JQuery(option).text(appScope.elementScripts.init[i].package + '::' + appScope.elementScripts.init[i].name);
  1306. if(appScope.elementScripts.init[i].id == mdata.initId){
  1307. JQuery(option).get(0).setAttribute('selected', true);
  1308. }
  1309. JQuery('#bfInitScriptSelection').append(option);
  1310. }
  1311. if(mdata.initFormEntry == 1){
  1312. JQuery('#bfInitFormEntry').get(0).checked = true;
  1313. } else {
  1314. JQuery('#bfInitFormEntry').get(0).checked = false;
  1315. }
  1316. if(mdata.initPageEntry == 1){
  1317. JQuery('#bfInitPageEntry').get(0).checked = true;
  1318. } else {
  1319. JQuery('#bfInitPageEntry').get(0).checked = false;
  1320. }
  1321. JQuery('#bfInitCode').val(mdata.initCode);
  1322. switch(mdata.initCondition){
  1323. case 1:
  1324. JQuery('.bfInitType').attr('checked','');
  1325. JQuery('#bfInitTypeLibrary').attr('checked',true);
  1326. JQuery('#bfInitScriptLibrary').css('display','');
  1327. JQuery('#bfInitScriptCustom').css('display','none');
  1328. JQuery('#bfInitScriptFlags').css('display','');
  1329. JQuery('#bfInitScriptLibrary').css('display','');
  1330. JQuery('#bfInitScriptCustom').css('display','none');
  1331. appScope.setInitScriptDescription();
  1332. break;
  1333. case 2:
  1334. JQuery('.bfInitType').attr('checked','');
  1335. JQuery('#bfInitTypeCustom').attr('checked',true);
  1336. JQuery('#bfInitScriptFlags').css('display','');
  1337. JQuery('#bfInitScriptLibrary').css('display','none');
  1338. JQuery('#bfInitScriptCustom').css('display','');
  1339. break;
  1340. default:
  1341. JQuery('.bfInitType').attr('checked','');
  1342. JQuery('#bfInitTypeNone').attr('checked',true);
  1343. JQuery('#bfInitScriptFlags').css('display','none');
  1344. JQuery('#bfInitScriptLibrary').css('display','none');
  1345. JQuery('#bfInitScriptCustom').css('display','none');
  1346. }
  1347. }
  1348. };
  1349. this.populateElementActionScript = function(){
  1350. var mdata = appScope.getProperties(appScope.selectedTreeElement);
  1351. if(mdata){
  1352. JQuery('#bfActionScript').css('display','');
  1353. if(mdata.bfType == 'bfSofortueberweisung' || mdata.bfType == 'bfPayPal' || mdata.bfType == 'bfIcon' || mdata.bfType == 'bfImageButton' || mdata.bfType == 'bfSubmitButton'){
  1354. JQuery('.bfAction').css('display','none');
  1355. JQuery('.bfActionLabel').css('display','none');
  1356. JQuery('#bfActionClick').css('display','');
  1357. JQuery('#bfActionClickLabel').css('display','');
  1358. } else {
  1359. JQuery('.bfAction').css('display','');
  1360. JQuery('.bfActionLabel').css('display','');
  1361. }
  1362. JQuery('#bfActionsScriptSelection').empty();
  1363. for(var i = 0; i < appScope.elementScripts.action.length;i++){
  1364. var option = document.createElement('option');
  1365. JQuery(option).val(appScope.elementScripts.action[i].id);
  1366. JQuery(option).text(appScope.elementScripts.action[i].package + '::' + appScope.elementScripts.action[i].name);
  1367. if(appScope.elementScripts.action[i].id == mdata.actionId){
  1368. JQuery(option).get(0).setAttribute('selected', true);
  1369. }
  1370. JQuery('#bfActionsScriptSelection').append(option);
  1371. }
  1372. if(mdata.actionClick == 1){
  1373. JQuery('#bfActionClick').get(0).checked = true;
  1374. } else {
  1375. JQuery('#bfActionClick').get(0).checked = false;
  1376. }
  1377. if(mdata.actionBlur == 1){
  1378. JQuery('#bfActionBlur').get(0).checked = true;
  1379. } else {
  1380. JQuery('#bfActionBlur').get(0).checked = false;
  1381. }
  1382. if(mdata.actionChange == 1){
  1383. JQuery('#bfActionChange').get(0).checked = true;
  1384. } else {
  1385. JQuery('#bfActionChange').get(0).checked = false;
  1386. }
  1387. if(mdata.actionFocus == 1){
  1388. JQuery('#bfActionFocus').get(0).checked = true;
  1389. } else {
  1390. JQuery('#bfActionFocus').get(0).checked = false;
  1391. }
  1392. if(mdata.actionSelect == 1){
  1393. JQuery('#bfActionSelect').get(0).checked = true;
  1394. } else {
  1395. JQuery('#bfActionSelect').get(0).checked = false;
  1396. }
  1397. JQuery('#bfActionCode').val(mdata.actionCode);
  1398. switch(mdata.actionCondition){
  1399. case 1:
  1400. JQuery('.bfActionType').attr('checked','');
  1401. JQuery('#bfActionTypeLibrary').attr('checked',true);
  1402. JQuery('#bfActionScriptLibrary').css('display','');
  1403. JQuery('#bfActionScriptCustom').css('display','none');
  1404. JQuery('#bfActionScriptFlags').css('display','');
  1405. JQuery('#bfActionScriptLibrary').css('display','');
  1406. JQuery('#bfActionScriptCustom').css('display','none');
  1407. appScope.setActionScriptDescription();
  1408. break;
  1409. case 2:
  1410. JQuery('.bfActionType').attr('checked','');
  1411. JQuery('#bfActionTypeCustom').attr('checked',true);
  1412. JQuery('#bfActionScriptFlags').css('display','');
  1413. JQuery('#bfActionScriptLibrary').css('display','none');
  1414. JQuery('#bfActionScriptCustom').css('display','');
  1415. break;
  1416. default:
  1417. JQuery('.bfActionType').attr('checked','');
  1418. JQuery('#bfActionTypeNone').attr('checked',true);
  1419. JQuery('#bfActionScriptFlags').css('display','none');
  1420. JQuery('#bfActionScriptLibrary').css('display','none');
  1421. JQuery('#bfActionScriptCustom').css('display','none');
  1422. }
  1423. }
  1424. };
  1425. this.createTreeItem = function(obj){
  1426. if(appScope.selectedTreeElement){
  1427. switch(appScope.getNodeClass(appScope.selectedTreeElement)){
  1428. case 'bfQuickModePageClass':
  1429. case 'bfQuickModeSectionClass':
  1430. if(obj.attributes['class'] != 'bfQuickModePageClass'){
  1431. var item = appScope.findDataObjectItem(JQuery(appScope.selectedTreeElement).attr('id'), appScope.dataObject);
  1432. if(item){
  1433. if(item.children){
  1434. item.children[item.children.length] = obj;
  1435. } else {
  1436. alert("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_NO_CHILDREN_ERROR')); ?>");
  1437. }
  1438. }
  1439. } else {
  1440. alert("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_NEW_SECTION_ERROR')); ?>");
  1441. }
  1442. break;
  1443. case 'bfQuickModeRootClass':
  1444. if(obj.attributes['class'] == 'bfQuickModePageClass' && appScope.dataObject && appScope.dataObject.children){
  1445. appScope.dataObject.children[appScope.dataObject.children.length] = obj;
  1446. } else {
  1447. alert("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_NEW_SECTION_ERROR')); ?>");
  1448. }
  1449. break;
  1450. default: alert("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_NEW_SECTION_ERROR')); ?>");
  1451. }
  1452. JQuery.tree_reference('bfElementExplorer').refresh();
  1453. }
  1454. };
  1455. /**
  1456. Section properties
  1457. */
  1458. this.saveSectionProperties = function(){
  1459. var mdata = appScope.getProperties(appScope.selectedTreeElement);
  1460. if(mdata){
  1461. var item = appScope.findDataObjectItem(JQuery(appScope.selectedTreeElement).attr('id'), appScope.dataObject);
  1462. if(item){
  1463. mdata.bfType = JQuery('#bfSectionType').val();
  1464. mdata.displayType = JQuery('#bfSectionDisplayType').val();
  1465. mdata.title = JQuery('#bfSectionTitle').val();
  1466. mdata.name = JQuery('#bfSectionName').val();
  1467. mdata.off = JQuery('#bfSectionAdvancedTurnOff').attr('checked');
  1468. item.properties = mdata;
  1469. item.data.title = JQuery('#bfSectionTitle').val();
  1470. }
  1471. }
  1472. };
  1473. this.populateSectionProperties = function(){
  1474. if(appScope.selectedTreeElement){
  1475. var mdata = appScope.getProperties(appScope.selectedTreeElement);
  1476. // compat 723
  1477. if(typeof mdata.off == "undefined"){
  1478. mdata['off'] = false;
  1479. }
  1480. // compat 723 end
  1481. if(mdata){
  1482. var item = appScope.findDataObjectItem(JQuery(appScope.selectedTreeElement).attr('id'), appScope.dataObject);
  1483. if(item){
  1484. item.data.title = mdata.title;
  1485. JQuery('#bfSectionType').val( mdata.bfType );
  1486. JQuery('#bfSectionDisplayType').val( mdata.displayType );
  1487. JQuery('#bfSectionTitle').val( mdata.title );
  1488. // compat 723
  1489. JQuery('#bfSectionName').val( typeof mdata.name == "undefined" ? '' : mdata.name );
  1490. // compat 723 end
  1491. JQuery('#bfSectionAdvancedTurnOff').attr( 'checked', mdata.off );
  1492. }
  1493. }
  1494. }
  1495. };
  1496. /**
  1497. Form properties
  1498. */
  1499. this.saveFormProperties = function(){
  1500. var mdata = appScope.getProperties(appScope.selectedTreeElement);
  1501. if(mdata){
  1502. var item = appScope.findDataObjectItem(JQuery(appScope.selectedTreeElement).attr('id'), appScope.dataObject);
  1503. if(item){
  1504. mdata.title = JQuery('#bfFormTitle').val();
  1505. mdata.name = JQuery('#bfFormName').val();
  1506. mdata.description = JQuery('#bfFormDescription').val();
  1507. mdata.mailRecipient = JQuery('#bfFormMailRecipient').val();
  1508. mdata.mailNotification = JQuery('#bfFormMailNotification').attr('checked');
  1509. mdata.submitInclude = JQuery('#bfSubmitIncludeYes').attr('checked');
  1510. mdata.submitLabel = JQuery('#bfFormSubmitLabel').val();
  1511. mdata.cancelInclude = JQuery('#bfCancelIncludeYes').attr('checked');
  1512. mdata.cancelLabel = JQuery('#bfFormCancelLabel').val();
  1513. mdata.pagingInclude = JQuery('#bfPagingIncludeYes').attr('checked');
  1514. mdata.pagingNextLabel = JQuery('#bfFormPagingNextLabel').val();
  1515. mdata.pagingPrevLabel = JQuery('#bfFormPagingPrevLabel').val();
  1516. mdata.theme = JQuery('#bfTheme').val();
  1517. mdata.fadeIn = JQuery('#bfElementAdvancedFadeIn').attr('checked');
  1518. mdata.useErrorAlerts = JQuery('#bfElementAdvancedUseErrorAlerts').attr('checked');
  1519. mdata.disableJQuery = JQuery('#bfElementAdvancedDisableJQuery').attr('checked');
  1520. mdata.joomlaHint = JQuery('#bfElementAdvancedJoomlaHint').attr('checked');
  1521. mdata.mobileEnabled = JQuery('#bfElementAdvancedMobileEnabled').attr('checked');
  1522. mdata.forceMobile = JQuery('#bfElementAdvancedForceMobile').attr('checked');
  1523. mdata.forceMobileUrl = JQuery('#bfElementAdvancedForceMobileUrl').val();
  1524. mdata.useDefaultErrors = JQuery('#bfElementAdvancedUseDefaultErrors').attr('checked');
  1525. mdata.useBalloonErrors = JQuery('#bfElementAdvancedUseBalloonErrors').attr('checked');
  1526. mdata.lastPageThankYou = JQuery('#bfFormLastPageThankYou').attr('checked');
  1527. mdata.rollover = JQuery('#bfElementAdvancedRollover').attr('checked');
  1528. mdata.rolloverColor = JQuery('#bfElementAdvancedRolloverColor').val();
  1529. mdata.toggleFields = JQuery('#bfElementAdvancedToggleFields').val();
  1530. var pagesSize = JQuery('#bfQuickModeRoot').children("ul").children("li").size();
  1531. if(mdata.lastPageThankYou && pagesSize > 1){
  1532. mdata.submittedScriptCondidtion = 2;
  1533. mdata.submittedScriptCode = 'function ff_'+mdata.name+'_submitted(status, message){if(status==0){ff_switchpage('+pagesSize+');}else{alert(message);}}';
  1534. } else {
  1535. mdata.submittedScriptCondidtion = -1;
  1536. }
  1537. item.properties = mdata;
  1538. }
  1539. }
  1540. };
  1541. this.populateFormProperties = function(){
  1542. if(appScope.selectedTreeElement){
  1543. var mdata = appScope.getProperties(appScope.selectedTreeElement);
  1544. if(mdata){
  1545. // setting the node's data
  1546. var item = appScope.findDataObjectItem(JQuery(appScope.selectedTreeElement).attr('id'), appScope.dataObject);
  1547. if(item){
  1548. item.data.title = mdata.title;
  1549. JQuery('#bfElementAdvancedFadeIn').attr('checked', mdata.fadeIn);
  1550. JQuery('#bfFormLastPageThankYou').attr('checked', mdata.lastPageThankYou);
  1551. JQuery('#bfElementAdvancedUseErrorAlerts').attr('checked', mdata.useErrorAlerts);
  1552. JQuery('#bfElementAdvancedDisableJQuery').attr('checked', mdata.disableJQuery);
  1553. JQuery('#bfElementAdvancedJoomlaHint').attr('checked', mdata.joomlaHint);
  1554. JQuery('#bfElementAdvancedMobileEnabled').attr('checked', mdata.mobileEnabled);
  1555. JQuery('#bfElementAdvancedForceMobile').attr('checked', mdata.forceMobile);
  1556. JQuery('#bfElementAdvancedForceMobileUrl').val(mdata.forceMobileUrl);
  1557. JQuery('#bfElementAdvancedUseDefaultErrors').attr('checked', mdata.useDefaultErrors);
  1558. JQuery('#bfElementAdvancedUseBalloonErrors').attr('checked', mdata.useBalloonErrors);
  1559. if(mdata.submitInclude){
  1560. JQuery('#bfSubmitIncludeYes').attr('checked', true);
  1561. JQuery('#bfSubmitIncludeNo').attr('checked', false);
  1562. }else{
  1563. JQuery('#bfSubmitIncludeYes').attr('checked', false);
  1564. JQuery('#bfSubmitIncludeNo').attr('checked', true);
  1565. }
  1566. JQuery('#bfFormSubmitLabel').val( mdata.submitLabel );
  1567. if(mdata.cancelInclude){
  1568. JQuery('#bfCancelIncludeYes').attr('checked', true);
  1569. JQuery('#bfCancelIncludeNo').attr('checked', false);
  1570. }else{
  1571. JQuery('#bfCancelIncludeYes').attr('checked', false);
  1572. JQuery('#bfCancelIncludeNo').attr('checked', true);
  1573. }
  1574. JQuery('#bfFormCancelLabel').val( mdata.cancelLabel );
  1575. if(mdata.pagingInclude){
  1576. JQuery('#bfPagingIncludeYes').attr('checked', true);
  1577. JQuery('#bfPagingIncludeNo').attr('checked', false);
  1578. }else{
  1579. JQuery('#bfPagingIncludeYes').attr('checked', false);
  1580. JQuery('#bfPagingIncludeNo').attr('checked', true);
  1581. }
  1582. JQuery('#bfFormPagingNextLabel').val( mdata.pagingNextLabel );
  1583. JQuery('#bfFormPagingPrevLabel').val( mdata.pagingPrevLabel );
  1584. JQuery('#bfTheme').val( mdata.theme );
  1585. JQuery('#bfElementAdvancedRollover').attr('checked', mdata.rollover);
  1586. JQuery('#bfElementAdvancedRolloverColor').val(mdata.rolloverColor);
  1587. JQuery('#bfElementAdvancedToggleFields').val(mdata.toggleFields);
  1588. }
  1589. }
  1590. }
  1591. };
  1592. /**
  1593. Page Properties
  1594. */
  1595. this.savePageProperties = function(){
  1596. var mdata = appScope.getProperties(appScope.selectedTreeElement);
  1597. if(mdata){
  1598. var item = appScope.findDataObjectItem(JQuery(appScope.selectedTreeElement).attr('id'), appScope.dataObject);
  1599. if(item){
  1600. item.properties = mdata;
  1601. }
  1602. }
  1603. };
  1604. this.populatePageProperties = function(){
  1605. if(appScope.selectedTreeElement){
  1606. var mdata = appScope.getProperties(appScope.selectedTreeElement);
  1607. if(mdata){
  1608. // setting the node's data
  1609. var item = appScope.findDataObjectItem(JQuery(appScope.selectedTreeElement).attr('id'), appScope.dataObject);
  1610. if(item){
  1611. // no properties yet to set
  1612. }
  1613. }
  1614. }
  1615. };
  1616. /**
  1617. Main application
  1618. */
  1619. this.toggleProperties = function (property){
  1620. JQuery('.bfProperties').css('display', 'none');
  1621. JQuery('#'+property).css('display', '');
  1622. };
  1623. this.toggleAdvanced = function (property){
  1624. JQuery('.bfAdvanced').css('display', 'none');
  1625. JQuery('#'+property).css('display', '');
  1626. };
  1627. JQuery('#bfElementExplorer').tree(
  1628. {
  1629. ui : {
  1630. theme_name : "apple",
  1631. context: [
  1632. {
  1633. id : 'copy',
  1634. label : 'Copy',
  1635. visible : function (NODE, TREE_OBJ) {
  1636. var source = appScope.findDataObjectItem( JQuery(NODE).attr('id'), appScope.dataObject );
  1637. if(source.attributes['class'] == 'bfQuickModeSectionClass' || source.attributes['class'] == 'bfQuickModeElementClass'){
  1638. return true;
  1639. }
  1640. return false;
  1641. },
  1642. action : function (NODE, TREE_OBJ) {
  1643. var source = appScope.findDataObjectItem( JQuery(NODE).attr('id'), appScope.dataObject );
  1644. if(source.attributes['class'] == 'bfQuickModeSectionClass' || source.attributes['class'] == 'bfQuickModeElementClass'){
  1645. if(source && source.attributes && source.attributes.id){
  1646. appScope.copyTreeElement = source;
  1647. }
  1648. }
  1649. }
  1650. },
  1651. {
  1652. id : 'paste',
  1653. label : 'Paste',
  1654. visible : function (NODE, TREE_OBJ) {
  1655. if(appScope.copyTreeElement){
  1656. var target = appScope.findDataObjectItem( JQuery(NODE).attr('id'), appScope.dataObject );
  1657. if(target.attributes['class'] == 'bfQuickModeSectionClass' || target.attributes['class'] == 'bfQuickModePageClass'){
  1658. return true;
  1659. }
  1660. return false;
  1661. }
  1662. return false;
  1663. },
  1664. action : function (NODE, TREE_OBJ) {
  1665. if(appScope.copyTreeElement){
  1666. var target = appScope.findDataObjectItem( JQuery(NODE).attr('id'), appScope.dataObject );
  1667. if(target.attributes['class'] == 'bfQuickModeSectionClass' || target.attributes['class'] == 'bfQuickModePageClass'){
  1668. appScope.insertElementInto(clone_obj(appScope.copyTreeElement), target);
  1669. setTimeout("JQuery.tree_reference('bfElementExplorer').refresh()", 10); // give it time to close the context menu
  1670. }
  1671. }
  1672. }
  1673. },
  1674. {
  1675. id : "delete",
  1676. label : "Delete",
  1677. icon : "remove.png",
  1678. visible : function (NODE, TREE_OBJ) { var ok = true; JQuery.each(NODE, function () { if(TREE_OBJ.check("deletable", this) == false) ok = false; return false; }); return ok; },
  1679. action : function (NODE, TREE_OBJ) { JQuery.each(NODE, function () { TREE_OBJ.remove(this); }); }
  1680. }
  1681. ]
  1682. },
  1683. selected : 'bfQuickModeRoot',
  1684. callback: {
  1685. onselect : function(node,obj) {
  1686. appScope.selectedTreeElement = node;
  1687. JQuery('#bfPropertySaveButton').css('display','');
  1688. JQuery('#bfPropertySaveButtonTop').css('display','');
  1689. JQuery('#bfAdvancedSaveButton').css('display','');
  1690. JQuery('#bfAdvancedSaveButtonTop').css('display','');
  1691. switch( appScope.getNodeClass(node) ) {
  1692. case 'bfQuickModeRootClass':
  1693. appScope.toggleProperties('bfFormProperties');
  1694. appScope.toggleAdvanced('bfFormAdvanced');
  1695. appScope.populateFormProperties();
  1696. break;
  1697. case 'bfQuickModeSectionClass':
  1698. appScope.toggleProperties('bfSectionProperties');
  1699. appScope.toggleAdvanced('bfSectionAdvanced');
  1700. appScope.populateSectionProperties();
  1701. //JQuery('#bfAdvancedSaveButton').css('display','none');
  1702. //JQuery('#bfAdvancedSaveButtonTop').css('display','none');
  1703. break;
  1704. case 'bfQuickModeElementClass':
  1705. appScope.toggleProperties('bfElementProperties');
  1706. appScope.toggleAdvanced('bfElementAdvanced');
  1707. appScope.populateSelectedElementProperties();
  1708. break;
  1709. case 'bfQuickModePageClass':
  1710. appScope.toggleProperties('bfPageProperties');
  1711. appScope.toggleAdvanced('bfPageAdvanced');
  1712. appScope.populatePageProperties();
  1713. JQuery('#bfAdvancedSaveButton').css('display','none');
  1714. JQuery('#bfAdvancedSaveButtonTop').css('display','none');
  1715. break;
  1716. }
  1717. },
  1718. onload : function(obj) {
  1719. },
  1720. onopen : function(NODE, TREE_OBJ) {
  1721. var source = appScope.findDataObjectItem( JQuery(NODE).attr('id'), appScope.dataObject );
  1722. source.state = 'open';
  1723. },
  1724. onclose : function(NODE, TREE_OBJ) {
  1725. var source = appScope.findDataObjectItem( JQuery(NODE).attr('id'), appScope.dataObject );
  1726. source.state = 'close';
  1727. },
  1728. ondelete : function(NODE, TREE_OBJ,RB) {
  1729. appScope.selectedTreeElement = null;
  1730. appScope.deleteDataObjectItem( JQuery(NODE).attr('id'), appScope.dataObject );
  1731. var target = appScope.findDataObjectItem( JQuery('#bfQuickModeRoot').attr('id'), appScope.dataObject );
  1732. if(target && !target.children){
  1733. target.children = new Array();
  1734. }
  1735. // restoring page numbers
  1736. if(target && target.children){
  1737. if(target.attributes['class'] == 'bfQuickModeRootClass'){
  1738. for(var i = 0; i < target.children.length; i++){
  1739. if(target.children[i].attributes['class'] == 'bfQuickModePageClass'){
  1740. var mdata = appScope.getProperties(JQuery('#'+target.children[i].attributes.id));
  1741. if(mdata){
  1742. target.children[i].attributes.id = 'bfQuickModePage' + (i+1);
  1743. target.children[i].data.title = "<?php echo addslashes( BFText::_('COM_BREEZINGFORMS_PAGE') ) ?> " + (i+1);
  1744. target.children[i].properties.pageNumber = i + 1;
  1745. }
  1746. }
  1747. }
  1748. // taking care of last page as thank you page
  1749. var pagesSize = target.children.length;
  1750. if(target.properties.lastPageThankYou && pagesSize > 1){
  1751. target.properties.submittedScriptCondidtion = 2;
  1752. target.properties.submittedScriptCode = 'function ff_'+target.properties.name+'_submitted(status, message){if(status==0){ff_switchpage('+pagesSize+');}else{alert(message);}}';
  1753. } else {
  1754. target.properties.submittedScriptCondidtion = -1;
  1755. }
  1756. }
  1757. }
  1758. setTimeout("JQuery.tree_reference('bfElementExplorer').refresh()", 10); // give it time to close the context menu
  1759. },
  1760. onmove : function(NODE,REF_NODE,TYPE,TREE_OBJ,RB){
  1761. var parent = JQuery.tree_reference('bfElementExplorer').parent(NODE);
  1762. if(!parent){
  1763. parent = '#bfQuickModeRoot';
  1764. }
  1765. children = parent.children("ul").children("li");
  1766. if( children && children.length && children.length > 0 ){
  1767. for(var i = 0; i < children.length; i++){
  1768. if(JQuery(NODE).attr('id') == children[i].id){
  1769. appScope.moveDataObjectItem( JQuery(NODE).attr('id'), JQuery(parent).attr('id'), i, appScope.dataObject );
  1770. break;
  1771. }
  1772. }
  1773. }
  1774. JQuery.tree_reference('bfElementExplorer').refresh();
  1775. }
  1776. },
  1777. rules : {
  1778. metadata : 'mdata',
  1779. use_inline : true,
  1780. deletable : 'none',
  1781. creatable : 'none',
  1782. renameable : 'none',
  1783. draggable : ['section', 'element', 'page'],
  1784. dragrules : [
  1785. 'element inside section',
  1786. 'section inside section',
  1787. 'element inside page',
  1788. 'section inside page',
  1789. 'element after element',
  1790. 'element before element',
  1791. 'element after section',
  1792. 'element before section',
  1793. 'section after element',
  1794. 'section before element',
  1795. 'section after section',
  1796. 'section before section',
  1797. 'page before page',
  1798. 'page after page'
  1799. ]
  1800. },
  1801. data : {
  1802. type : "json",
  1803. json : [appScope.dataObject]
  1804. }
  1805. }
  1806. );
  1807. this.saveButton = function(){
  1808. if(appScope.selectedTreeElement){
  1809. var error = false;
  1810. switch( appScope.getNodeClass(appScope.selectedTreeElement) ) {
  1811. case 'bfQuickModeRootClass':
  1812. if(JQuery.trim(JQuery('#bfFormTitle').val()) == ''){
  1813. alert("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_ERROR_ENTER_TITLE')) ?>");
  1814. error = true;
  1815. }
  1816. if(JQuery.trim(JQuery('#bfFormName').val()) == ''){
  1817. alert("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_ERROR_ENTER_NAME')) ?>");
  1818. error = true;
  1819. }
  1820. var myRegxp = /^([a-zA-Z0-9_]+)$/;
  1821. if(!myRegxp.test(JQuery('#bfFormName').val())){
  1822. alert("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_ERROR_ENTER_NAME_CHARACTERS')) ?>");
  1823. error = true;
  1824. }
  1825. if(!error) {
  1826. appScope.saveFormProperties();
  1827. }
  1828. break;
  1829. case 'bfQuickModeSectionClass':
  1830. if(JQuery.trim(JQuery('#bfSectionName').val()) == ''){
  1831. alert("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_ERROR_ENTER_NAME')) ?>");
  1832. error = true;
  1833. }
  1834. if(!error) {
  1835. appScope.saveSectionProperties();
  1836. }
  1837. break;
  1838. case 'bfQuickModeElementClass':
  1839. if(JQuery.trim(JQuery('#bfElementLabel').val()) == ''){
  1840. alert("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_ERROR_ENTER_LABEL')) ?>");
  1841. error = true;
  1842. }
  1843. if(JQuery.trim(JQuery('#bfElementName').val()) == ''){
  1844. alert("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_ERROR_ENTER_NAME')) ?>");
  1845. error = true;
  1846. }
  1847. var myRegxp = /^([a-zA-Z0-9_]+)$/;
  1848. if(!myRegxp.test(JQuery('#bfElementName').val())){
  1849. alert("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_ERROR_ENTER_NAME_CHARACTERS')) ?>");
  1850. error = true;
  1851. }
  1852. if(!error) {
  1853. appScope.saveSelectedElementProperties();
  1854. }
  1855. case 'bfQuickModePageClass':
  1856. appScope.savePageProperties();
  1857. break;
  1858. }
  1859. if(!error){
  1860. // TODO: remove the 2nd refresh if found out why this works only on the 2nd
  1861. JQuery.tree_reference('bfElementExplorer').refresh();
  1862. JQuery.tree_reference('bfElementExplorer').refresh();
  1863. JQuery(".bfFadingMessage").html("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_SETTINGS_UPDATED')) ?>");
  1864. JQuery(".bfFadingMessage").fadeIn(1000);
  1865. setTimeout('JQuery(".bfFadingMessage").fadeOut(1000);',1500);
  1866. }
  1867. }
  1868. };
  1869. JQuery('#bfPropertySaveButton').click(
  1870. appScope.saveButton
  1871. );
  1872. JQuery('#bfPropertySaveButtonTop').click(
  1873. appScope.saveButton
  1874. );
  1875. JQuery('#bfAdvancedSaveButton').click(
  1876. appScope.saveButton
  1877. );
  1878. JQuery('#bfAdvancedSaveButtonTop').click(
  1879. appScope.saveButton
  1880. );
  1881. JQuery('#bfNewSectionButton').click(
  1882. function(){
  1883. var id = "bfQuickModeSection" + ( Math.floor(Math.random() * 100000) );
  1884. var obj = {
  1885. attributes : {
  1886. "class" : 'bfQuickModeSectionClass',
  1887. id : id,
  1888. mdata : JQuery.toJSON( { deletable : true, type: 'section' } )
  1889. },
  1890. properties :
  1891. { bfType : 'normal', type: 'section', displayType: 'breaks', title: "untitled section", name: id, description: '', off : false }
  1892. ,
  1893. state: "open",
  1894. data: { title: "untitled section", icon : '<?php echo $iconBase . 'icon_section.png'?>'},
  1895. children : []
  1896. };
  1897. appScope.createTreeItem(obj);
  1898. JQuery.tree_reference('bfElementExplorer').select_branch(JQuery('#'+id));
  1899. }
  1900. );
  1901. JQuery('#bfElementType').change(
  1902. function(){
  1903. var obj = null;
  1904. var id = "bfQuickMode" + ( Math.floor(Math.random() * 10000000) );
  1905. var selected = JQuery('#bfElementType').val();
  1906. switch(selected){
  1907. case 'bfElementTypeText': obj = appScope.createTextfield(id); break;
  1908. case 'bfElementTypeRadioGroup': obj = appScope.createRadioGroup(id); break;
  1909. case 'bfElementTypeCheckboxGroup': obj = appScope.createCheckboxGroup(id); break;
  1910. case 'bfElementTypeCheckbox': obj = appScope.createCheckbox(id); break;
  1911. case 'bfElementTypeSelect': obj = appScope.createSelect(id); break;
  1912. case 'bfElementTypeTextarea': obj = appScope.createTextarea(id); break;
  1913. case 'bfElementTypeFile': obj = appScope.createFile(id); break;
  1914. case 'bfElementTypeSubmitButton': obj = appScope.createSubmitButton(id); break;
  1915. case 'bfElementTypeHidden': obj = appScope.createHidden(id); break;
  1916. case 'bfElementTypeSummarize': obj = appScope.createSummarize(id); break;
  1917. case 'bfElementTypeCaptcha': obj = appScope.createCaptcha(id); break;
  1918. case 'bfElementTypeReCaptcha': obj = appScope.createReCaptcha(id); break;
  1919. case 'bfElementTypeCalendar': obj = appScope.createCalendar(id); break;
  1920. case 'bfElementTypePayPal': obj = appScope.createPayPal(id); break;
  1921. case 'bfElementTypeSofortueberweisung': obj = appScope.createSofortueberweisung(id); break;
  1922. }
  1923. if(obj){
  1924. appScope.replaceDataObjectItem(JQuery(appScope.selectedTreeElement).attr('id'), obj, appScope.dataObject);
  1925. JQuery.tree_reference('bfElementExplorer').refresh();
  1926. JQuery.tree_reference('bfElementExplorer').select_branch(JQuery('#'+id));
  1927. }
  1928. }
  1929. );
  1930. this.setActionScriptDescription = function(){
  1931. for(var i = 0; i < appScope.elementScripts.action.length;i++){
  1932. if(JQuery('#bfActionsScriptSelection').val() == appScope.elementScripts.action[i].id){
  1933. JQuery('#bfActionsScriptSelectionDescription').text(appScope.elementScripts.action[i].description);
  1934. }
  1935. }
  1936. };
  1937. JQuery('#bfActionsScriptSelection').change(
  1938. function(){
  1939. appScope.setActionScriptDescription();
  1940. }
  1941. );
  1942. this.setInitScriptDescription = function(){
  1943. for(var i = 0; i < appScope.elementScripts.init.length;i++){
  1944. if(JQuery('#bfInitScriptSelection').val() == appScope.elementScripts.init[i].id){
  1945. JQuery('#bfInitSelectionDescription').text(appScope.elementScripts.init[i].description);
  1946. }
  1947. }
  1948. };
  1949. JQuery('#bfInitScriptSelection').change(
  1950. function(){
  1951. appScope.setInitScriptDescription();
  1952. }
  1953. );
  1954. this.setValidationScriptDescription = function(){
  1955. for(var i = 0; i < appScope.elementScripts.validation.length;i++){
  1956. if(JQuery('#bfValidationScriptSelection').val() == appScope.elementScripts.validation[i].id){
  1957. JQuery('#bfValidationScriptSelectionDescription').text(appScope.elementScripts.validation[i].description);
  1958. }
  1959. }
  1960. };
  1961. JQuery('#bfValidationScriptSelection').change(
  1962. function(){
  1963. appScope.setValidationScriptDescription();
  1964. }
  1965. );
  1966. JQuery('#bfNewElementButton').click(
  1967. function(){
  1968. var id = "bfQuickMode" + ( Math.floor(Math.random() * 10000000) );
  1969. var obj = appScope.createTextfield(id);
  1970. appScope.createTreeItem(obj);
  1971. JQuery.tree_reference('bfElementExplorer').select_branch(JQuery('#'+id));
  1972. }
  1973. );
  1974. JQuery('#bfNewPageButton').click(
  1975. function(){
  1976. var pageNumber = JQuery('#bfQuickModeRoot').children("ul").children("li").size() == 0 ? 1 : JQuery('#bfQuickModeRoot').children("ul").children("li").size() + 1;
  1977. var id = "bfQuickModePage" + pageNumber;
  1978. // taking care of thank you page if a new page is added
  1979. var item = appScope.findDataObjectItem('bfQuickModeRoot', appScope.dataObject);
  1980. var pagesSize = JQuery('#bfQuickModeRoot').children("ul").children("li").size();
  1981. if(item.properties.lastPageThankYou && pagesSize > 0){
  1982. item.properties.submittedScriptCondidtion = 2;
  1983. item.properties.submittedScriptCode = 'function ff_'+item.properties.name+'_submitted(status, message){if(status==0){ff_switchpage('+(pagesSize+1)+');}else{alert(message);}}';
  1984. } else {
  1985. item.properties.submittedScriptCondidtion = -1;
  1986. }
  1987. var obj = {
  1988. attributes : {
  1989. "class" : 'bfQuickModePageClass',
  1990. id : id,
  1991. mdata : JQuery.toJSON( { deletable : true, type : 'page' } )
  1992. },
  1993. properties: { type : 'page', pageNumber : pageNumber, pageIntro : '' },
  1994. state: "open",
  1995. data: { title: "<?php echo addslashes( BFText::_('COM_BREEZINGFORMS_PAGE') ) ?> " + pageNumber, icon: '<?php echo $iconBase . 'icon_page.png'?>'},
  1996. children : []
  1997. };
  1998. appScope.createTreeItem(obj);
  1999. JQuery.tree_reference('bfElementExplorer').select_branch(JQuery('#'+id));
  2000. }
  2001. );
  2002. JQuery('#menutab').tabs( { select: function(e, ui){ } } );
  2003. }
  2004. JQuery(document).ready(function() {
  2005. app = new BF_QuickModeApp();
  2006. var mdata = app.getProperties(app.selectedTreeElement);
  2007. if(mdata){
  2008. var item = app.findDataObjectItem('bfQuickModeRoot', app.dataObject);
  2009. if(item){
  2010. mdata.title = "<?php echo addslashes($formTitle) ?>";
  2011. mdata.name = "<?php echo addslashes($formName) ?>";
  2012. mdata.description = "<?php echo addslashes(str_replace("\n",'',str_replace("\r",'',$formDesc))) ?>";
  2013. mdata.mailRecipient = "<?php echo addslashes($formEmailadr) ?>";
  2014. mdata.mailNotification = "<?php echo addslashes($formEmailntf) == 2 ? true : false ?>";
  2015. item.properties = mdata;
  2016. }
  2017. }
  2018. });
  2019. function createInitCode()
  2020. {
  2021. var mdata = app.getProperties(app.selectedTreeElement);
  2022. if(mdata){
  2023. form = document.bfForm;
  2024. name = mdata.bfName;
  2025. if (name=='') {
  2026. alert('Please enter the element name first.');
  2027. return;
  2028. } // if
  2029. if (!confirm("<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CREAINIT'); ?>\n<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_EXISTAPP'); ?>")) return;
  2030. code =
  2031. "function ff_"+name+"_init(element, condition)\n"+
  2032. "{\n"+
  2033. " switch (condition) {\n";
  2034. if (form.bfInitFormEntry.checked)
  2035. code +=
  2036. " case 'formentry':\n"+
  2037. " break;\n";
  2038. if (form.bfInitPageEntry.checked)
  2039. code +=
  2040. " case 'pageentry':\n"+
  2041. " break;\n";
  2042. code +=
  2043. " default:;\n"+
  2044. " } // switch\n"+
  2045. "} // ff_"+name+"_init\n";
  2046. oldcode = form.bfInitCode.value;
  2047. if (oldcode != '')
  2048. form.bfInitCode.value =
  2049. code+
  2050. "\n// -------------- <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_OLDBELOW'); ?> --------------\n\n"+
  2051. oldcode;
  2052. else
  2053. form.bfInitCode.value = code;
  2054. }
  2055. } // createInitCode
  2056. function createValidationCode()
  2057. {
  2058. var mdata = app.getProperties(app.selectedTreeElement);
  2059. if(mdata){
  2060. form = document.bfForm;
  2061. name = mdata.bfName;
  2062. if (name=='') {
  2063. alert('Please enter the element name first.');
  2064. return;
  2065. } // if
  2066. if (!confirm("<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CREAVALID'); ?>\n<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_EXISTAPP'); ?>")) return;
  2067. code =
  2068. "function ff_"+name+"_validation(element, message)\n"+
  2069. "{\n"+
  2070. " if (element_fails_my_test) {\n"+
  2071. " if (message=='') message = element.name+\" faild in my test.\\n\"\n"+
  2072. " ff_validationFocus(element.name);\n"+
  2073. " return message;\n"+
  2074. " } // if\n"+
  2075. " return '';\n"+
  2076. "} // ff_"+name+"_validation\n";
  2077. oldcode = form.bfValidationCode.value;
  2078. if (oldcode != '')
  2079. form.bfValidationCode.value =
  2080. code+
  2081. "\n// -------------- <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_OLDBELOW'); ?> --------------\n\n"+
  2082. oldcode;
  2083. else
  2084. form.bfValidationCode.value = code;
  2085. }
  2086. } // createValidationCode
  2087. function createActionCode(element)
  2088. {
  2089. var mdata = app.getProperties(app.selectedTreeElement);
  2090. if(mdata){
  2091. form = document.bfForm;
  2092. name = mdata.bfName;
  2093. if (name=='') {
  2094. alert('Please enter the element name first.');
  2095. return;
  2096. } // if
  2097. if (!confirm("<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CREAACTION'); ?>\n<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_EXISTAPP'); ?>")) return;
  2098. code =
  2099. "function ff_"+name+"_action(element, action)\n"+
  2100. "{\n"+
  2101. " switch (action) {\n";
  2102. if (form.bfActionClick)
  2103. if (form.bfActionClick.checked)
  2104. code +=
  2105. " case 'click':\n"+
  2106. " break;\n";
  2107. if (form.bfActionBlur)
  2108. if (form.bfActionBlur.checked)
  2109. code +=
  2110. " case 'blur':\n"+
  2111. " break;\n";
  2112. if (form.bfActionChange)
  2113. if (form.bfActionChange.checked)
  2114. code +=
  2115. " case 'change':\n"+
  2116. " break;\n";
  2117. if (form.bfActionFocus)
  2118. if (form.bfActionFocus.checked)
  2119. code +=
  2120. " case 'focus':\n"+
  2121. " break;\n";
  2122. if (form.bfActionSelect)
  2123. if (form.bfActionSelect.checked)
  2124. code +=
  2125. " case 'select':\n"+
  2126. " break;\n";
  2127. code +=
  2128. " default:;\n"+
  2129. " } // switch\n"+
  2130. "} // ff_"+name+"_action\n";
  2131. oldcode = form.bfActionCode.value;
  2132. if (oldcode != '')
  2133. form.bfActionCode.value =
  2134. code+
  2135. "\n// -------------- <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_OLDBELOW'); ?> --------------\n\n"+
  2136. oldcode;
  2137. else
  2138. form.bfActionCode.value = code;
  2139. }
  2140. } // createActionCode
  2141. var bf_submitbutton = function (pressbutton)
  2142. {
  2143. var form = document.adminForm;
  2144. switch (pressbutton) {
  2145. case 'close':
  2146. location.href="index.php?option=com_breezingforms&act=manageforms";
  2147. break;
  2148. case 'save':
  2149. form.task.value = 'save';
  2150. form.act.value = 'quickmode';
  2151. var cVal = JQuery.base64Encode( JQuery.toJSON( app.dataObject ) );
  2152. JQuery.ajaxSetup({async:false});
  2153. var rndAdd = Math.random();
  2154. var chunks = new Array();
  2155. var chunk = '';
  2156. if(cVal.length > 10000){
  2157. var cnt = 0;
  2158. for( var i = 0; i < cVal.length; i++ ){
  2159. chunk += cVal[i];
  2160. cnt++;
  2161. if( cnt == 20000 || ( i+1 == cVal.length && cnt+1 < 20000 ) ){
  2162. chunks.push(chunk);
  2163. chunk = '';
  2164. cnt = 0;
  2165. }
  2166. }
  2167. }else{
  2168. chunks.push(cVal);
  2169. }
  2170. if(chunks.length > 1){
  2171. JQuery("#bfSaveQueue").css("display","");
  2172. JQuery("#bfSaveQueue").bfcenter(true);
  2173. JQuery("#bfSaveQueue").css("visibility","visible");
  2174. }
  2175. for(var i = 0; i < chunks.length; i++){
  2176. JQuery.post('index.php', { option: 'com_breezingforms', act: "quickmode", task: "doAjaxSave", form: document.adminForm.form.value, chunksLength: chunks.length, chunkIdx: i, chunk: chunks[i], rndAdd: rndAdd, format: 'html' }, function(data){if(data!='' && isNaN(data))alert(data);if(data!='' && data!=0 && !isNaN(data)){document.adminForm.form.value=data;document.adminForm.submit()}});
  2177. JQuery("#bfSaveQueue").get(0).innerHTML = "<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_LOAD_PACKAGE'));?> " + (i+1) + " <?php echo addslashes(BFText::_('COM_BREEZINGFORMS_LOAD_PACKAGE_OF'));?> " + (chunks.length - 1);
  2178. }
  2179. JQuery("#bfSaveQueue").css("visibility","hidden");
  2180. JQuery("#bfSaveQueue").css("display","none");
  2181. break;
  2182. case 'preview':
  2183. SqueezeBox.initialize({});
  2184. SqueezeBox.loadModal = function(modalUrl,handler,x,y) {
  2185. this.presets.size.x = 870;
  2186. this.initialize();
  2187. var options = JQuery.toJSON("{handler: \'" + handler + "\', size: {x: " + x +", y: " + y + "}}");
  2188. this.setOptions(this.presets, options);
  2189. this.assignOptions();
  2190. this.setContent(handler,modalUrl);
  2191. };
  2192. SqueezeBox.loadModal("<?php echo JURI::root()?>index.php?format=html&tmpl=component&option=com_breezingforms&ff_form=<?php echo $formId ?>&ff_page=1","iframe",820,400);
  2193. break;
  2194. case 'preview_site':
  2195. SqueezeBox.initialize({});
  2196. SqueezeBox.loadModal = function(modalUrl,handler,x,y) {
  2197. this.presets.size.x = 1024;
  2198. this.initialize();
  2199. var options = JQuery.toJSON("{handler: \'" + handler + "\', size: {x: " + x +", y: " + y + "}}");
  2200. this.setOptions(this.presets, options);
  2201. this.assignOptions();
  2202. this.setContent(handler,modalUrl);
  2203. };
  2204. SqueezeBox.loadModal("<?php echo JURI::root()?>index.php?option=com_breezingforms&ff_form=<?php echo $formId ?>&ff_page=1","iframe",820,400);
  2205. break;
  2206. }
  2207. };
  2208. if(typeof Joomla != "undefined"){
  2209. Joomla.submitbutton = bf_submitbutton;
  2210. }else{
  2211. submitbutton = bf_submitbutton;
  2212. }
  2213. function addslashes( str ) {
  2214. return (str+'').replace(/([\\"'])/g, "\\$1").replace(/\0/g, "\\0");
  2215. }
  2216. function clone_obj(obj) {
  2217. var c = obj instanceof Array ? [] : {};
  2218. for (var i in obj) {
  2219. var prop = obj[i];
  2220. if (typeof prop == 'object') {
  2221. if (prop instanceof Array) {
  2222. c[i] = [];
  2223. for (var j = 0; j < prop.length; j++) {
  2224. if (typeof prop[j] != 'object') {
  2225. c[i].push(prop[j]);
  2226. } else {
  2227. c[i].push(clone_obj(prop[j]));
  2228. }
  2229. }
  2230. } else {
  2231. c[i] = clone_obj(prop);
  2232. }
  2233. } else {
  2234. c[i] = prop;
  2235. }
  2236. }
  2237. return c;
  2238. }
  2239. </script>
  2240. <div style="float:left; margin-right: 3px;">
  2241. <?php JToolBarHelper::custom('save', 'save.png', 'save_f2.png', BFText::_('COM_BREEZINGFORMS_TOOLBAR_QUICKMODE_SAVE'), false); ?>
  2242. <?php
  2243. if($formId != 0){
  2244. JToolBarHelper::custom('preview', 'publish.png', 'save_f2.png', BFText::_('COM_BREEZINGFORMS_TOOLBAR_QUICKMODE_PREVIEW'), false);
  2245. JToolBarHelper::custom('preview_site', 'publish.png', 'save_f2.png', BFText::_('COM_BREEZINGFORMS_SITE_PREVIEW'), false);
  2246. }
  2247. ?>
  2248. <?php JToolBarHelper::title('<img src="'. JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/themes/easymode/i/logo-breezingforms.png'.'" align="top"/>'); ?>
  2249. <?php JToolBarHelper::custom('close', 'cancel.png', 'cancel_f2.png', BFText::_('COM_BREEZINGFORMS_TOOLBAR_QUICKMODE_CLOSE'), false); ?>
  2250. <form action="index.php" method="post" name="adminForm" id="adminForm">
  2251. <input type="hidden" name="option" value="com_breezingforms" />
  2252. <input type="hidden" name="act" value="quickmode" />
  2253. <input type="hidden" name="task" value="" />
  2254. <input type="hidden" name="form" value="<?php echo $formId;?>" />
  2255. <input type="hidden" name="sizeTplCode" value="0" />
  2256. </form>
  2257. </div>
  2258. <!-- ##### CSS ######## -->
  2259. <!-- ####### CSS ######## -->
  2260. <!-- ####### CSS ######## -->
  2261. <!-- ####### CSS ######## -->
  2262. <?php
  2263. jimport('joomla.version');
  2264. $version = new JVersion();
  2265. if(version_compare($version->getShortVersion(), '1.6', '>=') && version_compare($version->getShortVersion(), '3.0', '<')){
  2266. ?>
  2267. <link rel="stylesheet" href="<?php echo JURI::root(true)?>/administrator/components/com_breezingforms/admin/bluestork.fix.css" type="text/css" />
  2268. <?php
  2269. }
  2270. ?>
  2271. <style type="text/css">
  2272. #bfSaveQueue{
  2273. font: 11px Verdana, Geneva, sans-serif;
  2274. border: 2px solid #E5E5E5;
  2275. background-color: #F5F5F5;
  2276. margin-top: 5px;
  2277. padding: 10px;
  2278. width: 350px;
  2279. text-align: center;
  2280. font-weight: bold;
  2281. }
  2282. #bfQuickModeWrapper {
  2283. width: 100%;
  2284. }
  2285. #bfQuickModeLeft {
  2286. float: left;
  2287. width: 240px;
  2288. }
  2289. #bfQuickModeRight {
  2290. padding-left: 250px;
  2291. }
  2292. #bfElementExplorer {
  2293. width: auto;
  2294. overflow: auto;
  2295. }
  2296. #bfQuickModeRight #menutab {
  2297. width: 100%;
  2298. }
  2299. /* ##### hr ##### */
  2300. #bfQuickModeWrapper hr {
  2301. color:#ccc;
  2302. background-color:#ccc;
  2303. height:1px;
  2304. border:none;
  2305. margin: 10px 0px 10px 0px;
  2306. }
  2307. /* ##### inputs ##### */
  2308. #bfQuickModeWrapper fieldset {
  2309. padding: 10px;
  2310. }
  2311. #bfQuickModeWrapper label.bfPropertyLabel {
  2312. float: left;
  2313. min-width: 30%;
  2314. margin-right: 10px;
  2315. }
  2316. #bfQuickModeWrapper textarea {
  2317. height: 100px;
  2318. }
  2319. #bfQuickModeWrapper input[type=text], #bfQuickModeWrapper input[type=password], #bfQuickModeWrapper textarea, #bfQuickModeWrapper select {
  2320. border: 1px solid #bbb;
  2321. padding: 2px;
  2322. line-height: normal;
  2323. background: #f8f8f8;
  2324. font-size: 100%;
  2325. width: 50%;
  2326. }
  2327. #bfQuickModeWrapper textarea:hover, #bfQuickModeWrapper input[type='text']:hover, #bfQuickModeWrapper input[type='password']:hover, #bfQuickModeWrapper select:hover {
  2328. border-color: #92c1ff;
  2329. }
  2330. #bfQuickModeWrapper textarea:focus, #bfQuickModeWrapper input[type='text']:focus, #bfQuickModeWrapper input[type='password']:focus, #bfQuickModeWrapper select:focus {
  2331. border-color: #0071bc; outline: 2px solid #92c1ff;
  2332. }
  2333. #bfQuickModeWrapper input[type='button'], #bfQuickModeWrapper input[type='submit'], #bfQuickModeWrapper input[type='checkbox'], #bfQuickModeWrapper input[type='image'], #bfQuickModeWrapper input[type='radio'], #bfQuickModeWrapper input[type='reset'], #bfQuickModeWrapper select, #bfQuickModeWrapper button {
  2334. cursor: pointer;
  2335. }
  2336. #bfQuickModeWrapper input[type='hidden'] { display: none; }
  2337. .bfClearfix:after {
  2338. content: ".";
  2339. display: block;
  2340. height: 0;
  2341. clear: both;
  2342. visibility: hidden;
  2343. }
  2344. </style>
  2345. <h3><a href="http://crosstec.de/breezingforms-footer-removal.html" target="_blank">Get BreezingForms with stunning features like true mobile support, Salesfoce and Dropbox integration!</a> - <a href="http://crosstec.de/en/joomla-templates.html" target="_blank">See our responsive Joomla! Templates!</a> - <a href="http://www.facebook.com/CrosstecSoftware">Like us on Facebook</a></h3>
  2346. <div style="float:left">
  2347. <form onsubmit="return false;">
  2348. <input class="btn btn-warning" id="bfNewPageButton" type="submit" value="<?php echo BFText::_('COM_BREEZINGFORMS_NEW_PAGE'); ?>"/>
  2349. <input class="btn btn-warning" id="bfNewSectionButton" type="submit" value="<?php echo BFText::_('COM_BREEZINGFORMS_NEW_SECTION'); ?>"/>
  2350. <input class="btn btn-warning" id="bfNewElementButton" type="submit" value="<?php echo BFText::_('COM_BREEZINGFORMS_NEW_ELEMENT'); ?>"/>
  2351. <span class="bfFadingMessage" style="display:none"></span>
  2352. </form>
  2353. </div>
  2354. <div style="clear:both"></div>
  2355. <br/>
  2356. <div style="display:none;visibility:hidden;" id="bfSaveQueue"></div>
  2357. <div id="bfQuickModeWrapper" class="bfClearfix">
  2358. <div id="bfQuickModeLeft" class="bfClearfix">
  2359. <div id="bfElementExplorer"></div>
  2360. </div> <!-- ##### bfQuickModeLeft end ##### -->
  2361. <div id="bfQuickModeRight" class="bfClearfix">
  2362. <form name="bfForm" onsubmit="return false">
  2363. <div id="menutab" class="flora">
  2364. <ul>
  2365. <li><a onclick="JQuery('.bfFadingMessage').css('display','none')" href="#fragment-1"><span><div class="tab-items"><?php echo BFText::_('COM_BREEZINGFORMS_PROPERTIES') ?></div></span></a></li>
  2366. <li><a onclick="JQuery('.bfFadingMessage').css('display','none')" href="#fragment-2"><span><div class="tab-element"><?php echo BFText::_('COM_BREEZINGFORMS_ADVANCED') ?></div></span></a></li>
  2367. </ul>
  2368. <div class="t">
  2369. <div class="t">
  2370. <div class="t"></div>
  2371. </div>
  2372. </div>
  2373. <div class="m">
  2374. <div id="fragment-1">
  2375. <div>
  2376. <br/>
  2377. <div class="bfFadingMessage" style="display:none"></div>
  2378. <input type="submit" class="btn btn-secondary" value="<?php echo BFText::_('COM_BREEZINGFORMS_PROPERTIES_SAVE'); ?>" id="bfPropertySaveButtonTop"/>
  2379. <!-- FORM PROPERTIES BEGIN -->
  2380. <div class="bfProperties" id="bfFormProperties" style="display:none">
  2381. <br/>
  2382. <fieldset>
  2383. <legend><?php echo BFText::_('COM_BREEZINGFORMS_FORM_PROPERTIES'); ?></legend>
  2384. <label class="bfPropertyLabel" for="bfFormTitle"><?php echo BFText::_('COM_BREEZINGFORMS_FORM_TITLE'); ?></label>
  2385. <input type="text" value="<?php echo htmlentities($formTitle,ENT_QUOTES,'UTF-8') ?>" id="bfFormTitle"/>
  2386. <br/><br/>
  2387. <label class="bfPropertyLabel" for="bfFormName"><?php echo BFText::_('COM_BREEZINGFORMS_FORM_NAME'); ?></label>
  2388. <input type="text" value="<?php echo htmlentities($formName,ENT_QUOTES,'UTF-8') ?>" id="bfFormName"/>
  2389. <br/><br/>
  2390. <label class="bfPropertyLabel" for="bfFormDescription"><?php echo BFText::_('COM_BREEZINGFORMS_FORM_DESC'); ?></label>
  2391. <textarea id="bfFormDescription"><?php echo htmlentities($formDesc,ENT_QUOTES,'UTF-8') ?></textarea>
  2392. <br/><br/>
  2393. <label class="bfPropertyLabel" for="bfFormLastPageThankYou"><?php echo BFText::_('COM_BREEZINGFORMS_LAST_PAGE_THANK_YOU'); ?></label>
  2394. <input type="checkbox" value="" id="bfFormLastPageThankYou"/>
  2395. <br/><br/>
  2396. <label class="bfPropertyLabel" for="bfFormMailNotification"><?php echo BFText::_('COM_BREEZINGFORMS_MAIL_NOTIFICATION'); ?></label>
  2397. <input <?php echo $formEmailntf == 2 ? 'checked="checked"' : '' ?> type="checkbox" value="<?php echo htmlentities($formEmailntf,ENT_QUOTES,'UTF-8') ?>" id="bfFormMailNotification"/>
  2398. <br/><br/>
  2399. <label class="bfPropertyLabel" for="bfFormMailRecipient"><?php echo BFText::_('COM_BREEZINGFORMS_MAIL_RECIPIENT'); ?></label>
  2400. <input type="text" value="<?php echo htmlentities($formEmailadr,ENT_QUOTES,'UTF-8') ?>" id="bfFormMailRecipient"/>
  2401. <br/><br/>
  2402. <label class="bfPropertyLabel" for="bfSubmitIncludeYes"><?php echo BFText::_('COM_BREEZINGFORMS_FORM_SUBMIT_INCLUDE'); ?></label>
  2403. <input checked="checked" type="radio" name="bfSubmitInclude" value="" id="bfSubmitIncludeYes"/> <?php echo BFText::_('COM_BREEZINGFORMS_YES'); ?>
  2404. <input type="radio" name="bfSubmitInclude" value="" id="bfSubmitIncludeNo"/> <?php echo BFText::_('COM_BREEZINGFORMS_NO'); ?>
  2405. <br/><br/>
  2406. <label class="bfPropertyLabel" for="bfFormSubmitLabel"><?php echo BFText::_('COM_BREEZINGFORMS_FORM_SUBMIT_LABEL'); ?></label>
  2407. <input type="text" value="save" id="bfFormSubmitLabel"/>
  2408. <br/><br/>
  2409. <label class="bfPropertyLabel" for="bfPagingIncludeYes"><?php echo BFText::_('COM_BREEZINGFORMS_FORM_PAGING_INCLUDE'); ?></label>
  2410. <input checked="checked" type="radio" name="bfPagingInclude" value="" id="bfPagingIncludeYes"/> <?php echo BFText::_('COM_BREEZINGFORMS_YES'); ?>
  2411. <input type="radio" name="bfPagingInclude" value="" id="bfPagingIncludeNo"/> <?php echo BFText::_('COM_BREEZINGFORMS_NO'); ?>
  2412. <br/><br/>
  2413. <label class="bfPropertyLabel" for="bfFormPagingNextLabel"><?php echo BFText::_('COM_BREEZINGFORMS_FORM_PAGING_NEXT_LABEL'); ?></label>
  2414. <input type="text" value="next" id="bfFormPagingNextLabel"/>
  2415. <br/><br/>
  2416. <label class="bfPropertyLabel" for="bfFormPagingPrevLabel"><?php echo BFText::_('COM_BREEZINGFORMS_FORM_PAGING_PREV_LABEL'); ?></label>
  2417. <input type="text" value="back" id="bfFormPagingPrevLabel"/>
  2418. <br/><br/>
  2419. <label class="bfPropertyLabel" for="bfCancelIncludeYes"><?php echo BFText::_('COM_BREEZINGFORMS_FORM_CANCEL_INCLUDE'); ?></label>
  2420. <input checked="checked" type="radio" name="bfCancelInclude" value="" id="bfCancelIncludeYes"/> <?php echo BFText::_('COM_BREEZINGFORMS_YES'); ?>
  2421. <input type="radio" name="bfCancelInclude" value="" id="bfCancelIncludeNo"/> <?php echo BFText::_('COM_BREEZINGFORMS_NO'); ?>
  2422. <br/><br/>
  2423. <label class="bfPropertyLabel" for="bfFormCancelLabel"><?php echo BFText::_('COM_BREEZINGFORMS_FORM_CANCEL_LABEL'); ?></label>
  2424. <input type="text" value="reset" id="bfFormCancelLabel"/>
  2425. </fieldset>
  2426. </div>
  2427. <!-- FORM PROPERTIES END -->
  2428. <!-- PAGE PROPERTIES BEGIN -->
  2429. <div class="bfProperties" id="bfPageProperties" style="display:none">
  2430. <br/>
  2431. <fieldset>
  2432. <legend><?php echo BFText::_('COM_BREEZINGFORMS_PAGE_PROPERTIES'); ?></legend>
  2433. <label class="bfPropertyLabel" for="bfPageIntro"><?php echo BFText::_('COM_BREEZINGFORMS_PAGE_INTRO'); ?></label>
  2434. <!-- <textarea id="bfPageIntro"></textarea>-->
  2435. <a href="index.php?option=com_breezingforms&tmpl=component&act=quickmode_editor" title="<?php echo BFText::_('COM_BREEZINGFORMS_EDIT_INTRO');?>" class="modal" rel="{handler: 'iframe', size: {x: 820, y: 400}}"><?php echo BFText::_('COM_BREEZINGFORMS_EDIT_INTRO'); ?></a>
  2436. </fieldset>
  2437. </div>
  2438. <!-- PAGE PROPERTIES END -->
  2439. <!-- SECTION PROPERTIES BEGIN -->
  2440. <div class="bfProperties" id="bfSectionProperties" style="display:none">
  2441. <br/>
  2442. <fieldset>
  2443. <legend><?php echo BFText::_('COM_BREEZINGFORMS_SECTION_PROPERTIES'); ?></legend>
  2444. <label class="bfPropertyLabel" for="bfSectionType"><?php echo BFText::_('COM_BREEZINGFORMS_SECTION_TYPE'); ?></label>
  2445. <select id="bfSectionType">
  2446. <option value="normal"><?php echo BFText::_('COM_BREEZINGFORMS_NORMAL'); ?></option>
  2447. <option value="section"><?php echo BFText::_('COM_BREEZINGFORMS_FIELDSET'); ?></option>
  2448. </select>
  2449. <br/>
  2450. <br/>
  2451. <label class="bfPropertyLabel" for="bfSectionDisplayType"><?php echo BFText::_('COM_BREEZINGFORMS_SECTION_DISPLAY_TYPE'); ?></label>
  2452. <select id="bfSectionDisplayType">
  2453. <option value="inline"><?php echo BFText::_('COM_BREEZINGFORMS_INLINE'); ?></option>
  2454. <option value="breaks"><?php echo BFText::_('COM_BREEZINGFORMS_BREAKS'); ?></option>
  2455. </select>
  2456. <br/>
  2457. <br/>
  2458. <label class="bfPropertyLabel" for="bfSectionTitle"><?php echo BFText::_('COM_BREEZINGFORMS_SECTION_TITLE'); ?></label>
  2459. <input type="text" value="" id="bfSectionTitle"/>
  2460. <br/>
  2461. <br/>
  2462. <label class="bfPropertyLabel" for="bfSectionName"><?php echo BFText::_('COM_BREEZINGFORMS_SECTION_NAME'); ?></label>
  2463. <input type="text" value="" id="bfSectionName"/>
  2464. <br/>
  2465. <br/>
  2466. <label class="bfPropertyLabel" for="bfSectionDescription"><?php echo BFText::_('COM_BREEZINGFORMS_SECTION_DESCRIPTION'); ?></label>
  2467. <a href="index.php?option=com_breezingforms&tmpl=component&act=quickmode_editor" title="<?php echo BFText::_('COM_BREEZINGFORMS_EDIT_DESCRIPTION');?>" class="modal" rel="{handler: 'iframe', size: {x: 820, y: 400}}"><?php echo BFText::_('COM_BREEZINGFORMS_EDIT_DESCRIPTION'); ?></a>
  2468. </fieldset>
  2469. </div>
  2470. <!-- SECTION PROPERTIES END -->
  2471. <!-- ELEMENT PROPERTIES BEGIN -->
  2472. <div class="bfProperties" id="bfElementProperties" style="display:none">
  2473. <br/>
  2474. <fieldset>
  2475. <label class="bfPropertyLabel" for="bfElementType"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_TYPE'); ?></label>
  2476. <select id="bfElementType">
  2477. <option value=""><?php echo BFText::_('COM_BREEZINGFORMS_CHOOSE_ONE'); ?></option>
  2478. <option value="bfElementTypeText"><?php echo BFText::_('COM_BREEZINGFORMS_TEXTFIELD'); ?></option>
  2479. <option value="bfElementTypeTextarea"><?php echo BFText::_('COM_BREEZINGFORMS_TEXTAREA'); ?></option>
  2480. <option value="bfElementTypeRadioGroup"><?php echo BFText::_('COM_BREEZINGFORMS_RADIO_GROUP'); ?></option>
  2481. <option value="bfElementTypeCheckboxGroup"><?php echo BFText::_('COM_BREEZINGFORMS_CHECKBOX_GROUP'); ?></option>
  2482. <option value="bfElementTypeCheckbox"><?php echo BFText::_('COM_BREEZINGFORMS_CHECKBOX'); ?></option>
  2483. <option value="bfElementTypeSelect"><?php echo BFText::_('COM_BREEZINGFORMS_SELECT'); ?></option>
  2484. <option value="bfElementTypeFile"><?php echo BFText::_('COM_BREEZINGFORMS_FILE'); ?></option>
  2485. <option value="bfElementTypeSubmitButton"><?php echo BFText::_('COM_BREEZINGFORMS_SUBMIT_BUTTON'); ?></option>
  2486. <option value="bfElementTypeHidden"><?php echo BFText::_('COM_BREEZINGFORMS_HIDDEN'); ?></option>
  2487. <option value="bfElementTypeSummarize"><?php echo BFText::_('COM_BREEZINGFORMS_SUMMARIZE'); ?></option>
  2488. <option value="bfElementTypeCaptcha"><?php echo BFText::_('COM_BREEZINGFORMS_CAPTCHA'); ?></option>
  2489. <option value="bfElementTypeReCaptcha"><?php echo BFText::_('COM_BREEZINGFORMS_ReCaptcha'); ?></option>
  2490. <option value="bfElementTypeCalendar"><?php echo BFText::_('COM_BREEZINGFORMS_CALENDAR'); ?></option>
  2491. <option value="bfElementTypePayPal"><?php echo BFText::_('COM_BREEZINGFORMS_PAYPAL'); ?></option>
  2492. <option value="bfElementTypeSofortueberweisung"><?php echo BFText::_('COM_BREEZINGFORMS_SOFORTUEBERWEISUNG'); ?></option>
  2493. </select>
  2494. <br/>
  2495. <br/>
  2496. <legend><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_PROPERTIES'); ?></legend>
  2497. <label class="bfPropertyLabel" for="bfElementLabel"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_LABEL'); ?></label>
  2498. <input type="text" value="" id="bfElementLabel"/>
  2499. <br/>
  2500. <br/>
  2501. <label class="bfPropertyLabel" for="bfElementName"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_NAME'); ?></label>
  2502. <input type="text" value="" id="bfElementName"/>
  2503. <!-- HIDDEN BEGIN -->
  2504. <div class="bfElementTypeClass" id="bfElementTypeHidden" style="display:none">
  2505. <br/>
  2506. <label class="bfPropertyLabel" for="bfElementTypeHiddenValue"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_VALUE'); ?></label>
  2507. <input type="text" value="" id="bfElementTypeHiddenValue"/>
  2508. </div>
  2509. <!-- HIDDEN END -->
  2510. <!-- SUMMARIZE BEGIN -->
  2511. <div class="bfElementTypeClass" id="bfElementTypeSummarize" style="display:none">
  2512. <br/>
  2513. <label class="bfPropertyLabel" for="bfElementTypeSummarizeConnectWith"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_SUMMARIZE_CONNECT_WITH'); ?></label>
  2514. <select id="bfElementTypeSummarizeConnectWith">
  2515. <option value=""><?php echo BFText::_('COM_BREEZINGFORMS_CHOOSE_ONE'); ?></option>
  2516. </select>
  2517. <br/>
  2518. <br/>
  2519. <label class="bfPropertyLabel" for="bfElementTypeSummarizeEmptyMessage"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_EMPTY_MESSAGE'); ?></label>
  2520. <input type="text" value="" id="bfElementTypeSummarizeEmptyMessage"/>
  2521. <br/>
  2522. <br/>
  2523. <label class="bfPropertyLabel" for="bfElementTypeSummarizeHideIfEmpty"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HIDE_EMPTY'); ?></label>
  2524. <input type="checkbox" value="" id="bfElementTypeSummarizeHideIfEmpty"/>
  2525. <br/>
  2526. <br/>
  2527. <label class="bfPropertyLabel" for="bfElementTypeSummarizeUseElementLabel"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_USE_LABEL'); ?></label>
  2528. <input type="checkbox" value="" id="bfElementTypeSummarizeUseElementLabel"/>
  2529. </div>
  2530. <!-- SUMMARIZE END -->
  2531. <!-- TEXTFIELD BEGIN -->
  2532. <div class="bfElementTypeClass" id="bfElementTypeText" style="display:none">
  2533. <br/>
  2534. <label class="bfPropertyLabel" for="bfElementTypeTextValue"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_VALUE'); ?></label>
  2535. <input type="text" value="" id="bfElementTypeTextValue"/>
  2536. <br/>
  2537. <br/>
  2538. <label class="bfPropertyLabel" for="bfElementTypeTextSize"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_SIZE'); ?></label>
  2539. <input type="text" value="" id="bfElementTypeTextSize"/>
  2540. <br/>
  2541. <br/>
  2542. <label class="bfPropertyLabel" for="bfElementTypeTextMaxLength"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_MAX_LENGTH'); ?></label>
  2543. <input type="text" value="" id="bfElementTypeTextMaxLength"/>
  2544. <br/>
  2545. <br/>
  2546. <label class="bfPropertyLabel" for="bfElementTypeTextHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
  2547. <textarea id="bfElementTypeTextHint"></textarea>
  2548. </div>
  2549. <!-- TEXTFIELD END -->
  2550. <!-- TEXTAREA BEGIN -->
  2551. <div class="bfElementTypeClass" id="bfElementTypeTextarea" style="display:none">
  2552. <br/>
  2553. <label class="bfPropertyLabel" for="bfElementTypeTextareaValue"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_VALUE'); ?></label>
  2554. <textarea id="bfElementTypeTextareaValue"></textarea>
  2555. <br/>
  2556. <br/>
  2557. <label class="bfPropertyLabel" for="bfElementTypeTextareaWidth"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_WIDTH'); ?></label>
  2558. <input type="text" value="" id="bfElementTypeTextareaWidth"/>
  2559. <br/>
  2560. <br/>
  2561. <label class="bfPropertyLabel" for="bfElementTypeTextareaHeight"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HEIGHT'); ?></label>
  2562. <input type="text" value="" id="bfElementTypeTextareaHeight"/>
  2563. <br/>
  2564. <br/>
  2565. <br/>
  2566. <label class="bfPropertyLabel" for="bfElementTypeTextareaMaxLength"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_MAX_LENGTH'); ?></label>
  2567. <input type="text" value="" id="bfElementTypeTextareaMaxLength"/>
  2568. <br/>
  2569. <br/>
  2570. <label class="bfPropertyLabel" for="bfElementTypeTextareaMaxLengthShow"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_MAX_LENGTH_SHOW'); ?></label>
  2571. <input type="checkbox" value="" id="bfElementTypeTextareaMaxLengthShow"/>
  2572. <br/>
  2573. <br/>
  2574. <label class="bfPropertyLabel" for="bfElementTypeTextareaIsHtml">HTML</label>
  2575. <input type="checkbox" value="" id="bfElementTypeTextareaIsHtml"/>
  2576. <br/>
  2577. <br/>
  2578. <label class="bfPropertyLabel" for="bfElementTypeTextareaHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
  2579. <textarea id="bfElementTypeTextareaHint"></textarea>
  2580. </div>
  2581. <!-- TEXTAREA END -->
  2582. <!-- RADIOGROUP BEGIN -->
  2583. <div class="bfElementTypeClass" id="bfElementTypeRadioGroup" style="display:none">
  2584. <br/>
  2585. <label class="bfPropertyLabel" for="bfElementTypeRadioGroupGroups"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_GROUP'); ?></label>
  2586. <textarea id="bfElementTypeRadioGroupGroups"></textarea>
  2587. <br/>
  2588. <br/>
  2589. <label class="bfPropertyLabel" for="bfElementTypeRadioGroupReadonly"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_READONLY'); ?></label>
  2590. <input type="checkbox" value="" id="bfElementTypeRadioGroupReadonly"/>
  2591. <br/>
  2592. <br/>
  2593. <label class="bfPropertyLabel" for="bfElementTypeRadioGroupWrap"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_WRAP'); ?></label>
  2594. <input type="checkbox" value="" id="bfElementTypeRadioGroupWrap"/>
  2595. <br/>
  2596. <br/>
  2597. <label class="bfPropertyLabel" for="bfElementTypeRadioGroupHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
  2598. <textarea id="bfElementTypeRadioGroupHint"></textarea>
  2599. </div>
  2600. <!-- RADIOGROUP END -->
  2601. <!-- SUBMITBUTTON BEGIN -->
  2602. <div class="bfElementTypeClass" id="bfElementTypeSubmitButton" style="display:none">
  2603. <br/>
  2604. <label class="bfPropertyLabel" for="bfElementTypeSubmitButtonValue"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_VALUE'); ?></label>
  2605. <input type="text" value="" id="bfElementTypeSubmitButtonValue"/>
  2606. <br/>
  2607. <br/>
  2608. <label class="bfPropertyLabel" for="bfElementTypeSubmitButtonHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
  2609. <textarea id="bfElementTypeSubmitButtonHint"></textarea>
  2610. </div>
  2611. <!-- SUBMITBUTTON END -->
  2612. <!-- PAYPAL BEGIN -->
  2613. <div class="bfElementTypeClass" id="bfElementTypePayPal" style="display:none">
  2614. <br/>
  2615. <label class="bfPropertyLabel" for="bfElementTypePayPalBusiness"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_BUSINESS'); ?></label>
  2616. <input type="text" value="" id="bfElementTypePayPalBusiness"/>
  2617. <br/>
  2618. <br/>
  2619. <label class="bfPropertyLabel" for="bfElementTypePayPalToken"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_TOKEN'); ?></label>
  2620. <input type="text" value="" id="bfElementTypePayPalToken"/>
  2621. <br/>
  2622. <br/>
  2623. <label class="bfPropertyLabel" for="bfElementTypePayPalItemname"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_ITEMNAME'); ?></label>
  2624. <input type="text" value="" id="bfElementTypePayPalItemname"/>
  2625. <br/>
  2626. <br/>
  2627. <label class="bfPropertyLabel" for="bfElementTypePayPalItemnumber"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_ITEMNUMBER'); ?></label>
  2628. <input type="text" value="" id="bfElementTypePayPalItemnumber"/>
  2629. <br/>
  2630. <br/>
  2631. <label class="bfPropertyLabel" for="bfElementTypePayPalAmount"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_AMOUNT'); ?></label>
  2632. <input type="text" value="" id="bfElementTypePayPalAmount"/>
  2633. <br/>
  2634. <br/>
  2635. <label class="bfPropertyLabel" for="bfElementTypePayPalTax"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_TAX'); ?></label>
  2636. <input type="text" value="" id="bfElementTypePayPalTax"/>
  2637. <br/>
  2638. <br/>
  2639. <label class="bfPropertyLabel" for="bfElementTypePayPalThankYouPage"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_THANKYOU_PAGE'); ?></label>
  2640. <input type="text" value="" id="bfElementTypePayPalThankYouPage"/>
  2641. <br/>
  2642. <br/>
  2643. <label class="bfPropertyLabel" for="bfElementTypePayPalLocale"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_LOCALE'); ?></label>
  2644. <input type="text" value="" id="bfElementTypePayPalLocale"/>
  2645. <br/>
  2646. <br/>
  2647. <label class="bfPropertyLabel" for="bfElementTypePayPalCurrencyCode"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_CURRENCY_CODE'); ?></label>
  2648. <input type="text" value="" id="bfElementTypePayPalCurrencyCode"/>
  2649. <br/>
  2650. <br/>
  2651. <label class="bfPropertyLabel" for=bfElementTypePayPalSendNotificationAfterPayment><?php echo BFText::_('COM_BREEZINGFORMS_NOTIFICATION_AFTER_PAYMENT'); ?></label>
  2652. <input type="checkbox" value="" id="bfElementTypePayPalSendNotificationAfterPayment"/>
  2653. <br/>
  2654. <br/>
  2655. <label class="bfPropertyLabel" for="bfElementTypePayPalHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
  2656. <textarea id="bfElementTypePayPalHint"></textarea>
  2657. </div>
  2658. <!-- PAYPAL END -->
  2659. <!-- SOFORTUEBERWEISUNG BEGIN -->
  2660. <div class="bfElementTypeClass" id="bfElementTypeSofortueberweisung" style="display:none">
  2661. <br/>
  2662. <label class="bfPropertyLabel" for="bfElementTypeSofortueberweisungUserId"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_USERID'); ?></label>
  2663. <input type="text" value="" id="bfElementTypeSofortueberweisungUserId"/>
  2664. <br/>
  2665. <br/>
  2666. <label class="bfPropertyLabel" for="bfElementTypeSofortueberweisungProjectId"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_PROJECTID'); ?></label>
  2667. <input type="text" value="" id="bfElementTypeSofortueberweisungProjectId"/>
  2668. <br/>
  2669. <br/>
  2670. <label class="bfPropertyLabel" for="bfElementTypeSofortueberweisungProjectPassword"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_PROJECT_PASSWORD'); ?></label>
  2671. <input type="password" value="" id="bfElementTypeSofortueberweisungProjectPassword"/>
  2672. <br/>
  2673. <br/>
  2674. <label class="bfPropertyLabel" for="bfElementTypeSofortueberweisungReason1"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_REASON1'); ?></label>
  2675. <input type="text" value="" id="bfElementTypeSofortueberweisungReason1"/>
  2676. <br/>
  2677. <br/>
  2678. <label class="bfPropertyLabel" for="bfElementTypeSofortueberweisungReason2"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_REASON2'); ?></label>
  2679. <input type="text" value="" id="bfElementTypeSofortueberweisungReason2"/>
  2680. <br/>
  2681. <br/>
  2682. <label class="bfPropertyLabel" for="bfElementTypeSofortueberweisungAmount"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_AMOUNT'); ?></label>
  2683. <input type="text" value="" id="bfElementTypeSofortueberweisungAmount"/>
  2684. <br/>
  2685. <br/>
  2686. <label class="bfPropertyLabel" for="bfElementTypeSofortueberweisungThankYouPage"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_THANKYOU_PAGE'); ?></label>
  2687. <input type="text" value="" id="bfElementTypeSofortueberweisungThankYouPage"/>
  2688. <br/>
  2689. <br/>
  2690. <label class="bfPropertyLabel" for="bfElementTypeSofortueberweisungLanguageId"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_LANGUAGE_ID'); ?></label>
  2691. <input type="text" value="" id="bfElementTypeSofortueberweisungLanguageId"/>
  2692. <br/>
  2693. <br/>
  2694. <label class="bfPropertyLabel" for="bfElementTypeSofortueberweisungCurrencyId"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_CURRENCY_ID'); ?></label>
  2695. <input type="text" value="" id="bfElementTypeSofortueberweisungCurrencyId"/>
  2696. <br/>
  2697. <br/>
  2698. <label class="bfPropertyLabel" for=bfElementTypeSofortueberweisungMailback><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_MAILBACK'); ?></label>
  2699. <input type="checkbox" value="" id="bfElementTypeSofortueberweisungMailback"/>
  2700. <br/>
  2701. <br/>
  2702. <label class="bfPropertyLabel" for="bfElementTypeSofortueberweisungHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
  2703. <textarea id="bfElementTypeSofortueberweisungHint"></textarea>
  2704. </div>
  2705. <!-- SOFORTUEBERWEISUNG END -->
  2706. <!-- CAPTCHA BEGIN -->
  2707. <div class="bfElementTypeClass" id="bfElementTypeCaptcha" style="display:none">
  2708. <br/>
  2709. <label class="bfPropertyLabel" for="bfElementTypeCaptchaHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
  2710. <textarea id="bfElementTypeCaptchaHint"></textarea>
  2711. </div>
  2712. <!-- CAPTCHA END -->
  2713. <!-- RECAPTCHA BEGIN -->
  2714. <div class="bfElementTypeClass" id="bfElementTypeReCaptcha" style="display:none">
  2715. <br/>
  2716. <label class="bfPropertyLabel" for=bfElementTypeReCaptchaPubkey><?php echo BFText::_('COM_BREEZINGFORMS_PUBLIC_KEY'); ?></label>
  2717. <input type="text" value="" id="bfElementTypeReCaptchaPubkey"/>
  2718. <br/>
  2719. <br/>
  2720. <label class="bfPropertyLabel" for=bfElementTypeReCaptchaPrivkey><?php echo BFText::_('COM_BREEZINGFORMS_PRIVATE_KEY'); ?></label>
  2721. <input type="text" value="" id="bfElementTypeReCaptchaPrivkey"/>
  2722. <br/>
  2723. <br/>
  2724. <label class="bfPropertyLabel" for=bfElementTypeReCaptchaTheme><?php echo BFText::_('COM_BREEZINGFORMS_Theme'); ?></label>
  2725. <input type="text" value="red" id="bfElementTypeReCaptchaTheme"/> ('red', 'white', 'blackglass', 'clean', 'custom')
  2726. <br/>
  2727. <br/>
  2728. <label class="bfPropertyLabel" for="bfElementTypeReCaptchaHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
  2729. <textarea id="bfElementTypeReCaptchaHint"></textarea>
  2730. </div>
  2731. <!-- RECAPTCHA END -->
  2732. <!-- CALENDAR BEGIN -->
  2733. <div class="bfElementTypeClass" id="bfElementTypeCalendar" style="display:none">
  2734. <br/>
  2735. <label class="bfPropertyLabel" for="bfElementTypeCalendarFormat"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_FORMAT'); ?></label>
  2736. <input type="text" value="" id="bfElementTypeCalendarFormat"/>
  2737. <br/>
  2738. <br/>
  2739. <label class="bfPropertyLabel" for="bfElementTypeCalendarValue"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_VALUE'); ?></label>
  2740. <input type="text" value="" id="bfElementTypeCalendarValue"/>
  2741. <br/>
  2742. <br/>
  2743. <label class="bfPropertyLabel" for="bfElementTypeCalendarSize"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_SIZE'); ?></label>
  2744. <input type="text" value="" id="bfElementTypeCalendarSize"/>
  2745. <br/>
  2746. <br/>
  2747. <label class="bfPropertyLabel" for="bfElementTypeCalendarHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
  2748. <textarea id="bfElementTypeCalendarHint"></textarea>
  2749. </div>
  2750. <!-- CALENDAR END -->
  2751. <!-- CHECKBOXGROUP BEGIN -->
  2752. <div class="bfElementTypeClass" id="bfElementTypeCheckboxGroup" style="display:none">
  2753. <br/>
  2754. <label class="bfPropertyLabel" for="bfElementTypeCheckboxGroupGroups"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_GROUP'); ?></label>
  2755. <textarea id="bfElementTypeCheckboxGroupGroups"></textarea>
  2756. <br/>
  2757. <br/>
  2758. <label class="bfPropertyLabel" for="bfElementTypeCheckboxGroupReadonly"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_READONLY'); ?></label>
  2759. <input type="checkbox" value="" id="bfElementTypeCheckboxGroupReadonly"/>
  2760. <br/>
  2761. <br/>
  2762. <label class="bfPropertyLabel" for="bfElementTypeCheckboxGroupWrap"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_WRAP'); ?></label>
  2763. <input type="checkbox" value="" id="bfElementTypeCheckboxGroupWrap"/>
  2764. <br/>
  2765. <br/>
  2766. <label class="bfPropertyLabel" for="bfElementTypeCheckboxGroupHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
  2767. <textarea id="bfElementTypeCheckboxGroupHint"></textarea>
  2768. </div>
  2769. <!-- CHECKBOXGROUP END -->
  2770. <!-- CHECKBOX BEGIN -->
  2771. <div class="bfElementTypeClass" id="bfElementTypeCheckbox" style="display:none">
  2772. <br/>
  2773. <label class="bfPropertyLabel" for="bfElementTypeCheckboxValue"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_VALUE'); ?></label>
  2774. <textarea id="bfElementTypeCheckboxValue"></textarea>
  2775. <br/>
  2776. <br/>
  2777. <label class="bfPropertyLabel" for="bfElementTypeCheckboxChecked"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_CHECKED'); ?></label>
  2778. <input type="checkbox" value="" id="bfElementTypeCheckboxChecked"/>
  2779. <br/>
  2780. <br/>
  2781. <label class="bfPropertyLabel" for="bfElementTypeCheckboxReadonly"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_READONLY'); ?></label>
  2782. <input type="checkbox" value="" id="bfElementTypeCheckboxReadonly"/>
  2783. <br/>
  2784. <br/>
  2785. <label class="bfPropertyLabel" for="bfElementTypeCheckboxHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
  2786. <textarea id="bfElementTypeCheckboxHint"></textarea>
  2787. </div>
  2788. <!-- CHECKBOX END -->
  2789. <!-- SELECT BEGIN -->
  2790. <div class="bfElementTypeClass" id="bfElementTypeSelect" style="display:none">
  2791. <br/>
  2792. <label class="bfPropertyLabel" for="bfElementTypeSelectList"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_LIST'); ?></label>
  2793. <textarea id="bfElementTypeSelectList"></textarea>
  2794. <br/>
  2795. <br/>
  2796. <label class="bfPropertyLabel" for="bfElementTypeSelectMultiple"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_MULTIPLE'); ?></label>
  2797. <input type="checkbox" value="" id="bfElementTypeSelectMultiple"/>
  2798. <br/>
  2799. <br/>
  2800. <label class="bfPropertyLabel" for="bfElementTypeSelectListWidth"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_WIDTH'); ?></label>
  2801. <input type="text" value="" id="bfElementTypeSelectListWidth"/>
  2802. <br/>
  2803. <br/>
  2804. <label class="bfPropertyLabel" for="bfElementTypeSelectListHeight"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HEIGHT'); ?></label>
  2805. <input type="text" value="" id="bfElementTypeSelectListHeight"/>
  2806. <br/>
  2807. <br/>
  2808. <label class="bfPropertyLabel" for="bfElementTypeSelectReadonly"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_READONLY'); ?></label>
  2809. <input type="checkbox" value="" id="bfElementTypeSelectReadonly"/>
  2810. <br/>
  2811. <br/>
  2812. <label class="bfPropertyLabel" for="bfElementTypeSelectHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
  2813. <textarea id="bfElementTypeSelectHint"></textarea>
  2814. </div>
  2815. <!-- SELECT END -->
  2816. <!-- FILE BEGIN -->
  2817. <div class="bfElementTypeClass" id="bfElementTypeFile" style="display:none">
  2818. <br/>
  2819. <label class="bfPropertyLabel" for="bfElementTypeFileReadonly"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_READONLY'); ?></label>
  2820. <input type="checkbox" value="" id="bfElementTypeFileReadonly"/>
  2821. <br/>
  2822. <br/>
  2823. <label class="bfPropertyLabel" for="bfElementTypeFileHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
  2824. <textarea id="bfElementTypeFileHint"></textarea>
  2825. </div>
  2826. <!-- FILE END -->
  2827. </fieldset>
  2828. <fieldset id="bfValidationScript" style="display:none">
  2829. <legend><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_VALIDATION'); ?></legend>
  2830. <span id="bfElementValidationRequiredSet" style="display:none">
  2831. <label class="bfPropertyLabel" for="bfElementValidationRequired"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_VALIDATION_REQUIRED'); ?></label>
  2832. <input type="checkbox" value="" id="bfElementValidationRequired"/>
  2833. <br/>
  2834. <br/>
  2835. </span>
  2836. <label class="bfPropertyLabel" for="bfElementValidation"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_VALIDATION_LABEL'); ?></label>
  2837. <div>
  2838. <?php echo BFText::_('COM_BREEZINGFORMS_TYPE') ?>:
  2839. <?php echo BFText::_('COM_BREEZINGFORMS_NONE') ?> <input onclick="JQuery('#bfValidationScriptFlags').css('display','none');JQuery('#bfValidationScriptLibrary').css('display','none');JQuery('#bfValidationScriptCustom').css('display','none');" type="radio" name="validationType" id="bfValidationTypeNone" class="bfValidationType" value="0"/>
  2840. <?php echo BFText::_('COM_BREEZINGFORMS_LIBRARY') ?> <input onclick="JQuery('#bfValidationScriptFlags').css('display','');JQuery('#bfValidationScriptLibrary').css('display','');JQuery('#bfValidationScriptCustom').css('display','none');" type="radio" name="validationType" id="bfValidationTypeLibrary" class="bfValidationType" value="1"/>
  2841. <?php echo BFText::_('COM_BREEZINGFORMS_CUSTOM') ?> <input onclick="JQuery('#bfValidationScriptFlags').css('display','');JQuery('#bfValidationScriptLibrary').css('display','none');JQuery('#bfValidationScriptCustom').css('display','');" type="radio" name="validationType" id="bfValidationTypeCustom" class="bfValidationType" value="2"/>
  2842. <div id="bfValidationScriptFlags" style="display:none">
  2843. <hr/>
  2844. <?php echo BFText::_('COM_BREEZINGFORMS_ERROR_MESSAGE') ?>: <input type="text" style="width:100%" maxlength="255" class="bfValidationMessage" id="bfValidationMessage" name="bfValidationMessage" value="" class="inputbox"/>
  2845. </div>
  2846. <div id="bfValidationScriptLibrary" style="display:none">
  2847. <hr/>
  2848. <?php echo BFText::_('COM_BREEZINGFORMS_SCRIPT') ?>:<br/> <select id="bfValidationScriptSelection"></select>
  2849. <br/>
  2850. <br/>
  2851. <br/>
  2852. <div id="bfValidationScriptSelectionDescription"></div>
  2853. </div>
  2854. <div id="bfValidationScriptCustom" style="display:none">
  2855. <hr/>
  2856. <div style="cursor: pointer;" onclick="createValidationCode()"><?php echo BFText::_('COM_BREEZINGFORMS_CREATE_CODE_FRAMEWORK') ?></div>
  2857. <textarea name="bfValidationCode" id="bfValidationCode" rows="10" style="width:100%" wrap="off"></textarea>
  2858. </div>
  2859. </div>
  2860. </fieldset>
  2861. </div>
  2862. <br/>
  2863. <!-- ELEMENT PROPERTIES END -->
  2864. <div class="bfFadingMessage" style="display:none"></div>
  2865. <input type="submit" class="btn btn-secondary" value="<?php echo BFText::_('COM_BREEZINGFORMS_PROPERTIES_SAVE'); ?>" id="bfPropertySaveButton"/>
  2866. <br/>
  2867. <br/>
  2868. </div>
  2869. </div>
  2870. <div id="fragment-2">
  2871. <div>
  2872. <br/>
  2873. <div class="bfFadingMessage" style="display:none"></div>
  2874. <input type="submit" class="btn btn-secondary" value="<?php echo BFText::_('COM_BREEZINGFORMS_PROPERTIES_SAVE'); ?>" id="bfAdvancedSaveButtonTop"/>
  2875. <div class="bfAdvanced" id="bfPageAdvanced" style="display:none">
  2876. </div>
  2877. <div class="bfAdvanced" id="bfFormAdvanced" style="display:none">
  2878. <br/>
  2879. <fieldset>
  2880. <legend><?php echo BFText::_('COM_BREEZINGFORMS_ADVANCED_FORM_OPTIONS'); ?></legend>
  2881. <?php if($formId != 0){ ?>
  2882. <a href="index.php?option=com_breezingforms&tmpl=component&task=editform&act=editpage&form=<?php echo $formId ?>&pkg=QuickModeForms" title="<?php echo BFText::_('COM_BREEZINGFORMS_MORE_OPTIONS');?>" class="modal" rel="{handler: 'iframe', size: {x: 1000, y: 400}}"><?php echo htmlentities( BFText::_('COM_BREEZINGFORMS_MORE_OPTIONS'), ENT_QUOTES, 'UTF-8') ?></a>
  2883. <?php } ?>
  2884. </fieldset>
  2885. <fieldset>
  2886. <legend><?php echo BFText::_('COM_BREEZINGFORMS_ADVANCED_FORM_OTHER'); ?></legend>
  2887. <label class="bfPropertyLabel" for="bfTheme"><?php echo BFText::_('COM_BREEZINGFORMS_THEME'); ?></label>
  2888. <select id="bfTheme">
  2889. <?php
  2890. $tCount = count($themes);
  2891. for($i = 0; $i < $tCount; $i++){
  2892. echo '<option value="'.$themes[$i].'">'.$themes[$i].'</option>'."\n";
  2893. }
  2894. ?>
  2895. </select>
  2896. <br/>
  2897. <br/>
  2898. <br/>
  2899. <input type="hidden" value="0" id="bfElementAdvancedMobileEnabled"/>
  2900. <input type="hidden" value="0" id="bfElementAdvancedForceMobile"/>
  2901. <input type="hidden" value="" id="bfElementAdvancedForceMobileUrl"/>
  2902. <?php
  2903. if(version_compare($version->getShortVersion(), '3.0', '<')){
  2904. ?>
  2905. <label class="bfPropertyLabel" for="bfElementAdvancedJoomlaHint"><?php echo BFText::_('COM_BREEZINGFORMS_JOOMLA_HINT'); ?></label>
  2906. <input type="checkbox" value="" id="bfElementAdvancedJoomlaHint"/>
  2907. <br/>
  2908. <br/>
  2909. <?php
  2910. } else {
  2911. ?>
  2912. <input type="hidden" value="" id="bfElementAdvancedJoomlaHint"/>
  2913. <?php
  2914. }
  2915. ?>
  2916. <label class="bfPropertyLabel" for="bfElementAdvancedDisableJQuery"><?php echo BFText::_('COM_BREEZINGFORMS_DISABLE_JQUERY'); ?></label>
  2917. <input type="checkbox" value="" id="bfElementAdvancedDisableJQuery"/>
  2918. <br/>
  2919. <br/>
  2920. <label class="bfPropertyLabel" for="bfElementAdvancedUseErrorAlerts"><?php echo BFText::_('COM_BREEZINGFORMS_USE_ERROR_ALERTS'); ?></label>
  2921. <input type="checkbox" value="" id="bfElementAdvancedUseErrorAlerts"/>
  2922. <br/>
  2923. <br/>
  2924. <label class="bfPropertyLabel" for="bfElementAdvancedUseDefaultErrors"><?php echo BFText::_('COM_BREEZINGFORMS_IF_NOT_USE_ERROR_ALERTS'); ?></label>
  2925. <?php echo BFText::_('COM_BREEZINGFORMS_IF_USE_DEFAULT_ERRROS'); ?> <input type="checkbox" value="" id="bfElementAdvancedUseDefaultErrors"/>
  2926. <?php echo BFText::_('COM_BREEZINGFORMS_IF_USE_BALLOON_ERRORS'); ?> <input type="checkbox" value="" id="bfElementAdvancedUseBalloonErrors"/>
  2927. <br/>
  2928. <br/>
  2929. <label class="bfPropertyLabel" for="bfElementAdvancedFadeIn"><?php echo BFText::_('COM_BREEZINGFORMS_FADE_IN'); ?></label>
  2930. <input type="checkbox" value="" id="bfElementAdvancedFadeIn"/>
  2931. <br/>
  2932. <br/>
  2933. <label class="bfPropertyLabel" for="bfElementAdvancedRollover"><?php echo BFText::_('COM_BREEZINGFORMS_ROLLOVER'); ?></label>
  2934. <input type="checkbox" value="" id="bfElementAdvancedRollover"/>
  2935. <br/>
  2936. <br/>
  2937. <label class="bfPropertyLabel" for="bfElementAdvancedRolloverColor"><?php echo BFText::_('COM_BREEZINGFORMS_ROLLOVER_COLOR'); ?></label>
  2938. <input type="text" value="" id="bfElementAdvancedRolloverColor"/>
  2939. <br/>
  2940. <br/>
  2941. <label class="bfPropertyLabel" for="bfElementAdvancedToggleFields"><?php echo BFText::_('COM_BREEZINGFORMS_FORM_TOGGLEFIELDS'); ?></label>
  2942. <textarea id="bfElementAdvancedToggleFields"></textarea>
  2943. </fieldset>
  2944. </div>
  2945. <div class="bfAdvanced" id="bfSectionAdvanced" style="display:none">
  2946. <br/>
  2947. <label class="bfPropertyLabel" for="bfSectionAdvancedTurnOff"><?php echo BFText::_('COM_BREEZINGFORMS_TURN_OFF_INITIALLY'); ?></label>
  2948. <input type="checkbox" value="" id="bfSectionAdvancedTurnOff"/>
  2949. </div>
  2950. <div class="bfAdvanced" id="bfElementAdvanced" style="display:none">
  2951. <br/>
  2952. <fieldset>
  2953. <legend><?php echo BFText::_('COM_BREEZINGFORMS_ADVANCED_ELEMENT_OPTIONS'); ?></legend>
  2954. <!-- HIDDEN BEGIN -->
  2955. <div class="bfElementTypeClass" id="bfElementTypeHiddenAdvanced" style="display:none">
  2956. <label class="bfPropertyLabel" for="bfElementHiddenAdvancedOrderNumber"><?php echo BFText::_('COM_BREEZINGFORMS_ORDER_NUMBER'); ?></label>
  2957. <input type="text" value="" id="bfElementHiddenAdvancedOrderNumber"/>
  2958. <br/>
  2959. <br/>
  2960. <label class="bfPropertyLabel" for="bfElementHiddenAdvancedLogging"><?php echo BFText::_('COM_BREEZINGFORMS_LOGGING'); ?></label>
  2961. <input type="checkbox" value="" id="bfElementHiddenAdvancedLogging"/>
  2962. </div>
  2963. <!-- HIDDEN END -->
  2964. <!-- SUMMARIZE BEGIN -->
  2965. <div class="bfElementTypeClass" id="bfElementTypeSummarizeAdvanced" style="display:none">
  2966. <label class="bfPropertyLabel" for="bfElementAdvancedSummarizeCalc"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_CALC'); ?></label>
  2967. <textarea id="bfElementAdvancedSummarizeCalc"></textarea>
  2968. </div>
  2969. <!-- SUMMARIZE END -->
  2970. <!-- TEXTFIELD BEGIN -->
  2971. <div class="bfElementTypeClass" id="bfElementTypeTextAdvanced" style="display:none">
  2972. <label class="bfPropertyLabel" for="bfElementAdvancedPassword"><?php echo BFText::_('COM_BREEZINGFORMS_PASSWORD'); ?></label>
  2973. <input type="checkbox" value="" id="bfElementAdvancedPassword"/>
  2974. <br/>
  2975. <br/>
  2976. <label class="bfPropertyLabel" for="bfElementAdvancedReadOnly"><?php echo BFText::_('COM_BREEZINGFORMS_READONLY'); ?></label>
  2977. <input type="checkbox" value="" id="bfElementAdvancedReadOnly"/>
  2978. <br/>
  2979. <br/>
  2980. <label class="bfPropertyLabel" for="bfElementAdvancedMailback"><?php echo BFText::_('COM_BREEZINGFORMS_MAILBACK'); ?></label>
  2981. <input type="checkbox" value="" id="bfElementAdvancedMailback"/>
  2982. <br/>
  2983. <br/>
  2984. <label class="bfPropertyLabel" for="bfElementAdvancedMailbackAsSender"><?php echo BFText::_('COM_BREEZINGFORMS_MAILBACK_AS_SENDER'); ?></label>
  2985. <input type="checkbox" value="" id="bfElementAdvancedMailbackAsSender"/>
  2986. <br/>
  2987. <br/>
  2988. <label class="bfPropertyLabel" for="bfElementAdvancedMailbackfile"><?php echo BFText::_('COM_BREEZINGFORMS_MAILBACKFILE'); ?></label>
  2989. <input type="text" value="" id="bfElementAdvancedMailbackfile"/>
  2990. <br/>
  2991. <br/>
  2992. <label class="bfPropertyLabel" for="bfElementAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
  2993. <input checked="checked" type="checkbox" value="" id="bfElementAdvancedHideLabel"/>
  2994. <br/>
  2995. <br/>
  2996. <label class="bfPropertyLabel" for="bfElementAdvancedLogging"><?php echo BFText::_('COM_BREEZINGFORMS_LOGGING'); ?></label>
  2997. <input checked="checked" type="checkbox" value="" id="bfElementAdvancedLogging"/>
  2998. <br/>
  2999. <br/>
  3000. <label class="bfPropertyLabel" for="bfElementOrderNumber"><?php echo BFText::_('COM_BREEZINGFORMS_ORDER_NUMBER'); ?></label>
  3001. <input type="text" value="" id="bfElementOrderNumber"/>
  3002. </div>
  3003. <!-- TEXTFIELD END -->
  3004. <!-- TEXTAREA BEGIN -->
  3005. <div class="bfElementTypeClass" id="bfElementTypeTextareaAdvanced" style="display:none">
  3006. <label class="bfPropertyLabel" for="bfElementTextareaAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
  3007. <input checked="checked" type="checkbox" value="" id="bfElementTextareaAdvancedHideLabel"/>
  3008. <br/>
  3009. <br/>
  3010. <label class="bfPropertyLabel" for="bfElementTextareaAdvancedLogging"><?php echo BFText::_('COM_BREEZINGFORMS_LOGGING'); ?></label>
  3011. <input checked="checked" type="checkbox" value="" id="bfElementTextareaAdvancedLogging"/>
  3012. <br/>
  3013. <br/>
  3014. <label class="bfPropertyLabel" for="bfElementTextareaAdvancedOrderNumber"><?php echo BFText::_('COM_BREEZINGFORMS_ORDER_NUMBER'); ?></label>
  3015. <input type="text" value="" id="bfElementTextareaAdvancedOrderNumber"/>
  3016. </div>
  3017. <!-- TEXTAREA END -->
  3018. <!-- RADIOGROUP BEGIN -->
  3019. <div class="bfElementTypeClass" id="bfElementTypeRadioGroupAdvanced" style="display:none">
  3020. <label class="bfPropertyLabel" for="bfElementRadioGroupAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
  3021. <input checked="checked" type="checkbox" value="" id="bfElementRadioGroupAdvancedHideLabel"/>
  3022. <br/>
  3023. <br/>
  3024. <label class="bfPropertyLabel" for="bfElementRadioGroupAdvancedLogging"><?php echo BFText::_('COM_BREEZINGFORMS_LOGGING'); ?></label>
  3025. <input checked="checked" type="checkbox" value="" id="bfElementRadioGroupAdvancedLogging"/>
  3026. <br/>
  3027. <br/>
  3028. <label class="bfPropertyLabel" for="bfElementRadioGroupAdvancedOrderNumber"><?php echo BFText::_('COM_BREEZINGFORMS_ORDER_NUMBER'); ?></label>
  3029. <input type="text" value="" id="bfElementRadioGroupAdvancedOrderNumber"/>
  3030. </div>
  3031. <!-- RADIOGROUP END -->
  3032. <!-- SUBMITBUTTON BEGIN -->
  3033. <div class="bfElementTypeClass" id="bfElementTypeSubmitButtonAdvanced" style="display:none">
  3034. <label class="bfPropertyLabel" for="bfElementSubmitButtonAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
  3035. <input checked="checked" type="checkbox" value="" id="bfElementSubmitButtonAdvancedHideLabel"/>
  3036. <br/>
  3037. <br/>
  3038. <label class="bfPropertyLabel" for="bfElementSubmitButtonAdvancedSrc"><?php echo BFText::_('COM_BREEZINGFORMS_SOURCE'); ?></label>
  3039. <input type="text" value="" id="bfElementSubmitButtonAdvancedSrc"/>
  3040. </div>
  3041. <!-- SUBMITBUTTON END -->
  3042. <!-- PAYPAL BEGIN -->
  3043. <div class="bfElementTypeClass" id="bfElementTypePayPalAdvanced" style="display:none">
  3044. <label class="bfPropertyLabel" for="bfElementPayPalAdvancedUseIpn"><?php echo BFText::_('COM_BREEZINGFORMS_USE_IPN'); ?></label>
  3045. <input type="checkbox" value="" id="bfElementPayPalAdvancedUseIpn"/><?php echo BFText::_('COM_BREEZINGFORMS_USE_IPN_DESCRIPTION'); ?>
  3046. <br/>
  3047. <br/>
  3048. <label class="bfPropertyLabel" for="bfElementPayPalAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
  3049. <input checked="checked" type="checkbox" value="" id="bfElementPayPalAdvancedHideLabel"/>
  3050. <br/>
  3051. <br/>
  3052. <label class="bfPropertyLabel" for="bfElementPayPalAdvancedImage"><?php echo BFText::_('COM_BREEZINGFORMS_IMAGE'); ?></label>
  3053. <input type="text" value="" id="bfElementPayPalAdvancedImage"/>
  3054. <br/>
  3055. <br/>
  3056. <label class="bfPropertyLabel" for="bfElementPayPalAdvancedTestaccount"><?php echo BFText::_('COM_BREEZINGFORMS_TESTACCOUNT'); ?></label>
  3057. <input checked="checked" type="checkbox" value="" id="bfElementPayPalAdvancedTestaccount"/>
  3058. <br/>
  3059. <br/>
  3060. <label class="bfPropertyLabel" for="bfElementPayPalAdvancedTestBusiness"><?php echo BFText::_('COM_BREEZINGFORMS_TESTBUSINESS'); ?></label>
  3061. <input type="text" value="" id="bfElementPayPalAdvancedTestBusiness"/>
  3062. <br/>
  3063. <br/>
  3064. <label class="bfPropertyLabel" for="bfElementPayPalAdvancedTestToken"><?php echo BFText::_('COM_BREEZINGFORMS_TESTTOKEN'); ?></label>
  3065. <input type="text" value="" id="bfElementPayPalAdvancedTestToken"/>
  3066. <br/>
  3067. <br/>
  3068. <label class="bfPropertyLabel" for="bfElementPayPalAdvancedDownloadableFile"><?php echo BFText::_('COM_BREEZINGFORMS_DOWNLOADABLE_FILE'); ?></label>
  3069. <input checked="checked" type="checkbox" value="" id="bfElementPayPalAdvancedDownloadableFile"/>
  3070. <br/>
  3071. <br/>
  3072. <label class="bfPropertyLabel" for="bfElementPayPalAdvancedFilepath"><?php echo BFText::_('COM_BREEZINGFORMS_FILEPATH'); ?></label>
  3073. <input type="text" value="" id="bfElementPayPalAdvancedFilepath"/>
  3074. <br/>
  3075. <br/>
  3076. <label class="bfPropertyLabel" for="bfElementPayPalAdvancedDownloadTries"><?php echo BFText::_('COM_BREEZINGFORMS_DOWNLOAD_TRIES'); ?></label>
  3077. <input type="text" value="" id="bfElementPayPalAdvancedDownloadTries"/>
  3078. </div>
  3079. <!-- PAYPAL END -->
  3080. <!-- SOFORTUEBERWEISUNG BEGIN -->
  3081. <div class="bfElementTypeClass" id="bfElementTypeSofortueberweisungAdvanced" style="display:none">
  3082. <label class="bfPropertyLabel" for="bfElementSofortueberweisungAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
  3083. <input checked="checked" type="checkbox" value="" id="bfElementSofortueberweisungAdvancedHideLabel"/>
  3084. <br/>
  3085. <br/>
  3086. <label class="bfPropertyLabel" for="bfElementSofortueberweisungAdvancedImage"><?php echo BFText::_('COM_BREEZINGFORMS_IMAGE'); ?></label>
  3087. <input type="text" value="" id="bfElementSofortueberweisungAdvancedImage"/>
  3088. <br/>
  3089. <br/>
  3090. <label class="bfPropertyLabel" for="bfElementSofortueberweisungAdvancedDownloadableFile"><?php echo BFText::_('COM_BREEZINGFORMS_DOWNLOADABLE_FILE'); ?></label>
  3091. <input checked="checked" type="checkbox" value="" id="bfElementSofortueberweisungAdvancedDownloadableFile"/>
  3092. <br/>
  3093. <br/>
  3094. <label class="bfPropertyLabel" for="bfElementSofortueberweisungAdvancedFilepath"><?php echo BFText::_('COM_BREEZINGFORMS_FILEPATH'); ?></label>
  3095. <input type="text" value="" id="bfElementSofortueberweisungAdvancedFilepath"/>
  3096. <br/>
  3097. <br/>
  3098. <label class="bfPropertyLabel" for="bfElementSofortueberweisungAdvancedDownloadTries"><?php echo BFText::_('COM_BREEZINGFORMS_DOWNLOAD_TRIES'); ?></label>
  3099. <input type="text" value="" id="bfElementSofortueberweisungAdvancedDownloadTries"/>
  3100. </div>
  3101. <!-- SOFORTUEBERWEISUNG END -->
  3102. <!-- CAPTCHA BEGIN -->
  3103. <div class="bfElementTypeClass" id="bfElementTypeCaptchaAdvanced" style="display:none">
  3104. <label class="bfPropertyLabel" for="bfElementCaptchaAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
  3105. <input checked="checked" type="checkbox" value="" id="bfElementCaptchaAdvancedHideLabel"/>
  3106. </div>
  3107. <!-- CAPTCHA END -->
  3108. <!-- RECAPTCHA BEGIN -->
  3109. <div class="bfElementTypeClass" id="bfElementTypeReCaptchaAdvanced" style="display:none">
  3110. <label class="bfPropertyLabel" for="bfElementReCaptchaAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
  3111. <input checked="checked" type="checkbox" value="" id="bfElementReCaptchaAdvancedHideLabel"/>
  3112. </div>
  3113. <!-- RECAPTCHA END -->
  3114. <!-- CALENDAR BEGIN -->
  3115. <div class="bfElementTypeClass" id="bfElementTypeCalendarAdvanced" style="display:none">
  3116. <label class="bfPropertyLabel" for="bfElementCalendarAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
  3117. <input checked="checked" type="checkbox" value="" id="bfElementCalendarAdvancedHideLabel"/>
  3118. </div>
  3119. <!-- CALENDAR END -->
  3120. <!-- CHECKBOXGROUP BEGIN -->
  3121. <div class="bfElementTypeClass" id="bfElementTypeCheckboxGroupAdvanced" style="display:none">
  3122. <label class="bfPropertyLabel" for="bfElementCheckboxGroupAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
  3123. <input checked="checked" type="checkbox" value="" id="bfElementCheckboxGroupAdvancedHideLabel"/>
  3124. <br/>
  3125. <br/>
  3126. <label class="bfPropertyLabel" for="bfElementCheckboxGroupAdvancedLogging"><?php echo BFText::_('COM_BREEZINGFORMS_LOGGING'); ?></label>
  3127. <input checked="checked" type="checkbox" value="" id="bfElementCheckboxGroupAdvancedLogging"/>
  3128. <br/>
  3129. <br/>
  3130. <label class="bfPropertyLabel" for="bfElementCheckboxGroupAdvancedOrderNumber"><?php echo BFText::_('COM_BREEZINGFORMS_ORDER_NUMBER'); ?></label>
  3131. <input type="text" value="" id="bfElementCheckboxGroupAdvancedOrderNumber"/>
  3132. </div>
  3133. <!-- CHECKBOXGROUP END -->
  3134. <!-- CHECKBOX BEGIN -->
  3135. <div class="bfElementTypeClass" id="bfElementTypeCheckboxAdvanced" style="display:none">
  3136. <label class="bfPropertyLabel" for="bfElementCheckboxAdvancedMailbackAccept"><?php echo BFText::_('COM_BREEZINGFORMS_MAILBACK_ACCEPT'); ?></label>
  3137. <input checked="checked" type="checkbox" value="" id="bfElementCheckboxAdvancedMailbackAccept"/>
  3138. <br/>
  3139. <br/>
  3140. <label class="bfPropertyLabel" for="bfElementCheckboxAdvancedMailbackConnectWith"><?php echo BFText::_('COM_BREEZINGFORMS_MAILBACK_CONNECT_WITH'); ?></label>
  3141. <input type="text" value="" id="bfElementCheckboxAdvancedMailbackConnectWith"/>
  3142. <br/>
  3143. <br/>
  3144. <label class="bfPropertyLabel" for="bfElementCheckboxAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
  3145. <input checked="checked" type="checkbox" value="" id="bfElementCheckboxAdvancedHideLabel"/>
  3146. <br/>
  3147. <br/>
  3148. <label class="bfPropertyLabel" for="bfElementCheckboxAdvancedLogging"><?php echo BFText::_('COM_BREEZINGFORMS_LOGGING'); ?></label>
  3149. <input checked="checked" type="checkbox" value="" id="bfElementCheckboxAdvancedLogging"/>
  3150. <br/>
  3151. <br/>
  3152. <label class="bfPropertyLabel" for="bfElementCheckboxAdvancedOrderNumber"><?php echo BFText::_('COM_BREEZINGFORMS_ORDER_NUMBER'); ?></label>
  3153. <input type="text" value="" id="bfElementCheckboxAdvancedOrderNumber"/>
  3154. </div>
  3155. <!-- CHECKBOX END -->
  3156. <!-- CHECKBOXGROUP BEGIN -->
  3157. <div class="bfElementTypeClass" id="bfElementTypeSelectAdvanced" style="display:none">
  3158. <label class="bfPropertyLabel" for="bfElementSelectAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
  3159. <input checked="checked" type="checkbox" value="" id="bfElementSelectAdvancedHideLabel"/>
  3160. <br/>
  3161. <br/>
  3162. <label class="bfPropertyLabel" for="bfElementSelectAdvancedMailback"><?php echo BFText::_('COM_BREEZINGFORMS_MAILBACK'); ?></label>
  3163. <input checked="checked" type="checkbox" value="" id="bfElementSelectAdvancedMailback"/>
  3164. <br/>
  3165. <br/>
  3166. <label class="bfPropertyLabel" for="bfElementSelectAdvancedLogging"><?php echo BFText::_('COM_BREEZINGFORMS_LOGGING'); ?></label>
  3167. <input checked="checked" type="checkbox" value="" id="bfElementSelectAdvancedLogging"/>
  3168. <br/>
  3169. <br/>
  3170. <label class="bfPropertyLabel" for="bfElementSelectAdvancedOrderNumber"><?php echo BFText::_('COM_BREEZINGFORMS_ORDER_NUMBER'); ?></label>
  3171. <input type="text" value="" id="bfElementSelectAdvancedOrderNumber"/>
  3172. </div>
  3173. <!-- CHECKBOXGROUP END -->
  3174. <!-- FILE BEGIN -->
  3175. <div class="bfElementTypeClass" id="bfElementTypeFileAdvanced" style="display:none">
  3176. <label class="bfPropertyLabel" for="bfElementFileAdvancedFlashUploader"><?php echo BFText::_('COM_BREEZINGFORMS_FLASH_UPLOADER'); ?></label>
  3177. <input type="checkbox" value="" id="bfElementFileAdvancedFlashUploader"/>
  3178. <br/>
  3179. <br/>
  3180. <label class="bfPropertyLabel" for="bfElementFileAdvancedFlashUploaderMulti"><?php echo BFText::_('COM_BREEZINGFORMS_FLASH_UPLOADER_MULTI'); ?></label>
  3181. <input type="checkbox" value="" id="bfElementFileAdvancedFlashUploaderMulti"/>
  3182. <br/>
  3183. <br/>
  3184. <label class="bfPropertyLabel" for="bfElementFileAdvancedFlashUploaderBytes"><?php echo BFText::_('COM_BREEZINGFORMS_FLASH_UPLOADER_BYTES'); ?></label>
  3185. <input type="text" value="" id="bfElementFileAdvancedFlashUploaderBytes"/>
  3186. <br/>
  3187. <br/>
  3188. <label class="bfPropertyLabel" for="bfElementFileAdvancedFlashUploaderWidth"><?php echo BFText::_('COM_BREEZINGFORMS_FLASH_UPLOADER_WIDTH'); ?></label>
  3189. <input type="text" value="" id="bfElementFileAdvancedFlashUploaderWidth"/>
  3190. <br/>
  3191. <br/>
  3192. <label class="bfPropertyLabel" for="bfElementFileAdvancedFlashUploaderHeight"><?php echo BFText::_('COM_BREEZINGFORMS_FLASH_UPLOADER_HEIGHT'); ?></label>
  3193. <input type="text" value="" id="bfElementFileAdvancedFlashUploaderHeight"/>
  3194. <br/>
  3195. <br/>
  3196. <label class="bfPropertyLabel" for="bfElementFileAdvancedFlashUploaderTransparent"><?php echo BFText::_('COM_BREEZINGFORMS_FLASH_UPLOADER_TRANSPARENT'); ?></label>
  3197. <input type="checkbox" value="" id="bfElementFileAdvancedFlashUploaderTransparent"/>
  3198. <br/>
  3199. <br/>
  3200. <label class="bfPropertyLabel" for="bfElementFileAdvancedUploadDirectory"><?php echo BFText::_('COM_BREEZINGFORMS_UPLOAD_DIRECTORY'); ?></label>
  3201. <input type="text" value="" id="bfElementFileAdvancedUploadDirectory"/>
  3202. <br/>
  3203. <br/>
  3204. <label class="bfPropertyLabel" for="bfElementFileAdvancedTimestamp"><?php echo BFText::_('COM_BREEZINGFORMS_TIMESTAMP'); ?></label>
  3205. <input checked="checked" type="checkbox" value="" id="bfElementFileAdvancedTimestamp"/>
  3206. <br/>
  3207. <br/>
  3208. <label class="bfPropertyLabel" for="bfElementFileAdvancedAllowedFileExtensions"><?php echo BFText::_('COM_BREEZINGFORMS_ALLOWED_FILE_EXTENSIONS'); ?></label>
  3209. <input type="text" value="" id="bfElementFileAdvancedAllowedFileExtensions"/>
  3210. <br/>
  3211. <br/>
  3212. <label class="bfPropertyLabel" for="bfElementFileAdvancedAttachToUserMail"><?php echo BFText::_('COM_BREEZINGFORMS_ATTACH_TO_USERMAIL'); ?></label>
  3213. <input checked="checked" type="checkbox" value="" id="bfElementFileAdvancedAttachToUserMail"/>
  3214. <br/>
  3215. <br/>
  3216. <label class="bfPropertyLabel" for="bfElementFileAdvancedAttachToAdminMail"><?php echo BFText::_('COM_BREEZINGFORMS_ATTACH_TO_ADMINMAIL'); ?></label>
  3217. <input checked="checked" type="checkbox" value="" id="bfElementFileAdvancedAttachToAdminMail"/>
  3218. <br/>
  3219. <br/>
  3220. <label class="bfPropertyLabel" for="bfElementFileAdvancedUseUrl"><?php echo BFText::_('COM_BREEZINGFORMS_USE_URL'); ?></label>
  3221. <input checked="checked" type="checkbox" value="" id="bfElementFileAdvancedUseUrl"/>
  3222. <br/>
  3223. <br/>
  3224. <label class="bfPropertyLabel" for="bfElementFileAdvancedUseUrlDownloadDirectory"><?php echo BFText::_('COM_BREEZINGFORMS_USE_URL_DOWNLOAD_DIRECTORY'); ?></label>
  3225. <input type="text" value="" id="bfElementFileAdvancedUseUrlDownloadDirectory"/> <?php echo BFText::_('COM_BREEZINGFORMS_USE_URL_DOWNLOAD_DIRECTORY_SET_SYNCH'); ?>
  3226. <br/>
  3227. <br/>
  3228. <label class="bfPropertyLabel" for="bfElementFileAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
  3229. <input checked="checked" type="checkbox" value="" id="bfElementFileAdvancedHideLabel"/>
  3230. <br/>
  3231. <br/>
  3232. <label class="bfPropertyLabel" for="bfElementFileAdvancedLogging"><?php echo BFText::_('COM_BREEZINGFORMS_LOGGING'); ?></label>
  3233. <input checked="checked" type="checkbox" value="" id="bfElementFileAdvancedLogging"/>
  3234. <br/>
  3235. <br/>
  3236. <label class="bfPropertyLabel" for="bfElementFileAdvancedOrderNumber"><?php echo BFText::_('COM_BREEZINGFORMS_ORDER_NUMBER'); ?></label>
  3237. <input type="text" value="" id="bfElementFileAdvancedOrderNumber"/>
  3238. </div>
  3239. <!-- FILE END -->
  3240. <div id="bfHideInMailback">
  3241. <br/>
  3242. <label class="bfPropertyLabel" for="bfElementAdvancedHideInMailback"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_IN_MAILBACK'); ?></label>
  3243. <input type="checkbox" value="" id="bfElementAdvancedHideInMailback"/>
  3244. <br/>
  3245. </div>
  3246. <div id="bfAdvancedLeaf">
  3247. <br/>
  3248. <label class="bfPropertyLabel" id="bfElementAdvancedTabIndexLabel" for="bfElementAdvancedTabIndex"><?php echo BFText::_('COM_BREEZINGFORMS_TAB_INDEX'); ?></label>
  3249. <input type="text" value="" id="bfElementAdvancedTabIndex"/>
  3250. <br/>
  3251. <br/>
  3252. <label class="bfPropertyLabel" for="bfElementAdvancedTurnOff"><?php echo BFText::_('COM_BREEZINGFORMS_TURN_OFF_INITIALLY'); ?></label>
  3253. <input type="checkbox" value="" id="bfElementAdvancedTurnOff"/>
  3254. <br/>
  3255. <br/>
  3256. <label class="bfPropertyLabel" id="bfElementAdvancedLabelPositionLabel" for="bfElementAdvancedLabelPosition"><?php echo BFText::_('COM_BREEZINGFORMS_LABEL_POSITION'); ?></label>
  3257. <select id="bfElementAdvancedLabelPosition">
  3258. <option value="left"><?php echo BFText::_('COM_BREEZINGFORMS_LEFT'); ?></option>
  3259. <option value="top"><?php echo BFText::_('COM_BREEZINGFORMS_TOP'); ?></option>
  3260. <option value="right"><?php echo BFText::_('COM_BREEZINGFORMS_RIGHT'); ?></option>
  3261. <option value="bottom"><?php echo BFText::_('COM_BREEZINGFORMS_BOTTOM'); ?></option>
  3262. </select>
  3263. </div>
  3264. </fieldset>
  3265. <fieldset id="bfInitScript" style="display:none">
  3266. <br/>
  3267. <legend><?php echo BFText::_('COM_BREEZINGFORMS_ADVANCED_ELEMENT_INITSCRIPT'); ?></legend>
  3268. <?php echo BFText::_('COM_BREEZINGFORMS_TYPE') ?>:
  3269. <?php echo BFText::_('COM_BREEZINGFORMS_NONE') ?> <input onclick="JQuery('#bfInitScriptFlags').css('display','none');JQuery('#bfInitScriptLibrary').css('display','none');JQuery('#bfInitScriptCustom').css('display','none');" type="radio" name="initType" id="bfInitTypeNone" class="bfInitType" value="0"/>
  3270. <?php echo BFText::_('COM_BREEZINGFORMS_LIBRARY') ?> <input onclick="JQuery('#bfInitScriptFlags').css('display','');JQuery('#bfInitScriptLibrary').css('display','');JQuery('#bfInitScriptCustom').css('display','none');" type="radio" name="initType" id="bfInitTypeLibrary" class="bfInitType" value="1"/>
  3271. <?php echo BFText::_('COM_BREEZINGFORMS_CUSTOM') ?> <input onclick="JQuery('#bfInitScriptFlags').css('display','');JQuery('#bfInitScriptLibrary').css('display','none');JQuery('#bfInitScriptCustom').css('display','');" type="radio" name="initType" id="bfInitTypeCustom" class="bfInitType" value="2"/>
  3272. <div id="bfInitScriptFlags" style="display:none">
  3273. <hr/>
  3274. <input type="checkbox" id="bfInitFormEntry" class="bfInitFormEntry" name="bfInitFormEntry" value="1"/><label for="bfInitFormEntry"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_FORMENTRY'); ?></label>
  3275. <input type="checkbox" id="bfInitPageEntry" class="bfInitPageEntry" name="bfInitPageEntry" value="1"/><label for="bfInitPageEntry"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_PAGEENTRY'); ?></label>
  3276. </div>
  3277. <div id="bfInitScriptLibrary" style="display:none">
  3278. <hr/>
  3279. <?php echo BFText::_('COM_BREEZINGFORMS_SCRIPT') ?>:<br/> <select id="bfInitScriptSelection"></select>
  3280. <br/>
  3281. <br/>
  3282. <br/>
  3283. <div id="bfInitSelectionDescription"></div>
  3284. </div>
  3285. <div id="bfInitScriptCustom" style="display:none">
  3286. <hr/>
  3287. <div style="cursor: pointer;" onclick="createInitCode()"><?php echo BFText::_('COM_BREEZINGFORMS_CREATE_CODE_FRAMEWORK') ?></div>
  3288. <textarea name="bfInitCode" id="bfInitCode" rows="10" style="width:100%" wrap="off"></textarea>
  3289. </div>
  3290. </fieldset>
  3291. <fieldset id="bfActionScript" style="display:none">
  3292. <br/>
  3293. <legend><?php echo BFText::_('COM_BREEZINGFORMS_ADVANCED_ELEMENT_ACTIONSCRIPT'); ?></legend>
  3294. <?php echo BFText::_('COM_BREEZINGFORMS_TYPE') ?>:
  3295. <?php echo BFText::_('COM_BREEZINGFORMS_NONE') ?> <input onclick="JQuery('#bfActionScriptFlags').css('display','none');JQuery('#bfActionScriptLibrary').css('display','none');JQuery('#bfActionScriptCustom').css('display','none');" type="radio" name="actionType" name="actionType" id="bfActionTypeNone" class="bfActionType" value="0"/>
  3296. <?php echo BFText::_('COM_BREEZINGFORMS_LIBRARY') ?> <input onclick="JQuery('#bfActionScriptFlags').css('display','');JQuery('#bfActionScriptLibrary').css('display','');JQuery('#bfActionScriptCustom').css('display','none');" type="radio" name="actionType" id="bfActionTypeLibrary" class="bfActionType" value="1"/>
  3297. <?php echo BFText::_('COM_BREEZINGFORMS_CUSTOM') ?> <input onclick="JQuery('#bfActionScriptFlags').css('display','');JQuery('#bfActionScriptLibrary').css('display','none');JQuery('#bfActionScriptCustom').css('display','');" type="radio" name="actionType" id="bfActionTypeCustom" class="bfActionType" value="2"/>
  3298. <div id="bfActionScriptFlags" style="display:none">
  3299. <hr/>
  3300. <?php echo BFText::_('COM_BREEZINGFORMS_ACTIONS') ?>:
  3301. <input style="display:none" type="checkbox" class="bfAction" id="bfActionClick" name="bfActionClick" value="1"/><label style="display:none" class="bfActionLabel" id="bfActionClickLabel"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CLICK'); ?></label>
  3302. <input style="display:none" type="checkbox" class="bfAction" id="bfActionBlur" name="bfActionBlur" value="1"/><label style="display:none" class="bfActionLabel" id="bfActionBlurLabel"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_BLUR'); ?></label>
  3303. <input style="display:none" type="checkbox" class="bfAction" id="bfActionChange" name="bfActionChange" value="1"/><label style="display:none" class="bfActionLabel" id="bfActionChangeLabel"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CHANGE'); ?></label>
  3304. <input style="display:none" type="checkbox" class="bfAction" id="bfActionFocus" name="bfActionFocus" value="1"/><label style="display:none" class="bfActionLabel" id="bfActionFocusLabel"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_FOCUS'); ?></label>
  3305. <input style="display:none" type="checkbox" class="bfAction" id="bfActionSelect" name="bfActionSelect" value="1"/><label style="display:none" class="bfActionLabel" id="bfActionSelectLabel"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_SELECTION'); ?></label>
  3306. </div>
  3307. <div id="bfActionScriptLibrary" style="display:none">
  3308. <hr/>
  3309. <?php echo BFText::_('COM_BREEZINGFORMS_SCRIPT') ?>:<br/><select id="bfActionsScriptSelection"></select>
  3310. <br/>
  3311. <br/>
  3312. <br/>
  3313. <div id="bfActionsScriptSelectionDescription"></div>
  3314. </div>
  3315. <div id="bfActionScriptCustom" style="display:none">
  3316. <hr/>
  3317. <div style="cursor: pointer;" onclick="createActionCode()"><?php echo BFText::_('COM_BREEZINGFORMS_CREATE_CODE_FRAMEWORK') ?></div>
  3318. <textarea name="bfActionCode" id="bfActionCode" rows="10" style="width:100%" wrap="off"></textarea>
  3319. </div>
  3320. </fieldset>
  3321. </div>
  3322. <br/>
  3323. <div class="bfFadingMessage" style="display:none"></div>
  3324. <input type="submit" class="btn btn-secondary" value="<?php echo BFText::_('COM_BREEZINGFORMS_PROPERTIES_SAVE'); ?>" id="bfAdvancedSaveButton"/>
  3325. <br/>
  3326. <br/>
  3327. </div>
  3328. </div>
  3329. </div>
  3330. <div class="b">
  3331. <div class="b">
  3332. <div class="b"></div>
  3333. </div>
  3334. </div>
  3335. </div>
  3336. </form>
  3337. </div> <!-- ##### bfQuickModeRight end ##### -->
  3338. </div> <!-- ##### bfQuickModeWrapper end ##### -->
  3339. <?php
  3340. }
  3341. }