/zip/nuevos/promotor.php
PHP | 2938 lines | 2535 code | 322 blank | 81 comment | 697 complexity | 5c0b524c01f67522ce2ce29a2e80a4c9 MD5 | raw file
Possible License(s): GPL-2.0, BSD-3-Clause, LGPL-2.1, MIT, LGPL-3.0, LGPL-2.0, JSON
Large files files are truncated, but you can click here to view the full file
- <?php
- define( '_JEXEC', 1 );
- define('JPATH_BASE', dirname(__FILE__) );
- define( 'DS', DIRECTORY_SEPARATOR );
- require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
- require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
- $mainframe =& JFactory::getApplication('site');
- ?>
- <script src="/media/system/js/mootools-core.js" type="text/javascript"></script>
- <script src="/media/system/js/core.js" type="text/javascript"></script>
- <script src="/media/system/js/mootools-more.js" type="text/javascript"></script>
- <script src="/components/com_breezingforms/libraries/jquery/jq.min.js" type="text/javascript"></script>
- <script src="/components/com_breezingforms/libraries/jquery/tooltip.js" type="text/javascript"></script>
- <script src="/templates/beez5/javascript/md_stylechanger.js" type="text/javascript" defer="defer"></script>
- <script type="text/javascript">
- <!--
- var inlineErrorElements = new Array();
- var bfSummarizers = new Array();
- var bfDeactivateField = new Array();
- var bfDeactivateSection = new Array();
-
- var toggleFieldsArray = [{ action: "turn", state: "off", tCat: "section", tName: "socio1", statement: "if", sName: "numero_socios", condition: "is", value: "value0" },{ action: "turn", state: "off", tCat: "section", tName: "socio2", statement: "if", sName: "numero_socios", condition: "is", value: "value0" },{ action: "turn", state: "off", tCat: "section", tName: "socio3", statement: "if", sName: "numero_socios", condition: "is", value: "value0" },{ action: "turn", state: "off", tCat: "section", tName: "socio4", statement: "if", sName: "numero_socios", condition: "is", value: "value0" },{ action: "turn", state: "off", tCat: "section", tName: "socio5", statement: "if", sName: "numero_socios", condition: "is", value: "value0" },{ action: "turn", state: "off", tCat: "section", tName: "socio6", statement: "if", sName: "numero_socios", condition: "is", value: "value0" },{ action: "turn", state: "off", tCat: "section", tName: "socio7", statement: "if", sName: "numero_socios", condition: "is", value: "value0" },{ action: "turn", state: "off", tCat: "section", tName: "socio8", statement: "if", sName: "numero_socios", condition: "is", value: "value0" },{ action: "turn", state: "off", tCat: "section", tName: "socio9", statement: "if", sName: "numero_socios", condition: "is", value: "value0" },{ action: "turn", state: "off", tCat: "section", tName: "socio10", statement: "if", sName: "numero_socios", condition: "is", value: "value0" },{ action: "turn", state: "off", tCat: "section", tName: "socio11", statement: "if", sName: "numero_socios", condition: "is", value: "value0" },{ action: "turn", state: "off", tCat: "section", tName: "socio12", statement: "if", sName: "numero_socios", condition: "is", value: "value0" },{ action: "turn", state: "on", tCat: "section", tName: "socio1", statement: "if", sName: "numero_socios", condition: "is", value: "value1" },{ action: "turn", state: "off", tCat: "section", tName: "socio2", statement: "if", sName: "numero_socios", condition: "is", value: "value1" },{ action: "turn", state: "off", tCat: "section", tName: "socio3", statement: "if", sName: "numero_socios", condition: "is", value: "value1" },{ action: "turn", state: "off", tCat: "section", tName: "socio4", statement: "if", sName: "numero_socios", condition: "is", value: "value1" },{ action: "turn", state: "off", tCat: "section", tName: "socio5", statement: "if", sName: "numero_socios", condition: "is", value: "value1" },{ action: "turn", state: "off", tCat: "section", tName: "socio6", statement: "if", sName: "numero_socios", condition: "is", value: "value1" },{ action: "turn", state: "off", tCat: "section", tName: "socio7", statement: "if", sName: "numero_socios", condition: "is", value: "value1" },{ action: "turn", state: "off", tCat: "section", tName: "socio8", statement: "if", sName: "numero_socios", condition: "is", value: "value1" },{ action: "turn", state: "off", tCat: "section", tName: "socio9", statement: "if", sName: "numero_socios", condition: "is", value: "value1" },{ action: "turn", state: "off", tCat: "section", tName: "socio10", statement: "if", sName: "numero_socios", condition: "is", value: "value1" },{ action: "turn", state: "off", tCat: "section", tName: "socio11", statement: "if", sName: "numero_socios", condition: "is", value: "value1" },{ action: "turn", state: "off", tCat: "section", tName: "socio12", statement: "if", sName: "numero_socios", condition: "is", value: "value1" },{ action: "turn", state: "on", tCat: "section", tName: "socio1", statement: "if", sName: "numero_socios", condition: "is", value: "value2" },{ action: "turn", state: "on", tCat: "section", tName: "socio2", statement: "if", sName: "numero_socios", condition: "is", value: "value2" },{ action: "turn", state: "off", tCat: "section", tName: "socio3", statement: "if", sName: "numero_socios", condition: "is", value: "value2" },{ action: "turn", state: "off", tCat: "section", tName: "socio4", statement: "if", sName: "numero_socios", condition: "is", value: "value2" },{ action: "turn", state: "off", tCat: "section", tName: "socio5", statement: "if", sName: "numero_socios", condition: "is", value: "value2" },{ action: "turn", state: "off", tCat: "section", tName: "socio6", statement: "if", sName: "numero_socios", condition: "is", value: "value2" },{ action: "turn", state: "off", tCat: "section", tName: "socio7", statement: "if", sName: "numero_socios", condition: "is", value: "value2" },{ action: "turn", state: "off", tCat: "section", tName: "socio8", statement: "if", sName: "numero_socios", condition: "is", value: "value2" },{ action: "turn", state: "off", tCat: "section", tName: "socio9", statement: "if", sName: "numero_socios", condition: "is", value: "value2" },{ action: "turn", state: "off", tCat: "section", tName: "socio10", statement: "if", sName: "numero_socios", condition: "is", value: "value2" },{ action: "turn", state: "off", tCat: "section", tName: "socio11", statement: "if", sName: "numero_socios", condition: "is", value: "value2" },{ action: "turn", state: "off", tCat: "section", tName: "socio12", statement: "if", sName: "numero_socios", condition: "is", value: "value2" },{ action: "turn", state: "on", tCat: "section", tName: "socio1", statement: "if", sName: "numero_socios", condition: "is", value: "value3" },{ action: "turn", state: "on", tCat: "section", tName: "socio2", statement: "if", sName: "numero_socios", condition: "is", value: "value3" },{ action: "turn", state: "on", tCat: "section", tName: "socio3", statement: "if", sName: "numero_socios", condition: "is", value: "value3" },{ action: "turn", state: "off", tCat: "section", tName: "socio4", statement: "if", sName: "numero_socios", condition: "is", value: "value3" },{ action: "turn", state: "off", tCat: "section", tName: "socio5", statement: "if", sName: "numero_socios", condition: "is", value: "value3" },{ action: "turn", state: "off", tCat: "section", tName: "socio6", statement: "if", sName: "numero_socios", condition: "is", value: "value3" },{ action: "turn", state: "off", tCat: "section", tName: "socio7", statement: "if", sName: "numero_socios", condition: "is", value: "value3" },{ action: "turn", state: "off", tCat: "section", tName: "socio8", statement: "if", sName: "numero_socios", condition: "is", value: "value3" },{ action: "turn", state: "off", tCat: "section", tName: "socio9", statement: "if", sName: "numero_socios", condition: "is", value: "value3" },{ action: "turn", state: "off", tCat: "section", tName: "socio10", statement: "if", sName: "numero_socios", condition: "is", value: "value3" },{ action: "turn", state: "off", tCat: "section", tName: "socio11", statement: "if", sName: "numero_socios", condition: "is", value: "value3" },{ action: "turn", state: "off", tCat: "section", tName: "socio12", statement: "if", sName: "numero_socios", condition: "is", value: "value3" },{ action: "turn", state: "on", tCat: "section", tName: "socio1", statement: "if", sName: "numero_socios", condition: "is", value: "value4" },{ action: "turn", state: "on", tCat: "section", tName: "socio2", statement: "if", sName: "numero_socios", condition: "is", value: "value4" },{ action: "turn", state: "on", tCat: "section", tName: "socio3", statement: "if", sName: "numero_socios", condition: "is", value: "value4" },{ action: "turn", state: "on", tCat: "section", tName: "socio4", statement: "if", sName: "numero_socios", condition: "is", value: "value4" },{ action: "turn", state: "off", tCat: "section", tName: "socio5", statement: "if", sName: "numero_socios", condition: "is", value: "value4" },{ action: "turn", state: "off", tCat: "section", tName: "socio6", statement: "if", sName: "numero_socios", condition: "is", value: "value4" },{ action: "turn", state: "off", tCat: "section", tName: "socio7", statement: "if", sName: "numero_socios", condition: "is", value: "value4" },{ action: "turn", state: "off", tCat: "section", tName: "socio8", statement: "if", sName: "numero_socios", condition: "is", value: "value4" },{ action: "turn", state: "off", tCat: "section", tName: "socio9", statement: "if", sName: "numero_socios", condition: "is", value: "value4" },{ action: "turn", state: "off", tCat: "section", tName: "socio10", statement: "if", sName: "numero_socios", condition: "is", value: "value4" },{ action: "turn", state: "off", tCat: "section", tName: "socio11", statement: "if", sName: "numero_socios", condition: "is", value: "value4" },{ action: "turn", state: "off", tCat: "section", tName: "socio12", statement: "if", sName: "numero_socios", condition: "is", value: "value4" },{ action: "turn", state: "on", tCat: "section", tName: "socio1", statement: "if", sName: "numero_socios", condition: "is", value: "value5" },{ action: "turn", state: "on", tCat: "section", tName: "socio2", statement: "if", sName: "numero_socios", condition: "is", value: "value5" },{ action: "turn", state: "on", tCat: "section", tName: "socio3", statement: "if", sName: "numero_socios", condition: "is", value: "value5" },{ action: "turn", state: "on", tCat: "section", tName: "socio4", statement: "if", sName: "numero_socios", condition: "is", value: "value5" },{ action: "turn", state: "on", tCat: "section", tName: "socio5", statement: "if", sName: "numero_socios", condition: "is", value: "value5" },{ action: "turn", state: "off", tCat: "section", tName: "socio6", statement: "if", sName: "numero_socios", condition: "is", value: "value5" },{ action: "turn", state: "off", tCat: "section", tName: "socio7", statement: "if", sName: "numero_socios", condition: "is", value: "value5" },{ action: "turn", state: "off", tCat: "section", tName: "socio8", statement: "if", sName: "numero_socios", condition: "is", value: "value5" },{ action: "turn", state: "off", tCat: "section", tName: "socio9", statement: "if", sName: "numero_socios", condition: "is", value: "value5" },{ action: "turn", state: "off", tCat: "section", tName: "socio10", statement: "if", sName: "numero_socios", condition: "is", value: "value5" },{ action: "turn", state: "off", tCat: "section", tName: "socio11", statement: "if", sName: "numero_socios", condition: "is", value: "value5" },{ action: "turn", state: "off", tCat: "section", tName: "socio12", statement: "if", sName: "numero_socios", condition: "is", value: "value5" },{ action: "turn", state: "on", tCat: "section", tName: "socio1", statement: "if", sName: "numero_socios", condition: "is", value: "value6" },{ action: "turn", state: "on", tCat: "section", tName: "socio2", statement: "if", sName: "numero_socios", condition: "is", value: "value6" },{ action: "turn", state: "on", tCat: "section", tName: "socio3", statement: "if", sName: "numero_socios", condition: "is", value: "value6" },{ action: "turn", state: "on", tCat: "section", tName: "socio4", statement: "if", sName: "numero_socios", condition: "is", value: "value6" },{ action: "turn", state: "on", tCat: "section", tName: "socio5", statement: "if", sName: "numero_socios", condition: "is", value: "value6" },{ action: "turn", state: "on", tCat: "section", tName: "socio6", statement: "if", sName: "numero_socios", condition: "is", value: "value6" },{ action: "turn", state: "off", tCat: "section", tName: "socio7", statement: "if", sName: "numero_socios", condition: "is", value: "value6" },{ action: "turn", state: "off", tCat: "section", tName: "socio8", statement: "if", sName: "numero_socios", condition: "is", value: "value6" },{ action: "turn", state: "off", tCat: "section", tName: "socio9", statement: "if", sName: "numero_socios", condition: "is", value: "value6" },{ action: "turn", state: "off", tCat: "section", tName: "socio10", statement: "if", sName: "numero_socios", condition: "is", value: "value6" },{ action: "turn", state: "off", tCat: "section", tName: "socio11", statement: "if", sName: "numero_socios", condition: "is", value: "value6" },{ action: "turn", state: "off", tCat: "section", tName: "socio12", statement: "if", sName: "numero_socios", condition: "is", value: "value6" },{ action: "turn", state: "on", tCat: "section", tName: "socio1", statement: "if", sName: "numero_socios", condition: "is", value: "value7" },{ action: "turn", state: "on", tCat: "section", tName: "socio2", statement: "if", sName: "numero_socios", condition: "is", value: "value7" },{ action: "turn", state: "on", tCat: "section", tName: "socio3", statement: "if", sName: "numero_socios", condition: "is", value: "value7" },{ action: "turn", state: "on", tCat: "section", tName: "socio4", statement: "if", sName: "numero_socios", condition: "is", value: "value7" },{ action: "turn", state: "on", tCat: "section", tName: "socio5", statement: "if", sName: "numero_socios", condition: "is", value: "value7" },{ action: "turn", state: "on", tCat: "section", tName: "socio6", statement: "if", sName: "numero_socios", condition: "is", value: "value7" },{ action: "turn", state: "on", tCat: "section", tName: "socio7", statement: "if", sName: "numero_socios", condition: "is", value: "value7" },{ action: "turn", state: "off", tCat: "section", tName: "socio8", statement: "if", sName: "numero_socios", condition: "is", value: "value7" },{ action: "turn", state: "off", tCat: "section", tName: "socio9", statement: "if", sName: "numero_socios", condition: "is", value: "value7" },{ action: "turn", state: "off", tCat: "section", tName: "socio10", statement: "if", sName: "numero_socios", condition: "is", value: "value7" },{ action: "turn", state: "off", tCat: "section", tName: "socio11", statement: "if", sName: "numero_socios", condition: "is", value: "value7" },{ action: "turn", state: "off", tCat: "section", tName: "socio12", statement: "if", sName: "numero_socios", condition: "is", value: "value7" },{ action: "turn", state: "on", tCat: "section", tName: "socio1", statement: "if", sName: "numero_socios", condition: "is", value: "value8" },{ action: "turn", state: "on", tCat: "section", tName: "socio2", statement: "if", sName: "numero_socios", condition: "is", value: "value8" },{ action: "turn", state: "on", tCat: "section", tName: "socio3", statement: "if", sName: "numero_socios", condition: "is", value: "value8" },{ action: "turn", state: "on", tCat: "section", tName: "socio4", statement: "if", sName: "numero_socios", condition: "is", value: "value8" },{ action: "turn", state: "on", tCat: "section", tName: "socio5", statement: "if", sName: "numero_socios", condition: "is", value: "value8" },{ action: "turn", state: "on", tCat: "section", tName: "socio6", statement: "if", sName: "numero_socios", condition: "is", value: "value8" },{ action: "turn", state: "on", tCat: "section", tName: "socio7", statement: "if", sName: "numero_socios", condition: "is", value: "value8" },{ action: "turn", state: "on", tCat: "section", tName: "socio8", statement: "if", sName: "numero_socios", condition: "is", value: "value8" },{ action: "turn", state: "off", tCat: "section", tName: "socio9", statement: "if", sName: "numero_socios", condition: "is", value: "value8" },{ action: "turn", state: "off", tCat: "section", tName: "socio10", statement: "if", sName: "numero_socios", condition: "is", value: "value8" },{ action: "turn", state: "off", tCat: "section", tName: "socio11", statement: "if", sName: "numero_socios", condition: "is", value: "value8" },{ action: "turn", state: "off", tCat: "section", tName: "socio12", statement: "if", sName: "numero_socios", condition: "is", value: "value8" },{ action: "turn", state: "on", tCat: "section", tName: "socio1", statement: "if", sName: "numero_socios", condition: "is", value: "value9" },{ action: "turn", state: "on", tCat: "section", tName: "socio2", statement: "if", sName: "numero_socios", condition: "is", value: "value9" },{ action: "turn", state: "on", tCat: "section", tName: "socio3", statement: "if", sName: "numero_socios", condition: "is", value: "value9" },{ action: "turn", state: "on", tCat: "section", tName: "socio4", statement: "if", sName: "numero_socios", condition: "is", value: "value9" },{ action: "turn", state: "on", tCat: "section", tName: "socio5", statement: "if", sName: "numero_socios", condition: "is", value: "value9" },{ action: "turn", state: "on", tCat: "section", tName: "socio6", statement: "if", sName: "numero_socios", condition: "is", value: "value9" },{ action: "turn", state: "on", tCat: "section", tName: "socio7", statement: "if", sName: "numero_socios", condition: "is", value: "value9" },{ action: "turn", state: "on", tCat: "section", tName: "socio8", statement: "if", sName: "numero_socios", condition: "is", value: "value9" },{ action: "turn", state: "on", tCat: "section", tName: "socio9", statement: "if", sName: "numero_socios", condition: "is", value: "value9" },{ action: "turn", state: "off", tCat: "section", tName: "socio10", statement: "if", sName: "numero_socios", condition: "is", value: "value9" },{ action: "turn", state: "off", tCat: "section", tName: "socio11", statement: "if", sName: "numero_socios", condition: "is", value: "value9" },{ action: "turn", state: "off", tCat: "section", tName: "socio12", statement: "if", sName: "numero_socios", condition: "is", value: "value9" },{ action: "turn", state: "on", tCat: "section", tName: "socio1", statement: "if", sName: "numero_socios", condition: "is", value: "value10" },{ action: "turn", state: "on", tCat: "section", tName: "socio2", statement: "if", sName: "numero_socios", condition: "is", value: "value10" },{ action: "turn", state: "on", tCat: "section", tName: "socio3", statement: "if", sName: "numero_socios", condition: "is", value: "value10" },{ action: "turn", state: "on", tCat: "section", tName: "socio4", statement: "if", sName: "numero_socios", condition: "is", value: "value10" },{ action: "turn", state: "on", tCat: "section", tName: "socio5", statement: "if", sName: "numero_socios", condition: "is", value: "value10" },{ action: "turn", state: "on", tCat: "section", tName: "socio6", statement: "if", sName: "numero_socios", condition: "is", value: "value10" },{ action: "turn", state: "on", tCat: "section", tName: "socio7", statement: "if", sName: "numero_socios", condition: "is", value: "value10" },{ action: "turn", state: "on", tCat: "section", tName: "socio8", statement: "if", sName: "numero_socios", condition: "is", value: "value10" },{ action: "turn", state: "on", tCat: "section", tName: "socio9", statement: "if", sName: "numero_socios", condition: "is", value: "value10" },{ action: "turn", state: "on", tCat: "section", tName: "socio10", statement: "if", sName: "numero_socios", condition: "is", value: "value10" },{ action: "turn", state: "off", tCat: "section", tName: "socio11", statement: "if", sName: "numero_socios", condition: "is", value: "value10" },{ action: "turn", state: "off", tCat: "section", tName: "socio12", statement: "if", sName: "numero_socios", condition: "is", value: "value10" },{ action: "turn", state: "on", tCat: "section", tName: "socio1", statement: "if", sName: "numero_socios", condition: "is", value: "value11" },{ action: "turn", state: "on", tCat: "section", tName: "socio2", statement: "if", sName: "numero_socios", condition: "is", value: "value11" },{ action: "turn", state: "on", tCat: "section", tName: "socio3", statement: "if", sName: "numero_socios", condition: "is", value: "value11" },{ action: "turn", state: "on", tCat: "section", tName: "socio4", statement: "if", sName: "numero_socios", condition: "is", value: "value11" },{ action: "turn", state: "on", tCat: "section", tName: "socio5", statement: "if", sName: "numero_socios", condition: "is", value: "value11" },{ action: "turn", state: "on", tCat: "section", tName: "socio6", statement: "if", sName: "numero_socios", condition: "is", value: "value11" },{ action: "turn", state: "on", tCat: "section", tName: "socio7", statement: "if", sName: "numero_socios", condition: "is", value: "value11" },{ action: "turn", state: "on", tCat: "section", tName: "socio8", statement: "if", sName: "numero_socios", condition: "is", value: "value11" },{ action: "turn", state: "on", tCat: "section", tName: "socio9", statement: "if", sName: "numero_socios", condition: "is", value: "value11" },{ action: "turn", state: "on", tCat: "section", tName: "socio10", statement: "if", sName: "numero_socios", condition: "is", value: "value11" },{ action: "turn", state: "on", tCat: "section", tName: "socio11", statement: "if", sName: "numero_socios", condition: "is", value: "value11" },{ action: "turn", state: "off", tCat: "section", tName: "socio12", statement: "if", sName: "numero_socios", condition: "is", value: "value11" },{ action: "turn", state: "on", tCat: "section", tName: "socio1", statement: "if", sName: "numero_socios", condition: "is", value: "value12" },{ action: "turn", state: "on", tCat: "section", tName: "socio2", statement: "if", sName: "numero_socios", condition: "is", value: "value12" },{ action: "turn", state: "on", tCat: "section", tName: "socio3", statement: "if", sName: "numero_socios", condition: "is", value: "value12" },{ action: "turn", state: "on", tCat: "section", tName: "socio4", statement: "if", sName: "numero_socios", condition: "is", value: "value12" },{ action: "turn", state: "on", tCat: "section", tName: "socio5", statement: "if", sName: "numero_socios", condition: "is", value: "value12" },{ action: "turn", state: "on", tCat: "section", tName: "socio6", statement: "if", sName: "numero_socios", condition: "is", value: "value12" },{ action: "turn", state: "on", tCat: "section", tName: "socio7", statement: "if", sName: "numero_socios", condition: "is", value: "value12" },{ action: "turn", state: "on", tCat: "section", tName: "socio8", statement: "if", sName: "numero_socios", condition: "is", value: "value12" },{ action: "turn", state: "on", tCat: "section", tName: "socio9", statement: "if", sName: "numero_socios", condition: "is", value: "value12" },{ action: "turn", state: "on", tCat: "section", tName: "socio10", statement: "if", sName: "numero_socios", condition: "is", value: "value12" },{ action: "turn", state: "on", tCat: "section", tName: "socio11", statement: "if", sName: "numero_socios", condition: "is", value: "value12" },{ action: "turn", state: "on", tCat: "section", tName: "socio12", statement: "if", sName: "numero_socios", condition: "is", value: "value12" }];
- String.prototype.beginsWith = function(t, i) { if (i==false) { return
- (t == this.substring(0, t.length)); } else { return (t.toLowerCase()
- == this.substring(0, t.length).toLowerCase()); } }
- function bfDeactivateSectionFields(){
- for( var i = 0; i < bfDeactivateSection.length; i++ ){
- bfSetFieldValue(bfDeactivateSection[i], "off");
- JQuery("#"+bfDeactivateSection[i]+" .ff_elem").each(function(i){
- if( JQuery(this).get(0).name && JQuery(this).get(0).name.beginsWith("ff_nm_", true) ){
- bfDeactivateField[JQuery(this).get(0).name] = true;
- }
- });
- }
- for( var i = 0; i < toggleFieldsArray.length; i++ ){
- if(toggleFieldsArray[i].state == "turn"){
- bfSetFieldValue(toggleFieldsArray[i].tName, "off");
- }
- }
- }
- function bfToggleFields(state, tCat, tName, thisBfDeactivateField){
- // maybe a little to harsh, but currently no other workaround
- // file uploads will be removed for the complete form if a rule is executed
- // make sure you offer file uploads at the end of your form if you have visibility rules!
- if(typeof bfFlashUploadInterval != "undefined"){
- window.clearInterval( bfFlashUploadInterval );
- for(qID in bfFlashUploadAll){
- try{
- JQuery(bfFlashUploadAll[qID]).uploadifyCancel(qID);
- }catch(e){}
- }
- bfFlashUploadTooLarge = {};
- bfFlashUploadAll = {};
- JQuery("#bfFileQueue").html("")
- JQuery(".bfFlashFileQueueClass").html("");
- }
- if(state == "on"){
- if(tCat == "element"){
- if( typeof JQuery("[name=\"ff_nm_"+tName+"[]\"]") != "undefined" && JQuery("[name=\"ff_nm_"+tName+"[]\"]").parent().attr("class").substr(0, 10) == "bfElemWrap" ){
- JQuery("[name=\"ff_nm_"+tName+"[]\"]").parent().css("display", "");
- } else if(JQuery("[name=\"ff_nm_"+tName+"[]\"]").get(0).type == "checkbox" || JQuery("[name=\"ff_nm_"+tName+"[]\"]").get(0).type == "radio"){
- JQuery("[name=\"ff_nm_"+tName+"[]\"]").parent().parent().css("display", "");
- }
- thisBfDeactivateField["ff_nm_"+tName+"[]"] = false;
- bfSetFieldValue(tName, "on");
- } else {
- JQuery("#"+tName).css("display", "");
- bfSetFieldValue(tName, "on");
- JQuery("#"+tName).find(".ff_elem").each(function(i){
- if( JQuery(this).get(0).name && JQuery(this).get(0).name.beginsWith("ff_nm_", true) ){
- thisBfDeactivateField[JQuery(this).get(0).name] = false;
- }
- });
- }
- } else {
- if(tCat == "element"){
- if( typeof JQuery("[name=\"ff_nm_"+tName+"[]\"]") != "undefined" && JQuery("[name=\"ff_nm_"+tName+"[]\"]").parent().attr("class").substr(0, 10) == "bfElemWrap" ){
- JQuery("[name=\"ff_nm_"+tName+"[]\"]").parent().css("display", "none");
- } else if(JQuery("[name=\"ff_nm_"+tName+"[]\"]").get(0).type == "checkbox" || JQuery("[name=\"ff_nm_"+tName+"[]\"]").get(0).type == "radio"){
- JQuery("[name=\"ff_nm_"+tName+"[]\"]").parent().parent().css("display", "none");
- }
- thisBfDeactivateField["ff_nm_"+tName+"[]"] = true;
- bfSetFieldValue(tName, "off");
- } else {
- JQuery("#"+tName).css("display", "none");
- bfSetFieldValue(tName, "off");
- JQuery("#"+tName+" .ff_elem").each(function(i){
- if( JQuery(this).get(0).name && JQuery(this).get(0).name.beginsWith("ff_nm_", true) ){
- thisBfDeactivateField[JQuery(this).get(0).name] = true;
- }
- });
- }
- }
- }
- function bfSetFieldValue(name, condition){
- for( var i = 0; i < toggleFieldsArray.length; i++ ){
- if( toggleFieldsArray[i].action == "if" ) {
- if(name == toggleFieldsArray[i].tCat && condition == toggleFieldsArray[i].statement){
- var element = JQuery("[name=\"ff_nm_"+toggleFieldsArray[i].condition+"[]\"]");
-
- switch(element.get(0).type){
- case "text":
- case "textarea":
- if(toggleFieldsArray[i].value == "!empty"){
- element.val("");
- } else {
- element.val(toggleFieldsArray[i].value);
- }
- break;
- case "select-multiple":
- case "select-one":
- if(toggleFieldsArray[i].value == "!empty"){
- for(var j = 0; j < element.get(0).options.length; j++){
- element.get(0).options[j].selected = false;
- }
- }
- for(var j = 0; j < element.get(0).options.length; j++){
- if(element.get(0).options[j].value == toggleFieldsArray[i].value){
- element.get(0).options[j].selected = true;
- }
- }
- break;
- case "radio":
- case "checkbox":
- var radioLength = element.size();
- if(toggleFieldsArray[i].value == "!empty"){
- for(var j = 0; j < radioLength; j++){
- element.get(j).checked = false;
- }
- }
- for(var j = 0; j < radioLength; j++){
- if( element.get(j).value == toggleFieldsArray[i].value ){
- element.get(j).checked = true;
- }
- }
- break;
- }
- }
- }
- }
- }
- function bfRegisterToggleFields(){
-
- var offset = 0;
- var last_offset = 0;
- var limit = 10;
- var limit_cnt = 0;
-
- if( arguments.length == 1 ){
- offset = arguments[0];
- }
- var thisToggleFieldsArray = toggleFieldsArray;
- var thisBfDeactivateField = bfDeactivateField;
- var thisBfToggleFields = bfToggleFields;
-
- for( var i = offset; limit_cnt < limit && i < toggleFieldsArray.length; i++ ){
- // for( var i = 0; i < toggleFieldsArray.length; i++ ){
- if( toggleFieldsArray[i].action == "turn" && (toggleFieldsArray[i].tCat == "element" || toggleFieldsArray[i].tCat == "section") ){
- var toggleField = toggleFieldsArray[i];
- var element = JQuery("[name=\"ff_nm_"+toggleFieldsArray[i].sName+"[]\"]");
- if(element.get(0)){
- switch(element.get(0).type){
- case "text":
- case "textarea":
- JQuery("[name=\"ff_nm_"+toggleField.sName+"[]\"]").unbind("blur");
- JQuery("[name=\"ff_nm_"+toggleField.sName+"[]\"]").blur(
- function(){
- for( var k = 0; k < thisToggleFieldsArray.length; k++ ){
- var regExp = "";
- if(thisToggleFieldsArray[k].value.beginsWith("!", true) && JQuery(this).get(0).name == "ff_nm_"+thisToggleFieldsArray[k].sName+"[]"){
- regExp = thisToggleFieldsArray[k].value.substring(1, thisToggleFieldsArray[k].value.length);
- }
- if(thisToggleFieldsArray[k].condition == "isnot"){
- if(
- ( ( regExp != "" && JQuery(this).val().test(regExp) <= 0 ) || JQuery(this).val() != thisToggleFieldsArray[k].value ) && JQuery(this).get(0).name == "ff_nm_"+thisToggleFieldsArray[k].sName+"[]"
- ){
- var names = thisToggleFieldsArray[k].tName.split(",");
- for(var n = 0; n < names.length; n++){
- thisBfToggleFields(thisToggleFieldsArray[k].state, thisToggleFieldsArray[k].tCat, JQuery.trim(names[n]), thisBfDeactivateField);
- }
- //break;
- }
- } else if(thisToggleFieldsArray[k].condition == "is"){
- if(
- ( ( regExp != "" && JQuery(this).val().test(regExp) > 0 ) || JQuery(this).val() == thisToggleFieldsArray[k].value ) && JQuery(this).get(0).name == "ff_nm_"+thisToggleFieldsArray[k].sName+"[]"
- ){
- var names = thisToggleFieldsArray[k].tName.split(",");
- for(var n = 0; n < names.length; n++){
- thisBfToggleFields(thisToggleFieldsArray[k].state, thisToggleFieldsArray[k].tCat, JQuery.trim(names[n]), thisBfDeactivateField);
- }
- //break;
- }
- }
- }
- }
- );
- break;
- case "select-multiple":
- case "select-one":
- JQuery("[name=\"ff_nm_"+toggleField.sName+"[]\"]").unbind("change");
- JQuery("[name=\"ff_nm_"+toggleField.sName+"[]\"]").change(
- function(){
- var res = JQuery.isArray( JQuery(this).val() ) == false ? [ JQuery(this).val() ] : JQuery(this).val();
- for( var k = 0; k < thisToggleFieldsArray.length; k++ ){
-
- // The or-case in lists
- var found = false;
- var chkGrpValues = new Array();
- if(thisToggleFieldsArray[k].value.beginsWith("#", true) && JQuery(this).get(0).name == "ff_nm_"+thisToggleFieldsArray[k].sName+"[]"){
- chkGrpValues = thisToggleFieldsArray[k].value.substring(1, thisToggleFieldsArray[k].value.length).split("|");
- for(var l = 0; l < chkGrpValues.length; l++){
- if( JQuery.inArray(chkGrpValues[l], res) != -1 ){
- found = true;
- break;
- }
- }
- }
- // the and-case in lists
- var foundCount = 0;
- chkGrpValues2 = new Array();
- if(thisToggleFieldsArray[k].value.beginsWith("#", true) && JQuery(this).get(0).name == "ff_nm_"+thisToggleFieldsArray[k].sName+"[]"){
- chkGrpValues2 = thisToggleFieldsArray[k].value.substring(1, thisToggleFieldsArray[k].value.length).split(";");
- for(var l = 0; l < res.length; l++){
- if( JQuery.inArray(res[l], chkGrpValues2) != -1 ){
- foundCount++;
- }
- }
- }
-
- if(thisToggleFieldsArray[k].condition == "isnot"){
-
- if(
- (
- !JQuery.isArray(res) && JQuery(this).val() != thisToggleFieldsArray[k].value && JQuery(this).get(0).name == "ff_nm_"+thisToggleFieldsArray[k].sName+"[]"
- )
- ||
- (
- JQuery.isArray(res) && ( JQuery.inArray(thisToggleFieldsArray[k].value, res) == -1 || !found || ( foundCount == 0 || foundCount != chkGrpValues2.length ) ) && JQuery(this).get(0).name == "ff_nm_"+thisToggleFieldsArray[k].sName+"[]"
- )
- ){
- var names = thisToggleFieldsArray[k].tName.split(",");
- for(var n = 0; n < names.length; n++){
- thisBfToggleFields(thisToggleFieldsArray[k].state, thisToggleFieldsArray[k].tCat, JQuery.trim(names[n]), thisBfDeactivateField);
- }
- //break;
- }
- } else if(thisToggleFieldsArray[k].condition == "is"){
- if(
- (
- !JQuery.isArray(res) && JQuery(this).val() == thisToggleFieldsArray[k].value && JQuery(this).get(0).name == "ff_nm_"+thisToggleFieldsArray[k].sName+"[]"
- )
- ||
- (
- JQuery.isArray(res) && ( JQuery.inArray(thisToggleFieldsArray[k].value, res) != -1 || found || ( foundCount != 0 && foundCount == chkGrpValues2.length ) ) && JQuery(this).get(0).name == "ff_nm_"+thisToggleFieldsArray[k].sName+"[]"
- )
- ){
- var names = thisToggleFieldsArray[k].tName.split(",");
- for(var n = 0; n < names.length; n++){
- thisBfToggleFields(thisToggleFieldsArray[k].state, thisToggleFieldsArray[k].tCat, JQuery.trim(names[n]), thisBfDeactivateField);
- }
- //break;
- }
- }
- }
- }
- );
- break;
- case "radio":
- case "checkbox":
- var radioLength = JQuery("[name=\"ff_nm_"+toggleField.sName+"[]\"]").size();
- for(var j = 0; j < radioLength; j++){
- JQuery("#" + JQuery("[name=\"ff_nm_"+toggleField.sName+"[]\"]").get(j).id ).unbind("click");
- JQuery("#" + JQuery("[name=\"ff_nm_"+toggleField.sName+"[]\"]").get(j).id ).click(
- function(){
- // NOT O(n^2) since its ony executed on click event!
- for( var k = 0; k < thisToggleFieldsArray.length; k++ ){
-
- // used for complex checkbox group case below
- var chkGrpValues = new Array();
- if(JQuery(this).get(0).checked && thisToggleFieldsArray[k].value.beginsWith("#", true) && JQuery(this).get(0).name == "ff_nm_"+thisToggleFieldsArray[k].sName+"[]"){
- chkGrpValues = thisToggleFieldsArray[k].value.substring(1, thisToggleFieldsArray[k].value.length).split("|");
- }
- if(thisToggleFieldsArray[k].condition == "isnot"){
- if(
- // simple radio case for selected value
- ( JQuery(this).get(0).type == "radio" && JQuery(this).get(0).checked && JQuery(this).val() != thisToggleFieldsArray[k].value && JQuery(this).get(0).name == "ff_nm_"+thisToggleFieldsArray[k].sName+"[]" )
- ||
- // single checkbox case for checked/unchecked
- (
- JQuery(this).get(0).type == "checkbox" &&
- JQuery(this).get(0).name == "ff_nm_"+thisToggleFieldsArray[k].sName+"[]" &&
- ( JQuery(this).get(0).checked && thisToggleFieldsArray[k].value != "!checked"
- ||
- JQuery(this).get(0).checked && thisToggleFieldsArray[k].value == "!unchecked"
- )
- )
- ||
- // complex checkbox/radio group case by multiple values
- (
- JQuery(this).get(0).checked && JQuery.inArray(JQuery(this).val(), chkGrpValues) == -1 && JQuery(this).get(0).name == "ff_nm_"+thisToggleFieldsArray[k].sName+"[]"
- )
- ||
- // simple checkbox group case by single value
- (
- JQuery(this).get(0).type == "checkbox" && JQuery(this).get(0).checked && JQuery(this).val() != thisToggleFieldsArray[k].value && JQuery(this).get(0).name == "ff_nm_"+thisToggleFieldsArray[k].sName+"[]"
- )
- ){
- var names = thisToggleFieldsArray[k].tName.split(",");
- for(var n = 0; n < names.length; n++){
- thisBfToggleFields(thisToggleFieldsArray[k].state, thisToggleFieldsArray[k].tCat, JQuery.trim(names[n]), thisBfDeactivateField);
- }
- //break;
- }
- }
- else
- if(thisToggleFieldsArray[k].condition == "is"){
- if(
- // simple radio case for selected value
- ( JQuery(this).get(0).type == "radio" && JQuery(this).get(0).checked && JQuery(this).val() == thisToggleFieldsArray[k].value && JQuery(this).get(0).name == "ff_nm_"+thisTog…
Large files files are truncated, but you can click here to view the full file