function INSTPACKAGE_MENU() {
		
		JToolBarHelper::custom('uploadpackage',   'upload.png', 'upload_f2.png', BFText::_('COM_BREEZINGFORMS_TOOLBAR_INSTPKG'),   false);
		JToolBarHelper::custom('delpkgs', 'delete.png', 'delete_f2.png', BFText::_('COM_BREEZINGFORMS_TOOLBAR_UINSTPKGS'), false);
		JToolBarHelper::custom('edit',    'cancel.png', 'cancel_f2.png', BFText::_('COM_BREEZINGFORMS_TOOLBAR_CANCEL'),    false);
		
	}
Example #2
0
 /**
  * BFText::_(string) does the same like JText::_(string), except that it reloads the
  * language for com_breezingforms if a key is not set. A key could be not set from within the HTML_* view functions because the language
  * is not loaded there. So if one text request comes from one of these view functions, 
  * it makes sure that the language is always been loaded (of course in a lazy way).
  *
  * @param string
  * @return string
  */
 public static function _($name)
 {
     $bftext = BFText::getInstance();
     if (!$bftext->language->hasKey($name)) {
         $bftext->language->load(BFText::COMPONENT_NAME);
     }
     // ok, loaded and ready to go
     return JText::_($name);
 }
Example #3
0
	function copy($option, $pkg, $ids)
	{
		$database = JFactory::getDBO();
		$total = count($ids);
		$row = new facileFormsPieces($database);
		if (count($ids)) foreach ($ids as $id) {
			$row->load(intval($id));
			$row->id       = NULL;
			$row->store();
		} // foreach
		$msg = $total.' '.BFText::_('COM_BREEZINGFORMS_PIECES_SUCCOPIED');
		JFactory::getApplication()->redirect("index.php?option=$option&act=managepieces&pkg=$pkg&mosmsg=$msg");
	} // copy
 function setError($message, $inparse = false)
 {
     $this->error = '';
     $level = count($this->element);
     if ($level > 0) {
         $this->error .= BFText::_('COM_BREEZINGFORMS_XML_ELEMENT') . " '" . $this->element[$level - 1] . "' ";
     }
     if ($inparse) {
         $this->error .= BFText::_('COM_BREEZINGFORMS_XML_ATLINE') . ' ' . xml_get_current_line_number($this->parser) . ' ';
     }
     if ($this->error != '') {
         $this->error .= ': ';
     }
     $this->error .= $message;
 }
 static function copy($option, $pkg, $ids)
 {
     $database = JFactory::getDBO();
     $total = count($ids);
     $row = new facileFormsScripts($database);
     if (count($ids)) {
         foreach ($ids as $id) {
             $row->load(intval($id));
             $row->id = NULL;
             $row->store();
         }
     }
     // foreach
     $msg = $total . ' ' . BFText::_('COM_BREEZINGFORMS_SCRIPTS_SUCCOPIED');
     JFactory::getApplication()->redirect("index.php?option={$option}&act=managescripts&pkg={$pkg}&mosmsg={$msg}");
 }
    function submit()
    {
        global $database, $ff_config, $ff_comsite, $ff_mossite, $ff_otherparams;
        // CONTENTBUILDER BEGIN
        $cbRecordId = 0;
        $cbEmailNotifications = false;
        $cbEmailUpdateNotifications = false;
        $cbResult = $this->cbCheckPermissions();
        if ($cbResult['data'] !== null && $cbResult['data']['email_notifications']) {
            if (!JRequest::getInt('cb_record_id', 0)) {
                $cbEmailNotifications = true;
            } else {
                $cbEmailNotifications = false;
            }
        }
        if ($cbResult['data'] !== null && $cbResult['data']['email_update_notifications']) {
            if (JRequest::getInt('cb_record_id', 0)) {
                $cbEmailUpdateNotifications = true;
            } else {
                $cbEmailUpdateNotifications = false;
            }
        }
        if ($cbResult['data'] === null) {
            $cbEmailNotifications = true;
            $cbEmailUpdateNotifications = true;
        }
        // CONTENTBUILDER END
        $database = JFactory::getDBO();
        if (!$this->okrun) {
            return;
        }
        // currently only available in classic mode
        if (trim($this->formrow->template_code_processed) == '') {
            set_error_handler('_ff_errorHandler');
        }
        ob_start();
        $this->record_id = '';
        $this->status = _FF_STATUS_OK;
        $this->message = '';
        $this->sendNotificationAfterPayment = false;
        // handle Begin Submit piece
        $halt = false;
        $this->collectSubmitdata($cbResult);
        if (!$halt) {
            require_once JPATH_SITE . '/administrator/components/com_breezingforms/libraries/Zend/Json/Decoder.php';
            require_once JPATH_SITE . '/administrator/components/com_breezingforms/libraries/Zend/Json/Encoder.php';
            require_once JPATH_SITE . '/administrator/components/com_breezingforms/libraries/crosstec/functions/helpers.php';
            $dataObject = Zend_Json::decode(base64_decode($this->formrow->template_code));
            $rootMdata = $dataObject['properties'];
            if (JRequest::getVar('ff_applic', '') != 'mod_facileforms' && JRequest::getInt('ff_frame', 0) != 1 && bf_is_mobile()) {
                $is_device = true;
                $this->isMobile = isset($rootMdata['mobileEnabled']) && isset($rootMdata['forceMobile']) && $rootMdata['mobileEnabled'] && $rootMdata['forceMobile'] ? true : (isset($rootMdata['mobileEnabled']) && isset($rootMdata['forceMobile']) && $rootMdata['mobileEnabled'] && JFactory::getSession()->get('com_breezingforms.mobile', false) ? true : false);
            } else {
                $this->isMobile = false;
            }
            // transforming recaptcha into captcha due to compatibility on mobiles
            if ($this->isMobile && trim($this->formrow->template_code_processed) == 'QuickMode') {
                for ($i = 0; $i < $this->rowcount; $i++) {
                    $row = $this->rows[$i];
                    if ($row->type == "ReCaptcha") {
                        $this->rows[$i]->type = 'Captcha';
                        break;
                    }
                }
            }
            for ($i = 0; $i < $this->rowcount; $i++) {
                $row = $this->rows[$i];
                if ($row->type == "Captcha") {
                    require_once JPATH_SITE . '/components/com_breezingforms/images/captcha/securimage.php';
                    $securimage = new Securimage();
                    if (!$securimage->check(JRequest::getVar('bfCaptchaEntry', ''))) {
                        $halt = true;
                        $this->status = _FF_STATUS_CAPTCHA_FAILED;
                        exit;
                    }
                    break;
                } else {
                    if ($row->type == "ReCaptcha") {
                        if (!JFactory::getSession()->get('bfrecapsuccess', false)) {
                            $halt = true;
                            $this->status = _FF_STATUS_CAPTCHA_FAILED;
                            exit;
                        }
                        JFactory::getSession()->set('bfrecapsuccess', false);
                        break;
                    }
                }
            }
            require_once JPATH_SITE . '/administrator/components/com_breezingforms/libraries/Zend/Json/Decoder.php';
            require_once JPATH_SITE . '/administrator/components/com_breezingforms/libraries/Zend/Json/Encoder.php';
            $areas = Zend_Json::decode($this->formrow->template_areas);
            if (is_array($areas)) {
                switch (JRequest::getVar('ff_payment_method', '')) {
                    case 'PayPal':
                    case 'Sofortueberweisung':
                        foreach ($areas as $area) {
                            foreach ($area['elements'] as $element) {
                                if ($element['internalType'] == 'bfPayPal' || $element['internalType'] == 'bfSofortueberweisung') {
                                    $options = $element['options'];
                                    if (isset($options['sendNotificationAfterPayment']) && $options['sendNotificationAfterPayment']) {
                                        $this->sendNotificationAfterPayment = true;
                                    }
                                }
                            }
                        }
                }
            }
        }
        if (!$halt) {
            $code = '';
            switch ($this->formrow->piece3cond) {
                case 1:
                    // library
                    $database->setQuery("select name, code from #__facileforms_pieces " . "where id=" . $this->formrow->piece3id . " and published=1 ");
                    $rows = $database->loadObjectList();
                    if (count($rows)) {
                        echo $this->execPiece($rows[0]->code, BFText::_('COM_BREEZINGFORMS_PROCESS_BSPIECE') . " " . $rows[0]->name, 'p', $this->formrow->piece3id, null);
                    }
                    break;
                case 2:
                    // custom code
                    echo $this->execPiece($this->formrow->piece3code, BFText::_('COM_BREEZINGFORMS_PROCESS_BSPIECEC'), 'f', $this->form, 3);
                    break;
                default:
                    break;
            }
            // switch
            if ($this->bury()) {
                return;
            }
            if ($this->status == _FF_STATUS_OK) {
                if (!$this->formrow->published) {
                    $this->status = _FF_STATUS_UNPUBLISHED;
                } else {
                    if ($this->status == _FF_STATUS_OK) {
                        if ($this->formrow->dblog > 0) {
                            $cbRecordId = $this->logToDatabase($cbResult);
                        }
                        if ($this->status == _FF_STATUS_OK) {
                            if ($this->formrow->emailntf > 0 && ($cbEmailNotifications || $cbEmailUpdateNotifications)) {
                                // CONTENTBUILDER
                                $this->sendEmailNotification();
                            }
                            if ($this->formrow->mb_emailntf > 0 && ($cbEmailNotifications || $cbEmailUpdateNotifications)) {
                                // CONTENTBUILDER
                                $this->sendMailbackNotification();
                            }
                            // DROPBOX
                            if ($this->formrow->dropbox_submission_enabled) {
                                if ($this->formrow->dropbox_email && $this->formrow->dropbox_password) {
                                    if (!class_exists('DropboxUploader')) {
                                        require_once JPATH_SITE . DS . 'administrator' . DS . 'components' . DS . 'com_breezingforms' . DS . 'libraries' . DS . 'dropbox' . DS . 'dropbox.php';
                                    }
                                    try {
                                        $dropbox = new DropboxUploader($this->formrow->dropbox_email, $this->formrow->dropbox_password);
                                        if ($this->formrow->dropbox_email && $this->formrow->dropbox_password) {
                                            $dropbox_types = explode(',', $this->formrow->dropbox_submission_types);
                                            foreach ($dropbox_types as $dropbox_type) {
                                                $dropbox_file = '';
                                                switch ($dropbox_type) {
                                                    case 'pdf':
                                                        $dropbox_file = $this->exppdf();
                                                        break;
                                                    case 'csv':
                                                        $dropbox_file = $this->expcsv();
                                                        break;
                                                    case 'xml':
                                                        $dropbox_file = $this->expxml();
                                                        break;
                                                }
                                                if ($dropbox_file != '') {
                                                    $dropbox->upload($dropbox_file, '/' . ($this->formrow->dropbox_folder != '' ? $this->formrow->dropbox_folder : $this->formrow->name));
                                                }
                                            }
                                        }
                                    } catch (Exception $e) {
                                    }
                                }
                            }
                            $this->sendMailChimpNotification();
                            $this->sendSalesforceNotification();
                            JPluginHelper::importPlugin('breezingforms_addons');
                            $dispatcher = JDispatcher::getInstance();
                            $dispatcher->trigger('onPropertiesExecute', array($this));
                            $tickets = JFactory::getSession()->get('bfFlashUploadTickets', array());
                            mt_srand();
                            if (isset($tickets[JRequest::getVar('bfFlashUploadTicket', mt_rand(0, mt_getrandmax()))])) {
                                unset($tickets[JRequest::getVar('bfFlashUploadTicket')]);
                                JFactory::getSession()->set('bfFlashUploadTickets', $tickets);
                            }
                        }
                    }
                    // if
                }
                // if
            }
            // if
            // handle End Submit piece
            JFactory::getDbo()->setQuery("SELECT MAX(id) FROM #__facileforms_records");
            $lastid = JFactory::getDbo()->loadResult();
            $_SESSION['virtuemart_bf_id'] = $lastid;
            $session = JFactory::getSession();
            $session->set('virtuemart_bf_id', $lastid);
            $code = '';
            switch ($this->formrow->piece4cond) {
                case 1:
                    // library
                    $database->setQuery("select name, code from #__facileforms_pieces " . "where id=" . $this->formrow->piece4id . " and published=1 ");
                    $rows = $database->loadObjectList();
                    if (count($rows)) {
                        echo $this->execPiece($rows[0]->code, BFText::_('COM_BREEZINGFORMS_PROCESS_ESPIECE') . " " . $rows[0]->name, 'p', $this->formrow->piece4id, null);
                    }
                    break;
                case 2:
                    // custom code
                    echo $this->execPiece($this->formrow->piece4code, BFText::_('COM_BREEZINGFORMS_PROCESS_ESPIECEC'), 'f', $this->form, 3);
                    break;
                default:
                    break;
            }
            // switch
            if ($this->bury()) {
                return;
            }
        }
        switch ($this->status) {
            case _FF_STATUS_OK:
                $message = BFText::_('COM_BREEZINGFORMS_PROCESS_SUBMITSUCCESS');
                break;
            case _FF_STATUS_UNPUBLISHED:
                $message = BFText::_('COM_BREEZINGFORMS_PROCESS_UNPUBLISHED');
                break;
            case _FF_STATUS_SAVERECORD_FAILED:
                $message = BFText::_('COM_BREEZINGFORMS_PROCESS_SAVERECFAILED');
                break;
            case _FF_STATUS_SAVESUBRECORD_FAILED:
                $message = BFText::_('COM_BREEZINGFORMS_PROCESS_SAVESUBFAILED');
                break;
            case _FF_STATUS_UPLOAD_FAILED:
                $message = BFText::_('COM_BREEZINGFORMS_PROCESS_UPLOADFAILED');
                break;
            case _FF_STATUS_SENDMAIL_FAILED:
                $message = BFText::_('COM_BREEZINGFORMS_PROCESS_SENDMAILFAILED');
                break;
            case _FF_STATUS_ATTACHMENT_FAILED:
                $message = BFText::_('COM_BREEZINGFORMS_PROCESS_ATTACHMTFAILED');
                break;
            case _FF_STATUS_CAPTCHA_FAILED:
                $message = BFText::_('COM_BREEZINGFORMS_CAPTCHA_ENTRY_FAILED');
                break;
            case _FF_STATUS_FILE_EXTENSION_NOT_ALLOWED:
                $message = BFText::_('COM_BREEZINGFORMS_FILE_EXTENSION_NOT_ALLOWED');
                break;
            default:
                $message = '';
                // custom piece status and message
                break;
        }
        // switch
        // built in PayPal action
        $paymentAction = false;
        if ($this->formrow->template_code != '') {
            require_once JPATH_SITE . '/administrator/components/com_breezingforms/libraries/Zend/Json/Decoder.php';
            require_once JPATH_SITE . '/administrator/components/com_breezingforms/libraries/Zend/Json/Encoder.php';
            $areas = Zend_Json::decode($this->formrow->template_areas);
            if (is_array($areas)) {
                jimport('joomla.version');
                $version = new JVersion();
                $j15 = true;
                if (version_compare($version->getShortVersion(), '1.6', '>=')) {
                    $j15 = false;
                }
                $paymentAction = true;
                switch (JRequest::getVar('ff_payment_method', '')) {
                    case 'PayPal':
                        foreach ($areas as $area) {
                            foreach ($area['elements'] as $element) {
                                if ($element['internalType'] == 'bfPayPal') {
                                    $options = $element['options'];
                                    $business = $options['business'];
                                    $paypal = 'https://www.paypal.com';
                                    if ($options['testaccount']) {
                                        $paypal = 'https://www.sandbox.paypal.com';
                                        $business = $options['testBusiness'];
                                    }
                                    $returnurl = htmlentities(JURI::root() . "index.php?option=com_breezingforms&confirmPayPal=true&form_id=" . $this->form . "&record_id=" . $this->record_id);
                                    $cancelurl = htmlentities(JURI::root() . "index.php?msg=" . BFText::_('Transaction Cancelled'));
                                    $html = '';
                                    if (!$this->inline) {
                                        $html .= '<html><head></head><body>';
                                    }
                                    JHTML::_('behavior.modal');
                                    $ppselect = JRequest::getVar('ff_nm_bfPaymentSelect', array());
                                    if (count($ppselect) != 0) {
                                        $ppselected = explode('|', $ppselect[0]);
                                        if (count($ppselected) == 4) {
                                            $options['itemname'] = htmlentities($ppselected[0], ENT_QUOTES, 'UTF-8');
                                            $options['itemnumber'] = htmlentities($ppselected[1], ENT_QUOTES, 'UTF-8');
                                            $options['amount'] = htmlentities($ppselected[2], ENT_QUOTES, 'UTF-8');
                                            $options['tax'] = htmlentities($ppselected[3], ENT_QUOTES, 'UTF-8');
                                        }
                                    }
                                    // keeping this for compat reasons
                                    $ppselect = JRequest::getVar('ff_nm_PayPalSelect', array());
                                    if (count($ppselect) != 0) {
                                        $ppselected = explode('|', $ppselect[0]);
                                        if (count($ppselected) == 4) {
                                            $options['itemname'] = htmlentities($ppselected[0], ENT_QUOTES, 'UTF-8');
                                            $options['itemnumber'] = htmlentities($ppselected[1], ENT_QUOTES, 'UTF-8');
                                            $options['amount'] = htmlentities($ppselected[2], ENT_QUOTES, 'UTF-8');
                                            $options['tax'] = htmlentities($ppselected[3], ENT_QUOTES, 'UTF-8');
                                        }
                                    }
                                    // compat end
                                    $html .= "<form name=\"ff_submitform\" action=\"" . $paypal . "/cgi-bin/webscr\" method=\"post\">";
                                    $html .= "<input type=\"hidden\" name=\"cmd\" value=\"_xclick\"/>";
                                    $html .= "<input type=\"hidden\" name=\"business\" value=\"" . $business . "\"/>";
                                    $html .= "<input type=\"hidden\" name=\"item_name\" value=\"" . $options['itemname'] . "\"/>";
                                    $html .= "<input type=\"hidden\" name=\"item_number\" value=\"" . $options['itemnumber'] . "\"/>";
                                    $html .= "<input type=\"hidden\" name=\"amount\" value=\"" . $options['amount'] . "\"/>";
                                    $html .= "<input type=\"hidden\" name=\"tax\" value=\"" . $options['tax'] . "\"/>";
                                    $html .= "<input type=\"hidden\" name=\"no_shipping\" value=\"1\"/>";
                                    $html .= "<input type=\"hidden\" name=\"no_note\" value=\"1\"/>";
                                    if ($options['useIpn']) {
                                        $html .= "<input type=\"hidden\" name=\"notify_url\" value=\"" . htmlentities(JURI::root() . "index.php?option=com_breezingforms&confirmPayPalIpn=true&raw=true&form_id=" . $this->form . "&record_id=" . $this->record_id) . "\"/>";
                                        if ($options['testaccount']) {
                                            $html .= "<input type=\"hidden\" name=\"test_ipn\" value=\"1\"/>";
                                        }
                                    } else {
                                        $html .= "<input type=\"hidden\" name=\"notify_url\" value=\"" . $returnurl . "\"/>";
                                    }
                                    $html .= "<input type=\"hidden\" name=\"return\" value=\"" . $returnurl . "\"/>";
                                    $html .= "<input type=\"hidden\" name=\"cancel_return\" value=\"" . $cancelurl . "\"/>";
                                    $html .= "<input type=\"hidden\" name=\"rm\" value=\"2\"/>";
                                    $html .= "<input type=\"hidden\" name=\"lc\" value=\"" . $options['locale'] . "\"/>";
                                    //$html .= "<input type=\"hidden\" name=\"pal\" value=\"D6MXR7SEX68LU\"/>";
                                    $html .= "<input type=\"hidden\" name=\"currency_code\" value=\"" . strtoupper($options['currencyCode']) . "\"/>";
                                    if (!$this->inline) {
                                        $html .= "</form></body></html>";
                                    }
                                    // TODO: let the user decide to use modal or simple alert
                                    if ($j15) {
                                        $html .= '<script type="text/javascript">' . nl() . indentc(1) . '<!--' . nl() . indentc(2) . '

										    SqueezeBox.initialize({});

										    SqueezeBox.loadModal = function(modalUrl,handler,x,y) {
										    		this.initialize();
										      		var options = $merge(options || {}, Json.evaluate("{handler: \'" + handler + "\', size: {x: " + x +", y: " + y + "}}"));
													this.setOptions(this.presets, options);
													this.assignOptions();
													this.setContent(handler,modalUrl);
										   	};

										    SqueezeBox.loadModal("' . JURI::root() . 'index.php?raw=true&option=com_breezingforms&showPayPalConnectMsg=true","iframe",300,100);

										 	

										' . nl() . indentc(1) . '// -->' . nl() . '</script>' . nl();
                                    }
                                    $html .= '<script type="text/javascript"><!--' . nl() . 'document.ff_submitform.submit();' . nl() . '//--></script>';
                                    echo $html;
                                    break;
                                }
                            }
                        }
                        break;
                    case 'Sofortueberweisung':
                        foreach ($areas as $area) {
                            foreach ($area['elements'] as $element) {
                                if ($element['internalType'] == 'bfSofortueberweisung') {
                                    $html = '';
                                    if (!$this->inline) {
                                        $html .= '<html><head></head><body>';
                                    }
                                    JHTML::_('behavior.modal');
                                    $options = $element['options'];
                                    $ppselect = JRequest::getVar('ff_nm_bfPaymentSelect', array());
                                    if (count($ppselect) != 0) {
                                        $ppselected = explode('|', $ppselect[0]);
                                        if (count($ppselected) == 4) {
                                            $options['reason_1'] = htmlentities($ppselected[0], ENT_QUOTES, 'UTF-8');
                                            $options['reason_2'] = htmlentities($ppselected[1], ENT_QUOTES, 'UTF-8');
                                            $options['amount'] = htmlentities($ppselected[2], ENT_QUOTES, 'UTF-8');
                                            if ($ppselected[3] != '' && intval($ppselected[3]) > 0) {
                                                $options['amount'] = '' . doubleval($options['amount']) + doubleval($ppselected[3]);
                                            }
                                        }
                                    }
                                    $options['amount'] = str_replace('.', ',', $options['amount']);
                                    $hash = '';
                                    if (isset($options['project_password']) && trim($options['project_password']) != '') {
                                        $data = array($options['user_id'], $options['project_id'], '', '', '', '', $options['amount'], $options['currency_id'], $options['reason_1'], $options['reason_2'], $this->form, $this->record_id, isset($options['mailback']) && $options['mailback'] ? implode('###', $this->mailbackRecipients) : '', '', '', '', $options['project_password']);
                                        $data_implode = implode('|', $data);
                                        $gen = sha1($data_implode);
                                        $hash = '<input type="hidden" name="hash" value="' . $gen . '" />';
                                    }
                                    $mailback = '';
                                    if (isset($options['mailback']) && $options['mailback']) {
                                        $mailback = '<input type="hidden" name="user_variable_2" value="' . implode('###', $this->mailbackRecipients) . '" />';
                                    }
                                    $html .= '
									<!-- sofortüberweisung.de -->
									<form method="post" name="ff_submitform" action="https://www.sofortueberweisung.de/payment/start">
									<input type="hidden" name="user_id" value="' . $options['user_id'] . '" />
									<input type="hidden" name="project_id" value="' . $options['project_id'] . '" />
									<input type="hidden" name="reason_1" value="' . $options['reason_1'] . '" />
									<input type="hidden" name="reason_2" value="' . $options['reason_2'] . '" />
									<input type="hidden" name="amount" value="' . $options['amount'] . '" />
									<input type="hidden" name="currency_id" value="' . $options['currency_id'] . '" />
									<input type="hidden" name="language_id" value="' . $options['language_id'] . '" />
									<input type="hidden" name="user_variable_0" value="' . $this->form . '" />
									<input type="hidden" name="user_variable_1" value="' . $this->record_id . '" />
									' . $mailback . '
									' . $hash . '
									</form>
									<!-- sofortüberweisung.de -->
									';
                                    if ($j15) {
                                        // TODO: let the user decide to use modal or simple alert
                                        $html .= '<script type="text/javascript">' . nl() . indentc(1) . '<!--' . nl() . indentc(2) . '

										    SqueezeBox.initialize({});

										    SqueezeBox.loadModal = function(modalUrl,handler,x,y) {
										    		this.initialize();
										      		var options = $merge(options || {}, Json.evaluate("{handler: \'" + handler + "\', size: {x: " + x +", y: " + y + "}}"));
													this.setOptions(this.presets, options);
													this.assignOptions();
													this.setContent(handler,modalUrl);
										   	};

										    SqueezeBox.loadModal("' . JURI::root() . 'index.php?raw=true&option=com_breezingforms&showPayPalConnectMsg=true","iframe",300,100);

										' . nl() . indentc(1) . '// -->' . nl() . '</script>' . nl();
                                    }
                                    $html .= '<script type="text/javascript"><!--' . nl() . 'document.ff_submitform.submit();' . nl() . '//--></script>';
                                    if (!$this->inline) {
                                        $html .= "</form></body></html>";
                                    }
                                    echo $html;
                                    break;
                                }
                            }
                        }
                        break;
                    default:
                        $paymentAction = false;
                }
            }
        }
        // CONTENTBUILDER
        if (JRequest::getVar('cb_controller', null) != 'edit' && $cbRecordId && is_array($cbResult) && isset($cbResult['data']) && isset($cbResult['data']['id']) && $cbResult['data']['id']) {
            if ($cbRecordId) {
                $return = JRequest::getVar('return', '');
                if ($return) {
                    $return = base64_decode($return);
                    if (JURI::isInternal($return)) {
                        JFactory::getApplication()->redirect($return, $msg);
                    }
                }
            }
            if ($cbResult['data']['force_login']) {
                jimport('joomla.version');
                $version = new JVersion();
                $is15 = true;
                if (version_compare($version->getShortVersion(), '1.6', '>=')) {
                    $is15 = false;
                }
                if (!JFactory::getUser()->get('id', 0)) {
                    if (!$is15) {
                        JFactory::getApplication()->redirect(JRoute::_('index.php?option=com_users&view=login&Itemid=' . JRequest::getInt('Itemid', 0), false));
                    } else {
                        JFactory::getApplication()->redirect(JRoute::_('index.php?option=com_user&view=login&Itemid=' . JRequest::getInt('Itemid', 0), false));
                    }
                } else {
                    if (!$is15) {
                        JFactory::getApplication()->redirect(JRoute::_('index.php?option=com_users&view=profile&Itemid=' . JRequest::getInt('Itemid', 0), false));
                    } else {
                        JFactory::getApplication()->redirect(JRoute::_('index.php?option=com_user&view=user&Itemid=' . JRequest::getInt('Itemid', 0), false));
                    }
                }
            } else {
                if (trim($cbResult['data']['force_url'])) {
                    JFactory::getApplication()->redirect(trim($cbResult['data']['force_url']));
                }
            }
            JFactory::getApplication()->redirect(JRoute::_('index.php?option=com_contentbuilder&controller=details&Itemid=' . JRequest::getInt('Itemid', 0) . '&backtolist=' . JRequest::getInt('backtolist', 0) . '&id=' . $cbResult['data']['id'] . '&record_id=' . $cbRecordId . '&limitstart=' . JRequest::getInt('limitstart', 0) . '&filter_order=' . JRequest::getCmd('filter_order'), false), BFText::_('COM_CONTENTBUILDER_SAVED'));
        }
        if (!$paymentAction) {
            if (!defined('VMBFCF_RUNNING')) {
                $ob = 0;
                while (ob_get_level() > 0 && $ob <= 32) {
                    ob_end_clean();
                    $ob++;
                }
                ob_start();
                echo '<!DOCTYPE html>
                    <html>
                    <head></head>
                    <body>';
            }
            if ($message == '') {
                $message = $this->message;
            } else {
                if ($this->message != '') {
                    $message .= ":" . nl() . $this->message;
                }
            }
            // if
            if (!$this->inline) {
                $url = $this->inframe ? $ff_mossite . '/index.php?format=html&tmpl=component' : ($this->runmode == _FF_RUNMODE_FRONTEND ? '' : 'index.php?format=html' . (JRequest::getCmd('tmpl', '') ? '&tmpl=' . JRequest::getCmd('tmpl', '') : ''));
                echo '<form name="ff_submitform" action="' . $url . '" method="post">' . nl();
            }
            // if
            switch ($this->runmode) {
                case _FF_RUNMODE_FRONTEND:
                    echo indentc(1) . '<input type="hidden" name="ff_form" value="' . htmlentities($this->form, ENT_QUOTES, 'UTF-8') . '"/>' . nl();
                    if ($this->target > 1) {
                        echo indentc(1) . '<input type="hidden" name="ff_target" value="' . htmlentities($this->target, ENT_QUOTES, 'UTF-8') . '"/>' . nl();
                    }
                    if ($this->inframe) {
                        echo indentc(1) . '<input type="hidden" name="ff_frame" value="1"/>' . nl();
                    }
                    if ($this->border) {
                        echo indentc(1) . '<input type="hidden" name="ff_border" value="1"/>' . nl();
                    }
                    if ($this->page != 1) {
                        indentc(1) . '<input type="hidden" name="ff_page" value="' . htmlentities($this->page, ENT_QUOTES, 'UTF-8') . '"/>' . nl();
                    }
                    if ($this->align != 1) {
                        echo indentc(1) . '<input type="hidden" name="ff_align" value="' . htmlentities($this->align, ENT_QUOTES, 'UTF-8') . '"/>' . nl();
                    }
                    if ($this->top != 0) {
                        echo indentc(1) . '<input type="hidden" name="ff_top" value="' . htmlentities($this->top, ENT_QUOTES, 'UTF-8') . '"/>' . nl();
                    }
                    reset($ff_otherparams);
                    while (list($prop, $val) = each($ff_otherparams)) {
                        echo indentc(1) . '<input type="hidden" name="' . htmlentities($prop, ENT_QUOTES, 'UTF-8') . '" value="' . htmlentities($val, ENT_QUOTES, 'UTF-8') . '"/>' . nl();
                    }
                    break;
                case _FF_RUNMODE_BACKEND:
                    echo indentc(1) . '<input type="hidden" name="option" value="com_breezingforms"/>' . nl() . indentc(1) . '<input type="hidden" name="act" value="run"/>' . nl() . indentc(1) . '<input type="hidden" name="ff_form" value="' . htmlentities($this->form, ENT_QUOTES, 'UTF-8') . '"/>' . nl() . indentc(1) . '<input type="hidden" name="ff_runmode" value="' . htmlentities($this->runmode, ENT_QUOTES, 'UTF-8') . '"/>' . nl();
                    if ($this->target > 1) {
                        echo indentc(1) . '<input type="hidden" name="ff_target" value="' . htmlentities($this->target, ENT_QUOTES, 'UTF-8') . '"/>' . nl();
                    }
                    if ($this->inframe) {
                        echo indentc(1) . '<input type="hidden" name="ff_frame" value="1"/>' . nl();
                    }
                    if ($this->border) {
                        echo indentc(1) . '<input type="hidden" name="ff_border" value="1"/>' . nl();
                    }
                    if ($this->page != 1) {
                        indentc(1) . '<input type="hidden" name="ff_page" value="' . htmlentities($this->page, ENT_QUOTES, 'UTF-8') . '"/>' . nl();
                    }
                    if ($this->align != 1) {
                        echo indentc(1) . '<input type="hidden" name="ff_align" value="' . htmlentities($this->align, ENT_QUOTES, 'UTF-8') . '"/>' . nl();
                    }
                    if ($this->top != 0) {
                        echo indentc(1) . '<input type="hidden" name="ff_top" value="' . htmlentities($this->top, ENT_QUOTES, 'UTF-8') . '"/>' . nl();
                    }
                    break;
                default:
                    // _FF_RUNMODE_PREVIEW:
                    if ($this->inframe) {
                        echo indentc(1) . '<input type="hidden" name="option" value="com_breezingforms"/>' . nl() . indentc(1) . '<input type="hidden" name="ff_frame" value="1"/>' . nl() . indentc(1) . '<input type="hidden" name="ff_form" value="' . htmlentities($this->form, ENT_QUOTES, 'UTF-8') . '"/>' . nl() . indentc(1) . '<input type="hidden" name="ff_runmode" value="' . htmlentities($this->runmode, ENT_QUOTES, 'UTF-8') . '"/>' . nl();
                        if ($this->page != 1) {
                            indentc(1) . '<input type="hidden" name="ff_page" value="' . htmlentities($this->page, ENT_QUOTES, 'UTF-8') . '"/>' . nl();
                        }
                    }
                    // if
            }
            // if
            echo indentc(1) . '<input type="hidden" name="ff_contentid" value="' . JRequest::getInt('ff_contentid', 0) . '"/>' . nl() . indentc(1) . '<input type="hidden" name="ff_applic" value="' . JRequest::getWord('ff_applic', '') . '"/>' . nl() . indentc(1) . '<input type="hidden" name="ff_module_id" value="' . JRequest::getInt('ff_module_id', 0) . '"/>' . nl() . indentc(1) . '<input type="hidden" name="ff_status" value="' . htmlentities($this->status, ENT_QUOTES, 'UTF-8') . '"/>' . nl() . indentc(1) . '<input type="hidden" name="ff_message" value="' . htmlentities(addcslashes($message, "..!@\\@..ÿ"), ENT_QUOTES, 'UTF-8') . '"/>' . nl() . indentc(1) . '<input type="hidden" name="ff_form_submitted" value="1"/>' . nl();
            if (JRequest::getVar('tmpl') == 'component') {
                echo indentc(1) . '<input type="hidden" name="tmpl" value="component"/>' . nl();
            }
            if (isset($_REQUEST['cb_form_id']) && isset($_REQUEST['cb_record_id'])) {
                echo indentc(1) . '<input type="hidden" name="cb_form_id" value="' . JRequest::getInt('cb_form_id', 0) . '"/>' . nl();
                echo indentc(1) . '<input type="hidden" name="cb_record_id" value="' . JRequest::getInt('cb_record_id', 0) . '"/>' . nl();
                echo indentc(1) . '<input type="hidden" name="return" value="' . htmlentities(JRequest::getVar('return', ''), ENT_QUOTES, 'UTF-8') . '"/>' . nl();
            }
            // TODO: turn off tracing in the options
            if ($this->traceMode & _FF_TRACEMODE_DIRECT) {
                $this->dumpTrace();
                ob_end_flush();
                echo '</pre>';
            } else {
                ob_end_flush();
                $this->dumpTrace();
            }
            // if
            restore_error_handler();
            if (!$this->inline) {
                echo '</form>' . nl() . '<script type="text/javascript">' . nl() . indentc(1) . '<!--' . nl() . indentc(2) . 'document.ff_submitform.submit();' . nl() . indentc(1) . '// -->' . nl() . '</script>' . nl();
            }
            // if
            if (!defined('VMBFCF_RUNNING')) {
                $c = ob_get_contents();
                ob_end_clean();
                echo $c;
                echo '</body>
                      </html>';
            }
        }
        unset($_SESSION['ff_editable_overridePlg' . JRequest::getInt('ff_contentid', 0) . $this->form_id]);
        unset($_SESSION['ff_editablePlg' . JRequest::getInt('ff_contentid', 0) . $this->form_id]);
        JFactory::getSession()->set('ff_editableMod' . JRequest::getInt('ff_module_id', 0) . $this->form_id, 0);
        JFactory::getSession()->set('ff_editable_overrideMod' . JRequest::getInt('ff_module_id', 0) . $this->form_id, 0);
        if (!defined('VMBFCF_RUNNING')) {
            exit;
        }
    }
Example #7
0
	function emitCompmenu()
	{
		global $database;
		$database = JFactory::getDBO();
		// sanity check
		if ($this->hasErrors()) return;
		if (!array_key_exists('emitted', $this->params[1])) {
			// save new row
			$row = new facileFormsMenus($database);
			$database->setQuery("select max(ordering)+1 from #__facileforms_compmenus");
			$row->ordering    = $database->loadResult();
			$row->published   = $this->getInt(1, 'published', 1);
			$row->package     = $this->getText(1, 'package');
			$row->img         = $this->getText(1, 'img');
			$row->title       = $this->getText(1, 'title', BFText::_('COM_BREEZINGFORMS_INSTALLER_UNKNOWN'));
			$row->name        = $this->getText(1, 'name');
			$row->page        = $this->getInt(1, 'page', 1);
			$row->frame       = $this->getInt(1, 'frame');
			$row->border      = $this->getInt(1, 'border');
			$row->params      = $this->getText(1, 'params');
			if (!$row->store()) {
				$this->setError($row->getError(), true);
				return;
			} // if
			$this->menus[] = $row->id;
			if ($row->published) $this->pubmenus++;
			// final tasks
			$this->params[1]['menu_id']     = $row->id;
			$this->params[1]['submenu_ord'] = 0;
			$this->params[1]['emitted']     = true;
		} // if
	} // emitCompmenu
Example #8
0
 function bfProcess(&$dataObject, $finaltargetFile, $parent = null, $index = 0, $childrenLength = 0)
 {
     $mdata = $dataObject['properties'];
     if ($mdata['type'] == 'element') {
         switch ($mdata['bfType']) {
             case 'bfFile':
                 if (isset($mdata['flashUploaderBytes']) && intval($mdata['flashUploaderBytes']) > 0 && isset($mdata['bfName']) && trim($mdata['bfName']) == trim(JRequest::getVar('itemName', ''))) {
                     if (JFile::exists($finaltargetFile) && @filesize($finaltargetFile) > intval($mdata['flashUploaderBytes'])) {
                         @JFile::delete($finaltargetFile);
                         echo trim($mdata['label']) . ': ' . BFText::_('COM_BREEZINGFORMS_FLASH_UPLOADER_TOO_LARGE');
                         exit;
                     }
                     break;
                 }
                 break;
         }
     }
     if (isset($dataObject['children']) && count($dataObject['children']) != 0) {
         $childrenAmount = count($dataObject['children']);
         for ($i = 0; $i < $childrenAmount; $i++) {
             bfProcess($dataObject['children'][$i], $finaltargetFile, $mdata, $i, $childrenAmount);
         }
     }
 }
Example #9
0
	function listitems( $option, &$rows, &$pkglist )
	{
		global $ff_config, $ff_version;
?>
		<script type="text/javascript">
			<!--
			var bf_submitbutton = function(pressbutton)
			{
				var form = document.adminForm;
				switch (pressbutton) {
					case 'copy':
					case 'publish':
					case 'unpublish':
					case 'remove':
						if (form.boxchecked.value==0) {
							alert("<?php echo BFText::_('COM_BREEZINGFORMS_FORMS_SELFORMSFIRST'); ?>");
							return;
						} // if
						break;
					default:
						break;
				} // switch
				if (pressbutton == 'remove')
					if (!confirm("<?php echo BFText::_('COM_BREEZINGFORMS_FORMS_ASKDEL'); ?>")) return;
				if (pressbutton == '' && form.pkgsel.value == '')
					form.pkg.value = '- blank -';
				if (pressbutton == 'easymode')
					form.act.value = 'easymode'
				if (pressbutton == 'quickmode')
					form.act.value = 'quickmode'
				else
					form.pkg.value = form.pkgsel.value;
				submitform(pressbutton);
			} // submitbutton

                        if(typeof Joomla != 'undefined'){
                            Joomla.submitbutton = bf_submitbutton;
                        }

                        submitbutton = bf_submitbutton;

			function listItemTask( id, task )
			{
				var f = document.adminForm;
				cb = eval( 'f.' + id );
				if (cb) {
					for (i = 0; true; i++) {
						cbx = eval('f.cb'+i);
						if (!cbx) break;
						cbx.checked = false;
					} // for
					cb.checked = true;
					f.boxchecked.value = 1;
					submitbutton(task);
				}
				return false;
			} // listItemTask
			//-->
		</script>
		<form action="index.php?format=html" method="post" name="adminForm">
		<table cellpadding="4" cellspacing="1" border="0">
			<tr>
				<td width="50%" nowrap>
					<table class="adminheading">
						<tr><th nowrap class="edit">BreezingForms <?php echo $ff_version; ?><br/><span class="componentheading"><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_MANAGEFORMS'); ?></span></th></tr>
					</table>
				</td>
				<td nowrap>
					<?php echo BFText::_('COM_BREEZINGFORMS_FORMS_PACKAGE'); ?>:
					<select id="pkgsel" name="pkgsel" class="inputbox" size="1" onchange="submitbutton('');">
<?php
					if (count($pkglist)) foreach ($pkglist as $pkg) {
						$selected = '';
						if ($pkg[0]) $selected = ' selected';
						echo '<option value="'.$pkg[1].'"'.$selected.'>'.($pkg[1] == '' ? ' - '.BFText::_('COM_BREEZINGFORMS_SELECT') . ' - ' : $pkg[1]).'&nbsp;</option>';
					} // foreach
?>
					</select>
				</td>
				<td align="right" width="50%" nowrap>
<?php
		JToolBarHelper::custom('quickmode',  'new.png',       'new_f2.png',     BFText::_('COM_BREEZINGFORMS_TOOLBAR_QUICKMODE'),  false);
		JToolBarHelper::custom('easymode',  'new.png',       'new_f2.png',     BFText::_('COM_BREEZINGFORMS_TOOLBAR_EASYMODE'),  false);
		JToolBarHelper::custom('new',       'new.png',       'new_f2.png',     BFText::_('COM_BREEZINGFORMS_TOOLBAR_CLASSICMODE'),       false);
		JToolBarHelper::custom('copy',      'copy.png',      'copy_f2.png',    BFText::_('COM_BREEZINGFORMS_TOOLBAR_COPY'),      false);
		JToolBarHelper::custom('publish',   'publish.png',   'publish_f2.png', BFText::_('COM_BREEZINGFORMS_TOOLBAR_PUBLISH'),   false);
		JToolBarHelper::custom('unpublish', 'unpublish.png', 'unpublish_f2.png',BFText::_('COM_BREEZINGFORMS_TOOLBAR_UNPUBLISH'), false);
		JToolBarHelper::custom('remove',    'delete.png',    'delete_f2.png',  BFText::_('COM_BREEZINGFORMS_TOOLBAR_DELETE'),    false);
?>
				</td>
			</tr>
		</table>
		<table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist">
			<tr>
				<th nowrap align="center"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?>);" /></th>
				<th nowrap align="left"><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_TITLE'); ?></th>
				<th nowrap align="left"><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_NAME'); ?></th>
				<th nowrap align="left"><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_PAGES'); ?></th>
				<th nowrap align="right"><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_WIDTH'); ?></th>
				<th nowrap align="right"><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_HEIGHT'); ?></th>
				<th nowrap align="right"><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_SCRIPTID'); ?></th>
				<th nowrap align="center"><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_PUBLISHED'); ?></th>
				<th nowrap align="center" colspan="2"><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_REORDER'); ?></th>
				<th align="left"><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_DESCRIPTION'); ?></th>
			</tr>
<?php
			$k = 0;
			for($i=0; $i < count( $rows ); $i++) {
				$row = $rows[$i];
				$desc = $row->description;
				if (strlen($desc) > $ff_config->limitdesc) $desc = substr($desc,0,$ff_config->limitdesc).'...';
?>
				<tr class="row<?php echo $k; ?>">
					<td nowrap valign="top" align="center"><input type="checkbox" id="cb<?php echo $i; ?>" name="ids[]" value="<?php echo $row->id; ?>" onclick="isChecked(this.checked);" /></td>
					
					<?php 
					if($row->template_code_processed != '' && $row->template_code_processed != 'QuickMode'){
					?>
					<td valign="top" align="left"><a href="index.php?option=com_breezingforms&amp;format=html&amp;act=easymode&amp;formName=<?php echo $row->name?>&amp;form=<?php echo $row->id; ?>"><?php echo $row->title; ?></a></td>
					<td valign="top" align="left"><a href="index.php?option=com_breezingforms&amp;format=html&amp;act=easymode&amp;formName=<?php echo $row->name?>&amp;form=<?php echo $row->id; ?>"><?php echo $row->name; ?></a></td>
					<?php } else if($row->template_code_processed == 'QuickMode') { ?>
					<td valign="top" align="left"><a href="index.php?option=com_breezingforms&amp;format=html&amp;act=quickmode&amp;formName=<?php echo $row->name?>&amp;form=<?php echo $row->id; ?>"><?php echo $row->title; ?></a></td>
					<td valign="top" align="left"><a href="index.php?option=com_breezingforms&amp;format=html&amp;act=quickmode&amp;formName=<?php echo $row->name?>&amp;form=<?php echo $row->id; ?>"><?php echo $row->name; ?></a></td>
					<?php } else { ?>
					<td valign="top" align="left"><a href="#editpage1" onclick="return listItemTask('cb<?php echo $i; ?>','editpage1')"><?php echo $row->title; ?></a></td>
					<td valign="top" align="left"><a href="#editform" onclick="return listItemTask('cb<?php echo $i; ?>','edit')"><?php echo $row->name; ?></a></td>
					<?php } ?>
					
					<td nowrap valign="top" align="left"><?php
					for ($p = 1; $p <= $row->pages; $p++) {
						if ($p > 1) echo '&nbsp;';
						if($row->template_code_processed == '' && $row->template_code_processed != 'QuickMode'){
						?><a href="#editpage<?php echo $p; ?>" onclick="return listItemTask('cb<?php echo $i; ?>','editpage<?php echo $p; ?>')"><?php echo $p; ?></a><?php
						}else if($row->template_code_processed == 'QuickMode'){
						?><a href="index.php?option=com_breezingforms&amp;format=html&amp;act=quickmode&amp;formName=<?php echo $row->name?>&amp;form=<?php echo $row->id; ?>&amp;page=<?php echo $p; ?>"><?php echo $p; ?></a><?php	
						} else {?>
						<a href="index.php?option=com_breezingforms&amp;format=html&amp;act=easymode&amp;formName=<?php echo $row->name?>&amp;form=<?php echo $row->id; ?>&amp;page=<?php echo $p; ?>"><?php echo $p; ?></a>
						<?php
						}
					} // for
					?></td>
					<td nowrap valign="top" align="right"><?php echo $row->width; if ($row->widthmode) echo '%'; else echo 'px'; ?></td>
					<td nowrap valign="top" align="right"><?php
					$text = '';
					switch ($row->heightmode) {
						case 1:
							$text =BFText::_('COM_BREEZINGFORMS_FORMS_AUTO');
							if ($row->height > 0) $text .= '+'.$row->height.'px';
							break;
						case 2:
							$text =BFText::_('COM_BREEZINGFORMS_FORMS_AUTOMAX');
							if ($row->height > 0) $text .= '+'.$row->height.'px';
							break;
						default:
							$text = $row->height.'px';
					} // switch
					echo $text; ?></td>
					<td nowrap valign="top" align="right"><?php echo $row->id; ?></td>
					<td nowrap valign="top" align="center"><?php
					if ($row->published == "1") {
						?><a href="#" onClick="return listItemTask('cb<?php echo $i; ?>','unpublish')"><img src="components/com_breezingforms/images/icons/publish_g.png" alt="+" border="0" /></a><?php
					} else {
						?><a href="#" onClick="return listItemTask('cb<?php echo $i; ?>','publish')"><img src="components/com_breezingforms/images/icons/publish_x.png" alt="-" border="0" /></a><?php
					} // if
					?></td>
					<td nowrap valign="top" align="right"><?php
						if ($i > 0) {
							?><a href="#" onClick="return listItemTask('cb<?php echo $i; ?>','orderup')"><img src="components/com_breezingforms/images/icons/uparrow.png" alt="^" border="0" /></a><?php
						} // if
					?></td>
					<td nowrap valign="top" align="left"><?php
						if ($i < count($rows)-1) {
							?><a href="#" onClick="return listItemTask('cb<?php echo $i; ?>','orderdown')"><img src="components/com_breezingforms/images/icons/downarrow.png" alt="v" border="0" /></a><?php
						} // if
					?></td>
					<td valign="top" align="left"><?php echo htmlspecialchars($desc, ENT_QUOTES); ?></td>
				</tr>
<?php
				$k = 1 - $k;
			} // for
?>
		</table>
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="option" value="<?php echo $option; ?>" />
		<input type="hidden" name="act" value="manageforms" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="form" value="" />
		<input type="hidden" name="page" value="" />
		<input type="hidden" name="pkg" value="" />
		</form>
<?php
	} // listitems
Example #10
0
    static function getPagedest($option, $pkg, $form, $page, &$sellist)
    {
        ?>
		<script type="text/javascript">
		<!--
		function submitbutton(pressbutton) {
			var form = document.adminForm;
			if (pressbutton == 'cancel') {
				submitform( pressbutton );
				return;
			} // if
			// do field validation
			if (!getSelectedValue('adminForm', 'destination')) {
				alert( "<?php 
        echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_SELPAGEMOVE');
        ?>
" );
			} else {
				submitform( pressbutton );
			} // if
		} // submitbutton
		//-->
		</script>
		<form action="index.php" method="post" name="adminForm" id="adminForm" class="adminForm">
		<table cellpadding="4" cellspacing="1" border="0" class="adminform" style="width:300px;">
			<tr><th colspan="3" class="title">BreezingForms - <?php 
        echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_MOVEPAGE');
        ?>
</th></tr>
			<tr>
				<td></td>
				<td style="text-align:center" valign="top">
					<strong><?php 
        echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_SELNRPAGE');
        ?>
:</strong>
					<br/><br/><?php 
        echo $sellist;
        ?>
<br /><br />
				</td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td nowrap style="text-align:right">
                                        <input class="btn btn-primary" onclick="submitbutton('movepagesave');" type="submit" value="<?php 
        echo htmlentities(BFText::_('COM_BREEZINGFORMS_TOOLBAR_CONTINUE'), ENT_QUOTES, 'UTF-8');
        ?>
"/>
                                        &nbsp;&nbsp;
                                        <input class="btn btn-primary" onclick="submitbutton('cancel');" type="submit" value="<?php 
        echo htmlentities(BFText::_('COM_BREEZINGFORMS_TOOLBAR_CANCEL'), ENT_QUOTES, 'UTF-8');
        ?>
"/>
				</td>
				<td></td>
			</tr>
		</table>
		<input type="hidden" name="pkg" value="<?php 
        echo $pkg;
        ?>
" />
		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="act" value="editpage" />
		<input type="hidden" name="form" value="<?php 
        echo $form;
        ?>
" />
		<input type="hidden" name="page" value="<?php 
        echo $page;
        ?>
" />
		</form>
<?php 
    }
Example #11
0
	function getPageDestination($option, $pkg, $form, $page)
	{
		global $database;
		$database = JFactory::getDBO();
		$row = new facileFormsForms($database);
		$row->load($form);
		$lst = array();
		for($p = 1; $p <= $row->pages; $p++)
			$lst[] = JHTML::_('select.option', $p, BFText::_('COM_BREEZINGFORMS_ELEMENTS_PAGE').' '.$p);
		$sellist =
			JHTML::_('select.genericlist',
				$lst, 'destination', 'class="inputbox" size="15"',
				'value', 'text', $page
			);
		HTML_facileFormsElement::getPagedest($option, $pkg, $form, $page, $sellist);
	} // getPageDestination
Example #12
0
	function showPackage($option, $caller, $pkgid, &$inst)
	{
?>
		<form action="index.php" method="post" name="adminForm">
		<table cellpadding="0" cellspacing="0" border="0" class="adminform" style="width:600px;">
			<tr><th colspan="4" class="title" >BreezingForms - <?php echo BFText::_('COM_BREEZINGFORMS_INSTALLER_PKGREPORT'); ?></th></tr>
<?php
		if (array_key_exists('pkgid', $inst->params[0])) {
			$pkgid = $inst->params[0]['pkgid'];
?>
			<tr>
				<td></td>
				<td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_INSTALLER_ID'); ?>:</td>
				<td nowrap><?php echo $pkgid; ?></td>
				<td></td>
			</tr>
<?php
		} else
			$pkgid = '';
?>
			<tr>
				<td></td>
				<td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_INSTALLER_INSTTYPE'); ?>:</td>
				<td nowrap width="100%"><?php HTML_facileFormsConf::showParam($inst, 'pkgtype'); ?></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_INSTALLER_FFVERSION'); ?>:</td>
				<td nowrap><?php HTML_facileFormsConf::showParam($inst, 'pkgversion'); ?></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_INSTALLER_PACKAGE').' '.BFText::_('COM_BREEZINGFORMS_INSTALLER_NAME'); ?>:</td>
				<td nowrap><?php HTML_facileFormsConf::showParam($inst, 'name'); ?></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_INSTALLER_PACKAGE').' '.BFText::_('COM_BREEZINGFORMS_INSTALLER_TITLE'); ?>:</td>
				<td nowrap><?php HTML_facileFormsConf::showParam($inst, 'title'); ?></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_INSTALLER_PACKAGE').' '.BFText::_('COM_BREEZINGFORMS_INSTALLER_VERS'); ?>:</td>
				<td nowrap><?php HTML_facileFormsConf::showParam($inst, 'version'); ?></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td nowrap valign="top"><?php echo BFText::_('COM_BREEZINGFORMS_INSTALLER_DESC'); ?>:</td>
				<td nowrap><?php HTML_facileFormsConf::showParam($inst, 'description'); ?></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_INSTALLER_CPYRT'); ?>:</td>
				<td nowrap><?php HTML_facileFormsConf::showParam($inst, 'copyright'); ?></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_INSTALLER_CREATEDATE'); ?>:</td>
				<td nowrap><?php HTML_facileFormsConf::showParam($inst, 'creationDate'); ?></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_INSTALLER_AUTHOR').' '.BFText::_('COM_BREEZINGFORMS_INSTALLER_NAME'); ?>:</td>
				<td nowrap><?php HTML_facileFormsConf::showParam($inst, 'author'); ?></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_INSTALLER_AUTHOR').' '.BFText::_('COM_BREEZINGFORMS_INSTALLER_EMAIL'); ?>:</td>
				<td nowrap><?php HTML_facileFormsConf::showParam($inst, 'authorEmail'); ?></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_INSTALLER_AUTHOR').' '.BFText::_('COM_BREEZINGFORMS_INSTALLER_URL'); ?>:</td>
				<td nowrap><?php HTML_facileFormsConf::showParam($inst, 'authorUrl'); ?></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_INSTALLER_SCRIPTSIMP'); ?>:</td>
				<td nowrap><?php echo count($inst->scripts); ?></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_INSTALLER_PIECESIMP'); ?>:</td>
				<td nowrap><?php echo count($inst->pieces); ?></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_INSTALLER_FORMSIMP'); ?>:</td>
				<td nowrap><?php echo count($inst->forms); ?></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_INSTALLER_ELEMSIMP'); ?>:</td>
				<td nowrap><?php echo count($inst->elements); ?></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td nowrap><?php echo BFText::_('COM_BREEZINGFORMS_INSTALLER_MENUSIMP'); ?>:</td>
				<td nowrap><?php echo count($inst->menus); ?></td>
				<td></td>
			</tr>
<?php
			if (count($inst->warnings)) {
?>
			<tr>
				<td></td>
				<td nowrap colspan="2">
					<hr/><br/>
					<?php echo BFText::_('COM_BREEZINGFORMS_INSTALLER_WARNINGS'); ?>:<br/><br/>
<?php
					foreach ($inst->warnings as $warn) echo $warn.'<br/>';
?>
				</td>
				<td></td>
			</tr>
<?php
			} // if
?>
			<tr>
				<td></td>
				<td nowrap colspan="2" style="text-align:right">
                                        <input onclick="submitbutton('instpackage');" type="submit" value="<?php echo BFText::_('COM_BREEZINGFORMS_TOOLBAR_CLOSE'); ?>"/>
				</td>
				<td></td>
			</tr>
		</table>
		<input type="hidden" name="option" value="<?php echo $option; ?>" />
		<input type="hidden" name="act" value="configuration" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="caller_url" value="<?php echo htmlspecialchars($caller, ENT_QUOTES); ?>" />
		<input type="hidden" name="pkg" value="<?php echo $pkgid; ?>" />
		</form>
<?php
	} // showPackage
Example #13
0
	function listitems( $option, &$rows, &$pkglist )
	{
		global $ff_config, $ff_mossite, $ff_version;
?>
		<script type="text/javascript">
			<!--
			var bf_submitbutton = function(pressbutton)
			{
				var form = document.adminForm;
				switch (pressbutton) {
					case 'copy':
					case 'publish':
					case 'unpublish':
					case 'remove':
						if (form.boxchecked.value==0) {
							alert("<?php echo BFText::_('COM_BREEZINGFORMS_MENUS_SELMENUSFIRST'); ?>");
							return;
						} // if
						break;
					default:
						break;
				} // switch
				if (pressbutton == 'remove')
					if (!confirm("<?php echo BFText::_('COM_BREEZINGFORMS_MENUS_ASKDEL'); ?>")) return;
				if (pressbutton == '' && form.pkgsel.value == '')
					form.pkg.value = '- blank -';
				else
					form.pkg.value = form.pkgsel.value;

                                
				submitform(pressbutton);
			}; // submitbutton

                        if(typeof Joomla != "undefined"){
                            Joomla.submitbutton = bf_submitbutton;
                        }

                        submitbutton = bf_submitbutton;

			function listItemTask( id, task )
			{
				var f = document.adminForm;
				cb = eval( 'f.' + id );
				if (cb) {
					for (i = 0; true; i++) {
						cbx = eval('f.cb'+i);
						if (!cbx) break;
						cbx.checked = false;
					} // for
					cb.checked = true;
					f.boxchecked.value = 1;
					submitbutton(task);
				}
				return false;
			} // listItemTask
			//-->
		</script>
		<form action="index.php" method="post" name="adminForm">
		<table cellpadding="4" cellspacing="1" border="0">
			<tr>
				<td width="50%" nowrap>
					<table class="adminheading">
						<tr><th nowrap class="edit">BreezingForms <?php echo $ff_version; ?><br/><span class="componentheading"><?php echo BFText::_('COM_BREEZINGFORMS_MENUS_MANAGEMENUS'); ?></span></th></tr>
					</table>
				</td>
				<td nowrap>
					<?php echo BFText::_('COM_BREEZINGFORMS_MENUS_PACKAGE'); ?>:
					<select id="pkgsel" name="pkgsel" class="inputbox" size="1" onchange="submitbutton('');">
<?php
					if (count($pkglist)) foreach ($pkglist as $pkg) {
						$selected = '';
						if ($pkg[0]) $selected = ' selected';
						echo '<option value="'.$pkg[1].'"'.$selected.'>'.$pkg[1].'&nbsp;</option>';
					} // foreach
?>
					</select>
				</td>
				<td align="right" width="50%" nowrap>
<?php
		JToolBarHelper::custom('new',       'new.png',          'new_f2.png',       BFText::_('COM_BREEZINGFORMS_TOOLBAR_NEW'),       false);
		JToolBarHelper::custom('copy',      'copy.png',         'copy_f2.png',      BFText::_('COM_BREEZINGFORMS_TOOLBAR_COPY'),      false);
		JToolBarHelper::custom('publish',   'publish.png',      'publish_f2.png',   BFText::_('COM_BREEZINGFORMS_TOOLBAR_PUBLISH'),   false);
		JToolBarHelper::custom('unpublish', 'unpublish.png',    'unpublish_f2.png', BFText::_('COM_BREEZINGFORMS_TOOLBAR_UNPUBLISH'), false);
		JToolBarHelper::custom('remove',    'delete.png',       'delete_f2.png',    BFText::_('COM_BREEZINGFORMS_TOOLBAR_DELETE'),    false);
?>
				</td>
			</tr>
		</table>
		<table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist">
			<tr>
				<th nowrap align="center"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?>);" /></th>
				<th nowrap align="left"><?php echo BFText::_('COM_BREEZINGFORMS_MENUS_MENUITEM'); ?></th>
				<th nowrap align="center"><?php echo BFText::_('COM_BREEZINGFORMS_MENUS_IMAGE'); ?></th>
				<th nowrap align="center"><?php echo BFText::_('COM_BREEZINGFORMS_MENUS_PUBLISHED'); ?></th>
				<th nowrap align="center" colspan="2"><?php echo BFText::_('COM_BREEZINGFORMS_FORMS_REORDER'); ?></th>
				<th nowrap align="left"><?php echo BFText::_('COM_BREEZINGFORMS_MENUS_NAME'); ?></th>
				<th nowrap align="left"><?php echo BFText::_('COM_BREEZINGFORMS_MENUS_FRAME'); ?></th>
				<th nowrap align="left"><?php echo BFText::_('COM_BREEZINGFORMS_MENUS_BORDER'); ?></th>
				<th align="left" width="100%"><?php echo BFText::_('COM_BREEZINGFORMS_MENUS_PARAMS'); ?></th>
			</tr>
<?php
			$k = 0;
			for($i=0; $i < count( $rows ); $i++) {
				$row = $rows[$i];
				$img = '&nbsp;';
				if ($row->img != '') $img = '<img src="'.$ff_mossite.'/includes/'.$row->img.'" alt="" border="0"/>';
				$frame = '&nbsp;';
				if ($row->frame) $frame = '<img src="images/tick.png" alt="+" border="0"/>';
				$border = '&nbsp;';
				if ($row->border) $border = '<img src="images/tick.png" alt="+" border="0"/>';
?>
				<tr class="row<?php echo $k; ?>">
					<td nowrap valign="top" align="center"><input type="checkbox" id="cb<?php echo $i; ?>" name="ids[]" value="<?php echo $row->id; ?>" onclick="isChecked(this.checked);" /></td>
					<td nowrap valign="top" align="left"><a href="#edit" onclick="return listItemTask('cb<?php echo $i; ?>','edit')"><?php echo $row->title; ?></a></td>
					<td nowrap valign="top" align="center"><?php echo $img; ?></td>
					<td nowrap valign="top" align="center"><?php
					if ($row->published == "1") {
						?><a href="#" onClick="return listItemTask('cb<?php echo $i; ?>','unpublish')"><img src="components/com_breezingforms/images/icons/publish_g.png" alt="+" border="0" /></a><?php
					} else {
						?><a href="#" onClick="return listItemTask('cb<?php echo $i; ?>','publish')"><img src="components/com_breezingforms/images/icons/publish_x.png" alt="-" border="0" /></a><?php
					} // if
					?></td>
					<td nowrap valign="top" align="right"><?php
						if ($i > 0) {
							?><a href="#" onClick="return listItemTask('cb<?php echo $i; ?>','orderup')"><img src="components/com_breezingforms/images/icons/uparrow.png" alt="^" border="0" /></a><?php
						} // if
					?></td>
					<td nowrap valign="top" align="left"><?php
						if ($i < count($rows)-1) {
							?><a href="#" onClick="return listItemTask('cb<?php echo $i; ?>','orderdown')"><img src="components/com_breezingforms/images/icons/downarrow.png" alt="v" border="0" /></a><?php
						} // if
					?></td>
					<td nowrap valign="top" align="left"><?php echo $row->name; ?></td>
					<td nowrap valign="top" align="center"><?php echo $frame; ?></td>
					<td nowrap valign="top" align="center"><?php echo $border; ?></td>
					<td valign="top" align="left"><?php echo htmlspecialchars($row->params, ENT_QUOTES); ?></td>
				</tr>
<?php
				$k = 1 - $k;
			} // for
?>
		</table>
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="option" value="<?php echo $option; ?>" />
		<input type="hidden" name="act" value="managemenus" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="form" value="" />
		<input type="hidden" name="page" value="" />
		<input type="hidden" name="pkg" value="" />
		</form>
<?php
	} // listitems
Example #14
0
: <?php 
echo htmlentities($tx_token);
?>
<br/>
<?php 
echo BFText::_('COM_BREEZINGFORMS_PAYMENT_METHOD_PAYPAL');
?>
<br/>
<br/>
<a href="<?php 
echo JURI::root();
?>
index.php?raw=true&option=com_breezingforms&amp;paypalDownload=true&amp;tx=<?php 
echo urlencode($tx_token);
?>
&amp;form=<?php 
echo intval($form_id);
?>
&amp;record_id=<?php 
echo intval($record_id);
?>
"><?php 
echo BFText::_('COM_BREEZINGFORMS_DOWNLOAD');
?>
 (<?php 
echo BFText::_('COM_BREEZINGFORMS_ALLOWED_TRIES');
?>
: <?php 
echo $tries;
?>
)</a>
<a href="<?php 
    echo JURI::root();
    ?>
index.php?raw=true&option=com_breezingforms&amp;sofortueberweisungDownload=true&amp;tx=<?php 
    echo htmlentities($tx_token);
    ?>
&amp;form=<?php 
    echo intval($formId);
    ?>
&amp;record_id=<?php 
    echo intval($recordId);
    ?>
"><?php 
    echo BFText::_('COM_BREEZINGFORMS_DOWNLOAD');
    ?>
 (<?php 
    echo BFText::_('COM_BREEZINGFORMS_ALLOWED_TRIES');
    ?>
: <?php 
    echo $tries;
    ?>
)</a>
<?php 
} else {
    echo BFText::_('COM_BREEZINGFORMS_YOUR_PAYMENT_REQUIRES_CONFIRMATION');
    ?>
<script>
setTimeout("location.reload()",3000);
</script>
<?php 
}
<?php

defined('_JEXEC') or die('Direct Access to this location is not allowed.');
/**
* BreezingForms - A Joomla Forms Application
* @version 1.8
* @package BreezingForms
* @copyright (C) 2008-2012 by Markus Bopp
* @license Released under the terms of the GNU General Public License
**/
defined('_JEXEC') or die('Direct Access to this location is not allowed.');
echo BFText::_('COM_BREEZINGFORMS_THANK_YOU_FOR_BUYING_SU');
?>
<br/>
<br/>
<?php 
echo BFText::_('COM_BREEZINGFORMS_YOUR_TRANSACTION_ID');
?>
: <?php 
echo htmlentities($tx_token);
Example #17
0
 static function copy($option, $pkg, $ids)
 {
     global $database;
     JArrayHelper::toInteger($ids);
     require_once JPATH_SITE . '/administrator/components/com_breezingforms/admin/quickmode.class.php';
     require_once JPATH_SITE . '/administrator/components/com_breezingforms/libraries/Zend/Json/Decoder.php';
     require_once JPATH_SITE . '/administrator/components/com_breezingforms/libraries/Zend/Json/Encoder.php';
     $database = JFactory::getDBO();
     $total = count($ids);
     $row = new facileFormsForms($database);
     $elem = new facileFormsElements($database);
     if (count($ids)) {
         foreach ($ids as $id) {
             $row->load(intval($id));
             $row->id = NULL;
             $row->ordering = 999999;
             $row->title = 'Copy of ' . $row->title;
             $row->name = 'copy_' . $row->name;
             $row->store();
             $row->reorder('');
             $database->setQuery("select id from #__facileforms_elements where form={$id}");
             $eids = $database->loadObjectList();
             for ($i = 0; $i < count($eids); $i++) {
                 $eid = $eids[$i];
                 $elem->load(intval($eid->id));
                 $elem->id = NULL;
                 $elem->form = $row->id;
                 $elem->store();
             }
             // for
             // resetting easy and quickmode database ids
             JFactory::getDBO()->setQuery("Select template_areas, template_code_processed, template_code From #__facileforms_forms Where id = " . intval($row->{$id}));
             $row_ = JFactory::getDBO()->loadObject();
             if (trim($row_->template_code) != '') {
                 $areas = Zend_Json::decode($row_->template_areas);
                 $i = 0;
                 foreach ($areas as $area) {
                     $j = 0;
                     foreach ($area['elements'] as $element) {
                         $areas[$i]['elements'][$j]['dbId'] = 0;
                         $j++;
                     }
                     $i++;
                 }
                 $template_areas = Zend_Json::encode($areas);
                 $template_code = $row_->template_code;
                 if ($row_->template_code_processed == 'QuickMode') {
                     $dataObject = Zend_Json::decode(base64_decode($row_->template_code));
                     resetQuickModeDbId($dataObject);
                     $template_code = base64_encode(Zend_Json::encode($dataObject));
                 }
                 JFactory::getDBO()->setQuery("Update #__facileforms_forms Set template_code = " . JFactory::getDBO()->Quote($template_code) . ", template_areas = " . JFactory::getDBO()->Quote($template_areas) . " Where id = " . intval($id));
                 JFactory::getDBO()->query();
                 if ($row_ && $row_->template_code_processed == 'QuickMode') {
                     $quickMode = new QuickMode();
                     $quickMode->save($id, Zend_Json::decode(base64_decode($template_code)));
                 }
             }
             // reset end
         }
     }
     // foreach
     $msg = $total . ' ' . BFText::_('COM_BREEZINGFORMS_FORMS_SUCOPIED');
     JFactory::getApplication()->redirect("index.php?option={$option}&act=manageforms&pkg={$pkg}&mosmsg={$msg}");
 }
function updateComponentMenus($copy = false)
{
    // remove unprotected menu items
    $protids = protectedComponentIds();
    if (trim($protids) != '') {
        jimport('joomla.version');
        $version = new JVersion();
        if (version_compare($version->getShortVersion(), '1.6', '>=')) {
            _ff_query("delete from #__menu " . "where `link` Like 'index.php?option=com_breezingforms&act=run%' " . "and id not in ({$protids})");
        } else {
            _ff_query("delete from #__components " . "where `option`='com_breezingforms' " . "and id not in ({$protids})");
        }
    }
    // add published menu items
    $rows = _ff_select("select " . "m.id as id, " . "m.parent as parent, " . "m.ordering as ordering, " . "m.title as title, " . "m.img as img, " . "m.name as name, " . "m.page as page, " . "m.frame as frame, " . "m.border as border, " . "m.params as params, " . "m.published as published " . "from #__facileforms_compmenus as m " . "left join #__facileforms_compmenus as p on m.parent=p.id " . "where m.published=1 " . "and (m.parent=0 or p.published=1) " . "order by " . "if(m.parent,p.ordering,m.ordering), " . "if(m.parent,m.ordering,-1)");
    $parent = 0;
    if (count($rows)) {
        foreach ($rows as $row) {
            jimport('joomla.version');
            $version = new JVersion();
            if (version_compare($version->getShortVersion(), '1.6', '>=')) {
                JFactory::getDBO()->setQuery("Select id From #__menu Where `alias` = " . JFactory::getDBO()->Quote($row->title));
                if (JFactory::getDBO()->loadResult()) {
                    return BFText::_('COM_BREEZINGFORMS_MENU_ITEM_EXISTS');
                }
                if ($row->parent == 0 || $row->parent == 1) {
                    $parent = addComponentMenu($row, 1, $copy);
                } else {
                    addComponentMenu($row, $parent, $copy);
                }
            } else {
                if ($row->parent == 0) {
                    $parent = addComponentMenu($row, 0);
                } else {
                    addComponentMenu($row, $parent);
                }
            }
        }
    }
    // foreach
    return '';
}
Example #19
0
	function copy($option, $pkg, $ids)
	{
		global $database;
		$database = JFactory::getDBO();
		$total = count($ids);
		$row = new facileFormsForms($database);
		$elem = new facileFormsElements($database);
		if (count($ids)) foreach ($ids as $id) {
			$row->load(intval($id));
			$row->id       = NULL;
			$row->ordering = 999999;
			$row->store();
			$row->reorder('');
			$database->setQuery("select id from #__facileforms_elements where form=$id");
			$eids = $database->loadObjectList();
			for($i = 0; $i < count($eids); $i++) {
				$eid = $eids[$i];
				$elem->load(intval($eid->id));
				$elem->id      = NULL;
				$elem->form    = $row->id;
				$elem->store();
			} // for
		} // foreach
		$msg = $total.' '.BFText::_('COM_BREEZINGFORMS_FORMS_SUCOPIED');
		JFactory::getApplication()->redirect("index.php?option=$option&act=manageforms&pkg=$pkg&mosmsg=$msg");
	} // copy
Example #20
0
<?php

defined('_JEXEC') or die('Direct Access to this location is not allowed.');
/**
* BreezingForms - A Joomla Forms Application
* @version 1.8
* @package BreezingForms
* @copyright (C) 2008-2012 by Markus Bopp
* @license Released under the terms of the GNU General Public License
**/
defined('_JEXEC') or die('Direct Access to this location is not allowed.');
echo BFText::_('COM_BREEZINGFORMS_PAYMENT_ERROR_MSG');
?>
<br/>
<br/>
<?php 
echo BFText::_('COM_BREEZINGFORMS_YOUR_TRANSACTION_ID');
?>
: <?php 
echo htmlentities($tx_token);
?>
<br/>
<br/>
<?php 
echo BFText::_('COM_BREEZINGFORMS_ERROR');
?>
: <?php 
echo htmlentities($msg);
    public static function showApplication($formId = 0, $formName = '', $templateCode = '', $callbackParams = array(), $elementScripts = array(), $pages = 1, $page = 1)
    {
        JHTML::_('behavior.keepalive');
        ?>

	<style type="text/css">
	<!--
        /* B-O-F: PARTIALLY GOES TO FRONT */

	li.ff_listItem {
		width: 100%;
		/*background-color:#3F0;*/
	}

	li.ff_listItem .ff_div {
		width: auto;
		background-color: #eaf3fa;
		/*border: solid 2px red;*/
		float: left;
	}

	/* E-O-F: PARTIALLY GOES TO FRONT */

	/* SYSTEM STYLES */
	.ui-resizable-handle, .ui-resizable, .ui-resizable-se, .ui-wrapper { /*border: 1px #000000 solid;*/ float: left; width: auto; }
	.bfOptionsTextInput { width: 100%; }
	#main-container-easymode { height: 100%; }
	#menutab { float: left; width: 300px; height: 100%; }
	#form-area-easymode { padding-left: 310px; }
	#trashcan { list-style: none; }
	#trashcan-box { height: 100px; background: #fbfbfb url(<?php 
        echo JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/themes/easymode/i/trash-here.png';
        ?>
) center no-repeat; margin-bottom: 10px; }
 	#trashcan-box ul#trashcan { width:100%; height:100px; overflow:auto; padding:0; margin:0; float:left; }
	.ff_dragBox { width: 10px; height: 10px; cursor: move; float: left; background-image: url("<?php 
        echo JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/hand_icon.png';
        ?>
"); }
	.draggableElement { padding: 2px; }
	-->
	</style>

	<!-- TEMPLATE STYLES -->
	<style>
	<!--
	.droppableArea {
		list-style: none;
		padding: 5px;
		margin: 0;
		height: 600px;
                width: 100%;
		min-width: 700px !important;
		overflow: auto;
		background: #f6f6f6 url(<?php 
        echo JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/themes/easymode/i/drag-here.png';
        ?>
) center no-repeat;
		border: 2px dashed #ccc;
		width: auto;
	}

	.droppableArea li {
		margin: 0 0 0 0;
		padding-bottom: 0px;
		width: 100%;
	}

 	.ff_label{  float: left; }
 	.ff_elem { float: right; border-width: 0px; border-color:  }
	-->
	</style>

	<link rel="stylesheet" href="<?php 
        echo JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/themes/easymode/easymode.all.css';
        ?>
" type="text/css" media="screen" title="Flora (Default)">
	<?php 
        require_once JPATH_SITE . '/administrator/components/com_breezingforms/admin/easymode-js.php';
        ?>

	<div>
		<?php 
        echo JToolBarHelper::custom('save', 'save.png', 'save_f2.png', BFText::_('COM_BREEZINGFORMS_TOOLBAR_EASYMODE_SAVE'), false);
        ?>
		<?php 
        if ($formId != 0) {
            JToolBarHelper::custom('editform', 'edit.png', 'save_f2.png', BFText::_('COM_BREEZINGFORMS_TOOLBAR_EASYMODE_FORM_EDIT'), false);
            JToolBarHelper::custom('preview', 'publish.png', 'save_f2.png', BFText::_('COM_BREEZINGFORMS_TOOLBAR_EASYMODE_PREVIEW'), false);
            JToolBarHelper::custom('preview_site', 'publish.png', 'save_f2.png', BFText::_('COM_BREEZINGFORMS_SITE_PREVIEW'), false);
        }
        ?>
                <?php 
        JToolBarHelper::custom('close', 'cancel.png', 'cancel_f2.png', BFText::_('COM_BREEZINGFORMS_TOOLBAR_QUICKMODE_CLOSE'), false);
        ?>
		<?php 
        JToolBarHelper::title('<img src="' . JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/themes/easymode/i/logo-breezingforms.png' . '" align="top"/>');
        ?>
		<form action="index.php" method="post" id="adminForm" name="adminForm">
			<input type="hidden" name="option" value="com_breezingforms" />
			<input type="hidden" name="act" value="easymode" />
			<input type="hidden" name="templateCode" value="" />

			<input type="hidden" name="areas" value="" />
			<input type="hidden" name="task" value="" />
			<input type="hidden" name="form" value="<?php 
        echo $formId;
        ?>
" />
			<input type="hidden" name="formName" value="<?php 
        echo $formName;
        ?>
" />
			<input type="hidden" name="page" value="<?php 
        echo $page;
        ?>
" />
			<input type="hidden" name="pages" value="<?php 
        echo $pages;
        ?>
" />
		</form>
	</div>

	<div style="clear:both;"></div>

<?php 
        //echo bf_alert('Get BreezingForms Full Version', 'http://crosstec.de/en/extensions/joomla-forms-download.html');
        //echo bf_alert('More features, no footers, no messages', 'http://crosstec.de/en/extensions/joomla-forms-download.html');
        ?>
<br/>
<br/>

<form name="bfForm" onsubmit="return false;">

<div id="main-container-easymode">

	<div id="menutab" class="flora">
            <ul>
                <li><a href="#fragment-1" onclick="app.refreshTemplateBox();app.refreshBatchOptions();"><span><div class="tab-items"><?php 
        echo BFText::_('COM_BREEZINGFORMS_ITEMS');
        ?>
</div></span></a></li>
                <li><a href="#fragment-2" onclick="app.refreshTemplateBox();app.refreshBatchOptions();"><span><div class="tab-element"><?php 
        echo BFText::_('COM_BREEZINGFORMS_ELEMENT');
        ?>
</div></span></a></li>
                <li><a href="#fragment-3" onclick="app.refreshTemplateBox();app.refreshBatchOptions();"><span><div class="tab-form"><?php 
        echo BFText::_('COM_BREEZINGFORMS_FORM');
        ?>
</div></span></a></li>
            </ul>

            <div class="t">

				<div class="t">
					<div class="t"></div>
		 		</div>
	 		</div>

	 		<div class="m">

            <div id="fragment-1">
            	<div>

	                <ul id="nestedaccordion" class="ui-accordion-container" style="width: 275px;">
						<li>
							<a href='#'><div class="ui-accordion-left"></div><?php 
        echo BFText::_('COM_BREEZINGFORMS_BASIC');
        ?>
<div class="ui-accordion-right"></div></a>
							<div>


									<div class="draggableElement" id="bfStaticText" style="z-index:1000;" onMouseover="this.style.backgroundColor='#eaf3fa';" onMouseout="this.style.backgroundColor='white';">
										<span class="icon-statictext" style="width: 100px !important;"><?php 
        echo BFText::_('COM_BREEZINGFORMS_STATIC_TEXT');
        ?>
</span>
									</div>

									<div class="draggableElement" id="bfTextfield" style="z-index:1000;" onMouseover="this.style.backgroundColor='#eaf3fa';" onMouseout="this.style.backgroundColor='white';">
										<span class="icon-textfield" style="width: 100px !important;"><?php 
        echo BFText::_('COM_BREEZINGFORMS_TEXTFIELD');
        ?>
</span>

									</div>

									<div class="draggableElement" id="bfTextarea" style="z-index:1000;" onMouseover="this.style.backgroundColor='#eaf3fa';" onMouseout="this.style.backgroundColor='white';">
										<span class="icon-textarea" style="width: 100px !important;"><?php 
        echo BFText::_('COM_BREEZINGFORMS_TEXTAREA');
        ?>
</span>
									</div>

									<div class="draggableElement" id="bfCheckbox" style="z-index:1000;" onMouseover="this.style.backgroundColor='#eaf3fa';" onMouseout="this.style.backgroundColor='white';">
										<span class="icon-checkboxx" style="width: 100px !important;"><?php 
        echo BFText::_('COM_BREEZINGFORMS_CHECKBOX');
        ?>
</span>
									</div>

									<div class="draggableElement" id="bfRadio" style="z-index:1000;" onMouseover="this.style.backgroundColor='#eaf3fa';" onMouseout="this.style.backgroundColor='white';">
										<span class="icon-radio" style="width: 100px !important;"><?php 
        echo BFText::_('COM_BREEZINGFORMS_RADIO');
        ?>
</span>

									</div>

									<div class="draggableElement" id="bfSelect" style="z-index:1000;" onMouseover="this.style.backgroundColor='#eaf3fa';" onMouseout="this.style.backgroundColor='white';">
										<span class="icon-select" style="width: 100px !important;"><?php 
        echo BFText::_('COM_BREEZINGFORMS_SELECT');
        ?>
</span>
									</div>

									<div class="draggableElement" id="bfFile" style="z-index:1000;" onMouseover="this.style.backgroundColor='#eaf3fa';" onMouseout="this.style.backgroundColor='white';">
										<span class="icon-filee" style="width: 100px !important;"><?php 
        echo BFText::_('COM_BREEZINGFORMS_FILE');
        ?>
</span>
									</div>

									<div class="draggableElement" id="bfTooltip" style="z-index:1000;" onMouseover="this.style.backgroundColor='#eaf3fa';" onMouseout="this.style.backgroundColor='white';">
										<span class="icon-tooltip" style="width: 100px !important;"><?php 
        echo BFText::_('COM_BREEZINGFORMS_TOOLTIP');
        ?>
</span>

									</div>

									<div class="draggableElement" id="bfIcon" style="z-index:1000;" onMouseover="this.style.backgroundColor='#eaf3fa';" onMouseout="this.style.backgroundColor='white';">
										<span class="icon-icon" style="width: 100px !important;"><?php 
        echo BFText::_('COM_BREEZINGFORMS_ICON');
        ?>
</span>
									</div>

									<div class="draggableElement" id="bfSubmitButton" style="z-index:1000;" onMouseover="this.style.backgroundColor='#eaf3fa';" onMouseout="this.style.backgroundColor='white';">
										<span class="icon-submitbutton" style="width: 100px !important;"><?php 
        echo BFText::_('COM_BREEZINGFORMS_SUBMITBUTTON');
        ?>
</span>
									</div>

									<div class="draggableElement" id="bfImageButton" style="z-index:1000;" onMouseover="this.style.backgroundColor='#eaf3fa';" onMouseout="this.style.backgroundColor='white';">
										<span class="icon-imagebutton" style="width: 100px !important;"><?php 
        echo BFText::_('COM_BREEZINGFORMS_IMAGE_BUTTON');
        ?>
</span>

									</div>

									<div class="draggableElement" id="bfHidden" style="z-index:1000;" onMouseover="this.style.backgroundColor='#eaf3fa';" onMouseout="this.style.backgroundColor='white';">
										<span class="icon-hiddeninput" style="width: 100px !important;"><?php 
        echo BFText::_('COM_BREEZINGFORMS_HIDDEN_INPUT');
        ?>
</span>
									</div>


							</div>
						</li>
						<li>
							<a href='#'><div class="ui-accordion-left"></div><?php 
        echo BFText::_('COM_BREEZINGFORMS_SPECIAL');
        ?>
<div class="ui-accordion-right"></div></a>
							<div>


								<div class="draggableElement" id="bfCaptcha" style="z-index:1000;" onMouseover="this.style.backgroundColor='#eaf3fa';" onMouseout="this.style.backgroundColor='white';">
									<span class="icon-captcha" style="width: 100px !important;"><?php 
        echo BFText::_('COM_BREEZINGFORMS_CAPTCHA');
        ?>
</span>
								</div>

								<div class="draggableElement" id="bfCalendar" style="z-index:1000;" onMouseover="this.style.backgroundColor='#eaf3fa';" onMouseout="this.style.backgroundColor='white';">
									<span class="icon-calendarr" style="width: 100px !important;"><?php 
        echo BFText::_('COM_BREEZINGFORMS_CALENDAR');
        ?>
</span>
								</div>

								<div class="draggableElement" id="bfPayPal" style="z-index:1000;" onMouseover="this.style.backgroundColor='#eaf3fa';" onMouseout="this.style.backgroundColor='white';">
									<span class="icon-paypal" style="width: 100px !important;"><?php 
        echo BFText::_('COM_BREEZINGFORMS_PAYPAL');
        ?>
</span>
								</div>


								<div class="draggableElement" id="bfSofortueberweisung" style="z-index:1000;" onMouseover="this.style.backgroundColor='#eaf3fa';" onMouseout="this.style.backgroundColor='white';">
									<span class="icon-sofort" style="width: 100px !important;"><?php 
        echo BFText::_('COM_BREEZINGFORMS_SOFORTUEBERWEISUNG');
        ?>
</span>
								</div>

							</div>
						</li>
					</ul>
				</div>
            </div>
            <div id="fragment-2">

                <div>
	                <ul id="nestedaccordion2" class="ui-accordion-container" style="width: 275px;">
						<li>
							<a href='#'><div class="ui-accordion-left"></div><?php 
        echo BFText::_('COM_BREEZINGFORMS_OPTIONS');
        ?>
<div class="ui-accordion-right"></div></a>
							<div>
								<div id="bfOptionsWrapper" style="display:none;">
								<br/>
								<span id="bfOptionsSaveMessage" style="visibility:hidden;display:none"></span>
								<!-- Calendar -->

								<div id="bfCalendarOptions" class="bfOptions" style="visibility:hidden;display:none">
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_LINKTEXT_MAY_CONTAIN_HTML');
        ?>
:
									<br/>
									<textarea class="bfOptionsTextInput" id="bfCalendarText"></textarea>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_FORMAT');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfCalendarFormat" value=""/>
									<br/>

									<?php 
        echo BFText::_('COM_BREEZINGFORMS_CONNECT_WITH_FIELD_NAME');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfCalendarConnectWith" value=""/>
								</div>
								<!-- Captcha -->
								<div id="bfCaptchaOptions" class="bfOptions" style="visibility:hidden;display:none">
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_WIDTH');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfCaptchaWidth" value=""/>
									<br/>

									<?php 
        echo BFText::_('COM_BREEZINGFORMS_HEIGHT');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfCaptchaHeight" value=""/>
								</div>
								<!-- Label -->
								<div id="bfLabelOptions" class="bfOptions" style="visibility:hidden;display:none">
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_CONTENT_MAY_CONTAIN_HTML');
        ?>
:
									<br/>
									<textarea class="bfOptionsTextInput" id="bfLabelContent" rows="10"></textarea>

									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_WIDTH');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfLabelWidth" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_HEIGHT');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfLabelHeight" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_ON_TOP');
        ?>

									<br/>
									<input type="checkbox" id="bfLabelOnTop" value=""/>
								</div>
								<!-- Static Text -->
								<div id="bfStaticTextOptions" class="bfOptions" style="visibility:hidden;display:none">
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_TITLE');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfStaticTextTitle" value=""/>
									<br/>

									<?php 
        echo BFText::_('COM_BREEZINGFORMS_CONTENT_MAY_CONTAIN_HTML');
        ?>
:
									<br/>
									<textarea class="bfOptionsTextInput" id="bfStaticTextContent" rows="10"></textarea>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_WIDTH');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfStaticTextWidth" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_HEIGHT');
        ?>
:
									<br/>

									<input type="text" class="bfOptionsTextInput" id="bfStaticTextHeight" value=""/>
								</div>
								<!-- Text -->
								<div id="bfTextfieldOptions" class="bfOptions" style="visibility:hidden;display:none">
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_TITLE');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfTextfieldTitle" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_NAME');
        ?>
:
									<br/>

									<input type="text" class="bfOptionsTextInput" id="bfTextfieldName" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_VALUE');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfTextfieldValue" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_PASSWORD');
        ?>
									<br/>
									<input type="checkbox" id="bfTextfieldPassword" value=""/>

									<br/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_MAILBACK');
        ?>
									<br/>
									<input type="checkbox" id="bfTextfieldMailback" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_MAILBACK_AS_SENDER');
        ?>
									<br/>
									<input type="checkbox" id="bfTextfieldMailbackAsSender" value=""/>

									<br/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_MAILBACKFILE_IF_IS_MAILBACK_A_FILE_FROM_THIS_SERVER_PATH_IS_SENT_TO_THE_MAILBACK_ADDRESS');
        ?>
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfTextfieldMailbackfile" style="width:100%"/>
									<br/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_WIDTH');
        ?>
:
									<br/>

									<input type="text" class="bfOptionsTextInput" id="bfTextfieldWidth" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_HEIGHT');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfTextfieldHeight" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_MAXLENGTH');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfTextfieldMaxlength" value=""/>
									<br/>

									<?php 
        echo BFText::_('COM_BREEZINGFORMS_DISABLE');
        ?>
									<br/>
									<input type="checkbox" id="bfTextfieldDisable" value="disable"/>
								</div>
								<!-- Textarea -->
								<div id="bfTextareaOptions" class="bfOptions" style="visibility:hidden;display:none">
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_TITLE');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfTextareaTitle" value=""/>

									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_NAME');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfTextareaName" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_VALUE');
        ?>
:
									<br/>
									<textarea class="bfOptionsTextInput" id="bfTextareaValue"></textarea>
									<br/>

									<?php 
        echo BFText::_('COM_BREEZINGFORMS_WIDTH');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfTextareaWidth" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_HEIGHT');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfTextareaHeight" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_DISABLE');
        ?>
									<br/>

									<input type="checkbox" id="bfTextareaDisable" value="disable"/>
								</div>
								<!-- Checkbox -->
								<div id="bfCheckboxOptions" class="bfOptions" style="visibility:hidden;display:none">
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_TITLE');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfCheckboxTitle" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_NAME');
        ?>
:
									<br/>

									<input type="text" class="bfOptionsTextInput" id="bfCheckboxName" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_CHECKED');
        ?>
:
									<br/>
									<input type="checkbox" id="bfCheckboxChecked" value=""/>
									<br/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_MAILBACK_ACCEPT');
        ?>
:
									<br/>
									<input type="checkbox" id="bfCheckboxMailbackAccept" value=""/>

									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_MAILBACK_ACCEPT__CONNECT_WITH_NAME');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfCheckboxMailbackAcceptConnectWith" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_VALUE');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfCheckboxValue" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_WIDTH');
        ?>
:
									<br/>

									<input type="text" class="bfOptionsTextInput" id="bfCheckboxWidth" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_HEIGHT');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfCheckboxHeight" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_DISABLE');
        ?>
									<br/>
									<input type="checkbox" id="bfCheckboxDisable" value="disable"/>

								</div>
								<!-- Radio -->
								<div id="bfRadioOptions" class="bfOptions" style="visibility:hidden;display:none">
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_TITLE');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfRadioTitle" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_NAME');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfRadioName" value=""/>

									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_CHECKED');
        ?>
:
									<br/>
									<input type="checkbox" id="bfRadioChecked" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_VALUE');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfRadioValue" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_WIDTH');
        ?>
:
									<br/>

									<input type="text" class="bfOptionsTextInput" id="bfRadioWidth" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_HEIGHT');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfRadioHeight" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_DISABLE');
        ?>
									<br/>
									<input type="checkbox" id="bfRadioDisable" value="disable"/>

								</div>
								<!-- Select -->
								<div id="bfSelectOptions" class="bfOptions" style="visibility:hidden;display:none">
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_TITLE');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfSelectTitle" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_NAME');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfSelectName" value=""/>

									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_MULTIPLE');
        ?>
:
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_YES');
        ?>
 <input type="radio" name="bfSelectMultiple" id="bfSelectMultipleYes" value="1"/> <?php 
        echo BFText::_('COM_BREEZINGFORMS_NO');
        ?>
 <input type="radio" name="bfSelectMultiple" id="bfSelectMultipleNo" value="0"/>
									<br/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_OPTIONS');
        ?>
:
									<br/>

									<textarea class="bfOptionsTextInput" id="bfSelectOpts" rows="10"></textarea>
									<br/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_MAILBACK');
        ?>
									<br/>
									<input type="checkbox" id="bfSelectMailback" value=""/>
									<br/>
									<br/>

									<?php 
        echo BFText::_('COM_BREEZINGFORMS_WIDTH');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfSelectWidth" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_HEIGHT');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfSelectHeight" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_DISABLE');
        ?>
									<br/>

									<input type="checkbox" id="bfSelectDisable" value="disable"/>
								</div>
								<!-- File -->
								<div id="bfFileOptions" class="bfOptions" style="visibility:hidden;display:none">
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_TITLE');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfFileTitle" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_NAME');
        ?>
:
									<br/>

									<input type="text" class="bfOptionsTextInput" id="bfFileName" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_ADD_TIMESTAMP_TO_FILENAME');
        ?>
									<br/>
									<input type="checkbox" id="bfFileTimestamp" value="1"/>
									<br/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_UPLOAD_DIRECTORY');
        ?>
:
									<br/>

									<input type="text" class="bfOptionsTextInput" id="bfFileUploadDirectory" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_ALLOWED_FILE_EXTENSIONS');
        ?>
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfFileAllowedFileExtensions" value=""/>
									<br/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_ATTACH_FILE_TO_ADMIN_MAILS');
        ?>
									<br/>

									<input type="checkbox" id="bfFileAttachToAdminMail" value="0"/>
									<br/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_ATTACH_FILE_TO_USER_MAILS');
        ?>
									<br/>
									<input type="checkbox" id="bfFileAttachToUserMail" value="0"/>
									<br/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_WIDTH');
        ?>
:
									<br/>

									<input type="text" class="bfOptionsTextInput" id="bfFileWidth" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_HEIGHT');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfFileHeight" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_DISABLE');
        ?>
									<br/>
									<input type="checkbox" id="bfFileDisable" value="disable"/>

								</div>
								<!-- Icon -->
								<div id="bfIconOptions" class="bfOptions" style="visibility:hidden;display:none">
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_CAPTION_MAY_CONTAIN_HTML');
        ?>
:
									<br/>
									<textarea class="bfOptionsTextInput" id="bfIconCaption"></textarea>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_WIDTH');
        ?>
:
									<br/>

									<input type="text" class="bfOptionsTextInput" id="bfIconWidth" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_HEIGHT');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfIconHeight" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_ICON_IMAGE');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfIconImage" value=""/>
									<br/>

									<?php 
        echo BFText::_('COM_BREEZINGFORMS_ICON_IMAGE_OVER');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfIconImageOver" value=""/>
								</div>
								<!-- Image Button -->
								<div id="bfImageButtonOptions" class="bfOptions" style="visibility:hidden;display:none">
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_TITLE');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfImageButtonTitle" value=""/>
									<br/>

									<?php 
        echo BFText::_('COM_BREEZINGFORMS_NAME');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfImageButtonName" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_WIDTH');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfImageButtonWidth" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_HEIGHT');
        ?>
:
									<br/>

									<input type="text" class="bfOptionsTextInput" id="bfImageButtonHeight" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_VALUE');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfImageButtonValue" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_IMAGE');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfImageButtonImage" value=""/>
									<br/>

									<?php 
        echo BFText::_('COM_BREEZINGFORMS_DISABLE');
        ?>
									<br/>
									<input type="checkbox" id="bfImageButtonDisable" value="disable"/>
								</div>
								<!-- Submit Button -->
								<div id="bfSubmitButtonOptions" class="bfOptions" style="visibility:hidden;display:none">
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_TITLE');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfSubmitButtonTitle" value=""/>

									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_NAME');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfSubmitButtonName" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_WIDTH');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfSubmitButtonWidth" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_HEIGHT');
        ?>
:
									<br/>

									<input type="text" class="bfOptionsTextInput" id="bfSubmitButtonHeight" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_VALUE');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfSubmitButtonValue" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_DISABLE');
        ?>
									<br/>
									<input type="checkbox" id="bfSubmitButtonDisable" value="disable"/>

								</div>
								<!-- Tooltip -->
								<div id="bfTooltipOptions" class="bfOptions" style="visibility:hidden;display:none">
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_TITLE');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfTooltipTitle" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_NAME');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfTooltipName" value=""/>

									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_TYPE');
        ?>
:
									<br/>
									<input type="radio" name="bfTooltipType" id="bfTooltipTypeInfo" value="info"/> <img src="<?php 
        echo JURI::root();
        ?>
includes/js/ThemeOffice/tooltip.png"/>
									<input type="radio" name="bfTooltipType" id="bfTooltipTypeWarning" value="warning"/> <img src="<?php 
        echo JURI::root();
        ?>
includes/js/ThemeOffice/warning.png"/>
									<input type="radio" name="bfTooltipType" id="bfTooltipTypeCustom" value="warning"/> <?php 
        echo BFText::_('COM_BREEZINGFORMS_CUSTOM');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfTooltipCustomImage" value=""/>

									<br/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_TEXT');
        ?>
:
									<br/>
									<textarea class="bfOptionsTextInput" id="bfTooltipText"></textarea>
									<br/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_WIDTH');
        ?>
:
									<br/>

									<input type="text" class="bfOptionsTextInput" id="bfTooltipWidth" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_HEIGHT');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfTooltipHeight" value=""/>
									<br/>
								</div>
								<!-- PayPal -->
								<div id="bfPayPalOptions" class="bfOptions" style="visibility:hidden;display:none">

									<?php 
        echo BFText::_('COM_BREEZINGFORMS_TITLE');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfPayPalTitle" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_NAME');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfPayPalName" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_TESTACCOUNT');
        ?>
:
									<br/>

									<?php 
        echo BFText::_('COM_BREEZINGFORMS_YES');
        ?>
<input type="radio" id="bfPayPalTestaccountYes" name="bfPayPalTestaccount" value="1"/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_NO');
        ?>
<input type="radio" id="bfPayPalTestaccountNo" name="bfPayPalTestaccount" value="0" checked="checked"/>
									<br/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_ACCOUNT');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfPayPalBusiness" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_ACCOUNTTOKEN_GET_IT_FROM_PAYPAL');
        ?>
:
									<br/>

									<input type="text" class="bfOptionsTextInput" id="bfPayPalToken" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_TESTACCOUNT');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfPayPalTestBusiness" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_TESTACCOUNTTOKEN_GET_IT_FROM_PAYPAL_SANDBOX');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfPayPalTestToken" value=""/>
									<br/>

                                                                        <br/>
                                                                        <?php 
        echo BFText::_('COM_BREEZINGFORMS_USE_IPN');
        ?>
:
                                                                        <br/>
                                                                        <?php 
        echo BFText::_('COM_BREEZINGFORMS_YES');
        ?>
<input type="radio" id="bfPayPalUseIpnYes" name="bfPayPalUseIpn" value="1"/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_NO');
        ?>
<input type="radio" id="bfPayPalUseIpnNo" name="bfPayPalUseIpn" value="0" checked="checked"/>
                                                                        <br/>
                                                                        <br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_DOWNLOADABLEFILE');
        ?>
:
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_YES');
        ?>
<input type="radio" id="bfPayPalDownloadableFileYes" name="bfPayPalDownloadableFile" value="1"/>

									<?php 
        echo BFText::_('COM_BREEZINGFORMS_NO');
        ?>
<input type="radio" id="bfPayPalDownloadableFileNo" name="bfPayPalDownloadableFile" value="0" checked="checked"/>
									<br/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_FILEPATH_PLEASE_CHMOD_700_THE_FILE_USING_YOUR_FTP_CLIENT_OR_PUT_IT_OUTSIDE_OF_YOUR_WEBFOLDER');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfPayPalFilepath" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_FILE_DOWNLOAD_TRIES');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfPayPalFileDownloadTries" value="1"/>

									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_ITEMNAME');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfPayPalItemname" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_ITEMNUMBER');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfPayPalItemnumber" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_AMOUNT');
        ?>
:
									<br/>

									<input type="text" class="bfOptionsTextInput" id="bfPayPalAmount" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_TAX');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfPayPalTax" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_THANKYOUPAGE_IF_NOT_DOWNLOADABLE_FILE');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfPayPalThankYouPage" value="<?php 
        echo JURI::root();
        ?>
"/>
									<br/>

									<?php 
        echo BFText::_('COM_BREEZINGFORMS_LOCALE');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfPayPalLocale" value="us"/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_CURRENCYCODE');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfPayPalCurrencyCode" value="USD"/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_PAYPALIMAGE');
        ?>
:
									<br/>

									<input type="text" class="bfOptionsTextInput" id="bfPayPalImage" value="http://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif"/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_WIDTH');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfPayPalWidth" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_HEIGHT');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfPayPalHeight" value=""/>
									<br/>

								</div>
								<br/>
								<!-- Sofortüberweisung -->
								<div id="bfSofortueberweisungOptions" class="bfOptions" style="visibility:hidden;display:none">
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_TITLE');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfSofortueberweisungTitle" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_NAME');
        ?>
:
									<br/>

									<input type="text" class="bfOptionsTextInput" id="bfSofortueberweisungName" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_USERID');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfSofortueberweisungUserId" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_PROJECTID');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfSofortueberweisungProjectId" value=""/>
									<br/>

									<?php 
        echo BFText::_('COM_BREEZINGFORMS_PROJECTPASSWORD');
        ?>
:
									<br/>
									<input type="password" class="bfOptionsTextInput" id="bfSofortueberweisungProjectPassword" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_SEND_PAYMENT_SUCCESS_MESSAGE_TO_MAILBACK_ADDRESSES');
        ?>
:
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_YES');
        ?>
<input type="radio" id="bfSofortueberweisungMailbackYes" name="bfSofortueberweisungMailback" value="1"/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_NO');
        ?>
<input type="radio" id="bfSofortueberweisungMailbackNo" name="bfSofortueberweisungMailback" value="0" checked="checked"/>
									<br/>
									<br/>

									<?php 
        echo BFText::_('COM_BREEZINGFORMS_DOWNLOADABLEFILE');
        ?>
:
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_YES');
        ?>
<input type="radio" id="bfSofortueberweisungDownloadableFileYes" name="bfSofortueberweisungDownloadableFile" value="1"/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_NO');
        ?>
<input type="radio" id="bfSofortueberweisungDownloadableFileNo" name="bfSofortueberweisungDownloadableFile" value="0" checked="checked"/>
									<br/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_FILEPATH_PLEASE_CHMOD_700_THE_FILE_USING_YOUR_FTP_CLIENT_OR_PUT_IT_OUTSIDE_OF_YOUR_WEBFOLDER');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfSofortueberweisungFilepath" value=""/>
									<br/>

									<?php 
        echo BFText::_('COM_BREEZINGFORMS_FILE_DOWNLOAD_TRIES');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfSofortueberweisungFileDownloadTries" value="1"/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_REASON_1');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfSofortueberweisungReason1" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_REASON_2');
        ?>
:
									<br/>

									<input type="text" class="bfOptionsTextInput" id="bfSofortueberweisungReason2" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_AMOUNT');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfSofortueberweisungAmount" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_THANKYOUPAGE_IF_NOT_DOWNLOADABLE_FILE');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfSofortueberweisungThankYouPage" value="<?php 
        echo JURI::root();
        ?>
"/>
									<br/>

									<?php 
        echo BFText::_('COM_BREEZINGFORMS_LANGUAGE_ID');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfSofortueberweisungLanguageId" value="DE"/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_CURRENCY_ID');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfSofortueberweisungCurrencyId" value="EUR"/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_SOFORTUEBERWEISUNGIMAGE');
        ?>
:
									<br/>

									<input type="text" class="bfOptionsTextInput" id="bfSofortueberweisungImage" value="<?php 
        echo JURI::root();
        ?>
components/com_breezingforms/images/200x65px.png"/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_WIDTH');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfSofortueberweisungWidth" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_HEIGHT');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfSofortueberweisungHeight" value=""/>
									<br/>

								</div>
								<br/>
								<div id="bfGlobalOptions" style="display:none">
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_PADDING');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfOptionsPadding" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_MARGIN');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfOptionsMargin" value=""/>

									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_ORDER_NUMBER');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfOptionsOrder" value=""/>
									<br/>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_TABINDEX_NUMBER');
        ?>
:
									<br/>
									<input type="text" class="bfOptionsTextInput" id="bfOptionsTabIndex" value=""/>
									<br/>
								</div>

								<input type="submit" value="<?php 
        echo BFText::_('COM_BREEZINGFORMS_UPDATE');
        ?>
" id="bfSaveOptionsButton" style="visibility:hidden;display:none;width:100%;"/>
								<br/>
								<br/>
								<input type="submit" value="<?php 
        echo BFText::_('COM_BREEZINGFORMS_REMOVE');
        ?>
" id="bfRemoveLabelButton" style="visibility:hidden;display:none;width:100%;"/>
								<br/>
								<br/>
							</div>
							</div>
						</li>

						<li>
							<a href='#'><div class="ui-accordion-left"></div><?php 
        echo BFText::_('COM_BREEZINGFORMS_ACTIONS');
        ?>
<div class="ui-accordion-right"></div></a>
							<div id="bfActions" style="display:none">
								<br/>
								<select id="bfBesideCreationButton" style="width:100%" onchange="app.createElementBesideByType(app.optionElement, this)">
									<option value=""><?php 
        echo BFText::_('COM_BREEZINGFORMS_CREATE_ELEMENT_BESIDE');
        ?>
</option>
									<option value="bfStaticText"><?php 
        echo BFText::_('COM_BREEZINGFORMS_STATIC_TEXT');
        ?>
</option>
									<option value="bfTextfield"><?php 
        echo BFText::_('COM_BREEZINGFORMS_TEXTFIELD');
        ?>
</option>
									<option value="bfTextarea"><?php 
        echo BFText::_('COM_BREEZINGFORMS_TEXTAREA');
        ?>
</option>

									<option value="bfCheckbox"><?php 
        echo BFText::_('COM_BREEZINGFORMS_CHECKBOX');
        ?>
</option>
									<option value="bfRadio"><?php 
        echo BFText::_('COM_BREEZINGFORMS_RADIO');
        ?>
</option>
									<option value="bfSelect"><?php 
        echo BFText::_('COM_BREEZINGFORMS_SELECT');
        ?>
</option>
									<option value="bfFile"><?php 
        echo BFText::_('COM_BREEZINGFORMS_FILE');
        ?>
</option>
									<option value="bfTooltip"><?php 
        echo BFText::_('COM_BREEZINGFORMS_TOOLTIP');
        ?>
</option>
									<option value="bfIcon"><?php 
        echo BFText::_('COM_BREEZINGFORMS_ICON');
        ?>
</option>
									<option value="bfSubmitButton"><?php 
        echo BFText::_('COM_BREEZINGFORMS_SUBMIT_BUTTON');
        ?>
</option>
									<option value="bfImageButton"><?php 
        echo BFText::_('COM_BREEZINGFORMS_IMAGE_BUTTON');
        ?>
</option>
									<option value="bfCaptcha"><?php 
        echo BFText::_('COM_BREEZINGFORMS_CAPTCHA');
        ?>
</option>

									<option value="bfCalendar"><?php 
        echo BFText::_('COM_BREEZINGFORMS_CALENDAR');
        ?>
</option>
									<option value="bfPayPal"><?php 
        echo BFText::_('COM_BREEZINGFORMS_PAYPAL');
        ?>
</option>
									<option value="bfSofortueberweisung"><?php 
        echo BFText::_('COM_BREEZINGFORMS_SOFORTUEBERWEISUNG');
        ?>
</option>
								</select>
								<br/>
								<br/>
								<input type="submit" id="bfElementRemoveButton" onclick="app.removeElement(app.optionElement)" value="<?php 
        echo BFText::_('COM_BREEZINGFORMS_REMOVE_ELEMENT');
        ?>
" style="visibility:hidden;display:none;width:100%;">
								<br/>
								<br/>

								<input type="submit" id="bfElementMoveLeft" onclick="app.moveElement(app.optionElement, 'prev')" value="<?php 
        echo BFText::_('COM_BREEZINGFORMS_MOVE_LEFT');
        ?>
" style="width:49%;visibility:hidden;display:none">
								<input type="submit" id="bfElementMoveRight" onclick="app.moveElement(app.optionElement, 'next')" value="<?php 
        echo BFText::_('COM_BREEZINGFORMS_MOVE_RIGHT');
        ?>
" style="width:49%;visibility:hidden;display:none">
								<br/>
								<br/>
							</div>
						</li>
						<li>
							<a href='#'><div class="ui-accordion-left"></div><?php 
        echo BFText::_('COM_BREEZINGFORMS_INIT_SCRIPT');
        ?>
<div class="ui-accordion-right"></div></a>
							<div>

								<div id="bfInitScript" style="display:none">
									<br/>
									<span class="bfScriptsSaveMessage" style="display:none"></span>
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_TYPE');
        ?>
:
									<?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"/>
									<?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"/>
									<?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"/>

									<div id="bfInitScriptFlags" style="display:none">

										<hr/>

										<input type="checkbox" id="script1flag1" class="script1flag" name="script1flag1" value="1"/><label for="script1flag1"> <?php 
        echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_FORMENTRY');
        ?>
</label>
										<input type="checkbox" id="script1flag2" class="script1flag" name="script1flag2" value="1"/><label for="script1flag2"> <?php 
        echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_PAGEENTRY');
        ?>
</label>
									</div>

									<div id="bfInitScriptLibrary" style="display:none">
										<hr/>
										<?php 
        echo BFText::_('COM_BREEZINGFORMS_SCRIPT');
        ?>
: <select id="bfInitScriptSelection"></select>

									</div>

									<div id="bfInitScriptCustom" style="display:none">
										<hr/>
										<div style="cursor: pointer;" onclick="createInitCode(app.optionElement)"><?php 
        echo BFText::_('COM_BREEZINGFORMS_CREATE_CODE_FRAMEWORK');
        ?>
</div>
										<textarea name="script1code" id="script1code" rows="10" style="width:100%" wrap="off"></textarea>
									</div>

									<hr/>

									<input id="bfInitButton" type="submit" value="update" style="width:100%"/>


									<br/>
									<br/>
								</div>
							</div>
						</li>
						<li>
							<a href='#'><div class="ui-accordion-left"></div><?php 
        echo BFText::_('COM_BREEZINGFORMS_ACTION_SCRIPT');
        ?>
<div class="ui-accordion-right"></div></a>
							<div>
								<span class="bfScriptsSaveMessage" style="display:none"></span>

								<div id="bfActionScript" style="display:none">
									<?php 
        echo BFText::_('COM_BREEZINGFORMS_TYPE');
        ?>
:
									<?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"/>
									<?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"/>
									<?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"/>

									<div id="bfActionScriptFlags" style="display:none">
										<hr/>
										<?php 
        echo BFText::_('COM_BREEZINGFORMS_ACTIONS');
        ?>
:
                                                                                <br/>
										<input style="display:none" type="checkbox" class="script2flag" id="script2flag1" name="script2flag1" value="1"/><label style="display:none" class="script2flagLabel" id="script2flag1Label" for="script2flag1"> <?php 
        echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CLICK');
        ?>
</label>

										<input style="display:none" type="checkbox" class="script2flag" id="script2flag2" name="script2flag2" value="1"/><label style="display:none" class="script2flagLabel" id="script2flag2Label"> <?php 
        echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_BLUR');
        ?>
</label>
										<input style="display:none" type="checkbox" class="script2flag" id="script2flag3" name="script2flag3" value="1"/><label style="display:none" class="script2flagLabel" id="script2flag3Label"> <?php 
        echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CHANGE');
        ?>
</label>
										<input style="display:none" type="checkbox" class="script2flag" id="script2flag4" name="script2flag4" value="1"/><label style="display:none" class="script2flagLabel" id="script2flag4Label"> <?php 
        echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_FOCUS');
        ?>
</label>
										<input style="display:none" type="checkbox" class="script2flag" id="script2flag5" name="script2flag5" value="1"/><label style="display:none" class="script2flagLabel" id="script2flag5Label"> <?php 
        echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_SELECTION');
        ?>
</label>
                                                                                
									</div>

									<div id="bfActionScriptLibrary" style="display:none">
										<hr/>

										<?php 
        echo BFText::_('COM_BREEZINGFORMS_SCRIPT');
        ?>
: <select id="bfActionsScriptSelection"></select>
									</div>

									<div id="bfActionScriptCustom" style="display:none">
										<hr/>
										<div style="cursor: pointer;" onclick="createActionCode(app.optionElement)"><?php 
        echo BFText::_('COM_BREEZINGFORMS_CREATE_CODE_FRAMEWORK');
        ?>
</div>
										<textarea name="script2code" id="script2code" rows="10" style="width:100%" wrap="off"></textarea>
									</div>

									<hr/>


									<input id="bfActionButton" type="submit" value="<?php 
        echo BFText::_('COM_BREEZINGFORMS_UPDATE');
        ?>
" style="width:100%"/>

									<br/>
									<br/>
								</div>
							</div>
						</li>
						<li>
							<a href='#'><div class="ui-accordion-left"></div><?php 
        echo BFText::_('COM_BREEZINGFORMS_VALIDATION_SCRIPT');
        ?>
<div class="ui-accordion-right"></div></a>
							<div>

								<span class="bfScriptsSaveMessage" style="display:none"></span>
								<div id="bfValidationScript" style="display:none">

									<?php 
        echo BFText::_('COM_BREEZINGFORMS_TYPE');
        ?>
:
									<?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"/>
									<?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"/>
									<?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"/>

									<div id="bfValidationScriptFlags" style="display:none">
										<hr/>

										<?php 
        echo BFText::_('COM_BREEZINGFORMS_ERROR_MESSAGE');
        ?>
: <input type="text" style="width:100%" maxlength="255" class="script3msg" id="script3msg" name="script3msg" value="" class="inputbox"/>
									</div>

									<div id="bfValidationScriptLibrary" style="display:none">
										<hr/>
										<?php 
        echo BFText::_('COM_BREEZINGFORMS_SCRIPT');
        ?>
: <select id="bfValidationScriptSelection"></select>
									</div>

									<div id="bfValidationScriptCustom" style="display:none">
										<hr/>

										<div style="cursor: pointer;" onclick="createValidationCode(app.optionElement)"><?php 
        echo BFText::_('COM_BREEZINGFORMS_CREATE_CODE_FRAMEWORK');
        ?>
</div>
										<textarea name="script3code" id="script3code" rows="10" style="width:100%" wrap="off"></textarea>
									</div>

									<hr/>

									<input id="bfValidationButton" type="submit" value="<?php 
        echo BFText::_('COM_BREEZINGFORMS_UPDATE');
        ?>
" style="width:100%"/>

									<br/>
									<br/>

								</div>

							</div>
						</li>
					</ul>
				</div>
            </div>
            <div id="fragment-3">
               <div>

               	<ul id="nestedaccordion3" class="ui-accordion-container" style="width: 275px;">

               		<li>

						<a href='#'><div class="ui-accordion-left"></div><?php 
        echo BFText::_('COM_BREEZINGFORMS_PAGES');
        ?>
<div class="ui-accordion-right"></div></a>
						<div>
							<br/>
							<?php 
        echo BFText::_('COM_BREEZINGFORMS_CURRENT_PAGE');
        ?>
: <span id="bfCurrentPage"></span>
							<br/>
							<br/>
							<input type="submit" value="<?php 
        echo BFText::_('COM_BREEZINGFORMS_CREATE_NEW_PAGE');
        ?>
" id="bfCreatePage" style="width:100%"/>
							<br/>

							<br/>
							<select id="bfGoToPage" style="width:100%">
							<option value="-1"><?php 
        echo BFText::_('COM_BREEZINGFORMS_GO_TO_PAGE');
        ?>
</option>
							</select>
							<br/>
							<br/>
							<select id="bfMoveThisPageTo" style="width:100%">
							<option value="-1"><?php 
        echo BFText::_('COM_BREEZINGFORMS_MOVE_THIS_PAGE_TO');
        ?>
</option>
							</select>

							<br/>
							<br/>
							<input type="submit" value="<?php 
        echo BFText::_('COM_BREEZINGFORMS_DELETE_THIS_PAGE');
        ?>
" id="bfDeleteThisPage" style="width:100%"/>
							<br/>
							<br/>
						</div>
					</li>

               		<li>
						<a href='#'><div class="ui-accordion-left"></div><?php 
        echo BFText::_('COM_BREEZINGFORMS_HIDDEN_FIELDS');
        ?>
<div class="ui-accordion-right"></div></a>

						<div>
							<div id="bfHiddenFieldsOptions">

							</div>
						</div>
					</li>

               		<li>
						<a href='#'><div class="ui-accordion-left"></div><?php 
        echo BFText::_('COM_BREEZINGFORMS_CODE');
        ?>
<div class="ui-accordion-right"></div></a>
						<div>
							<?php 
        echo BFText::_('COM_BREEZINGFORMS_ATTENTION_CHANGE_THE_GENERATED_TEMPLATE_CODE_ON_YOUR_OWN_RISK_BEST_IS_TO_KEEP_THE_UL_TAGS_AND_THEIR_CONTENTS_AS_IS_AND_CHANGE_ONLY_THE_LAYOUT_AROUND_IF_NECESSARY_AND_NEVER_UPDATE_WHEN_YOU_HAVE_UNSAVED_ELEMENTS_IN_THE_EDITOR');
        ?>

							<br/>
							<br/>
							<textarea rows="10" style="width:100%;" id="bfTemplateBox" wrap="off"></textarea>
							<br/>
							<input type="submit" id="bfUpdateTemplateButton" value="<?php 
        echo BFText::_('COM_BREEZINGFORMS_UPDATE');
        ?>
" style="width:100%"/>
							<br/>
							<br/>
						</div>

					</li>

					<li>
						<a href='#'><div class="ui-accordion-left"></div><?php 
        echo BFText::_('COM_BREEZINGFORMS_BATCH_OPTIONS');
        ?>
<div class="ui-accordion-right"></div></a>
						<div>
							<br/>
							<?php 
        echo BFText::_('COM_BREEZINGFORMS_LABELS');
        ?>
							<br/>
							<select id="bfBatchLabels" multiple="multiple" style="width:100%;height:100px;"></select>
							<br/>

							<?php 
        echo BFText::_('COM_BREEZINGFORMS_ELEMENTS');
        ?>
							<br/>
							<select id="bfBatchElements" multiple="multiple" style="width:100%;height:100px;"></select>
							<br/>
							<?php 
        echo BFText::_('COM_BREEZINGFORMS_WIDTH');
        ?>
							<br/>
							<input type="text" id="bfBatchWidth" value="" style="width:100%"/>
							<br/>
							<?php 
        echo BFText::_('COM_BREEZINGFORMS_HEIGHT');
        ?>

							<br/>
							<input type="text" id="bfBatchHeight" value="" style="width:100%"/>
							<br/>
							<?php 
        echo BFText::_('COM_BREEZINGFORMS_PADDING');
        ?>
							<br/>
							<input type="text" id="bfBatchPadding" value="" style="width:100%"/>
							<br/>
							<?php 
        echo BFText::_('COM_BREEZINGFORMS_MARGIN');
        ?>
							<br/>

							<input type="text" id="bfBatchMargin" value="" style="width:100%"/>
							<br/>
							<input type="submit" id="bfBatchButton" value="<?php 
        echo BFText::_('COM_BREEZINGFORMS_UPDATE');
        ?>
" style="width:100%"/>
							<br/>
							<br/>
						</div>
					</li>

					<li>
						<a href='#'><div class="ui-accordion-left"></div><?php 
        echo BFText::_('COM_BREEZINGFORMS_MISC');
        ?>
<div class="ui-accordion-right"></div></a>

						<div>
							<br/>
							<?php 
        echo BFText::_('COM_BREEZINGFORMS_PIXEL_RASTER');
        ?>
							<br/>
							<input type="text" id="bfPixelRaster" value="1" style="width:100%"/>
							<br/>
							<input type="submit" value="update" id="bfUpdatePixelRaster" style="width:100%"/>
							<br/>
							<br/>

							<br/>
						</div>
					</li>

               	</ul>

               </div>
            </div>
            <div class="clear"></div>
            </div>
            <div class="b">

				<div class="b">
		 			<div class="b"></div>
				</div>
			</div>

			<br />
			        <div id="easymode-trashcan">

            <span class="icon-trashcan"><?php 
        echo BFText::_('COM_BREEZINGFORMS_TRASH_CAN');
        ?>
</span>

			        <div id="trashcan-box">

        <div class="t">

				<div class="t">
					<div class="t"></div>
		 		</div>
	 		</div>
	 		<div class="m">
        	<ul id="trashcan">
	</ul>

	<div class="clr"></div>
			</div>

	<div class="b">
				<div class="b">
		 			<div class="b"></div>
				</div>
			</div>

			</div>
			</div><!-- easymode-trashcan end -->

    </div>

	<div id="form-area-easymode">

		<div id="bfTemplate"><?php 
        if ($templateCode == '') {
            ?>
<ul class="droppableArea" id="drop1"></ul>
<?php 
        }
        if ($templateCode != '') {
            echo $templateCode;
        }
        ?>
</div>
	</div> <!-- form-area-easymode -->
    <div class="clear"></div>
	</div>

	</form>





<?php 
    }
Example #22
0
<?php
/**
* BreezingForms - A Joomla Forms Application
* @version 1.7.2
* @package BreezingForms
* @copyright (C) 2008-2010 by Markus Bopp
* @license Released under the terms of the GNU General Public License
**/
defined('_JEXEC') or die('Direct Access to this location is not allowed.');
?>
<?php echo BFText::_('COM_BREEZINGFORMS_THANK_YOU_FOR_BUYING'); ?>
<br/>
<br/>
<?php echo BFText::_('COM_BREEZINGFORMS_YOUR_TRANSACTION_ID')  ?>: <?php echo $tx_token; ?>
<br/>
<?php echo BFText::_('COM_BREEZINGFORMS_PAYMENT_METHOD_PAYPAL')  ?>
<br/>
<br/>
<a href="<?php echo JURI::root() ?>index.php?raw=true&option=com_breezingforms&amp;paypalDownload=true&amp;tx=<?php echo $tx_token ?>&amp;form=<?php echo $form_id ?>&amp;record_id=<?php echo $record_id ?>"><?php echo BFText::_('COM_BREEZINGFORMS_DOWNLOAD'); ?> (<?php echo BFText::_('COM_BREEZINGFORMS_ALLOWED_TRIES'); ?>: <?php echo $tries ?>)</a>
Example #23
0
    static function listitems($option, &$rows, &$pkglist)
    {
        global $ff_config, $ff_version;
        ?>
		<script type="text/javascript">
			<!--
			function submitbutton(pressbutton)
			{
				var form = document.adminForm;
				switch (pressbutton) {
					case 'copy':
					case 'publish':
					case 'unpublish':
					case 'remove':
						if (form.boxchecked.value==0) {
							alert("<?php 
        echo BFText::_('COM_BREEZINGFORMS_PIECES_SELPIECESFIRST');
        ?>
");
							return;
						} // if
						break;
					default:
						break;
				} // switch
				if (pressbutton == 'remove')
					if (!confirm("<?php 
        echo BFText::_('COM_BREEZINGFORMS_PIECES_ASKDELETE');
        ?>
")) return;
				if (pressbutton == '' && form.pkgsel.value == '')
					form.pkg.value = '- blank -';
				else
					form.pkg.value = form.pkgsel.value;
				submitform(pressbutton);
			} // submitbutton

			function listItemTask( id, task )
			{
				var f = document.adminForm;
				cb = eval( 'f.' + id );
				if (cb) {
					for (i = 0; true; i++) {
						cbx = eval('f.cb'+i);
						if (!cbx) break;
						cbx.checked = false;
					} // for
					cb.checked = true;
					f.boxchecked.value = 1;
					submitbutton(task);
				}
				return false;
			} // listItemTask
			//-->
		</script>
		<form action="index.php" method="post" name="adminForm" id="adminForm">
		<table cellpadding="4" cellspacing="1" border="0">
			<tr>
				<td width="50%" nowrap>
					<table class="adminheading">
						<tr><th nowrap class="sections">BreezingForms <?php 
        echo $ff_version;
        ?>
<br/><span class="componentheading"><?php 
        echo BFText::_('COM_BREEZINGFORMS_PIECES_MANAGEPIECES');
        ?>
</span></th></tr>
					</table>
				</td>
				<td nowrap>
					<?php 
        echo BFText::_('COM_BREEZINGFORMS_PIECES_PACKAGE');
        ?>
:
					<select id="pkgsel" name="pkgsel" class="inputbox" size="1" onchange="submitbutton('');">
<?php 
        if (count($pkglist)) {
            foreach ($pkglist as $pkg) {
                $selected = '';
                if ($pkg[0]) {
                    $selected = ' selected';
                }
                echo '<option value="' . $pkg[1] . '"' . $selected . '>' . $pkg[1] . '&nbsp;</option>';
            }
        }
        // foreach
        ?>
					</select>
				</td>
				<td align="right" width="50%" nowrap>
<?php 
        JToolBarHelper::custom('new', 'new.png', 'new_f2.png', BFText::_('COM_BREEZINGFORMS_TOOLBAR_NEW'), false);
        JToolBarHelper::custom('copy', 'copy.png', 'copy_f2.png', BFText::_('COM_BREEZINGFORMS_TOOLBAR_COPY'), false);
        JToolBarHelper::custom('publish', 'publish.png', 'publish_f2.png', BFText::_('COM_BREEZINGFORMS_TOOLBAR_PUBLISH'), false);
        JToolBarHelper::custom('unpublish', 'unpublish.png', 'unpublish_f2.png', BFText::_('COM_BREEZINGFORMS_TOOLBAR_UNPUBLISH'), false);
        JToolBarHelper::custom('remove', 'delete.png', 'delete_f2.png', BFText::_('COM_BREEZINGFORMS_TOOLBAR_DELETE'), false);
        ?>
				</td>
			</tr>
		</table>
		<table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist table table-striped">
			<tr>
				<th nowrap align="center"><input type="checkbox" name="toggle" value="" onclick="<?php 
        $version = new JVersion();
        echo version_compare($version->getShortVersion(), '3.0', '>=') ? 'Joomla.checkAll(this);' : 'checkAll(' . count($rows) . ');';
        ?>
" /></th>
				<th nowrap align="left"><?php 
        echo BFText::_('COM_BREEZINGFORMS_PIECES_TITLE');
        ?>
</th>
				<th nowrap align="left"><?php 
        echo BFText::_('COM_BREEZINGFORMS_PIECES_NAME');
        ?>
</th>
				<th nowrap align="left"><?php 
        echo BFText::_('COM_BREEZINGFORMS_PIECES_TYPE');
        ?>
</th>
				<th nowrap align="right">ID</th>
				<th nowrap align="center"><?php 
        echo BFText::_('COM_BREEZINGFORMS_PIECES_PUBLISHED');
        ?>
</th>
				<th align="left" width="100%"><?php 
        echo BFText::_('COM_BREEZINGFORMS_PIECES_DESCRIPTION');
        ?>
</th>
			</tr>
<?php 
        $k = 0;
        for ($i = 0; $i < count($rows); $i++) {
            $row = $rows[$i];
            $desc = $row->description;
            if (strlen($desc) > $ff_config->limitdesc) {
                $desc = substr($desc, 0, $ff_config->limitdesc) . '...';
            }
            ?>
				<tr class="row<?php 
            echo $k;
            ?>
">
					<td nowrap valign="top" align="center"><input type="checkbox" id="cb<?php 
            echo $i;
            ?>
" name="ids[]" value="<?php 
            echo $row->id;
            ?>
" onclick="<?php 
            jimport('joomla.version');
            $version = new JVersion();
            echo version_compare($version->getShortVersion(), '3.0', '>=') ? 'Joomla.isChecked(this.checked);' : 'isChecked(this.checked);';
            ?>
" /></td>
					<td nowrap valign="top" align="left"><a href="#edit" onclick="return listItemTask('cb<?php 
            echo $i;
            ?>
','edit')"><?php 
            echo $row->title;
            ?>
</a></td>
					<td nowrap valign="top" align="left"><?php 
            echo $row->name;
            ?>
</td>
					<td nowrap valign="top" align="left"><?php 
            echo HTML_facileFormsPiece::typeName($row->type);
            ?>
</td>
					<td nowrap valign="top" align="right"><?php 
            echo $row->id;
            ?>
</td>
					<td nowrap valign="top" align="center"><?php 
            if ($row->published == "1") {
                ?>
<a href="#" onClick="return listItemTask('cb<?php 
                echo $i;
                ?>
','unpublish')"><img src="components/com_breezingforms/images/icons/publish_g.png" alt="+" border="0" /></a><?php 
            } else {
                ?>
<a href="#" onClick="return listItemTask('cb<?php 
                echo $i;
                ?>
','publish')"><img src="components/com_breezingforms/images/icons/publish_x.png" alt="-" border="0" /></a><?php 
            }
            // if
            ?>
</td>
					<td valign="top" align="left"><?php 
            echo htmlspecialchars($desc, ENT_QUOTES);
            ?>
</td>
				</tr>
<?php 
            $k = 1 - $k;
        }
        // for
        ?>
		</table>
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="option" value="<?php 
        echo $option;
        ?>
" />
		<input type="hidden" name="act" value="managepieces" />
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="pkg" value="" />
		</form>
<?php 
    }
    public function render()
    {
        if (isset($this->rootMdata['themebootstrapUseProgress']) && $this->rootMdata['themebootstrapUseProgress']) {
            echo '<div class="progress"><div id="bfProgressBar" class="bar"></div></div>
                        <script type="text/javascript">
                        <!--
                        function bfUpdateProgress(){
                            if(ff_currentpage > 1){
                                var pages = JQuery(".bfPage").size()' . ($this->rootMdata['lastPageThankYou'] ? '-1' : '') . ';
                                var result = Math.round(((ff_currentpage-1) / pages)*100);
                                JQuery("#bfProgressBar").css("width",result+"%");
                            }else{
                                JQuery("#bfProgressBar").css("width","0%");
                            }
                        }
                        JQuery(document).ready(function(){
                            setInterval("bfUpdateProgress()", 500);
                        });
                        -->
                        </script>';
        }
        $this->process($this->dataObject);
        echo '</div>' . "\n";
        // closing last page
        $this->headers();
        if ($this->hasResponsiveDatePicker) {
            JFactory::getDocument()->addScript(JURI::root(true) . '/components/com_breezingforms/libraries/jquery/pickadate/picker.js');
            JFactory::getDocument()->addScript(JURI::root(true) . '/components/com_breezingforms/libraries/jquery/pickadate/picker.date.js');
            $lang = JFactory::getLanguage()->getTag();
            $lang = explode('-', $lang);
            $lang = strtolower($lang[0]);
            if (JFile::exists(JPATH_SITE . '/components/com_breezingforms/libraries/jquery/pickadate/translations/' . $lang . '.js')) {
                JFactory::getDocument()->addScript(JURI::root(true) . '/components/com_breezingforms/libraries/jquery/pickadate/translations/' . $lang . '.js');
            }
            JFactory::getDocument()->addStyleSheet(JURI::root(true) . '/components/com_breezingforms/libraries/jquery/pickadate/themes/default.css');
            JFactory::getDocument()->addStyleSheet(JURI::root(true) . '/components/com_breezingforms/libraries/jquery/pickadate/themes/default.date.css');
        }
        // we must make sure that everything mootools related is included after moxie and plupload
        if (isset(JFactory::getDocument()->_scripts)) {
            foreach (JFactory::getDocument()->_scripts as $script_name => $script_value) {
                if (basename($script_name) != 'moxie.js' && basename($script_name) != 'plupload.js' && basename($script_name) != 'calendar.js' && basename($script_name) != 'calendar-setup.js') {
                    unset(JFactory::getDocument()->_scripts[$script_name]);
                    JFactory::getDocument()->_scripts[$script_name] = $script_value;
                }
            }
        }
        // we gonna add a blank to each textarea, since the value is transferred upon submit
        // requires a different mandatory validation than ff_valuenotempty
        if (count($this->htmltextareas)) {
            JImport('joomla.html.editor');
            $editor = JFactory::getEditor();
            $htmltextarea_out = '';
            foreach ($this->htmltextareas as $htmltextarea) {
                $htmltextarea_out .= 'JQuery("[name=\\"' . $htmltextarea . '\\"]").val(JQuery.trim(JQuery("[name=\\"' . $htmltextarea . '\\"]").val())+" ");' . "\n";
                $htmltextarea_out .= 'bf_htmltextareas.push("' . rtrim(trim($editor->getContent($htmltextarea)), ';') . '")' . "\n";
                $htmltextarea_out .= 'bf_htmltextareanames.push("' . $htmltextarea . '")' . "\n";
            }
            echo '<script type="text/javascript">
                          <!--
                          var bf_htmltextareas     = [];
                          var bf_htmltextareanames = [];
                          function bf_htmltextareainit(){
                            ' . $htmltextarea_out . '
                          }
                          //-->
                          </script>';
        }
        if ($this->hasFlashUpload) {
            $tickets = JFactory::getSession()->get('bfFlashUploadTickets', array());
            $tickets[$this->flashUploadTicket] = array();
            // stores file info for later processing
            JFactory::getSession()->set('bfFlashUploadTickets', $tickets);
            echo '<input type="hidden" name="bfFlashUploadTicket" value="' . $this->flashUploadTicket . '"/>' . "\n";
            JFactory::getDocument()->addScript(JURI::root(true) . '/components/com_breezingforms/libraries/jquery/center.js');
            JFactory::getDocument()->addScriptDeclaration('
                        var bfUploaders = [];
                        var bfUploaderErrorElements = [];
			var bfFlashUploadInterval = null;
			var bfFlashUploaders = new Array();
                        var bfFlashUploadersLength = 0;
                        function bfRefreshAll(){
                            for( var i = 0; i < bfUploaders.length; i++ ){
                                bfUploaders[i].refresh();
                            }
                        }
                        function bfInitAll(){
                            for( var i = 0; i < bfUploaders.length; i++ ){
                                bfUploaders[i].init();
                            }
                        }
			function bfDoFlashUpload(){
                                JQuery("#bfSubmitMessage").css("visibility","hidden");
				JQuery(".bfErrorMessage").html("");
                                JQuery(".bfErrorMessage").css("display","none");
                                for(var i = 0; i < bfUploaderErrorElements.length; i++){
                                    JQuery("#"+bfUploaderErrorElements[i]).html("");
                                }
                                bfUploaderErrorElements = [];
                                if(ff_validation(0) == ""){
					try{
                                            bfFlashUploadInterval = window.setInterval( bfCheckFlashUploadProgress, 1000 );
                                            if(bfFlashUploadersLength > 0){
                                                JQuery("#bfFileQueue").bfcenter(true);
                                                JQuery("#bfFileQueue").css("visibility","visible");
                                                for( var i = 0; i < bfUploaders.length; i++ ){
                                                    bfUploaders[i].start();
                                                }
                                            }
					} catch(e){alert(e)}
				} else {
					if(typeof bfUseErrorAlerts == "undefined"){
                                            alert(error);
                                        } else {
                                            bfShowErrors(error);
                                        }
                                        ff_validationFocus("");
                                        document.getElementById("bfSubmitButton").disabled = false;
				}
			}
			function bfCheckFlashUploadProgress(){
                                if( JQuery("#bfFileQueue").html() == "" ){ // empty indicates that all queues are uploaded or in any way cancelled
					JQuery("#bfFileQueue").css("visibility","hidden");
					window.clearInterval( bfFlashUploadInterval );
                                        if(typeof bfAjaxObject101 != \'undefined\' || typeof bfReCaptchaLoaded != \'undefined\'){
                                            ff_submitForm2();
                                        }else{
                                            ff_validate_submit(document.getElementById("bfSubmitButton"), "click");
                                        }
					JQuery(".bfFlashFileQueueClass").html("");
                                        if(bfFlashUploadersLength > 0){
                                            JQuery("#bfSubmitMessage").bfcenter(true);
                                            JQuery("#bfSubmitMessage").css("visibility","visible");
                                        }
                                        
				}
			}
			');
            echo "<div style=\"visibility:hidden;\" id=\"bfFileQueue\"></div>";
            echo "<div style=\"visibility:hidden;\" id=\"bfSubmitMessage\">" . BFText::_('COM_BREEZINGFORMS_SUBMIT_MESSAGE') . "</div>";
        }
        echo '<noscript>Please turn on javascript to submit your data. Thank you!</noscript>' . "\n";
        JFactory::getDocument()->addScriptDeclaration('//-->');
    }
Example #25
0
<?php
/**
* BreezingForms - A Joomla Forms Application
* @version 1.7.2
* @package BreezingForms
* @copyright (C) 2008-2010 by Markus Bopp
* @license Released under the terms of the GNU General Public License
**/
defined('_JEXEC') or die('Direct Access to this location is not allowed.');
?>
<?php echo BFText::_('COM_BREEZINGFORMS_PAYMENT_ERROR_MSG'); ?>
<br/>
<br/>
<?php echo BFText::_('COM_BREEZINGFORMS_YOUR_TRANSACTION_ID')  ?>: <?php echo $tx_token; ?>
<br/>
<br/>
<?php echo BFText::_('COM_BREEZINGFORMS_ERROR')  ?>: <?php echo htmlentities($msg); ?>
Example #26
0
	function step3($option, &$errors)
	{
?>
		<table cellpadding="4" cellspacing="1" border="0" class="adminform" style="width:450px;">
		<form action="index.php" method="post" name="adminForm" id="adminForm" class="adminForm">
			<tr><th colspan="3" class="title"><?php echo BFText::_('COM_BREEZINGFORMS_INSTALL_COMPLETE'); ?></th></tr>
			<tr>
				<td></td>
				<td><?php echo BFText::_('COM_BREEZINGFORMS_INSTALL_COMPLETEMSG'); ?>
					<hr/><br/>
<?php
					if (count($errors)==0)
						echo BFText::_('COM_BREEZINGFORMS_INSTALL_NOMESSAGES');
					else
						for ($i = 0; $i < count($errors); $i++) echo $errors[$i]."<br/>";
?>
				</td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td nowrap style="text-align:right">
                                        <input onclick="submitbutton('step4');" type="submit" value="<?php echo BFText::_('COM_BREEZINGFORMS_TOOLBAR_CONTINUE'); ?>"/>
				</td>
				<td></td>
			</tr>
		</table>
		<input type="hidden" name="option" value="<?php echo $option; ?>" />
		<input type="hidden" name="act" value="installation" />
		<input type="hidden" name="task" value="" />
		</form>
<?php
	} // step3
Example #27
0
	function uninstPackages($option, $caller, $pkg, $ids)
	{
		if (count($ids)) foreach ($ids as $id) dropPackage($id);
		HTML_facileFormsConf::message(
			$option, $caller, $pkg,
			count($ids).' '.BFText::_('COM_BREEZINGFORMS_INSTALLER_PKGSUNINST'),
			'instpackage'
		);
	} // uninstPackages
Example #28
0
</td>
<td>
	<?php echo $rec->paypal_testaccount == 1 ? BFText::_('COM_BREEZINGFORMS_YES') : BFText::_('COM_BREEZINGFORMS_NO'); ?>
</td>
</tr>
<tr>
<td>
	<strong><?php echo BFText::_('COM_BREEZINGFORMS_PAYMENT_DOWNLOAD_TRIES') ?>:</strong>
</td>
<td>
	<?php echo $rec->paypal_download_tries; ?> 
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#cccccc">
	<strong><?php echo BFText::_('COM_BREEZINGFORMS_DATA') ?>:</strong>
</td>
</tr>
<?php
$subs = $this->getSubrecords($rec->id);
$subsSize = count($subs);
for($s = 0; $s < $subsSize; $s++) {
	$sub = $subs[$s];
?>
<tr>
<td>
	<strong><?php echo htmlentities(wordwrap($sub->title, 50, '<br/>', true), ENT_QUOTES, 'UTF-8'); ?>:</strong>
</td>
<td>
	<?php echo nl2br(htmlentities(substr($sub->value,0,10000), ENT_QUOTES, 'UTF-8')); ?> 
</td>
\n<?php 
echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_EXISTAPP');
?>
")) return;
			code =
				"function ff_"+name+"_validation(element, message)\n"+
				"{\n"+
				"    if (element_fails_my_test) {\n"+
				"        if (message=='') message = element.name+\" faild in my test.\\n\"\n"+
				"        ff_validationFocus(element.name);\n"+
				"        return message;\n"+
				"    } // if\n"+
				"    return '';\n"+
				"} // ff_"+name+"_validation\n";
			oldcode = form.script3code.value;
			if (oldcode != '')
				form.script3code.value =
					code+
					"\n// -------------- <?php 
echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_OLDBELOW');
?>
 --------------\n\n"+
					oldcode;
			else
				form.script3code.value = code;
} // createValidationCode

function stripHTML(string) { 
    return string.replace(/<(.|\n)*?>/g, ''); 
}
</script>
Example #30
0
	public static function showApplication($formId = 0, $formName, $formTitle, $formDesc, $formEmailntf, $formEmailadr, $dataObjectString, $elementScripts, $themes){
		JHTML::_('behavior.keepalive');
		JHTML::_('behavior.modal');
		$iconBase = '../administrator/components/com_breezingforms/libraries/jquery/themes/quickmode/i/';
?>
	<style>
	<!--
	#menutab { float: left; width: 500px; height: 100%; }
	-->
	</style>
	
	<link rel="stylesheet" href="<?php echo JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/themes/quickmode/quickmode.all.css' ;?>" type="text/css" media="screen" title="Flora (Default)"/>
	<link rel="stylesheet" type="text/css" href="<?php echo JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/jtree/' ;?>tree_component.css" />
	<script type="text/javascript" src="<?php echo JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/jtree/' ;?>_lib.js"></script>	
	<script type="text/javascript" src="<?php echo JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/jtree/' ;?>tree_component.js"></script>
	<script
	type="text/javascript"
	src="<?php echo JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/' ;?>jquery-ui.min.js"></script>
	<script
	type="text/javascript"
	src="<?php echo JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/plugins/' ;?>base64.js"></script>
	<script
	type="text/javascript"
	src="<?php echo JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/plugins/' ;?>json.js"></script>
	<script
	type="text/javascript"
	src="<?php echo JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/plugins/' ;?>md5.js"></script>
        <script
	type="text/javascript"
	src="<?php echo JURI::root()?>components/com_breezingforms/libraries/jquery/center.js"></script>

	<script type="text/javascript">
	var JQuery = jQuery.noConflict();
	var app = null;
	
	function BF_QuickModeApp(){
		
		var selectedTreeElement = null;
		var copyTreeElement = null;
		var appScope = this;
		this.elementScripts = <?php echo Zend_Json::encode($elementScripts)?>;	      
		this.dataObject = <?php echo str_replace("..\\/administrator\\/components\\/com_facileforms", "..\\/administrator\\/components\\/com_breezingforms",$dataObjectString) ?>;
		
		<?php require_once(JPATH_SITE . '/administrator/components/com_breezingforms/admin/quickmode-elements-js.php'); ?>
		
		/**
			Helper methods
		*/
		this.getNodeClass = function(node){
			if(JQuery(node).attr('class')){
				var splitted = JQuery(appScope.selectedTreeElement).attr('class').split(' ');
				if(splitted.length != 0){
					return splitted[0]; 
				}
			}
			return '';
		};
		
		this.setProperties = function(node, props){
			var item = this.findDataObjectItem(JQuery(node).attr('id'), appScope.dataObject);
			item.properties = props;
		};
		
		this.getProperties = function(node){
			
			var item = this.findDataObjectItem(JQuery(node).attr('id'), appScope.dataObject)
			return item.properties;
		};
		
		/**
			searches for the id in a given object item.
		*/
		this.findDataObjectItem = function(id, startObj){
			if( id && startObj && startObj.attributes && startObj.attributes.id ){
				if( startObj.attributes.id == id ){
					return startObj;
				} else { 
					if(startObj.children){
						var child = null;
						for(var i = 0; i < startObj.children.length; i++){
							child = appScope.findDataObjectItem(id, startObj.children[i]);
							if(child){
								return child;
							}
						}
					}
				}
				return null;
			}
			return null;
		};
		
		this.getItemsFlattened = function(startObj, arr){
			if( startObj && startObj.properties && startObj.properties.type == 'element' ){
				arr.push(startObj);
				
			}
			if(startObj.children){
				var child = null;
				for(var i = 0; i < startObj.children.length; i++){
					appScope.getItemsFlattened(startObj.children[i], arr);
				}
			}
		};
		
		this.replaceDataObjectItem = function(id, replacement, startObj){
			if( id && startObj && startObj.attributes && startObj.attributes.id ){
				if(startObj.children){
					var child = null;
					for(var i = 0; i < startObj.children.length; i++){
						if(startObj.children[i].attributes.id == id){
							startObj.children[i] = replacement;
							break;
						}
						appScope.replaceDataObjectItem(id, replacement, startObj.children[i]);
					}
				}
			}
		}
		
		/**
			searches for the id in a given object item and deletes it.
			returns the deleted child.
		*/
		this.deleteDataObjectItem = function(id, startObj, previous){
			if( id && startObj && startObj.attributes && startObj.attributes.id ){
				if( startObj.attributes.id == id ){
					if(previous){
						var newChildren = new Array();
						for(var j = 0; j < previous.children.length; j++){
							if(previous.children[j].attributes.id != startObj.attributes.id){
								newChildren.push(previous.children[j]);
							}
						}
						previous.children = newChildren;
					}
					return startObj;
				} else { 
					if(startObj.children){
						var child = null;
						for(var i = 0; i < startObj.children.length; i++){
							child = appScope.deleteDataObjectItem(id, startObj.children[i], startObj);
							if(child){
								return child;
							}
						}
					}
				}
				return null;
			}
			return null;
		};
		
		this.moveDataObjectItem = function( sourceId, targetId, index, obj ){
			var source = appScope.deleteDataObjectItem(sourceId, obj);
			var target = appScope.findDataObjectItem( targetId, obj );
			if(target && !target.children && ( target.attributes['class'] == 'bfQuickModePageClass' || target.attributes['class'] == 'bfQuickModeSectionClass' || target.attributes['class'] == 'bfQuickModeRootClass' )){
				target.children = new Array();
			}
			if(target && target.children){
				target.children.splice(index,0,source);
				if(target.attributes['class'] == 'bfQuickModeRootClass'){
					for(var i = 0; i < target.children.length; i++){
						var mdata = appScope.getProperties(JQuery('#'+target.children[i].attributes.id));
						if(mdata){
							if(target.children[i].attributes['class'] == 'bfQuickModePageClass'){
								target.children[i].attributes.id = 'bfQuickModePage' + (i+1);
								target.children[i].data.title = "<?php echo addslashes( BFText::_('COM_BREEZINGFORMS_PAGE') ) ?> " + (i+1);
								target.children[i].properties.pageNumber = i + 1;
							}
						}
					}
				}
				return true;
			}
			return false;
		};

		this.insertElementInto = function (source, target){
			if(target && target.children){
				if(target.attributes['class'] == 'bfQuickModeSectionClass' || target.attributes['class'] == 'bfQuickModePageClass'){
					this.recreatedIds(source);
					target.children.push(source);
				}
			}
		};

		this.recreatedIds = function(startObj){
			if( startObj && startObj.attributes && startObj.attributes.id ){
				if(startObj.attributes['class'] == 'bfQuickModeSectionClass'){
					type = 'bfQuickModeSection';
				} else {
					type = 'bfQuickMode';
				}
				var id = type + ( Math.floor(Math.random() * 100000) );
				startObj.attributes.id = id;
				if(startObj.attributes['class'] == 'bfQuickModeSectionClass'){
					startObj.properties.name = id;
				} else {
					startObj.properties.bfName = id;
					startObj.properties.dbId = 0;
				}
				startObj.properties.name = id;
				if(startObj.children){
					var child = null;
					for(var i = 0; i < startObj.children.length; i++){
						child = appScope.recreatedIds(startObj.children[i]);
						if(child){
							return child;
						}
					}
				}
				return null;
			}
			return null;
		};
		
		/**
			Element properties
		*/
		
		// TEXTFIELD
		this.saveTextProperties = function(mdata, item){
			mdata.value = JQuery('#bfElementTypeTextValue').val();
			mdata.bfName = JQuery('#bfElementName').val();
			mdata.logging = JQuery('#bfElementAdvancedLogging').attr('checked');
			mdata.label = JQuery('#bfElementLabel').val();
			mdata.maxLength = JQuery('#bfElementTypeTextMaxLength').val();
			mdata.hint = JQuery('#bfElementTypeTextHint').val();
			mdata.password = JQuery('#bfElementAdvancedPassword').attr('checked');
			mdata.readonly = JQuery('#bfElementAdvancedReadOnly').attr('checked');
			mdata.mailback = JQuery('#bfElementAdvancedMailback').attr('checked');
			mdata.mailbackAsSender = JQuery('#bfElementAdvancedMailbackAsSender').attr('checked');
			mdata.mailbackfile = JQuery('#bfElementAdvancedMailbackfile').val();
			mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
			mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
			mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
                        mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
			mdata.hideLabel = JQuery('#bfElementAdvancedHideLabel').attr('checked');
			mdata.size = JQuery('#bfElementTypeTextSize').val();
			mdata.orderNumber = JQuery('#bfElementOrderNumber').val();
			mdata.required = JQuery('#bfElementValidationRequired').attr('checked');
			item.properties = mdata;
		};
		
		this.populateTextProperties = function(mdata){
			JQuery('#bfElementTypeTextValue').val(mdata.value);
			JQuery('#bfElementName').val(mdata.bfName);
			JQuery('#bfElementLabel').val(mdata.label);
			JQuery('#bfElementAdvancedLogging').attr('checked', mdata.logging);
			JQuery('#bfElementTypeTextMaxLength').val(mdata.maxLength);
			JQuery('#bfElementTypeTextHint').val(mdata.hint);
			JQuery('#bfElementAdvancedPassword').attr('checked', mdata.password);
			JQuery('#bfElementAdvancedReadOnly').attr('checked', mdata.readonly);
			JQuery('#bfElementAdvancedMailback').attr('checked', mdata.mailback);
			JQuery('#bfElementAdvancedMailbackAsSender').attr('checked', mdata.mailbackAsSender);
			JQuery('#bfElementAdvancedMailbackfile').val(mdata.mailbackfile);
			JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
			JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
                        JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
			JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
			JQuery('#bfElementAdvancedHideLabel').attr('checked', mdata.hideLabel);
			JQuery('#bfElementTypeTextSize').val(mdata.size);
			JQuery('#bfElementOrderNumber').val(mdata.orderNumber);
			JQuery('#bfElementValidationRequired').attr('checked', mdata.required);
		};
		
		// TEXTAREA
		this.saveTextareaProperties = function(mdata, item){
			mdata.value = JQuery('#bfElementTypeTextareaValue').val();
			mdata.bfName = JQuery('#bfElementName').val();
			mdata.logging = JQuery('#bfElementTextareaAdvancedLogging').attr('checked');
			mdata.label = JQuery('#bfElementLabel').val();
			mdata.hint = JQuery('#bfElementTypeTextareaHint').val();
			mdata.width = JQuery('#bfElementTypeTextareaWidth').val();
			mdata.height = JQuery('#bfElementTypeTextareaHeight').val();
			mdata.maxlength = JQuery('#bfElementTypeTextareaMaxLength').val();
			mdata.showMaxlengthCounter = JQuery('#bfElementTypeTextareaMaxLengthShow').attr('checked');
			mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
			mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
                        mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
			mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
			mdata.hideLabel = JQuery('#bfElementTextareaAdvancedHideLabel').attr('checked');
			mdata.orderNumber = JQuery('#bfElementTextareaAdvancedOrderNumber').val();
			mdata.required = JQuery('#bfElementValidationRequired').attr('checked');
			item.properties = mdata;
		};
		
		this.populateTextareaProperties = function(mdata){
			JQuery('#bfElementTypeTextareaValue').val(mdata.value);
			JQuery('#bfElementName').val(mdata.bfName);
			JQuery('#bfElementLabel').val(mdata.label);
			JQuery('#bfElementTextareaAdvancedLogging').attr('checked', mdata.logging);
			JQuery('#bfElementTypeTextareaHint').val(mdata.hint);
			JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
			JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
                        JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
			JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
			JQuery('#bfElementTextareaAdvancedHideLabel').attr('checked', mdata.hideLabel);
			JQuery('#bfElementTypeTextareaWidth').val(mdata.width);
			JQuery('#bfElementTypeTextareaHeight').val(mdata.height);
			// compat 723
			if(typeof mdata.maxlength == "undefined"){
				mdata["maxlength"] = 0;
			}
			if(typeof mdata.showMaxlengthCounter == "undefined"){
				mdata["showMaxlengthCounter"] = true;
			}
			// end compat 723
			JQuery('#bfElementTypeTextareaMaxLength').val(!isNaN(mdata.maxlength) ? mdata.maxlength : 0);
			JQuery('#bfElementTypeTextareaMaxLengthShow').attr('checked', mdata.showMaxlengthCounter);
			JQuery('#bfElementTextareaAdvancedOrderNumber').val(mdata.orderNumber);
			JQuery('#bfElementValidationRequired').attr('checked', mdata.required);
		};
		
		// RADIOS
		this.saveRadioGroupProperties = function(mdata, item){
			// dynamic properties
			mdata.group = JQuery('#bfElementTypeRadioGroupGroups').val();
			mdata.readonly = JQuery('#bfElementTypeRadioGroupReadonly').attr('checked');
			mdata.wrap = JQuery('#bfElementTypeRadioGroupWrap').attr('checked');
			mdata.hint = JQuery('#bfElementTypeRadioGroupHint').val();
			mdata.hideLabel = JQuery('#bfElementRadioGroupAdvancedHideLabel').attr('checked');
			mdata.logging = JQuery('#bfElementRadioGroupAdvancedLogging').attr('checked');
			mdata.orderNumber = JQuery('#bfElementRadioGroupAdvancedOrderNumber').val();
			// static properties
			mdata.bfName = JQuery('#bfElementName').val();
			mdata.label = JQuery('#bfElementLabel').val();
			mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
			mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
                        mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
			mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
			mdata.required = JQuery('#bfElementValidationRequired').attr('checked');
			
			item.properties = mdata;
		};
		
		this.populateRadioGroupProperties = function(mdata){
			// dynamic properties
			JQuery('#bfElementTypeRadioGroupGroups').val(mdata.group);
			JQuery('#bfElementTypeRadioGroupReadonly').attr('checked', mdata.readonly);
			JQuery('#bfElementTypeRadioGroupWrap').attr('checked', mdata.wrap);
			JQuery('#bfElementTypeRadioGroupHint').val(mdata.hint);
			JQuery('#bfElementRadioGroupAdvancedHideLabel').attr('checked', mdata.hideLabel);
			JQuery('#bfElementRadioGroupAdvancedLogging').attr('checked', mdata.logging);
			JQuery('#bfElementRadioGroupAdvancedOrderNumber').val(mdata.orderNumber);
			// static properties
			JQuery('#bfElementName').val(mdata.bfName);
			JQuery('#bfElementLabel').val(mdata.label);
			JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
                        JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
			JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
			JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
			JQuery('#bfElementValidationRequired').attr('checked', mdata.required);
		};
		
		// Checkboxgroup
		this.saveCheckboxGroupProperties = function(mdata, item){
			// dynamic properties
			mdata.group = JQuery('#bfElementTypeCheckboxGroupGroups').val();
			mdata.readonly = JQuery('#bfElementTypeCheckboxGroupReadonly').attr('checked');
			mdata.wrap = JQuery('#bfElementTypeCheckboxGroupWrap').attr('checked');
			mdata.hint = JQuery('#bfElementTypeCheckboxGroupHint').val();
			mdata.hideLabel = JQuery('#bfElementCheckboxGroupAdvancedHideLabel').attr('checked');
			mdata.logging = JQuery('#bfElementCheckboxGroupAdvancedLogging').attr('checked');
			mdata.orderNumber = JQuery('#bfElementCheckboxGroupAdvancedOrderNumber').val();
			// static properties
			mdata.bfName = JQuery('#bfElementName').val();
			mdata.label = JQuery('#bfElementLabel').val();
			mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
			mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
                        mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
			mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
			mdata.required = JQuery('#bfElementValidationRequired').attr('checked');
			
			item.properties = mdata;
		};
		
		this.populateCheckboxGroupProperties = function(mdata){
			// dynamic properties
			JQuery('#bfElementTypeCheckboxGroupGroups').val(mdata.group);
			JQuery('#bfElementTypeCheckboxGroupReadonly').attr('checked', mdata.readonly);
			JQuery('#bfElementTypeCheckboxGroupWrap').attr('checked', mdata.wrap);
			JQuery('#bfElementTypeCheckboxGroupHint').val(mdata.hint);
			JQuery('#bfElementCheckboxGroupAdvancedHideLabel').attr('checked', mdata.hideLabel);
			JQuery('#bfElementCheckboxGroupAdvancedLogging').attr('checked', mdata.logging);
			JQuery('#bfElementCheckboxGroupAdvancedOrderNumber').val(mdata.orderNumber);
			// static properties
			JQuery('#bfElementName').val(mdata.bfName);
			JQuery('#bfElementLabel').val(mdata.label);
			JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
                        JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
			JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
			JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
			JQuery('#bfElementValidationRequired').attr('checked', mdata.required);
		};
		
		// Checkbox
		this.saveCheckboxProperties = function(mdata, item){
			// dynamic properties
			mdata.value = JQuery('#bfElementTypeCheckboxValue').val() == '' ? 'checked' : JQuery('#bfElementTypeCheckboxValue').val();
			mdata.checked = JQuery('#bfElementTypeCheckboxChecked').attr('checked');
			mdata.readonly = JQuery('#bfElementTypeCheckboxReadonly').attr('checked');
			mdata.mailbackAccept = JQuery('#bfElementCheckboxAdvancedMailbackAccept').attr('checked');
			mdata.mailbackConnectWith = JQuery('#bfElementCheckboxAdvancedMailbackConnectWith').val();
			mdata.hint = JQuery('#bfElementTypeCheckboxHint').val();
			mdata.hideLabel = JQuery('#bfElementCheckboxAdvancedHideLabel').attr('checked');
			mdata.logging = JQuery('#bfElementCheckboxAdvancedLogging').attr('checked');
			mdata.orderNumber = JQuery('#bfElementCheckboxAdvancedOrderNumber').val();
			// static properties
			mdata.bfName = JQuery('#bfElementName').val();
			mdata.label = JQuery('#bfElementLabel').val();
			mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
			mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
                        mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
			mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
			mdata.required = JQuery('#bfElementValidationRequired').attr('checked');
			
			item.properties = mdata;
		};
		
		this.populateCheckboxProperties = function(mdata){
			// dynamic properties
			JQuery('#bfElementTypeCheckboxValue').val(mdata.value);
			JQuery('#bfElementTypeCheckboxChecked').attr('checked', mdata.checked);
			JQuery('#bfElementCheckboxAdvancedMailbackAccept').attr('checked', mdata.mailbackAccept);
			JQuery('#bfElementCheckboxAdvancedMailbackConnectWith').val(mdata.mailbackConnectWith);
			JQuery('#bfElementTypeCheckboxReadonly').attr('checked', mdata.readonly);
			JQuery('#bfElementTypeCheckboxHint').val(mdata.hint);
			JQuery('#bfElementCheckboxAdvancedHideLabel').attr('checked', mdata.hideLabel);
			JQuery('#bfElementCheckboxAdvancedLogging').attr('checked', mdata.logging);
			JQuery('#bfElementCheckboxAdvancedOrderNumber').val(mdata.orderNumber);
			// static properties
			JQuery('#bfElementName').val(mdata.bfName);
			JQuery('#bfElementLabel').val(mdata.label);
			JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
                        JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
			JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
			JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
			JQuery('#bfElementValidationRequired').attr('checked', mdata.required);
		};
		
		// Select
		this.saveSelectProperties = function(mdata, item){
			// dynamic properties
			mdata.list = JQuery('#bfElementTypeSelectList').val();
			mdata.width = JQuery('#bfElementTypeSelectListWidth').val();
			mdata.height = JQuery('#bfElementTypeSelectListHeight').val();
			mdata.readonly = JQuery('#bfElementTypeSelectReadonly').attr('checked');
			mdata.multiple = JQuery('#bfElementTypeSelectMultiple').attr('checked');
			mdata.mailback = JQuery('#bfElementSelectAdvancedMailback').attr('checked');
			mdata.hint = JQuery('#bfElementTypeSelectHint').val();
			mdata.hideLabel = JQuery('#bfElementSelectAdvancedHideLabel').attr('checked');
			mdata.logging = JQuery('#bfElementSelectAdvancedLogging').attr('checked');
			mdata.orderNumber = JQuery('#bfElementSelectAdvancedOrderNumber').val();
			// static properties
			mdata.bfName = JQuery('#bfElementName').val();
			mdata.label = JQuery('#bfElementLabel').val();
			mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
			mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
                        mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
			mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
			mdata.required = JQuery('#bfElementValidationRequired').attr('checked');
			
			item.properties = mdata;
		};
		
		this.populateSelectProperties = function(mdata){
			// dynamic properties
			JQuery('#bfElementTypeSelectList').val(mdata.list);
			// compat 723
			if(typeof mdata.width == "undefined"){
				mdata['width'] = '';
			}
			if(typeof mdata.height == "undefined"){
				mdata['height'] = '';
			}
			// compat 723 end
			JQuery('#bfElementTypeSelectListWidth').val(mdata.width);
			JQuery('#bfElementTypeSelectListHeight').val(mdata.height);
			JQuery('#bfElementTypeSelectReadonly').attr('checked', mdata.readonly);
			JQuery('#bfElementTypeSelectMultiple').attr('checked', mdata.multiple);
			JQuery('#bfElementSelectAdvancedMailback').attr('checked', mdata.mailback);
			JQuery('#bfElementTypeSelectHint').val(mdata.hint);
			JQuery('#bfElementSelectAdvancedHideLabel').attr('checked', mdata.hideLabel);
			JQuery('#bfElementSelectAdvancedLogging').attr('checked', mdata.logging);
			JQuery('#bfElementSelectAdvancedOrderNumber').val(mdata.orderNumber);
			// static properties
			JQuery('#bfElementName').val(mdata.bfName);
			JQuery('#bfElementLabel').val(mdata.label);
			JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
                        JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
			JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
			JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
			JQuery('#bfElementValidationRequired').attr('checked', mdata.required);
		};	
		
		// File
		this.saveFileProperties = function(mdata, item){
			// dynamic properties
			mdata.uploadDirectory = JQuery('#bfElementFileAdvancedUploadDirectory').val();
			mdata.timestamp = JQuery('#bfElementFileAdvancedTimestamp').attr('checked');
			mdata.allowedFileExtensions = JQuery('#bfElementFileAdvancedAllowedFileExtensions').val();
			mdata.attachToUserMail = JQuery('#bfElementFileAdvancedAttachToUserMail').attr('checked');
			mdata.attachToAdminMail = JQuery('#bfElementFileAdvancedAttachToAdminMail').attr('checked');
			
			mdata.readonly = JQuery('#bfElementTypeFileReadonly').attr('checked');
			mdata.hint = JQuery('#bfElementTypeFileHint').val();
                        mdata.useUrl = JQuery('#bfElementFileAdvancedUseUrl').attr('checked');
                        mdata.useUrlDownloadDirectory = JQuery('#bfElementFileAdvancedUseUrlDownloadDirectory').val();
			mdata.hideLabel = JQuery('#bfElementFileAdvancedHideLabel').attr('checked');
			mdata.logging = JQuery('#bfElementFileAdvancedLogging').attr('checked');
			mdata.orderNumber = JQuery('#bfElementFileAdvancedOrderNumber').val();
			mdata.flashUploader = JQuery('#bfElementFileAdvancedFlashUploader').attr('checked');
			mdata.flashUploaderMulti = JQuery('#bfElementFileAdvancedFlashUploaderMulti').attr('checked');
			mdata.flashUploaderBytes = JQuery('#bfElementFileAdvancedFlashUploaderBytes').val();
			mdata.flashUploaderWidth = JQuery('#bfElementFileAdvancedFlashUploaderWidth').val();
			mdata.flashUploaderHeight = JQuery('#bfElementFileAdvancedFlashUploaderHeight').val();
			mdata.flashUploaderTransparent = JQuery('#bfElementFileAdvancedFlashUploaderTransparent').attr('checked');
			// static properties
			mdata.bfName = JQuery('#bfElementName').val();
			mdata.label = JQuery('#bfElementLabel').val();
			mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
			mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
                        mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
			mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
			mdata.required = JQuery('#bfElementValidationRequired').attr('checked');
			
			item.properties = mdata;
		};
		
		this.populateFileProperties = function(mdata){
			// dynamic properties
			JQuery('#bfElementFileAdvancedUploadDirectory').val(mdata.uploadDirectory);
			JQuery('#bfElementFileAdvancedTimestamp').attr('checked', mdata.timestamp);
			JQuery('#bfElementFileAdvancedAllowedFileExtensions').val(mdata.allowedFileExtensions);
			JQuery('#bfElementFileAdvancedAttachToUserMail').attr('checked', mdata.attachToUserMail);
			JQuery('#bfElementFileAdvancedAttachToAdminMail').attr('checked', mdata.attachToAdminMail);
			
			JQuery('#bfElementTypeFileReadonly').attr('checked', mdata.readonly);
			JQuery('#bfElementTypeFileHint').val(mdata.hint);
			JQuery('#bfElementFileAdvancedHideLabel').attr('checked', mdata.hideLabel);
                        if(mdata.useUrl && mdata.useUrlDownloadDirectory == ''){
                            mdata.useUrlDownloadDirectory = '<?php echo JURI::root() . 'components/com_breezingforms/uploads'  ;?>';
                        }
                        JQuery('#bfElementFileAdvancedUseUrl').attr('checked', mdata.useUrl);
                        JQuery('#bfElementFileAdvancedUseUrlDownloadDirectory').val(mdata.useUrlDownloadDirectory);
			JQuery('#bfElementFileAdvancedLogging').attr('checked', mdata.logging);
			JQuery('#bfElementFileAdvancedOrderNumber').val(mdata.orderNumber);
			JQuery('#bfElementFileAdvancedFlashUploader').attr('checked', mdata.flashUploader);
			JQuery('#bfElementFileAdvancedFlashUploaderMulti').attr('checked', mdata.flashUploaderMulti);
			JQuery('#bfElementFileAdvancedFlashUploaderBytes').val(mdata.flashUploaderBytes);
			JQuery('#bfElementFileAdvancedFlashUploaderWidth').val(mdata.flashUploaderWidth);
			JQuery('#bfElementFileAdvancedFlashUploaderHeight').val(mdata.flashUploaderHeight);
			JQuery('#bfElementFileAdvancedFlashUploaderTransparent').attr('checked', mdata.flashUploaderTransparent);
			// static properties
			JQuery('#bfElementName').val(mdata.bfName);
			JQuery('#bfElementLabel').val(mdata.label);
			JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
                        JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
			JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
			JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
			JQuery('#bfElementValidationRequired').attr('checked', mdata.required);
		};

		// SUBMIT BUTTON
		this.saveSubmitButtonProperties = function(mdata, item){
			// dynamic properties
			mdata.src = JQuery('#bfElementSubmitButtonAdvancedSrc').val();
			mdata.value = JQuery('#bfElementTypeSubmitButtonValue').val();
			mdata.hint = JQuery('#bfElementTypeSubmitButtonHint').val();
			mdata.hideLabel = JQuery('#bfElementSubmitButtonAdvancedHideLabel').attr('checked');
			// static properties
			mdata.bfName = JQuery('#bfElementName').val();
			mdata.label = JQuery('#bfElementLabel').val();
			mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
			mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
                        mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
			mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
			
			item.properties = mdata;
		};
		
		this.populateSubmitButtonProperties = function(mdata){
			// dynamic properties
			JQuery('#bfElementSubmitButtonAdvancedSrc').val(mdata.src);
			JQuery('#bfElementTypeSubmitButtonValue').val(mdata.value);
			JQuery('#bfElementTypeSubmitButtonHint').val(mdata.hint);
			JQuery('#bfElementSubmitButtonAdvancedHideLabel').attr('checked', mdata.hideLabel);
			// static properties
			JQuery('#bfElementName').val(mdata.bfName);
			JQuery('#bfElementLabel').val(mdata.label);
			JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
                        JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
			JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
			JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
		};
			
		// CAPTCHA
		this.saveCaptchaProperties = function(mdata, item){
			// dynamic properties
			mdata.hint = JQuery('#bfElementTypeCaptchaHint').val();
			mdata.hideLabel = JQuery('#bfElementCaptchaAdvancedHideLabel').attr('checked');
			// static properties
			mdata.bfName = JQuery('#bfElementName').val();
			mdata.label = JQuery('#bfElementLabel').val();
			mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
			mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
			mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
			mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
			item.properties = mdata;
		};

                // RECAPTCHA
		this.saveReCaptchaProperties = function(mdata, item){
			// dynamic properties
			mdata.hint = JQuery('#bfElementTypeReCaptchaHint').val();
			mdata.hideLabel = JQuery('#bfElementReCaptchaAdvancedHideLabel').attr('checked');

                        mdata.pubkey = JQuery('#bfElementTypeReCaptchaPubkey').val();
                        mdata.privkey = JQuery('#bfElementTypeReCaptchaPrivkey').val();
                        mdata.theme = JQuery('#bfElementTypeReCaptchaTheme').val();

			// static properties
			mdata.bfName = JQuery('#bfElementName').val();
			mdata.label = JQuery('#bfElementLabel').val();
			mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
			mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
                        
			mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
                        mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
			item.properties = mdata;
		};

                this.populateReCaptchaProperties = function(mdata){
			// dynamic properties
			JQuery('#bfElementTypeReCaptchaHint').val(mdata.hint);
			JQuery('#bfElementReCaptchaAdvancedHideLabel').attr('checked', mdata.hideLabel);

                        JQuery('#bfElementTypeReCaptchaPubkey').val(mdata.pubkey);
                        JQuery('#bfElementTypeReCaptchaPrivkey').val(mdata.privkey);
                        JQuery('#bfElementTypeReCaptchaTheme').val(mdata.theme);

			// static properties
			JQuery('#bfElementName').val(mdata.bfName);
			JQuery('#bfElementLabel').val(mdata.label);
			JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
			JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
			JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
                        JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
		};

		this.populateCaptchaProperties = function(mdata){
			// dynamic properties
			JQuery('#bfElementTypeCaptchaHint').val(mdata.hint);
			JQuery('#bfElementCaptchaAdvancedHideLabel').attr('checked', mdata.hideLabel);
			// static properties
			JQuery('#bfElementName').val(mdata.bfName);
			JQuery('#bfElementLabel').val(mdata.label);
			JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
			JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
			JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
                        JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
		};
		
		// CALENDAR
		this.saveCalendarProperties = function(mdata, item){
			// dynamic properties
			mdata.format = JQuery('#bfElementTypeCalendarFormat').val();
			mdata.value = JQuery('#bfElementTypeCalendarValue').val();
			mdata.size = JQuery('#bfElementTypeCalendarSize').val();
			mdata.hint = JQuery('#bfElementTypeCalendarHint').val();
			mdata.hideLabel = JQuery('#bfElementCalendarAdvancedHideLabel').attr('checked');
			// static properties
			mdata.bfName = JQuery('#bfElementName').val();
			mdata.label = JQuery('#bfElementLabel').val();
			mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
			mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
                        mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
			mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
			mdata.required = JQuery('#bfElementValidationRequired').attr('checked');
			
			item.properties = mdata;
		};
		
		this.populateCalendarProperties = function(mdata){
			// dynamic properties
			JQuery('#bfElementTypeCalendarFormat').val(mdata.format);
			JQuery('#bfElementTypeCalendarValue').val(mdata.value);
			JQuery('#bfElementTypeCalendarSize').val(mdata.size);
			JQuery('#bfElementTypeCalendarHint').val(mdata.hint);
			JQuery('#bfElementCalendarAdvancedHideLabel').attr('checked', mdata.hideLabel);
			// static properties
			JQuery('#bfElementName').val(mdata.bfName);
			JQuery('#bfElementLabel').val(mdata.label);
			JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
                        JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
			JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
			JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
			JQuery('#bfElementValidationRequired').attr('checked', mdata.required);
		};
			
		// Hidden
		this.saveHiddenProperties = function(mdata, item){
			// dynamic properties
			mdata.value = JQuery('#bfElementTypeHiddenValue').val();
			mdata.logging = JQuery('#bfElementHiddenAdvancedLogging').attr('checked');
			mdata.orderNumber = JQuery('#bfElementHiddenAdvancedOrderNumber').val();
			// static properties
			mdata.bfName = JQuery('#bfElementName').val();
			mdata.label = JQuery('#bfElementLabel').val();
			mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
			mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
                        mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
			mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
			
			item.properties = mdata;
		};
		
		this.populateHiddenProperties = function(mdata){
			// dynamic properties
			JQuery('#bfElementTypeHiddenValue').val(mdata.value);
			JQuery('#bfElementHiddenAdvancedLogging').attr('checked', mdata.logging);
			JQuery('#bfElementHiddenAdvancedOrderNumber').val(mdata.orderNumber);
			// static properties
			JQuery('#bfElementName').val(mdata.bfName);
			JQuery('#bfElementLabel').val(mdata.label);
			JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
                        JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
			JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
			JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
		};
		
		// SUMMARIZE
		this.saveSummarizeProperties = function(mdata, item){
			// dynamic properties
			var val = JQuery('#bfElementTypeSummarizeConnectWith').val();
			if(val != ''){
				var name = val.split(":")[0];
				var type = val.split(":")[1];
				mdata.connectWith = name;
				mdata.connectType = type;
			}
			
			mdata.useElementLabel = JQuery('#bfElementTypeSummarizeUseElementLabel').attr('checked');
			mdata.hideIfEmpty = JQuery('#bfElementTypeSummarizeHideIfEmpty').attr('checked');
			mdata.fieldCalc = JQuery('#bfElementAdvancedSummarizeCalc').val();
				
			mdata.emptyMessage = JQuery('#bfElementTypeSummarizeEmptyMessage').val();
			if(mdata.useElementLabel){
				var items = new Array();
				appScope.getItemsFlattened(appScope.dataObject, items);
				for(var i = 0; i < items.length;i++){
					if(items[i].properties.bfName == name){
						JQuery('#bfElementLabel').val(items[i].properties.label);
						break;
					}
				}		
			}
			// static properties
			mdata.bfName = JQuery('#bfElementName').val();
			mdata.label = JQuery('#bfElementLabel').val();
			mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
			mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
                        mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
			item.properties = mdata;
		};
		
		this.populateSummarizeProperties = function(mdata){
			var items = new Array();
			appScope.getItemsFlattened(appScope.dataObject, items);
			JQuery('#bfElementTypeSummarizeConnectWith').empty();
			var option = document.createElement('option');
			JQuery(option).val('');
			JQuery(option).text("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_CHOOSE_ONE')); ?>");
			JQuery('#bfElementTypeSummarizeConnectWith').append(option);
			for(var i = 0; i < items.length;i++){
				switch(items[i].properties.bfType){
					case 'bfTextfield':
					case 'bfTextarea':
					case 'bfRadioGroup':
					case 'bfCheckboxGroup':
					case 'bfCheckbox':
					case 'bfSelect':
					case 'bfFile':
					case 'bfHidden':
					case 'bfCalendar':
						var option = document.createElement('option');
						JQuery(option).val(items[i].properties.bfName + ":" + items[i].properties.bfType);
						JQuery(option).text(items[i].properties.label + " ("+items[i].properties.bfName+")"); 
						JQuery('#bfElementTypeSummarizeConnectWith').append(option);
					break;
				}
			}
			// dynamic properties
			JQuery('#bfElementTypeSummarizeConnectWith').val(mdata.connectWith+":"+mdata.connectType);
			JQuery('#bfElementTypeSummarizeEmptyMesssage').val(mdata.emptyMessage);
			JQuery('#bfElementTypeSummarizeUseElementLabel').attr('checked', mdata.useElementLabel);
			JQuery('#bfElementTypeSummarizeEmptyMessage').val(mdata.emptyMessage);
			JQuery('#bfElementTypeSummarizeHideIfEmpty').attr('checked', mdata.hideIfEmpty);
			JQuery('#bfElementAdvancedSummarizeCalc').val(mdata.fieldCalc);
			// static properties
			JQuery('#bfElementName').val(mdata.bfName);
			JQuery('#bfElementLabel').val(mdata.label);
			JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
			JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
                        JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
		};
		
		// PAYPAL BUTTON
		this.savePayPalProperties = function(mdata, item){
			// dynamic properties
			
			// DEFAULT
			
			// account
			mdata.business = JQuery('#bfElementTypePayPalBusiness').val();
			mdata.token = JQuery('#bfElementTypePayPalToken').val();
			
			mdata.itemname = JQuery('#bfElementTypePayPalItemname').val();
			mdata.itemnumber = JQuery('#bfElementTypePayPalItemnumber').val();
			mdata.amount = JQuery('#bfElementTypePayPalAmount').val();
			mdata.tax = JQuery('#bfElementTypePayPalTax').val();
			mdata.thankYouPage = JQuery('#bfElementTypePayPalThankYouPage').val();
			mdata.locale = JQuery('#bfElementTypePayPalLocale').val();
			mdata.currencyCode = JQuery('#bfElementTypePayPalCurrencyCode').val();
			mdata.sendNotificationAfterPayment = JQuery('#bfElementTypePayPalSendNotificationAfterPayment').attr('checked');
			
			// ADVANCED

                        mdata.useIpn = JQuery('#bfElementPayPalAdvancedUseIpn').attr('checked');

			mdata.image = JQuery('#bfElementPayPalAdvancedImage').val();
			
			// testaccount
			mdata.testaccount = JQuery('#bfElementPayPalAdvancedTestaccount').attr('checked');
			mdata.testBusiness = JQuery('#bfElementPayPalAdvancedTestBusiness').val();
			mdata.testToken = JQuery('#bfElementPayPalAdvancedTestToken').val();
			
			// file
			mdata.downloadableFile = JQuery('#bfElementPayPalAdvancedDownloadableFile').attr('checked');
			mdata.filepath = JQuery('#bfElementPayPalAdvancedFilepath').val();
			mdata.downloadTries = JQuery('#bfElementPayPalAdvancedDownloadTries').val();
			
			// OTHER ADVANCED
			mdata.hint = JQuery('#bfElementTypePayPalHint').val();
			mdata.hideLabel = JQuery('#bfElementPayPalAdvancedHideLabel').attr('checked');
			
			// static properties
			mdata.bfName = JQuery('#bfElementName').val();
			mdata.label = JQuery('#bfElementLabel').val();
			mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
			mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
                        mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
			mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
			item.properties = mdata;
		};
		
		this.populatePayPalProperties = function(mdata){
			// dynamic properties
			
			// DEFAULT
			
			// account
			JQuery('#bfElementTypePayPalBusiness').val(mdata.business);
			JQuery('#bfElementTypePayPalToken').val(mdata.token);
			
			JQuery('#bfElementTypePayPalItemname').val(mdata.itemname);
			JQuery('#bfElementTypePayPalItemnumber').val(mdata.itemnumber);
			JQuery('#bfElementTypePayPalAmount').val(mdata.amount);
			JQuery('#bfElementTypePayPalTax').val(mdata.tax);
			JQuery('#bfElementTypePayPalThankYouPage').val(mdata.thankYouPage);
			JQuery('#bfElementTypePayPalLocale').val(mdata.locale);
			JQuery('#bfElementTypePayPalCurrencyCode').val(mdata.currencyCode);
			JQuery('#bfElementTypePayPalSendNotificationAfterPayment').attr('checked', mdata.sendNotificationAfterPayment);
			// ADVANCED
			
			JQuery('#bfElementPayPalAdvancedImage').val(mdata.image);
			
			// testaccount
			JQuery('#bfElementPayPalAdvancedTestaccount').attr('checked', mdata.testaccount);
			JQuery('#bfElementPayPalAdvancedTestBusiness').val(mdata.testBusiness);
			JQuery('#bfElementPayPalAdvancedTestToken').val(mdata.testToken);
			
			// file
			JQuery('#bfElementPayPalAdvancedDownloadableFile').attr('checked', mdata.downloadableFile);
			JQuery('#bfElementPayPalAdvancedFilepath').val(mdata.filepath);
			JQuery('#bfElementPayPalAdvancedDownloadTries').val(mdata.downloadTries);
                        if(typeof mdata.useIpn == "undefined"){
                            mdata['useIpn'] = false;
                        }
                        JQuery('#bfElementPayPalAdvancedUseIpn').attr('checked', mdata.useIpn);
			JQuery('#bfElementTypePayPalHint').val(mdata.hint);
			JQuery('#bfElementPayPalAdvancedHideLabel').attr('checked', mdata.hideLabel);
			
			// static properties
			JQuery('#bfElementName').val(mdata.bfName);
			JQuery('#bfElementLabel').val(mdata.label);
			JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
                        JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
			JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
			JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
		};
		
		// SOFORTUEBERWEISUNG BUTTON
		this.saveSofortueberweisungProperties = function(mdata, item){
			// dynamic properties
			
			// DEFAULT

			// account
			mdata.user_id = JQuery('#bfElementTypeSofortueberweisungUserId').val();
			mdata.project_id = JQuery('#bfElementTypeSofortueberweisungProjectId').val();
			mdata.project_password = JQuery('#bfElementTypeSofortueberweisungProjectPassword').val();
			
			mdata.reason_1 = JQuery('#bfElementTypeSofortueberweisungReason1').val();
			mdata.reason_2 = JQuery('#bfElementTypeSofortueberweisungReason2').val();
			mdata.amount = JQuery('#bfElementTypeSofortueberweisungAmount').val();
			mdata.thankYouPage = JQuery('#bfElementTypeSofortueberweisungThankYouPage').val();
			mdata.language_id = JQuery('#bfElementTypeSofortueberweisungLanguageId').val();
			mdata.currency_id = JQuery('#bfElementTypeSofortueberweisungCurrencyId').val();
			mdata.mailback = JQuery('#bfElementTypeSofortueberweisungMailback').attr('checked');
			
			// ADVANCED
			
			mdata.image = JQuery('#bfElementSofortueberweisungAdvancedImage').val();
			
			// file
			mdata.downloadableFile = JQuery('#bfElementSofortueberweisungAdvancedDownloadableFile').attr('checked');
			mdata.filepath = JQuery('#bfElementSofortueberweisungAdvancedFilepath').val();
			mdata.downloadTries = JQuery('#bfElementSofortueberweisungAdvancedDownloadTries').val();
			
			// OTHER ADVANCED
			mdata.hint = JQuery('#bfElementTypeSofortueberweisungHint').val();
			mdata.hideLabel = JQuery('#bfElementSofortueberweisungAdvancedHideLabel').attr('checked');
			
			// static properties
			mdata.bfName = JQuery('#bfElementName').val();
			mdata.label = JQuery('#bfElementLabel').val();
			mdata.labelPosition = JQuery('#bfElementAdvancedLabelPosition').val();
			mdata.tabIndex = JQuery('#bfElementAdvancedTabIndex').val();
                        mdata.hideInMailback = JQuery('#bfElementAdvancedHideInMailback').attr('checked');
			mdata.off = JQuery('#bfElementAdvancedTurnOff').attr('checked');
			item.properties = mdata;
		};
		
		this.populateSofortueberweisungProperties = function(mdata){
			// dynamic properties
			
			// DEFAULT
			
			// account
			JQuery('#bfElementTypeSofortueberweisungUserId').val(mdata.user_id);
			JQuery('#bfElementTypeSofortueberweisungProjectId').val(mdata.project_id);
			JQuery('#bfElementTypeSofortueberweisungProjectPassword').val(mdata.project_password);
			
			JQuery('#bfElementTypeSofortueberweisungReason1').val(mdata.reason_1);
			JQuery('#bfElementTypeSofortueberweisungReason2').val(mdata.reason_2);
			JQuery('#bfElementTypeSofortueberweisungAmount').val(mdata.amount);
			JQuery('#bfElementTypeSofortueberweisungThankYouPage').val(mdata.thankYouPage);
			JQuery('#bfElementTypeSofortueberweisungLanguageId').val(mdata.language_id);
			JQuery('#bfElementTypeSofortueberweisungCurrencyId').val(mdata.currency_id);
			JQuery('#bfElementTypeSofortueberweisungMailback').attr('checked', mdata.mailback);
			
			// ADVANCED
			
			JQuery('#bfElementSofortueberweisungAdvancedImage').val(mdata.image);
			
			// file
			JQuery('#bfElementSofortueberweisungAdvancedDownloadableFile').attr('checked', mdata.downloadableFile);
			JQuery('#bfElementSofortueberweisungAdvancedFilepath').val(mdata.filepath);
			JQuery('#bfElementSofortueberweisungAdvancedDownloadTries').val(mdata.downloadTries);
			
			// OTHER ADVANCED
			JQuery('#bfElementTypeSofortueberweisungHint').val(mdata.hint);
			JQuery('#bfElementSofortueberweisungAdvancedHideLabel').attr('checked', mdata.hideLabel);
			
			// static properties
			JQuery('#bfElementName').val(mdata.bfName);
			JQuery('#bfElementLabel').val(mdata.label);
			JQuery('#bfElementAdvancedTabIndex').val(mdata.tabIndex);
                        JQuery('#bfElementAdvancedHideInMailback').attr('checked', mdata.hideInMailback);
			JQuery('#bfElementAdvancedTurnOff').attr('checked', mdata.off);
			JQuery('#bfElementAdvancedLabelPosition').val(mdata.labelPosition);
		};
			
		this.saveSelectedElementProperties = function(){
			if(appScope.selectedTreeElement){
				var mdata = appScope.getProperties(appScope.selectedTreeElement);
				if(mdata){
					var item = appScope.findDataObjectItem(JQuery(appScope.selectedTreeElement).attr('id'), appScope.dataObject);
					if(item){
						switch(mdata.bfType){
							case 'bfSummarize':
								appScope.saveSummarizeProperties(mdata, item);
							break;
							case 'bfHidden':
								appScope.saveHiddenProperties(mdata, item);
								appScope.saveValidation(mdata, item);
								appScope.saveInit(mdata, item);
							break;
							case 'bfTextfield':
								appScope.saveTextProperties(mdata, item);
								appScope.saveValidation(mdata, item);
								appScope.saveInit(mdata, item);
								appScope.saveAction(mdata, item);
							break;
							case 'bfTextarea':
								appScope.saveTextareaProperties(mdata, item);
								appScope.saveValidation(mdata, item);
								appScope.saveInit(mdata, item);
								appScope.saveAction(mdata, item);
							break;
							case 'bfRadioGroup':
								appScope.saveRadioGroupProperties(mdata, item);
								appScope.saveValidation(mdata, item);
								appScope.saveInit(mdata, item);
								appScope.saveAction(mdata, item);
							break;
							case 'bfSubmitButton':
								appScope.saveSubmitButtonProperties(mdata, item);
								appScope.saveAction(mdata, item);
							break;
							case 'bfPayPal':
								appScope.savePayPalProperties(mdata, item);
								appScope.saveAction(mdata, item);
							break;
							case 'bfSofortueberweisung':
								appScope.saveSofortueberweisungProperties(mdata, item);
								appScope.saveAction(mdata, item);
							break;
							case 'bfCaptcha':
								appScope.saveCaptchaProperties(mdata, item);
								appScope.saveAction(mdata, item);
							break;
                                                        case 'bfReCaptcha':
								appScope.saveReCaptchaProperties(mdata, item);
								appScope.saveAction(mdata, item);
							break;
							case 'bfCalendar':
								appScope.saveCalendarProperties(mdata, item);
								appScope.saveValidation(mdata, item);
							break;
							case 'bfCheckboxGroup':
								appScope.saveCheckboxGroupProperties(mdata, item);
								appScope.saveValidation(mdata, item);
								appScope.saveInit(mdata, item);
								appScope.saveAction(mdata, item);
							break;
							case 'bfCheckbox':
								appScope.saveCheckboxProperties(mdata, item);
								appScope.saveValidation(mdata, item);
								appScope.saveInit(mdata, item);
								appScope.saveAction(mdata, item);
							break;
							case 'bfSelect':
								appScope.saveSelectProperties(mdata, item);
								appScope.saveValidation(mdata, item);
								appScope.saveInit(mdata, item);
								appScope.saveAction(mdata, item);
							break;
							case 'bfFile':
								appScope.saveFileProperties(mdata, item);
								appScope.saveValidation(mdata, item);
								appScope.saveInit(mdata, item);
								appScope.saveAction(mdata, item);
							break;
						}
					}
				}
			}
		};
		
		this.saveValidation = function(mdata, item){
			mdata.validationId = JQuery('#bfValidationScriptSelection').val();
			mdata.validationCode = JQuery('#bfValidationCode').val();
			mdata.validationMessage = JQuery('#bfValidationMessage').val();
				
			if(JQuery('#bfValidationTypeLibrary').get(0).checked){
				mdata.validationCondition = 1;
				for(var i = 0; i < appScope.elementScripts.validation.length;i++){
					if(appScope.elementScripts.validation[i].id == JQuery('#bfValidationScriptSelection').val()){
						mdata.validationFunctionName = appScope.elementScripts.validation[i].name;
						break;
					}
				}
				
			} else if(JQuery('#bfValidationTypeCustom').get(0).checked){
				mdata.validationCondition = 2;
				mdata.validationFunctionName = 'ff_' + mdata.bfName + '_validation';
			} else {
				mdata.validationCondition = 0;
			}
			item.properties = mdata;
		};
		
		this.saveInit = function(mdata, item){
			if(JQuery('#bfInitFormEntry').get(0).checked){
				mdata.initFormEntry = 1;
			} else {
				mdata.initFormEntry = 0;
			}
				
			if(JQuery('#bfInitPageEntry').get(0).checked){
				mdata.initPageEntry = 1;
			} else {
				mdata.initPageEntry = 0;
			}
				
			mdata.initId = JQuery('#bfInitScriptSelection').val();
			mdata.initCode = JQuery('#bfInitCode').val();
				
			if(JQuery('#bfInitTypeLibrary').get(0).checked){
				mdata.initCondition = 1;
				for(var i = 0; i < appScope.elementScripts.init.length;i++){
					if(appScope.elementScripts.init[i].id == JQuery('#bfInitScriptSelection').val()){
						mdata.initScript = appScope.elementScripts.init[i].name;
						break;
					}
				}
				
			} else if(JQuery('#bfInitTypeCustom').get(0).checked){
				mdata.initCondition = 2;
				mdata.initFunctionName = 'ff_' + mdata.bfName + '_init';
			} else {
				mdata.initCondition = 0;
			}
			item.properties = mdata;
		};
		
		this.saveAction = function(mdata, item){
				
				mdata.actionId = JQuery('#bfActionsScriptSelection').val();
				mdata.actionCode = JQuery('#bfActionCode').val();
				
				if(JQuery('#bfActionTypeLibrary').get(0).checked){
					mdata.actionCondition = 1;
					for(var i = 0; i < appScope.elementScripts.action.length;i++){
						if(appScope.elementScripts.action[i].id == JQuery('#bfActionsScriptSelection').val()){
							mdata.actionFunctionName = appScope.elementScripts.action[i].name;
							break;
						}
					}
				} else if(JQuery('#bfActionTypeCustom').get(0).checked){
					mdata.actionCondition = 2;
					mdata.actionFunctionName = 'ff_' + mdata.bfName + '_action';
				} else {
					mdata.actionCondition = 0;
				}
				
				if(JQuery('#bfActionClick').get(0).checked && mdata.actionCondition > 0){
					mdata.actionClick = 1;
				} else {
					mdata.actionClick = 0;
				}
				
				if(JQuery('#bfActionBlur').get(0).checked && mdata.actionCondition > 0){
					mdata.actionBlur = 1;
				} else {
					mdata.actionBlur = 0;
				}
				
				if(JQuery('#bfActionChange').get(0).checked && mdata.actionCondition > 0){
					mdata.actionChange = 1;
				} else {
					mdata.actionChange = 0;
				}
				
				if(JQuery('#bfActionFocus').get(0).checked && mdata.actionCondition > 0){
					mdata.actionFocus = 1;
				} else {
					mdata.actionFocus = 0;
				}
				
				if(JQuery('#bfActionSelect').get(0).checked && mdata.actionCondition > 0){
					mdata.actionSelect = 1;
				} else {
					mdata.actionSelect = 0;
				}
				
				item.properties = mdata;
		};
		
		this.populateSelectedElementProperties = function(){
			if(appScope.selectedTreeElement){
				var mdata = appScope.getProperties(appScope.selectedTreeElement);
				
				// compat 723
				if(typeof mdata.off == "undefined"){
					mdata['off'] = false;
				}
				// compat 723 end
				
				if(mdata){
					var item = appScope.findDataObjectItem(JQuery(appScope.selectedTreeElement).attr('id'), appScope.dataObject);
					if(item){
						item.data.title = mdata.label;
						JQuery('#bfValidationScript').css('display','none');
						JQuery('#bfInitScript').css('display','none');
						JQuery('#bfActionScript').css('display','none');
						
						JQuery('#bfElementTypeText').css('display','none');
						JQuery('#bfElementTypeTextarea').css('display','none');
						JQuery('#bfElementTypeRadioGroup').css('display','none');
						JQuery('#bfElementTypeSubmitButton').css('display','none');
						JQuery('#bfElementTypePayPal').css('display','none');
						JQuery('#bfElementTypeSofortueberweisung').css('display','none');
						JQuery('#bfElementTypeCaptcha').css('display','none');
                                                JQuery('#bfElementTypeReCaptcha').css('display','none');
						JQuery('#bfElementTypeCalendar').css('display','none');
						JQuery('#bfElementTypeCheckboxGroup').css('display','none');
						JQuery('#bfElementTypeCheckbox').css('display','none');
						JQuery('#bfElementTypeSelect').css('display','none');
						JQuery('#bfElementTypeFile').css('display','none');
						JQuery('#bfElementTypeHidden').css('display','none');
						JQuery('#bfElementTypeSummarize').css('display','none');
						
						JQuery('#bfElementTypeTextAdvanced').css('display','none');
						JQuery('#bfElementTypeTextareaAdvanced').css('display','none');
						JQuery('#bfElementTypeRadioGroupAdvanced').css('display','none');
						JQuery('#bfElementTypeSubmitButtonAdvanced').css('display','none');
						JQuery('#bfElementTypePayPalAdvanced').css('display','none');
						JQuery('#bfElementTypeSofortueberweisungAdvanced').css('display','none');
						JQuery('#bfElementTypeCaptchaAdvanced').css('display','none');
                                                JQuery('#bfElementTypeReCaptchaAdvanced').css('display','none');
						JQuery('#bfElementTypeCalendarAdvanced').css('display','none');
						JQuery('#bfElementTypeCheckboxGroupAdvanced').css('display','none');
						JQuery('#bfElementTypeCheckboxAdvanced').css('display','none');
						JQuery('#bfElementTypeSelectAdvanced').css('display','none');
						JQuery('#bfElementTypeFileAdvanced').css('display','none');
						JQuery('#bfElementTypeHiddenAdvanced').css('display','none');
						JQuery('#bfElementTypeSummarizeAdvanced').css('display','none');
						JQuery('#bfElementValidationRequiredSet').css('display','none');
						
						JQuery('#bfAdvancedLeaf').css('display','');
                                                JQuery('#bfHideInMailback').css('display','');
						
						switch(mdata.bfType){
							case 'bfSummarize':
                                                                JQuery('#bfHideInMailback').css('display','none');
								JQuery('#bfElementType').val('bfElementTypeSummarize');
								appScope.populateSummarizeProperties(mdata);
							break;
							case 'bfHidden':
								JQuery('#bfElementType').val('bfElementTypeHidden');
								JQuery('#bfAdvancedLeaf').css('display','none');
								appScope.populateHiddenProperties(mdata);
								appScope.populateElementValidationScript();
								appScope.populateElementInitScript();
							break;
							case 'bfTextfield':
								JQuery('#bfElementType').val('bfElementTypeText');
								appScope.populateTextProperties(mdata);
								appScope.populateElementValidationScript();
								appScope.populateElementInitScript();
								appScope.populateElementActionScript();
							break;
							case 'bfTextarea':
								JQuery('#bfElementType').val('bfElementTypeTextarea');
								appScope.populateTextareaProperties(mdata);
								appScope.populateElementValidationScript();
								appScope.populateElementInitScript();
								appScope.populateElementActionScript();
							break;
							case 'bfRadioGroup':
								JQuery('#bfElementType').val('bfElementTypeRadioGroup');
								appScope.populateRadioGroupProperties(mdata);
								appScope.populateElementValidationScript();
								appScope.populateElementInitScript();
								appScope.populateElementActionScript();
							break;
							case 'bfSubmitButton':
								JQuery('#bfElementType').val('bfElementTypeSubmitButton');
								appScope.populateSubmitButtonProperties(mdata);
								appScope.populateElementActionScript();
							break;
							case 'bfPayPal':
								JQuery('#bfElementType').val('bfElementTypePayPal');
								appScope.populatePayPalProperties(mdata);
								appScope.populateElementActionScript();
							break;
							case 'bfSofortueberweisung':
								JQuery('#bfElementType').val('bfElementTypeSofortueberweisung');
								appScope.populateSofortueberweisungProperties(mdata);
								appScope.populateElementActionScript();
							break;
							case 'bfCaptcha':
                                                                JQuery('#bfHideInMailback').css('display','none');
								JQuery('#bfElementType').val('bfElementTypeCaptcha');
								appScope.populateCaptchaProperties(mdata);
							break;
                                                        case 'bfReCaptcha':
                                                                JQuery('#bfHideInMailback').css('display','none');
								JQuery('#bfElementType').val('bfElementTypeReCaptcha');
								appScope.populateReCaptchaProperties(mdata);
							break;
							case 'bfCalendar':
								JQuery('#bfElementType').val('bfElementTypeCalendar');
								appScope.populateCalendarProperties(mdata);
								appScope.populateElementValidationScript();
							break;
							case 'bfCheckboxGroup':
								JQuery('#bfElementType').val('bfElementTypeCheckboxGroup');
								appScope.populateCheckboxGroupProperties(mdata);
								appScope.populateElementValidationScript();
								appScope.populateElementInitScript();
								appScope.populateElementActionScript();
							break;
							case 'bfCheckbox':
								JQuery('#bfElementType').val('bfElementTypeCheckbox');
								appScope.populateCheckboxProperties(mdata);
								appScope.populateElementValidationScript();
								appScope.populateElementInitScript();
								appScope.populateElementActionScript();
							break;
							case 'bfSelect':
								JQuery('#bfElementType').val('bfElementTypeSelect');
								appScope.populateSelectProperties(mdata);
								appScope.populateElementValidationScript();
								appScope.populateElementInitScript();
								appScope.populateElementActionScript();
							break;
							case 'bfFile':
								JQuery('#bfElementType').val('bfElementTypeFile');
								appScope.populateFileProperties(mdata);
								appScope.populateElementValidationScript();
								appScope.populateElementInitScript();
								appScope.populateElementActionScript();
							break;
						}
						
						if(JQuery('#bfElementType').val() != ''){
							JQuery('#bfElementTypeClass').css('display','none');
							JQuery('#'+JQuery('#bfElementType').val()).css('display','');
							JQuery('#'+JQuery('#bfElementType').val()+"Advanced").css('display','');
							if(mdata.bfType != 'bfHidden'){
								JQuery('#bfElementValidationRequiredSet').css('display','');
							}
						}
					}
				}
			}
		};
		
		this.populateElementValidationScript = function(){
			
			var mdata = appScope.getProperties(appScope.selectedTreeElement);
			if(mdata){
			
				JQuery('#bfValidationScript').css('display','');
	
				JQuery('#bfValidationScriptSelection').empty();
				for(var i = 0; i < appScope.elementScripts.validation.length;i++){
					var option = document.createElement('option');
					JQuery(option).val(appScope.elementScripts.validation[i].id);
					JQuery(option).text(appScope.elementScripts.validation[i].package + '::' + appScope.elementScripts.validation[i].name); 
					if(appScope.elementScripts.validation[i].id == mdata.validationId){
						JQuery(option).get(0).setAttribute('selected', true);
					}
					JQuery('#bfValidationScriptSelection').append(option);
				}
				
				JQuery('#bfValidationMessage').val(mdata.validationMessage);
				JQuery('#bfValidationCode').val(mdata.validationCode);
				
				switch(mdata.validationCondition){
					case 1:
						JQuery('.bfValidationType').attr('checked','');
						JQuery('#bfValidationTypeLibrary').attr('checked',true);
						JQuery('#bfValidationScriptLibrary').css('display','');
						JQuery('#bfValidationScriptCustom').css('display','none');
						JQuery('#bfValidationScriptFlags').css('display','');
						JQuery('#bfValidationScriptLibrary').css('display','');
						JQuery('#bfValidationScriptCustom').css('display','none');
						appScope.setValidationScriptDescription();
						break;
					case 2:
						JQuery('.bfValidationType').attr('checked','');
						JQuery('#bfValidationTypeCustom').attr('checked',true);
						JQuery('#bfValidationScriptFlags').css('display','');
						JQuery('#bfValidationScriptLibrary').css('display','none');
						JQuery('#bfValidationScriptCustom').css('display','');
						break;
					default:
						JQuery('.bfValidationType').attr('checked','');
						JQuery('#bfValidationTypeNone').attr('checked',true);
						JQuery('#bfValidationScriptFlags').css('display','none');
						JQuery('#bfValidationScriptLibrary').css('display','none');
						JQuery('#bfValidationScriptCustom').css('display','none');
				}
			}
			
		};
		
		this.populateElementInitScript = function(){
			
			var mdata = appScope.getProperties(appScope.selectedTreeElement);
			if(mdata){
			
				JQuery('#bfInitScript').css('display','');
	
				JQuery('#bfInitScriptSelection').empty();
				for(var i = 0; i < appScope.elementScripts.init.length;i++){
					var option = document.createElement('option');
					JQuery(option).val(appScope.elementScripts.init[i].id);
					JQuery(option).text(appScope.elementScripts.init[i].package + '::' + appScope.elementScripts.init[i].name); 
					if(appScope.elementScripts.init[i].id == mdata.initId){
						JQuery(option).get(0).setAttribute('selected', true);
					}
					JQuery('#bfInitScriptSelection').append(option);
				}
				
				if(mdata.initFormEntry == 1){
					JQuery('#bfInitFormEntry').get(0).checked = true;
				} else {
					JQuery('#bfInitFormEntry').get(0).checked = false;
				}
				
				if(mdata.initPageEntry == 1){
					JQuery('#bfInitPageEntry').get(0).checked = true;
				} else {
					JQuery('#bfInitPageEntry').get(0).checked = false;
				}
				
				JQuery('#bfInitCode').val(mdata.initCode);
				
				switch(mdata.initCondition){
					case 1:
						JQuery('.bfInitType').attr('checked','');
						JQuery('#bfInitTypeLibrary').attr('checked',true);
						JQuery('#bfInitScriptLibrary').css('display','');
						JQuery('#bfInitScriptCustom').css('display','none');
						JQuery('#bfInitScriptFlags').css('display','');
						JQuery('#bfInitScriptLibrary').css('display','');
						JQuery('#bfInitScriptCustom').css('display','none');
						appScope.setInitScriptDescription();
						break;
					case 2:
						JQuery('.bfInitType').attr('checked','');
						JQuery('#bfInitTypeCustom').attr('checked',true);
						JQuery('#bfInitScriptFlags').css('display','');
						JQuery('#bfInitScriptLibrary').css('display','none');
						JQuery('#bfInitScriptCustom').css('display','');
						break;
					default:
						JQuery('.bfInitType').attr('checked','');
						JQuery('#bfInitTypeNone').attr('checked',true);
						JQuery('#bfInitScriptFlags').css('display','none');
						JQuery('#bfInitScriptLibrary').css('display','none');
						JQuery('#bfInitScriptCustom').css('display','none');
				}
			
			}
		};
		
		this.populateElementActionScript = function(){
			
			var mdata = appScope.getProperties(appScope.selectedTreeElement);
			if(mdata){
				
				JQuery('#bfActionScript').css('display','');
				
				if(mdata.bfType == 'bfSofortueberweisung' || mdata.bfType == 'bfPayPal' || mdata.bfType == 'bfIcon' || mdata.bfType == 'bfImageButton' || mdata.bfType == 'bfSubmitButton'){
					JQuery('.bfAction').css('display','none');
					JQuery('.bfActionLabel').css('display','none');
					JQuery('#bfActionClick').css('display','');
					JQuery('#bfActionClickLabel').css('display','');
				} else {
					JQuery('.bfAction').css('display','');
					JQuery('.bfActionLabel').css('display','');
				}
				
				JQuery('#bfActionsScriptSelection').empty();
				
				for(var i = 0; i < appScope.elementScripts.action.length;i++){
				
					var option = document.createElement('option');
					
					JQuery(option).val(appScope.elementScripts.action[i].id);
					JQuery(option).text(appScope.elementScripts.action[i].package + '::' + appScope.elementScripts.action[i].name); 
					
					if(appScope.elementScripts.action[i].id == mdata.actionId){
						
						JQuery(option).get(0).setAttribute('selected', true);
					}
					
					JQuery('#bfActionsScriptSelection').append(option);
				}
				
				if(mdata.actionClick == 1){
					JQuery('#bfActionClick').get(0).checked = true;
				} else {
					JQuery('#bfActionClick').get(0).checked = false;
				}
				
				if(mdata.actionBlur == 1){
					JQuery('#bfActionBlur').get(0).checked = true;
				} else {
					JQuery('#bfActionBlur').get(0).checked = false;
				}
				
				if(mdata.actionChange == 1){
					JQuery('#bfActionChange').get(0).checked = true;
				} else {
					JQuery('#bfActionChange').get(0).checked = false;
				}
				
				if(mdata.actionFocus == 1){
					JQuery('#bfActionFocus').get(0).checked = true;
				} else {
					JQuery('#bfActionFocus').get(0).checked = false;
				}
				
				if(mdata.actionSelect == 1){
					JQuery('#bfActionSelect').get(0).checked = true;
				} else {
					JQuery('#bfActionSelect').get(0).checked = false;
				}
				
				JQuery('#bfActionCode').val(mdata.actionCode);
				
				switch(mdata.actionCondition){
					case 1:
						JQuery('.bfActionType').attr('checked','');
						JQuery('#bfActionTypeLibrary').attr('checked',true);
						JQuery('#bfActionScriptLibrary').css('display','');
						JQuery('#bfActionScriptCustom').css('display','none');
						JQuery('#bfActionScriptFlags').css('display','');
						JQuery('#bfActionScriptLibrary').css('display','');
						JQuery('#bfActionScriptCustom').css('display','none');
						appScope.setActionScriptDescription();
						break;
					case 2:
						JQuery('.bfActionType').attr('checked','');
						JQuery('#bfActionTypeCustom').attr('checked',true);
						JQuery('#bfActionScriptFlags').css('display','');
						JQuery('#bfActionScriptLibrary').css('display','none');
						JQuery('#bfActionScriptCustom').css('display','');
						break;
					default:
						JQuery('.bfActionType').attr('checked','');
						JQuery('#bfActionTypeNone').attr('checked',true);
						JQuery('#bfActionScriptFlags').css('display','none');
						JQuery('#bfActionScriptLibrary').css('display','none');
						JQuery('#bfActionScriptCustom').css('display','none');
				}
			
			}
		};
		
		this.createTreeItem = function(obj){
				if(appScope.selectedTreeElement){
					switch(appScope.getNodeClass(appScope.selectedTreeElement)){
						case 'bfQuickModePageClass':
						case 'bfQuickModeSectionClass':
							if(obj.attributes['class'] != 'bfQuickModePageClass'){
								var item = appScope.findDataObjectItem(JQuery(appScope.selectedTreeElement).attr('id'), appScope.dataObject);
								if(item){
						      		if(item.children){
						      			item.children[item.children.length] = obj;
						      		} else {
						      			alert("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_NO_CHILDREN_ERROR')); ?>");
						      		}
								}
							} else {
								alert("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_NEW_SECTION_ERROR')); ?>");
							}
						break;
						case 'bfQuickModeRootClass':
							if(obj.attributes['class'] == 'bfQuickModePageClass' && appScope.dataObject && appScope.dataObject.children){
					      		appScope.dataObject.children[appScope.dataObject.children.length] = obj;
							} else {
								alert("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_NEW_SECTION_ERROR')); ?>");
							}
						break;
						default: alert("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_NEW_SECTION_ERROR')); ?>");
					}
					JQuery.tree_reference('bfElementExplorer').refresh();
				}
		};
		
		/**
			Section properties
		*/
		this.saveSectionProperties = function(){
			var mdata = appScope.getProperties(appScope.selectedTreeElement);
			if(mdata){
				var item = appScope.findDataObjectItem(JQuery(appScope.selectedTreeElement).attr('id'), appScope.dataObject);
				if(item){
					mdata.bfType = JQuery('#bfSectionType').val();
					mdata.displayType = JQuery('#bfSectionDisplayType').val();
					mdata.title = JQuery('#bfSectionTitle').val();
					mdata.name = JQuery('#bfSectionName').val();
					mdata.off = JQuery('#bfSectionAdvancedTurnOff').attr('checked');
					
					item.properties = mdata;
					item.data.title = JQuery('#bfSectionTitle').val();
				}
			}
		};
		
		this.populateSectionProperties = function(){
			if(appScope.selectedTreeElement){
				var mdata = appScope.getProperties(appScope.selectedTreeElement);
				// compat 723
				if(typeof mdata.off == "undefined"){
					mdata['off'] = false;
				}
				// compat 723 end
				if(mdata){
					var item = appScope.findDataObjectItem(JQuery(appScope.selectedTreeElement).attr('id'), appScope.dataObject);
					if(item){
						item.data.title = mdata.title;
						JQuery('#bfSectionType').val( mdata.bfType );
						JQuery('#bfSectionDisplayType').val( mdata.displayType );
						JQuery('#bfSectionTitle').val( mdata.title );
						// compat 723
						JQuery('#bfSectionName').val( typeof mdata.name == "undefined" ? '' : mdata.name );
						// compat 723 end
						JQuery('#bfSectionAdvancedTurnOff').attr( 'checked', mdata.off );
					}	
				}
			}
		};
		
		/**
			Form properties
		*/
		this.saveFormProperties = function(){
			var mdata = appScope.getProperties(appScope.selectedTreeElement);
			if(mdata){
				var item = appScope.findDataObjectItem(JQuery(appScope.selectedTreeElement).attr('id'), appScope.dataObject);
				if(item){
					mdata.title = JQuery('#bfFormTitle').val();
					mdata.name  = JQuery('#bfFormName').val();
					mdata.description = JQuery('#bfFormDescription').val();
					mdata.mailRecipient = JQuery('#bfFormMailRecipient').val();
					mdata.mailNotification = JQuery('#bfFormMailNotification').attr('checked'); 
					mdata.submitInclude = JQuery('#bfSubmitIncludeYes').attr('checked'); 
					mdata.submitLabel = JQuery('#bfFormSubmitLabel').val();
					mdata.cancelInclude = JQuery('#bfCancelIncludeYes').attr('checked'); 
					mdata.cancelLabel = JQuery('#bfFormCancelLabel').val();
					mdata.pagingInclude = JQuery('#bfPagingIncludeYes').attr('checked'); 
					mdata.pagingNextLabel = JQuery('#bfFormPagingNextLabel').val();
					mdata.pagingPrevLabel = JQuery('#bfFormPagingPrevLabel').val();
					mdata.theme = JQuery('#bfTheme').val();
					mdata.fadeIn = JQuery('#bfElementAdvancedFadeIn').attr('checked');
					mdata.useErrorAlerts = JQuery('#bfElementAdvancedUseErrorAlerts').attr('checked');
                                        mdata.useDefaultErrors = JQuery('#bfElementAdvancedUseDefaultErrors').attr('checked');
                                        mdata.useBalloonErrors = JQuery('#bfElementAdvancedUseBalloonErrors').attr('checked');
					mdata.lastPageThankYou = JQuery('#bfFormLastPageThankYou').attr('checked');
					mdata.rollover = JQuery('#bfElementAdvancedRollover').attr('checked');
					mdata.rolloverColor = JQuery('#bfElementAdvancedRolloverColor').val();
					mdata.toggleFields = JQuery('#bfElementAdvancedToggleFields').val();
					var pagesSize = JQuery('#bfQuickModeRoot').children("ul").children("li").size();
					if(mdata.lastPageThankYou && pagesSize > 1){
						mdata.submittedScriptCondidtion = 2;
						mdata.submittedScriptCode = 'function ff_'+mdata.name+'_submitted(status, message){ff_switchpage('+pagesSize+');}';
					} else {
						mdata.submittedScriptCondidtion = -1;
					}
					item.properties = mdata;
				}
			}
		};
		
		this.populateFormProperties = function(){
			if(appScope.selectedTreeElement){
				var mdata = appScope.getProperties(appScope.selectedTreeElement);
				if(mdata){
					// setting the node's data
					var item = appScope.findDataObjectItem(JQuery(appScope.selectedTreeElement).attr('id'), appScope.dataObject);
					if(item){
						item.data.title = mdata.title;
						JQuery('#bfElementAdvancedFadeIn').attr('checked', mdata.fadeIn);
						JQuery('#bfFormLastPageThankYou').attr('checked', mdata.lastPageThankYou);
						JQuery('#bfElementAdvancedUseErrorAlerts').attr('checked', mdata.useErrorAlerts);
                                                JQuery('#bfElementAdvancedUseDefaultErrors').attr('checked', mdata.useDefaultErrors);
                                                JQuery('#bfElementAdvancedUseBalloonErrors').attr('checked', mdata.useBalloonErrors);
						if(mdata.submitInclude){
							JQuery('#bfSubmitIncludeYes').attr('checked', true);
							JQuery('#bfSubmitIncludeNo').attr('checked', false);
						}else{
							JQuery('#bfSubmitIncludeYes').attr('checked', false);
							JQuery('#bfSubmitIncludeNo').attr('checked', true);
						}
						JQuery('#bfFormSubmitLabel').val( mdata.submitLabel );
						if(mdata.cancelInclude){
							JQuery('#bfCancelIncludeYes').attr('checked', true);
							JQuery('#bfCancelIncludeNo').attr('checked', false);
						}else{
							JQuery('#bfCancelIncludeYes').attr('checked', false);
							JQuery('#bfCancelIncludeNo').attr('checked', true);
						}
						JQuery('#bfFormCancelLabel').val( mdata.cancelLabel );
						if(mdata.pagingInclude){
							JQuery('#bfPagingIncludeYes').attr('checked', true);
							JQuery('#bfPagingIncludeNo').attr('checked', false);
						}else{
							JQuery('#bfPagingIncludeYes').attr('checked', false);
							JQuery('#bfPagingIncludeNo').attr('checked', true);
						}
						JQuery('#bfFormPagingNextLabel').val( mdata.pagingNextLabel );
						JQuery('#bfFormPagingPrevLabel').val( mdata.pagingPrevLabel );
						JQuery('#bfTheme').val( mdata.theme );
						JQuery('#bfElementAdvancedRollover').attr('checked', mdata.rollover);
					 	JQuery('#bfElementAdvancedRolloverColor').val(mdata.rolloverColor);
					 	JQuery('#bfElementAdvancedToggleFields').val(mdata.toggleFields);
					}
				}
			}
		};
		
		/**
			Page Properties
		*/
		this.savePageProperties = function(){
			var mdata = appScope.getProperties(appScope.selectedTreeElement);
			if(mdata){
				var item = appScope.findDataObjectItem(JQuery(appScope.selectedTreeElement).attr('id'), appScope.dataObject);
				if(item){
					item.properties = mdata;
				}
			}
		};
		
		this.populatePageProperties = function(){
			if(appScope.selectedTreeElement){
				var mdata = appScope.getProperties(appScope.selectedTreeElement);
				if(mdata){
					// setting the node's data
					var item = appScope.findDataObjectItem(JQuery(appScope.selectedTreeElement).attr('id'), appScope.dataObject);
					if(item){
						// no properties yet to set
					}
				}
			}
		};
		
		/**
			Main application
		*/
		this.toggleProperties = function (property){
			JQuery('.bfProperties').css('display', 'none');
			JQuery('#'+property).css('display', '');
		};
		
		this.toggleAdvanced = function (property){
			JQuery('.bfAdvanced').css('display', 'none');
			JQuery('#'+property).css('display', '');
		};
		
		JQuery('#bfElementExplorer').tree(
			{
			  ui : {
			    theme_name : "apple",
			    context: [
					{
						id    : 'copy',
						label :  'Copy',
						visible : function (NODE, TREE_OBJ) {
							var source = appScope.findDataObjectItem( JQuery(NODE).attr('id'), appScope.dataObject );
							if(source.attributes['class'] == 'bfQuickModeSectionClass' || source.attributes['class'] == 'bfQuickModeElementClass'){
								return true;
							} 
							return false;
						},
						action  : function (NODE, TREE_OBJ) {
							var source = appScope.findDataObjectItem( JQuery(NODE).attr('id'), appScope.dataObject );
							if(source.attributes['class'] == 'bfQuickModeSectionClass' || source.attributes['class'] == 'bfQuickModeElementClass'){
								if(source && source.attributes && source.attributes.id){
									appScope.copyTreeElement = source;
								}
							}
						}
			    	},
			    	{
						id    : 'paste',
						label :  'Paste',
						visible : function (NODE, TREE_OBJ) {
                                                        if(appScope.copyTreeElement){
								var target = appScope.findDataObjectItem( JQuery(NODE).attr('id'), appScope.dataObject );
								if(target.attributes['class'] == 'bfQuickModeSectionClass' || target.attributes['class'] == 'bfQuickModePageClass'){
									return true;
								}
								return false;
							} 
							return false;
						},
						action  : function (NODE, TREE_OBJ) {
							if(appScope.copyTreeElement){
								var target = appScope.findDataObjectItem( JQuery(NODE).attr('id'), appScope.dataObject );
								if(target.attributes['class'] == 'bfQuickModeSectionClass' || target.attributes['class'] == 'bfQuickModePageClass'){
									appScope.insertElementInto(clone_obj(appScope.copyTreeElement), target);
									setTimeout("JQuery.tree_reference('bfElementExplorer').refresh()", 10); // give it time to close the context menu
								}
							}
						}
			    	},
			    	{ 
		                id      : "delete",
		                label   : "Delete",
		                icon    : "remove.png",
		                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; }, 
		                action  : function (NODE, TREE_OBJ) { JQuery.each(NODE, function () { TREE_OBJ.remove(this); }); } 
		            }
					    	
				]
				    
			  },
			  selected : 'bfQuickModeRoot',
			  callback: {
			  	onselect : function(node,obj) {
			  		appScope.selectedTreeElement = node;
			  		JQuery('#bfPropertySaveButton').css('display','');
			  		JQuery('#bfPropertySaveButtonTop').css('display','');
			  		JQuery('#bfAdvancedSaveButton').css('display','');
			  		JQuery('#bfAdvancedSaveButtonTop').css('display','');
			  		switch( appScope.getNodeClass(node) ) {
			  			case 'bfQuickModeRootClass':
			  				appScope.toggleProperties('bfFormProperties');
			  				appScope.toggleAdvanced('bfFormAdvanced');
			  				appScope.populateFormProperties();
							break;
				  		case 'bfQuickModeSectionClass':
				  			appScope.toggleProperties('bfSectionProperties');
				  			appScope.toggleAdvanced('bfSectionAdvanced');
				  			appScope.populateSectionProperties();
				  			//JQuery('#bfAdvancedSaveButton').css('display','none');
				  			//JQuery('#bfAdvancedSaveButtonTop').css('display','none');
				  			break;
				  		case 'bfQuickModeElementClass':
				  			appScope.toggleProperties('bfElementProperties');
				  			appScope.toggleAdvanced('bfElementAdvanced');
				  			appScope.populateSelectedElementProperties();
				  			break;
				  		case 'bfQuickModePageClass':
				  			appScope.toggleProperties('bfPageProperties');
				  			appScope.toggleAdvanced('bfPageAdvanced');
				  			appScope.populatePageProperties();
				  			JQuery('#bfAdvancedSaveButton').css('display','none');
				  			JQuery('#bfAdvancedSaveButtonTop').css('display','none');
				  			break;
				  	}
			  	},
			  	onload : function(obj) {
			  		
			  	},
				onopen : function(NODE, TREE_OBJ) {
			  		var source = appScope.findDataObjectItem( JQuery(NODE).attr('id'), appScope.dataObject );
			  		source.state = 'open';
			  	},
			  	onclose : function(NODE, TREE_OBJ) {
			  		var source = appScope.findDataObjectItem( JQuery(NODE).attr('id'), appScope.dataObject );
			  		source.state = 'close';
			  	},
			  	ondelete : function(NODE, TREE_OBJ,RB) {
			  		appScope.selectedTreeElement = null;
			  		appScope.deleteDataObjectItem( JQuery(NODE).attr('id'), appScope.dataObject );
			  		var target = appScope.findDataObjectItem( JQuery('#bfQuickModeRoot').attr('id'), appScope.dataObject );
					if(target && !target.children){
						target.children = new Array();
					}
					// restoring page numbers
					if(target && target.children){
						if(target.attributes['class'] == 'bfQuickModeRootClass'){
							for(var i = 0; i < target.children.length; i++){
								if(target.children[i].attributes['class'] == 'bfQuickModePageClass'){
									var mdata = appScope.getProperties(JQuery('#'+target.children[i].attributes.id));
									if(mdata){
										target.children[i].attributes.id = 'bfQuickModePage' + (i+1);
										target.children[i].data.title = "<?php echo addslashes( BFText::_('COM_BREEZINGFORMS_PAGE') ) ?> " + (i+1);
										target.children[i].properties.pageNumber = i + 1;
									}
								}
							}
							// taking care of last page as thank you page
							var pagesSize = target.children.length;
							if(target.properties.lastPageThankYou && pagesSize > 1){
								target.properties.submittedScriptCondidtion = 2;
								target.properties.submittedScriptCode = 'function ff_'+target.properties.name+'_submitted(status, message){ff_switchpage('+pagesSize+');}';
							} else {
								target.properties.submittedScriptCondidtion = -1;
							}
						}
					}
			  		setTimeout("JQuery.tree_reference('bfElementExplorer').refresh()", 10); // give it time to close the context menu 
			  	},
			  	onmove : function(NODE,REF_NODE,TYPE,TREE_OBJ,RB){
			  		var parent = JQuery.tree_reference('bfElementExplorer').parent(NODE);
			  		if(!parent){
			  			parent = '#bfQuickModeRoot';
			  		}
			  		children = parent.children("ul").children("li");
				  	if( children && children.length && children.length > 0 ){
				  		for(var i = 0; i < children.length; i++){
				  			if(JQuery(NODE).attr('id') == children[i].id){
				  				appScope.moveDataObjectItem( JQuery(NODE).attr('id'), JQuery(parent).attr('id'), i, appScope.dataObject );
				  				break;
				  			}
				  		}
				  	} 
			  		JQuery.tree_reference('bfElementExplorer').refresh(); 
			  	}
			  },
			  rules : {
			  	metadata   : 'mdata',
			  	use_inline : true,
			  	deletable : 'none',
			  	creatable : 'none',
			  	renameable : 'none',
			  	
			  	draggable : ['section', 'element', 'page'],
			  	dragrules : [ 
			  					'element inside section', 
			  					'section inside section', 
			  					'element inside page', 
			  					'section inside page',
			  					'element after element',
			  					'element before element',
			  					'element after section',
			  					'element before section',
			  					'section after element',
			  					'section before element',
			  					'section after section',
			  					'section before section',
			  					'page before page',
			  					'page after page'
			  				]
			  },
			  data  : {
			    type  : "json",
			    json  : [appScope.dataObject]
			  }
			}
		
		);
		
		this.saveButton = function(){
			
			if(appScope.selectedTreeElement){
				var error = false;
				switch( appScope.getNodeClass(appScope.selectedTreeElement) ) {
			  		case 'bfQuickModeRootClass':
			  			if(JQuery.trim(JQuery('#bfFormTitle').val()) == ''){
							alert("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_ERROR_ENTER_TITLE')) ?>");
							error = true;
						} 
						if(JQuery.trim(JQuery('#bfFormName').val()) == ''){
							alert("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_ERROR_ENTER_NAME')) ?>");
							error = true;
						}
						var myRegxp = /^([a-zA-Z0-9_]+)$/;
						if(!myRegxp.test(JQuery('#bfFormName').val())){
							alert("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_ERROR_ENTER_NAME_CHARACTERS')) ?>");
							error = true;
						}
						if(!error) {
			  				appScope.saveFormProperties();
			  			}
					break;
			  		case 'bfQuickModeSectionClass':
			  			if(JQuery.trim(JQuery('#bfSectionName').val()) == ''){
							alert("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_ERROR_ENTER_NAME')) ?>");
							error = true;
						}
						if(!error) {
			  				appScope.saveSectionProperties();
			  			}
				  	break;
			  		case 'bfQuickModeElementClass':
						if(JQuery.trim(JQuery('#bfElementLabel').val()) == ''){
							alert("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_ERROR_ENTER_LABEL')) ?>");
							error = true;
						} 
						if(JQuery.trim(JQuery('#bfElementName').val()) == ''){
							alert("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_ERROR_ENTER_NAME')) ?>");
							error = true;
						}
						var myRegxp = /^([a-zA-Z0-9_]+)$/;
						if(!myRegxp.test(JQuery('#bfElementName').val())){
							alert("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_ERROR_ENTER_NAME_CHARACTERS')) ?>");
							error = true;
						}
						if(!error) {
			  				appScope.saveSelectedElementProperties();
			  			}
			  		case 'bfQuickModePageClass':
			  			appScope.savePageProperties();
			 		break;
				}
				if(!error){
					// TODO: remove the 2nd refresh if found out why this works only on the 2nd
					JQuery.tree_reference('bfElementExplorer').refresh();
					JQuery.tree_reference('bfElementExplorer').refresh();
					
					JQuery(".bfFadingMessage").html("<?php echo addslashes(BFText::_('COM_BREEZINGFORMS_SETTINGS_UPDATED')) ?>");
					JQuery(".bfFadingMessage").fadeIn(1000);
					setTimeout('JQuery(".bfFadingMessage").fadeOut(1000);',1500);
				}
			}
		};
		
		JQuery('#bfPropertySaveButton').click(
			appScope.saveButton
		);

		JQuery('#bfPropertySaveButtonTop').click(
			appScope.saveButton
		);

		JQuery('#bfAdvancedSaveButton').click(
			appScope.saveButton
		);

		JQuery('#bfAdvancedSaveButtonTop').click(
			appScope.saveButton
		);

		JQuery('#bfNewSectionButton').click(
			function(){
				var id = "bfQuickModeSection" + ( Math.floor(Math.random() * 100000) );
				var obj = {
			      			attributes : {
			      				"class" : 'bfQuickModeSectionClass', 
			      				id : id, 
			      				mdata : JQuery.toJSON( { deletable : true, type: 'section' } ) 
			      			},
			      			properties :
			      			{ bfType : 'normal', type: 'section', displayType: 'breaks', title: "untitled section", name: id, description: '', off : false }
				      		, 
			      			state: "open", 
			      			data: { title: "untitled section", icon : '<?php echo $iconBase . 'icon_section.png'?>'},
			      			children : []
			      		};
				appScope.createTreeItem(obj);
				JQuery.tree_reference('bfElementExplorer').select_branch(JQuery('#'+id));
			}
		);
		
		JQuery('#bfElementType').change(
			function(){
				var obj = null;
				var id = "bfQuickMode" + ( Math.floor(Math.random() * 10000000) );
				var selected = JQuery('#bfElementType').val();
				switch(selected){
					case 'bfElementTypeText': obj = appScope.createTextfield(id); break;
					case 'bfElementTypeRadioGroup': obj = appScope.createRadioGroup(id); break;
					case 'bfElementTypeCheckboxGroup': obj = appScope.createCheckboxGroup(id); break;
					case 'bfElementTypeCheckbox': obj = appScope.createCheckbox(id); break;
					case 'bfElementTypeSelect': obj = appScope.createSelect(id); break;
					case 'bfElementTypeTextarea': obj = appScope.createTextarea(id); break;
					case 'bfElementTypeFile': obj = appScope.createFile(id); break;
					case 'bfElementTypeSubmitButton': obj = appScope.createSubmitButton(id); break;
					case 'bfElementTypeHidden': obj = appScope.createHidden(id); break;
					case 'bfElementTypeSummarize': obj = appScope.createSummarize(id); break;
					case 'bfElementTypeCaptcha': obj = appScope.createCaptcha(id); break;
                                        case 'bfElementTypeReCaptcha': obj = appScope.createReCaptcha(id); break;
					case 'bfElementTypeCalendar': obj = appScope.createCalendar(id); break;
					case 'bfElementTypePayPal': obj = appScope.createPayPal(id); break;
					case 'bfElementTypeSofortueberweisung': obj = appScope.createSofortueberweisung(id); break;
				}
				if(obj){
					appScope.replaceDataObjectItem(JQuery(appScope.selectedTreeElement).attr('id'), obj, appScope.dataObject);
					JQuery.tree_reference('bfElementExplorer').refresh();
					JQuery.tree_reference('bfElementExplorer').select_branch(JQuery('#'+id));
				}
			}
		);
		
		this.setActionScriptDescription = function(){
				for(var i = 0; i < appScope.elementScripts.action.length;i++){
					if(JQuery('#bfActionsScriptSelection').val() == appScope.elementScripts.action[i].id){
						JQuery('#bfActionsScriptSelectionDescription').text(appScope.elementScripts.action[i].description);
					}
				}
		};
		
		JQuery('#bfActionsScriptSelection').change(
			function(){
				appScope.setActionScriptDescription();
			}
		);
		
		this.setInitScriptDescription = function(){
				for(var i = 0; i < appScope.elementScripts.init.length;i++){
					if(JQuery('#bfInitScriptSelection').val() == appScope.elementScripts.init[i].id){
						JQuery('#bfInitSelectionDescription').text(appScope.elementScripts.init[i].description);
					}
				}
		};
		
		JQuery('#bfInitScriptSelection').change(
			function(){
				appScope.setInitScriptDescription();
			}
		);
		
		this.setValidationScriptDescription = function(){
				for(var i = 0; i < appScope.elementScripts.validation.length;i++){
					if(JQuery('#bfValidationScriptSelection').val() == appScope.elementScripts.validation[i].id){
						JQuery('#bfValidationScriptSelectionDescription').text(appScope.elementScripts.validation[i].description);
					}
				}
		};
		
		JQuery('#bfValidationScriptSelection').change(
			function(){
				appScope.setValidationScriptDescription();
			}
		);
		
		JQuery('#bfNewElementButton').click(
			function(){
				var id = "bfQuickMode" + ( Math.floor(Math.random() * 10000000) );
				var obj = appScope.createTextfield(id);
				appScope.createTreeItem(obj);
				JQuery.tree_reference('bfElementExplorer').select_branch(JQuery('#'+id));
			}
		);
		
		JQuery('#bfNewPageButton').click(
			function(){
				var pageNumber = JQuery('#bfQuickModeRoot').children("ul").children("li").size() == 0 ? 1 : JQuery('#bfQuickModeRoot').children("ul").children("li").size() + 1;
				var id = "bfQuickModePage" + pageNumber;
				
				// taking care of thank you page if a new page is added
				var item = appScope.findDataObjectItem('bfQuickModeRoot', appScope.dataObject);	
				var pagesSize = JQuery('#bfQuickModeRoot').children("ul").children("li").size();
				if(item.properties.lastPageThankYou && pagesSize > 0){
					item.properties.submittedScriptCondidtion = 2;
					item.properties.submittedScriptCode = 'function ff_'+item.properties.name+'_submitted(status, message){ff_switchpage('+(pagesSize+1)+');}';
				} else {
					item.properties.submittedScriptCondidtion = -1;
				}
				
				var obj = {
				  attributes : {
				      	"class" : 'bfQuickModePageClass', 
				      	id : id,
				      	mdata : JQuery.toJSON( { deletable : true, type : 'page'  } ) 
				  }, 
				  properties: { type : 'page', pageNumber : pageNumber, pageIntro : '' },
				  state: "open", 
				  data: { title: "<?php echo addslashes( BFText::_('COM_BREEZINGFORMS_PAGE') ) ?> " + pageNumber, icon: '<?php echo $iconBase . 'icon_page.png'?>'},
			      children : []
				};
				appScope.createTreeItem(obj);
				JQuery.tree_reference('bfElementExplorer').select_branch(JQuery('#'+id));
			}
		);
		
		JQuery('#menutab').tabs( { select: function(e, ui){  } } );
	}
	
	JQuery(document).ready(function() {
		app = new BF_QuickModeApp();
		var mdata = app.getProperties(app.selectedTreeElement);
		if(mdata){
			var item = app.findDataObjectItem('bfQuickModeRoot', app.dataObject);
			if(item){
				mdata.title = "<?php echo addslashes($formTitle) ?>";
				mdata.name  = "<?php echo addslashes($formName) ?>";
				mdata.description = "<?php echo addslashes(str_replace("\n",'',str_replace("\r",'',$formDesc))) ?>";
				mdata.mailRecipient = "<?php echo addslashes($formEmailadr) ?>";
				mdata.mailNotification = "<?php echo addslashes($formEmailntf) == 2 ? true : false ?>"; 
				item.properties = mdata;
			}
		}
	});
	
	function createInitCode()
	{
		var mdata = app.getProperties(app.selectedTreeElement);
		if(mdata){
			form = document.bfForm;
			name = mdata.bfName;
			if (name=='') {
				alert('Please enter the element name first.');
				return;
			} // if
			if (!confirm("<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CREAINIT'); ?>\n<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_EXISTAPP'); ?>")) return;
			code =
				"function ff_"+name+"_init(element, condition)\n"+
				"{\n"+
				"    switch (condition) {\n";
			if (form.bfInitFormEntry.checked)
				code +=
					"        case 'formentry':\n"+
					"            break;\n";
			if (form.bfInitPageEntry.checked)
				code +=
					"        case 'pageentry':\n"+
					"            break;\n";
			code +=
				"        default:;\n"+
				"    } // switch\n"+
				"} // ff_"+name+"_init\n";
			oldcode = form.bfInitCode.value;
			if (oldcode != '')
				form.bfInitCode.value =
					code+
					"\n// -------------- <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_OLDBELOW'); ?> --------------\n\n"+
					oldcode;
			else
				form.bfInitCode.value = code;
		}
	} // createInitCode
	
	function createValidationCode()
	{
		var mdata = app.getProperties(app.selectedTreeElement);
		if(mdata){
			form = document.bfForm;
			name = mdata.bfName;
			if (name=='') {
				alert('Please enter the element name first.');
				return;
			} // if
			if (!confirm("<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CREAVALID'); ?>\n<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_EXISTAPP'); ?>")) return;
			code =
				"function ff_"+name+"_validation(element, message)\n"+
				"{\n"+
				"    if (element_fails_my_test) {\n"+
				"        if (message=='') message = element.name+\" faild in my test.\\n\"\n"+
				"        ff_validationFocus(element.name);\n"+
				"        return message;\n"+
				"    } // if\n"+
				"    return '';\n"+
				"} // ff_"+name+"_validation\n";
			oldcode = form.bfValidationCode.value;
			if (oldcode != '')
				form.bfValidationCode.value =
					code+
					"\n// -------------- <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_OLDBELOW'); ?> --------------\n\n"+
					oldcode;
			else
				form.bfValidationCode.value = code;
		}
	} // createValidationCode
	
	function createActionCode(element)
	{
		var mdata = app.getProperties(app.selectedTreeElement);
		if(mdata){
			form = document.bfForm;
			name = mdata.bfName;
			if (name=='') {
				alert('Please enter the element name first.');
				return;
			} // if
			if (!confirm("<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_CREAACTION'); ?>\n<?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_EXISTAPP'); ?>")) return;
			code =
				"function ff_"+name+"_action(element, action)\n"+
				"{\n"+
				"    switch (action) {\n";
			if (form.bfActionClick)
				if (form.bfActionClick.checked)
					code +=
						"        case 'click':\n"+
						"            break;\n";
			if (form.bfActionBlur)
				if (form.bfActionBlur.checked)
					code +=
						"        case 'blur':\n"+
						"            break;\n";
			if (form.bfActionChange)
				if (form.bfActionChange.checked)
					code +=
						"        case 'change':\n"+
						"            break;\n";
			if (form.bfActionFocus)
				if (form.bfActionFocus.checked)
					code +=
						"        case 'focus':\n"+
						"            break;\n";
			if (form.bfActionSelect)
				if (form.bfActionSelect.checked)
					code +=
						"        case 'select':\n"+
						"            break;\n";
			code +=
				"        default:;\n"+
				"    } // switch\n"+
				"} // ff_"+name+"_action\n";
				
			oldcode = form.bfActionCode.value;
			if (oldcode != '')
				form.bfActionCode.value =
					code+
					"\n// -------------- <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_OLDBELOW'); ?> --------------\n\n"+
					oldcode;
			else
				form.bfActionCode.value = code;
		}
	} // createActionCode
	
	var bf_submitbutton = function (pressbutton)
	{
		var form = document.adminForm;
		
		switch (pressbutton) {

                        case 'close':
                            location.href="index.php?option=com_breezingforms&act=manageforms";
                            break;
			case 'save':
				form.task.value = 'save';
				form.act.value = 'quickmode';
				var cVal = JQuery.base64Encode( JQuery.toJSON( app.dataObject ) );
                                JQuery.ajaxSetup({async:false});
                                var rndAdd = Math.random();
                                var chunks = new Array();
                                var chunk = '';
                                if(cVal.length > 30000){
                                    var cnt = 0;
                                    for( var i = 0; i < cVal.length; i++ ){
                                        chunk += cVal[i];
                                        cnt++;
                                        if( cnt == 60000 || ( i+1 == cVal.length && cnt+1 < 60000 ) ){
                                            chunks.push(chunk);
                                            chunk = '';
                                            cnt = 0;
                                        }
                                    }
                                }else{
                                    chunks.push(cVal);
                                }

                                if(chunks.length > 1){
                                    JQuery("#bfSaveQueue").css("display","");
                                    JQuery("#bfSaveQueue").center(true);
                                    JQuery("#bfSaveQueue").css("visibility","visible");
                                }
                                
                                for(var i = 0; i < chunks.length; i++){
                                    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 }, function(data){if(data!='' && isNaN(data))alert(data);if(data!='' && !isNaN(data)){document.adminForm.form.value=data;document.adminForm.submit()}});
                                    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);
                                }

                                JQuery("#bfSaveQueue").css("visibility","hidden");
                                JQuery("#bfSaveQueue").css("display","none");
				break;
			case 'preview':
				
				SqueezeBox.initialize({});               
			         
			    SqueezeBox.loadModal = function(modalUrl,handler,x,y) {
                                        this.presets.size.x = 820;
			    		this.initialize();      
			      		var options = $merge(options || {}, JQuery.toJSON("{handler: \'" + handler + "\', size: {x: " + x +", y: " + y + "}}"));      
						this.setOptions(this.presets, options);
						this.assignOptions();
						this.setContent(handler,modalUrl);
			   	};
			         
			    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);
				break; 
			case 'preview_site':
				SqueezeBox.initialize({});               
			         
			    SqueezeBox.loadModal = function(modalUrl,handler,x,y) {
                                        this.presets.size.x = 820;
			    		this.initialize();      
			      		var options = $merge(options || {}, JQuery.toJSON("{handler: \'" + handler + "\', size: {x: " + x +", y: " + y + "}}"));      
						this.setOptions(this.presets, options);
						this.assignOptions();
						this.setContent(handler,modalUrl);
			   	};
			         
			    SqueezeBox.loadModal("<?php echo JURI::root()?>index.php?option=com_breezingforms&ff_form=<?php echo $formId ?>&ff_page=1","iframe",820,400);
				break; 
		}
	};

	if(typeof Joomla != "undefined"){
		Joomla.submitbutton = bf_submitbutton;
	}else{
		submitbutton = bf_submitbutton;
	}
	
	function addslashes( str ) {
    	return (str+'').replace(/([\\"'])/g, "\\$1").replace(/\0/g, "\\0");
	}

	function clone_obj(obj) {
		    var c = obj instanceof Array ? [] : {};
		 
		    for (var i in obj) {
		        var prop = obj[i];
		 
		        if (typeof prop == 'object') {
		           if (prop instanceof Array) {
		               c[i] = [];
		 
		               for (var j = 0; j < prop.length; j++) {
		                   if (typeof prop[j] != 'object') {
		                       c[i].push(prop[j]);
		                   } else {
		                       c[i].push(clone_obj(prop[j]));
		                   }
		               }
		           } else {
		               c[i] = clone_obj(prop);
		           }
		        } else {
		           c[i] = prop;
		        }
		    }
		 
		    return c;
		}
	
	</script>
	
	<div style="float:left; margin-right: 3px;">
		<?php JToolBarHelper::custom('save', 'save.png', 'save_f2.png', BFText::_('COM_BREEZINGFORMS_TOOLBAR_QUICKMODE_SAVE'), false); ?>
		<?php
			
			if($formId != 0){
				JToolBarHelper::custom('preview', 'publish.png', 'save_f2.png', BFText::_('COM_BREEZINGFORMS_TOOLBAR_QUICKMODE_PREVIEW'), false);
				JToolBarHelper::custom('preview_site', 'publish.png', 'save_f2.png', BFText::_('COM_BREEZINGFORMS_SITE_PREVIEW'), false);
			}
		?>
		<?php JToolBarHelper::title('<img src="'. JURI::root() . 'administrator/components/com_breezingforms/libraries/jquery/themes/easymode/i/logo-breezingforms.png'.'" align="top"/>'); ?>
                <?php JToolBarHelper::custom('close', 'cancel.png', 'cancel_f2.png', BFText::_('COM_BREEZINGFORMS_TOOLBAR_QUICKMODE_CLOSE'), false); ?>
		<form action="index.php" method="post" name="adminForm">
			<input type="hidden" name="option" value="com_breezingforms" />
			<input type="hidden" name="act" value="quickmode" />
			<input type="hidden" name="task" value="" />
			<input type="hidden" name="form" value="<?php echo $formId;?>" />
                        <input type="hidden" name="sizeTplCode" value="0" />
		</form>
	</div>
	
	<!-- ##### CSS ######## -->
	<!-- ####### CSS ######## -->
	<!-- ####### CSS ######## -->
	<!-- ####### CSS ######## -->
<?php 
jimport('joomla.version');
$version = new JVersion();

if(version_compare($version->getShortVersion(), '1.6', '>=')){
?>
<link rel="stylesheet" href="<?php echo JURI::root(true)?>/administrator/components/com_breezingforms/admin/bluestork.fix.css" type="text/css" />
<?php 
}
?>
<style type="text/css">

#bfSaveQueue{
	font: 11px Verdana, Geneva, sans-serif;
	border: 2px solid #E5E5E5;
	background-color: #F5F5F5;
	margin-top: 5px;
	padding: 10px;
	width: 350px;
        text-align: center;
        font-weight: bold;
}


#bfQuickModeWrapper {
	width: 100%;
}

#bfQuickModeLeft {
	float: left;
	width: 240px;
}

#bfQuickModeRight {
	padding-left: 250px;
}

#bfElementExplorer {
	width: auto;
	overflow: auto;
}

#bfQuickModeRight #menutab {
	width: 100%;
}

/* ##### hr ##### */

#bfQuickModeWrapper hr {
	color:#ccc;
	background-color:#ccc;
	height:1px;
	border:none;
	margin: 10px 0px 10px 0px;
}

/* ##### inputs ##### */

#bfQuickModeWrapper fieldset {
	padding: 10px;
}

#bfQuickModeWrapper label.bfPropertyLabel {
	float: left;
	width: 20%;
	margin-right: 10px;
}

#bfQuickModeWrapper textarea {
	height: 100px;
}

#bfQuickModeWrapper input[type=text], #bfQuickModeWrapper input[type=password], #bfQuickModeWrapper textarea, #bfQuickModeWrapper select {
    border: 1px solid #bbb;
    padding: 2px;
    line-height: normal;
    background: #f8f8f8;
    font-size: 100%;
    width: 50%;
}

#bfQuickModeWrapper textarea:hover, #bfQuickModeWrapper input[type='text']:hover, #bfQuickModeWrapper input[type='password']:hover, #bfQuickModeWrapper select:hover {
    border-color: #92c1ff;
}

#bfQuickModeWrapper textarea:focus, #bfQuickModeWrapper input[type='text']:focus, #bfQuickModeWrapper input[type='password']:focus, #bfQuickModeWrapper select:focus {
    border-color: #0071bc; outline: 2px solid #92c1ff;
}

#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 {
    cursor: pointer;
}

#bfQuickModeWrapper input[type='hidden'] { display: none; }

.bfClearfix:after {
    content: ".";
    display: block;
    height: 0;
    clear: both;
    visibility: hidden;
}


</style>
	<!-- ####### CSS ######## -->
	<!-- ####### CSS ######## -->
	<!-- ####### CSS ######## -->
	<!-- ####### CSS ######## -->
<div style="display:none;visibility:hidden;" id="bfSaveQueue"></div>
<div id="bfQuickModeWrapper" class="bfClearfix">
	
	<div id="bfQuickModeLeft" class="bfClearfix">
		
	<div style="float:left">
		<form onsubmit="return false;">
			<input id="bfNewPageButton" type="submit" value="<?php echo BFText::_('COM_BREEZINGFORMS_NEW_PAGE'); ?>"/>
			<input id="bfNewSectionButton" type="submit" value="<?php echo BFText::_('COM_BREEZINGFORMS_NEW_SECTION'); ?>"/>
			<input id="bfNewElementButton" type="submit" value="<?php echo BFText::_('COM_BREEZINGFORMS_NEW_ELEMENT'); ?>"/>
			<span class="bfFadingMessage" style="display:none"></span>
		</form>
	</div>
	<div style="clear:both"></div>
	<br/>
	<div id="bfElementExplorer"></div>
	
	</div> <!-- ##### bfQuickModeLeft end ##### -->
	
	
	<div id="bfQuickModeRight" class="bfClearfix">
		
	<form name="bfForm" onsubmit="return false">
	
	<div id="menutab" class="flora">
            <ul>
                <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>
                <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>
            </ul>

			<div class="t">

				<div class="t">
					<div class="t"></div>
		 		</div>
	 		</div>

			<div class="m">

	            <div id="fragment-1">
		            <div>
		            	<div class="bfFadingMessage" style="display:none"></div>
		            	<input type="submit" value="<?php echo BFText::_('COM_BREEZINGFORMS_PROPERTIES_SAVE'); ?>" id="bfPropertySaveButtonTop"/>
		            	<!-- FORM PROPERTIES BEGIN -->
		            	<div class="bfProperties" id="bfFormProperties" style="display:none">
		            		<br/>
		            		<fieldset>
		            			<legend><?php echo BFText::_('COM_BREEZINGFORMS_FORM_PROPERTIES'); ?></legend>
		            			<label class="bfPropertyLabel" for="bfFormTitle"><?php echo BFText::_('COM_BREEZINGFORMS_FORM_TITLE'); ?></label>
		            			<input type="text" value="<?php echo htmlentities($formTitle,ENT_QUOTES,'UTF-8') ?>" id="bfFormTitle"/>
		            			<br/><br/>
		            			<label class="bfPropertyLabel" for="bfFormName"><?php echo BFText::_('COM_BREEZINGFORMS_FORM_NAME'); ?></label>
		            			<input type="text" value="<?php echo htmlentities($formName,ENT_QUOTES,'UTF-8') ?>" id="bfFormName"/>
		            			<br/><br/>
		            			<label class="bfPropertyLabel" for="bfFormDescription"><?php echo BFText::_('COM_BREEZINGFORMS_FORM_DESC'); ?></label>
		            			<textarea id="bfFormDescription"><?php echo htmlentities($formDesc,ENT_QUOTES,'UTF-8') ?></textarea>
		            			<br/><br/>
			            		<label class="bfPropertyLabel" for="bfFormLastPageThankYou"><?php echo BFText::_('COM_BREEZINGFORMS_LAST_PAGE_THANK_YOU'); ?></label>
			            		<input type="checkbox" value="" id="bfFormLastPageThankYou"/>
		            			<br/><br/>
		            			<label class="bfPropertyLabel" for="bfFormMailNotification"><?php echo BFText::_('COM_BREEZINGFORMS_MAIL_NOTIFICATION'); ?></label>
		            			<input <?php echo $formEmailntf == 2 ? 'checked="checked"' : '' ?> type="checkbox" value="<?php echo htmlentities($formEmailntf,ENT_QUOTES,'UTF-8') ?>" id="bfFormMailNotification"/>
		            			<br/><br/>
		            			<label class="bfPropertyLabel" for="bfFormMailRecipient"><?php echo BFText::_('COM_BREEZINGFORMS_MAIL_RECIPIENT'); ?></label>
		            			<input type="text" value="<?php echo htmlentities($formEmailadr,ENT_QUOTES,'UTF-8') ?>" id="bfFormMailRecipient"/>
		            			<br/><br/>
		            			<label class="bfPropertyLabel" for="bfSubmitIncludeYes"><?php echo BFText::_('COM_BREEZINGFORMS_FORM_SUBMIT_INCLUDE'); ?></label>
		            			
			            			<input checked="checked" type="radio" name="bfSubmitInclude" value="" id="bfSubmitIncludeYes"/> <?php echo BFText::_('COM_BREEZINGFORMS_YES'); ?>
			            			<input type="radio" name="bfSubmitInclude" value="" id="bfSubmitIncludeNo"/> <?php echo BFText::_('COM_BREEZINGFORMS_NO'); ?>
		            			<br/><br/>
		            			<label class="bfPropertyLabel" for="bfFormSubmitLabel"><?php echo BFText::_('COM_BREEZINGFORMS_FORM_SUBMIT_LABEL'); ?></label>
		            			<input type="text" value="save" id="bfFormSubmitLabel"/>
		            			<br/><br/>
		            			<label class="bfPropertyLabel" for="bfPagingIncludeYes"><?php echo BFText::_('COM_BREEZINGFORMS_FORM_PAGING_INCLUDE'); ?></label>
		            			<input checked="checked" type="radio" name="bfPagingInclude" value="" id="bfPagingIncludeYes"/> <?php echo BFText::_('COM_BREEZINGFORMS_YES'); ?>
		            			<input type="radio" name="bfPagingInclude" value="" id="bfPagingIncludeNo"/> <?php echo BFText::_('COM_BREEZINGFORMS_NO'); ?>
		            			<br/><br/>
		            			<label class="bfPropertyLabel" for="bfFormPagingNextLabel"><?php echo BFText::_('COM_BREEZINGFORMS_FORM_PAGING_NEXT_LABEL'); ?></label>
		            			<input type="text" value="next" id="bfFormPagingNextLabel"/>
		            			<br/><br/>
		            			<label class="bfPropertyLabel" for="bfFormPagingPrevLabel"><?php echo BFText::_('COM_BREEZINGFORMS_FORM_PAGING_PREV_LABEL'); ?></label>
		            			<input type="text" value="back" id="bfFormPagingPrevLabel"/>
		            			<br/><br/>
		            			<label class="bfPropertyLabel" for="bfCancelIncludeYes"><?php echo BFText::_('COM_BREEZINGFORMS_FORM_CANCEL_INCLUDE'); ?></label>
		            			<input checked="checked" type="radio" name="bfCancelInclude" value="" id="bfCancelIncludeYes"/> <?php echo BFText::_('COM_BREEZINGFORMS_YES'); ?>
		            			<input type="radio" name="bfCancelInclude" value="" id="bfCancelIncludeNo"/> <?php echo BFText::_('COM_BREEZINGFORMS_NO'); ?>
		            			<br/><br/>
		            			<label class="bfPropertyLabel" for="bfFormCancelLabel"><?php echo BFText::_('COM_BREEZINGFORMS_FORM_CANCEL_LABEL'); ?></label>
		            			<input type="text" value="reset" id="bfFormCancelLabel"/>
		            		</fieldset>
		            	</div>
		            	<!-- FORM PROPERTIES END -->
		            	
		            	<!-- PAGE PROPERTIES BEGIN -->
		            	<div class="bfProperties" id="bfPageProperties" style="display:none">
		            		<br/>
		            		<fieldset>
		            		<legend><?php echo BFText::_('COM_BREEZINGFORMS_PAGE_PROPERTIES'); ?></legend>
		            		<label class="bfPropertyLabel" for="bfPageIntro"><?php echo BFText::_('COM_BREEZINGFORMS_PAGE_INTRO'); ?></label>
		            		<!-- <textarea id="bfPageIntro"></textarea>-->
		            		<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>
		            		</fieldset>
		            	</div>
		            	<!-- PAGE PROPERTIES END -->
		            	
		            	<!-- SECTION PROPERTIES BEGIN -->
		            	<div class="bfProperties" id="bfSectionProperties" style="display:none">
		            		<br/>
		            		<fieldset>
		            			<legend><?php echo BFText::_('COM_BREEZINGFORMS_SECTION_PROPERTIES'); ?></legend>
		            			<label class="bfPropertyLabel" for="bfSectionType"><?php echo BFText::_('COM_BREEZINGFORMS_SECTION_TYPE'); ?></label>
		            			<select id="bfSectionType">
		            				<option value="normal"><?php echo BFText::_('COM_BREEZINGFORMS_NORMAL'); ?></option>
		            				<option value="section"><?php echo BFText::_('COM_BREEZINGFORMS_FIELDSET'); ?></option>
		            			</select>
		            			<br/>
		            			<br/>
		            			<label class="bfPropertyLabel" for="bfSectionDisplayType"><?php echo BFText::_('COM_BREEZINGFORMS_SECTION_DISPLAY_TYPE'); ?></label>
		            			<select id="bfSectionDisplayType">
		            				<option value="inline"><?php echo BFText::_('COM_BREEZINGFORMS_INLINE'); ?></option>
		            				<option value="breaks"><?php echo BFText::_('COM_BREEZINGFORMS_BREAKS'); ?></option>
		            			</select>
		            			<br/>
		            			<br/>
		            			<label class="bfPropertyLabel" for="bfSectionTitle"><?php echo BFText::_('COM_BREEZINGFORMS_SECTION_TITLE'); ?></label>
		            			<input type="text" value="" id="bfSectionTitle"/>
		            			<br/>
		            			<br/>
		            			<label class="bfPropertyLabel" for="bfSectionName"><?php echo BFText::_('COM_BREEZINGFORMS_SECTION_NAME'); ?></label>
		            			<input type="text" value="" id="bfSectionName"/>
		            			<br/>
		            			<br/>
		            			<label class="bfPropertyLabel" for="bfSectionDescription"><?php echo BFText::_('COM_BREEZINGFORMS_SECTION_DESCRIPTION'); ?></label>
		            			<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>
		            		</fieldset>
		            	</div>
		            	<!-- SECTION PROPERTIES END -->
		            	
		            	<!-- ELEMENT PROPERTIES BEGIN -->
		            	<div class="bfProperties" id="bfElementProperties" style="display:none">
		            		<br/>
		            		<fieldset>
		            			<label class="bfPropertyLabel" for="bfElementType"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_TYPE'); ?></label>
		            			<select id="bfElementType">
		            				<option value=""><?php echo BFText::_('COM_BREEZINGFORMS_CHOOSE_ONE'); ?></option>
		            				<option value="bfElementTypeText"><?php echo BFText::_('COM_BREEZINGFORMS_TEXTFIELD'); ?></option>
		            				<option value="bfElementTypeTextarea"><?php echo BFText::_('COM_BREEZINGFORMS_TEXTAREA'); ?></option>
		            				<option value="bfElementTypeRadioGroup"><?php echo BFText::_('COM_BREEZINGFORMS_RADIO_GROUP'); ?></option>
		            				<option value="bfElementTypeCheckboxGroup"><?php echo BFText::_('COM_BREEZINGFORMS_CHECKBOX_GROUP'); ?></option>
		            				<option value="bfElementTypeCheckbox"><?php echo BFText::_('COM_BREEZINGFORMS_CHECKBOX'); ?></option>
		            				<option value="bfElementTypeSelect"><?php echo BFText::_('COM_BREEZINGFORMS_SELECT'); ?></option>
		            				<option value="bfElementTypeFile"><?php echo BFText::_('COM_BREEZINGFORMS_FILE'); ?></option>
		            				<option value="bfElementTypeSubmitButton"><?php echo BFText::_('COM_BREEZINGFORMS_SUBMIT_BUTTON'); ?></option>
		            				<option value="bfElementTypeHidden"><?php echo BFText::_('COM_BREEZINGFORMS_HIDDEN'); ?></option>
		            				<option value="bfElementTypeSummarize"><?php echo BFText::_('COM_BREEZINGFORMS_SUMMARIZE'); ?></option>
		            				<option value="bfElementTypeCaptcha"><?php echo BFText::_('COM_BREEZINGFORMS_CAPTCHA'); ?></option>
                                                        <option value="bfElementTypeReCaptcha"><?php echo BFText::_('COM_BREEZINGFORMS_ReCaptcha'); ?></option>
		            				<option value="bfElementTypeCalendar"><?php echo BFText::_('COM_BREEZINGFORMS_CALENDAR'); ?></option>
		            				<option value="bfElementTypePayPal"><?php echo BFText::_('COM_BREEZINGFORMS_PAYPAL'); ?></option>
		            				<option value="bfElementTypeSofortueberweisung"><?php echo BFText::_('COM_BREEZINGFORMS_SOFORTUEBERWEISUNG'); ?></option>
		            			</select>
		            			<br/>
		            			<br/>
		            			<legend><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_PROPERTIES'); ?></legend>
		            			<label class="bfPropertyLabel" for="bfElementLabel"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_LABEL'); ?></label>
		            			<input type="text" value="" id="bfElementLabel"/>
		            			<br/>
		            			<br/>
		            			<label class="bfPropertyLabel" for="bfElementName"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_NAME'); ?></label>
			            		<input type="text" value="" id="bfElementName"/>
			            		<!-- HIDDEN BEGIN -->
		            			<div class="bfElementTypeClass" id="bfElementTypeHidden" style="display:none">
		            				<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeHiddenValue"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_VALUE'); ?></label>
			            			<input type="text" value="" id="bfElementTypeHiddenValue"/>
		            			</div>
		            			<!-- HIDDEN END -->
		            			<!-- SUMMARIZE BEGIN -->
		            			<div class="bfElementTypeClass" id="bfElementTypeSummarize" style="display:none">
		            				<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeSummarizeConnectWith"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_SUMMARIZE_CONNECT_WITH'); ?></label>
			            			<select id="bfElementTypeSummarizeConnectWith">
		            					<option value=""><?php echo BFText::_('COM_BREEZINGFORMS_CHOOSE_ONE'); ?></option>
		            				</select>
		            				<br/>
		            				<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeSummarizeEmptyMessage"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_EMPTY_MESSAGE'); ?></label>
			            			<input type="text" value="" id="bfElementTypeSummarizeEmptyMessage"/>
			            			<br/>
			            			<br/>
		            				<label class="bfPropertyLabel" for="bfElementTypeSummarizeHideIfEmpty"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HIDE_EMPTY'); ?></label>
				            		<input type="checkbox" value="" id="bfElementTypeSummarizeHideIfEmpty"/>
		            				<br/>
			            			<br/>
		            				<label class="bfPropertyLabel" for="bfElementTypeSummarizeUseElementLabel"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_USE_LABEL'); ?></label>
				            		<input type="checkbox" value="" id="bfElementTypeSummarizeUseElementLabel"/>
		            			</div>
		            			<!-- SUMMARIZE END -->
			            		<!-- TEXTFIELD BEGIN -->
		            			<div class="bfElementTypeClass" id="bfElementTypeText" style="display:none">
		            				<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeTextValue"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_VALUE'); ?></label>
			            			<input type="text" value="" id="bfElementTypeTextValue"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeTextSize"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_SIZE'); ?></label>
			            			<input type="text" value="" id="bfElementTypeTextSize"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeTextMaxLength"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_MAX_LENGTH'); ?></label>
			            			<input type="text" value="" id="bfElementTypeTextMaxLength"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeTextHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
			            			<textarea id="bfElementTypeTextHint"></textarea>
		            			</div>
		            			<!-- TEXTFIELD END -->
		            			<!-- TEXTAREA BEGIN -->
		            			<div class="bfElementTypeClass" id="bfElementTypeTextarea" style="display:none">
		            				<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeTextareaValue"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_VALUE'); ?></label>
			            			<textarea id="bfElementTypeTextareaValue"></textarea>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeTextareaWidth"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_WIDTH'); ?></label>
			            			<input type="text" value="" id="bfElementTypeTextareaWidth"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeTextareaHeight"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HEIGHT'); ?></label>
			            			<input type="text" value="" id="bfElementTypeTextareaHeight"/>
			            			<br/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeTextareaMaxLength"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_MAX_LENGTH'); ?></label>
			            			<input type="text" value="" id="bfElementTypeTextareaMaxLength"/>
			            			<br/>
				            		<br/>
				            		<label class="bfPropertyLabel" for=bfElementTypeTextareaMaxLengthShow><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_MAX_LENGTH_SHOW'); ?></label>
				            		<input type="checkbox" value="" id="bfElementTypeTextareaMaxLengthShow"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeTextareaHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
			            			<textarea id="bfElementTypeTextareaHint"></textarea>
		            			</div>
		            			<!-- TEXTAREA END -->
		            			<!-- RADIOGROUP BEGIN -->
		            			<div class="bfElementTypeClass" id="bfElementTypeRadioGroup" style="display:none">
		            				<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeRadioGroupGroups"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_GROUP'); ?></label>
			            			<textarea id="bfElementTypeRadioGroupGroups"></textarea>
				            		<br/>
				            		<br/>
				            		<label class="bfPropertyLabel" for="bfElementTypeRadioGroupReadonly"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_READONLY'); ?></label>
				            		<input type="checkbox" value="" id="bfElementTypeRadioGroupReadonly"/>
				            		<br/>
				            		<br/>
				            		<label class="bfPropertyLabel" for="bfElementTypeRadioGroupWrap"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_WRAP'); ?></label>
				            		<input type="checkbox" value="" id="bfElementTypeRadioGroupWrap"/>
				            		<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeRadioGroupHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
			            			<textarea id="bfElementTypeRadioGroupHint"></textarea>
		            			</div>
		            			<!-- RADIOGROUP END -->
		            			<!-- SUBMITBUTTON BEGIN -->
		            			<div class="bfElementTypeClass" id="bfElementTypeSubmitButton" style="display:none">
		            				<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeSubmitButtonValue"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_VALUE'); ?></label>
			            			<input type="text" value="" id="bfElementTypeSubmitButtonValue"/>
				            		<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeSubmitButtonHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
			            			<textarea id="bfElementTypeSubmitButtonHint"></textarea>
		            			</div>
		            			<!-- SUBMITBUTTON END -->
								<!-- PAYPAL BEGIN -->
		            			<div class="bfElementTypeClass" id="bfElementTypePayPal" style="display:none">
		            				<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypePayPalBusiness"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_BUSINESS'); ?></label>
			            			<input type="text" value="" id="bfElementTypePayPalBusiness"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypePayPalToken"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_TOKEN'); ?></label>
			            			<input type="text" value="" id="bfElementTypePayPalToken"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypePayPalItemname"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_ITEMNAME'); ?></label>
			            			<input type="text" value="" id="bfElementTypePayPalItemname"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypePayPalItemnumber"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_ITEMNUMBER'); ?></label>
			            			<input type="text" value="" id="bfElementTypePayPalItemnumber"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypePayPalAmount"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_AMOUNT'); ?></label>
			            			<input type="text" value="" id="bfElementTypePayPalAmount"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypePayPalTax"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_TAX'); ?></label>
			            			<input type="text" value="" id="bfElementTypePayPalTax"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypePayPalThankYouPage"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_THANKYOU_PAGE'); ?></label>
			            			<input type="text" value="" id="bfElementTypePayPalThankYouPage"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypePayPalLocale"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_LOCALE'); ?></label>
			            			<input type="text" value="" id="bfElementTypePayPalLocale"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypePayPalCurrencyCode"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_CURRENCY_CODE'); ?></label>
			            			<input type="text" value="" id="bfElementTypePayPalCurrencyCode"/>
			            			<br/>
				            		<br/>
				            		<label class="bfPropertyLabel" for=bfElementTypePayPalSendNotificationAfterPayment><?php echo BFText::_('COM_BREEZINGFORMS_NOTIFICATION_AFTER_PAYMENT'); ?></label>
				            		<input type="checkbox" value="" id="bfElementTypePayPalSendNotificationAfterPayment"/>
			            			
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypePayPalHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
			            			<textarea id="bfElementTypePayPalHint"></textarea>
			            			
			            			
		            			</div>
		            			<!-- PAYPAL END -->
								<!-- SOFORTUEBERWEISUNG BEGIN -->
		            			<div class="bfElementTypeClass" id="bfElementTypeSofortueberweisung" style="display:none">
		            				<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeSofortueberweisungUserId"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_USERID'); ?></label>
			            			<input type="text" value="" id="bfElementTypeSofortueberweisungUserId"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeSofortueberweisungProjectId"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_PROJECTID'); ?></label>
			            			<input type="text" value="" id="bfElementTypeSofortueberweisungProjectId"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeSofortueberweisungProjectPassword"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_PROJECT_PASSWORD'); ?></label>
			            			<input type="password" value="" id="bfElementTypeSofortueberweisungProjectPassword"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeSofortueberweisungReason1"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_REASON1'); ?></label>
			            			<input type="text" value="" id="bfElementTypeSofortueberweisungReason1"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeSofortueberweisungReason2"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_REASON2'); ?></label>
			            			<input type="text" value="" id="bfElementTypeSofortueberweisungReason2"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeSofortueberweisungAmount"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_AMOUNT'); ?></label>
			            			<input type="text" value="" id="bfElementTypeSofortueberweisungAmount"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeSofortueberweisungThankYouPage"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_THANKYOU_PAGE'); ?></label>
			            			<input type="text" value="" id="bfElementTypeSofortueberweisungThankYouPage"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeSofortueberweisungLanguageId"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_LANGUAGE_ID'); ?></label>
			            			<input type="text" value="" id="bfElementTypeSofortueberweisungLanguageId"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeSofortueberweisungCurrencyId"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_CURRENCY_ID'); ?></label>
			            			<input type="text" value="" id="bfElementTypeSofortueberweisungCurrencyId"/>
			            			<br/>
				            		<br/>
				            		<label class="bfPropertyLabel" for=bfElementTypeSofortueberweisungMailback><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_MAILBACK'); ?></label>
				            		<input type="checkbox" value="" id="bfElementTypeSofortueberweisungMailback"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeSofortueberweisungHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
			            			<textarea id="bfElementTypeSofortueberweisungHint"></textarea>
		            			</div>
		            			<!-- SOFORTUEBERWEISUNG END -->
		            			<!-- CAPTCHA BEGIN -->
		            			<div class="bfElementTypeClass" id="bfElementTypeCaptcha" style="display:none">
		            				<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeCaptchaHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
			            			<textarea id="bfElementTypeCaptchaHint"></textarea>
		            			</div>
		            			<!-- CAPTCHA END -->
                                                <!-- RECAPTCHA BEGIN -->
		            			<div class="bfElementTypeClass" id="bfElementTypeReCaptcha" style="display:none">
		            				<br/>

                                                        <label class="bfPropertyLabel" for=bfElementTypeReCaptchaPubkey><?php echo BFText::_('COM_BREEZINGFORMS_PUBLIC_KEY'); ?></label>
				            		<input type="text" value="" id="bfElementTypeReCaptchaPubkey"/>
                                                        <br/>
		            				<br/>
                                                        <label class="bfPropertyLabel" for=bfElementTypeReCaptchaPrivkey><?php echo BFText::_('COM_BREEZINGFORMS_PRIVATE_KEY'); ?></label>
				            		<input type="text" value="" id="bfElementTypeReCaptchaPrivkey"/>
                                                        <br/>
		            				<br/>
                                                        <label class="bfPropertyLabel" for=bfElementTypeReCaptchaTheme><?php echo BFText::_('COM_BREEZINGFORMS_Theme'); ?></label>
				            		<input type="text" value="red" id="bfElementTypeReCaptchaTheme"/> ('red', 'white', 'blackglass', 'clean', 'custom')
                                                        <br/>
		            				<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeReCaptchaHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
			            			<textarea id="bfElementTypeReCaptchaHint"></textarea>
		            			</div>
		            			<!-- RECAPTCHA END -->
		            			<!-- CALENDAR BEGIN -->
		            			<div class="bfElementTypeClass" id="bfElementTypeCalendar" style="display:none">
		            				<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeCalendarFormat"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_FORMAT'); ?></label>
			            			<input type="text" value="" id="bfElementTypeCalendarFormat"/>
		            				<br/>
		            				<br/>
		            				<label class="bfPropertyLabel" for="bfElementTypeCalendarValue"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_VALUE'); ?></label>
			            			<input type="text" value="" id="bfElementTypeCalendarValue"/>
			            			<br/>
		            				<br/>
		            				<label class="bfPropertyLabel" for="bfElementTypeCalendarSize"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_SIZE'); ?></label>
			            			<input type="text" value="" id="bfElementTypeCalendarSize"/>
			            			<br/>
		            				<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeCalendarHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
			            			<textarea id="bfElementTypeCalendarHint"></textarea>
		            			</div>
		            			<!-- CALENDAR END -->
		            			<!-- CHECKBOXGROUP BEGIN -->
		            			<div class="bfElementTypeClass" id="bfElementTypeCheckboxGroup" style="display:none">
		            				<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeCheckboxGroupGroups"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_GROUP'); ?></label>
			            			<textarea id="bfElementTypeCheckboxGroupGroups"></textarea>
				            		<br/>
				            		<br/>
				            		<label class="bfPropertyLabel" for="bfElementTypeCheckboxGroupReadonly"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_READONLY'); ?></label>
				            		<input type="checkbox" value="" id="bfElementTypeCheckboxGroupReadonly"/>
				            		<br/>
				            		<br/>
				            		<label class="bfPropertyLabel" for="bfElementTypeCheckboxGroupWrap"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_WRAP'); ?></label>
				            		<input type="checkbox" value="" id="bfElementTypeCheckboxGroupWrap"/>
				            		<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeCheckboxGroupHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
			            			<textarea id="bfElementTypeCheckboxGroupHint"></textarea>
		            			</div>
		            			<!-- CHECKBOXGROUP END -->
		            			<!-- CHECKBOX BEGIN -->
		            			<div class="bfElementTypeClass" id="bfElementTypeCheckbox" style="display:none">
		            				<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeCheckboxValue"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_VALUE'); ?></label>
			            			<textarea id="bfElementTypeCheckboxValue"></textarea>
			            			<br/>
				            		<br/>
				            		<label class="bfPropertyLabel" for="bfElementTypeCheckboxChecked"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_CHECKED'); ?></label>
				            		<input type="checkbox" value="" id="bfElementTypeCheckboxChecked"/>
				            		<br/>
				            		<br/>
				            		<label class="bfPropertyLabel" for="bfElementTypeCheckboxReadonly"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_READONLY'); ?></label>
				            		<input type="checkbox" value="" id="bfElementTypeCheckboxReadonly"/>
				            		<br/>
				            		<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeCheckboxHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
			            			<textarea id="bfElementTypeCheckboxHint"></textarea>
		            			</div>
		            			<!-- CHECKBOX END -->
		            			<!-- SELECT BEGIN -->
		            			<div class="bfElementTypeClass" id="bfElementTypeSelect" style="display:none">
		            				<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeSelectList"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_LIST'); ?></label>
			            			<textarea id="bfElementTypeSelectList"></textarea>
			            			<br/>
				            		<br/>
				            		<label class="bfPropertyLabel" for="bfElementTypeSelectMultiple"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_MULTIPLE'); ?></label>
				            		<input type="checkbox" value="" id="bfElementTypeSelectMultiple"/>
				            		<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeSelectListWidth"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_WIDTH'); ?></label>
			            			<input type="text" value="" id="bfElementTypeSelectListWidth"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeSelectListHeight"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HEIGHT'); ?></label>
			            			<input type="text" value="" id="bfElementTypeSelectListHeight"/>
				            		<br/>
				            		<br/>
				            		<label class="bfPropertyLabel" for="bfElementTypeSelectReadonly"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_READONLY'); ?></label>
				            		<input type="checkbox" value="" id="bfElementTypeSelectReadonly"/>
				            		<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeSelectHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
			            			<textarea id="bfElementTypeSelectHint"></textarea>
		            			</div>
		            			<!-- SELECT END -->
		            			<!-- FILE BEGIN -->
		            			<div class="bfElementTypeClass" id="bfElementTypeFile" style="display:none">
		            				<br/>
				            		<label class="bfPropertyLabel" for="bfElementTypeFileReadonly"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_READONLY'); ?></label>
				            		<input type="checkbox" value="" id="bfElementTypeFileReadonly"/>
				            		<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTypeFileHint"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_HINT'); ?></label>
			            			<textarea id="bfElementTypeFileHint"></textarea>
		            			</div>
		            			<!-- FILE END -->
		            		</fieldset>
		            		<fieldset id="bfValidationScript" style="display:none">
		            			<legend><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_VALIDATION'); ?></legend>
		            			<span id="bfElementValidationRequiredSet" style="display:none">
			            			<label class="bfPropertyLabel" for="bfElementValidationRequired"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_VALIDATION_REQUIRED'); ?></label>
				            		<input type="checkbox" value="" id="bfElementValidationRequired"/>
				            		<br/>
				            		<br/>
			            		</span>
		            			<label class="bfPropertyLabel" for="bfElementValidation"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_VALIDATION_LABEL'); ?></label>
		            			<div>
								
									<?php echo BFText::_('COM_BREEZINGFORMS_TYPE') ?>:
									<?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"/>
									<?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"/>
									<?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"/>
									
									<div id="bfValidationScriptFlags" style="display:none">
										<hr/>
										<?php echo BFText::_('COM_BREEZINGFORMS_ERROR_MESSAGE') ?>: <input type="text" style="width:100%" maxlength="255" class="bfValidationMessage" id="bfValidationMessage" name="bfValidationMessage" value="" class="inputbox"/>
									</div>
									
									<div id="bfValidationScriptLibrary" style="display:none">
										<hr/>
										<?php echo BFText::_('COM_BREEZINGFORMS_SCRIPT') ?>: <select id="bfValidationScriptSelection"></select>
										<br/>
										<br/>
										<div id="bfValidationScriptSelectionDescription"></div>
									</div>
									
									<div id="bfValidationScriptCustom" style="display:none">
										<hr/>
										<div style="cursor: pointer;" onclick="createValidationCode()"><?php echo BFText::_('COM_BREEZINGFORMS_CREATE_CODE_FRAMEWORK') ?></div>
										<textarea name="bfValidationCode" id="bfValidationCode" rows="10" style="width:100%" wrap="off"></textarea>
									</div>
								</div>
		            		</fieldset>
		            	</div>
		            	<!-- ELEMENT PROPERTIES END -->
		            	<div class="bfFadingMessage" style="display:none"></div>
		            	<input type="submit" value="<?php echo BFText::_('COM_BREEZINGFORMS_PROPERTIES_SAVE'); ?>" id="bfPropertySaveButton"/>
		            </div>
	            </div>
	            
	            <div id="fragment-2">
	            	<div>
	            		<div class="bfFadingMessage" style="display:none"></div>
			            <input type="submit" value="<?php echo BFText::_('COM_BREEZINGFORMS_PROPERTIES_SAVE'); ?>" id="bfAdvancedSaveButtonTop"/>
			            <div class="bfAdvanced" id="bfPageAdvanced" style="display:none">
		            	</div>
		            	<div class="bfAdvanced" id="bfFormAdvanced" style="display:none">
		            		<br/>
			            	<fieldset>
			            		<legend><?php echo BFText::_('COM_BREEZINGFORMS_ADVANCED_FORM_OPTIONS'); ?></legend>
			            		<?php if($formId != 0){ ?>
			            		<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: 820, y: 400}}"><?php echo htmlentities( BFText::_('COM_BREEZINGFORMS_MORE_OPTIONS'), ENT_QUOTES, 'UTF-8') ?></a>
			            		<?php } ?>
			            	</fieldset>
			            	<fieldset>
			            		<legend><?php echo BFText::_('COM_BREEZINGFORMS_ADVANCED_FORM_OTHER'); ?></legend>
			            		<label class="bfPropertyLabel" for="bfTheme"><?php echo BFText::_('COM_BREEZINGFORMS_THEME'); ?></label>
			            		<select id="bfTheme">
			            		<?php
								$tCount = count($themes);
								for($i = 0; $i < $tCount; $i++){
									echo '<option value="'.$themes[$i].'">'.$themes[$i].'</option>'."\n";
								}
			            		?>
			            		</select>
			            		<br/>
			            		<br/>
			            		<label class="bfPropertyLabel" for="bfElementAdvancedUseErrorAlerts"><?php echo BFText::_('COM_BREEZINGFORMS_USE_ERROR_ALERTS'); ?></label>
			            		<input type="checkbox" value="" id="bfElementAdvancedUseErrorAlerts"/>
                                                <br/>
			            		<br/>
                                                <label class="bfPropertyLabel" for="bfElementAdvancedUseDefaultErrors"><?php echo BFText::_('COM_BREEZINGFORMS_IF_NOT_USE_ERROR_ALERTS'); ?></label>
			            		<?php echo BFText::_('COM_BREEZINGFORMS_IF_USE_DEFAULT_ERRROS'); ?> <input type="checkbox" value="" id="bfElementAdvancedUseDefaultErrors"/>
                                                <?php echo BFText::_('COM_BREEZINGFORMS_IF_USE_BALLOON_ERRORS'); ?> <input type="checkbox" value="" id="bfElementAdvancedUseBalloonErrors"/>
			            		<br/>
			            		<br/>
			            		<label class="bfPropertyLabel" for="bfElementAdvancedFadeIn"><?php echo BFText::_('COM_BREEZINGFORMS_FADE_IN'); ?></label>
			            		<input type="checkbox" value="" id="bfElementAdvancedFadeIn"/>
			            		<br/>
			            		<br/>
			            		<label class="bfPropertyLabel" for="bfElementAdvancedRollover"><?php echo BFText::_('COM_BREEZINGFORMS_ROLLOVER'); ?></label>
			            		<input type="checkbox" value="" id="bfElementAdvancedRollover"/>
			            		<br/>
			            		<br/>
			            		<label class="bfPropertyLabel" for="bfElementAdvancedRolloverColor"><?php echo BFText::_('COM_BREEZINGFORMS_ROLLOVER_COLOR'); ?></label>
			            		<input type="text" value="" id="bfElementAdvancedRolloverColor"/>
			            		<br/>
		            			<br/>
		            			<label class="bfPropertyLabel" for="bfElementAdvancedToggleFields"><?php echo BFText::_('COM_BREEZINGFORMS_FORM_TOGGLEFIELDS'); ?></label>
		            			<textarea id="bfElementAdvancedToggleFields"></textarea>
			            	</fieldset>
			            </div>
			            <div class="bfAdvanced" id="bfSectionAdvanced" style="display:none">
			            	<br/>
			            	<label class="bfPropertyLabel" for="bfSectionAdvancedTurnOff"><?php echo BFText::_('COM_BREEZINGFORMS_TURN_OFF_INITIALLY'); ?></label>
			            	<input type="checkbox" value="" id="bfSectionAdvancedTurnOff"/>
			            </div>
			            <div class="bfAdvanced" id="bfElementAdvanced" style="display:none">
			            	<br/>
			            	<fieldset>
			            		<legend><?php echo BFText::_('COM_BREEZINGFORMS_ADVANCED_ELEMENT_OPTIONS'); ?></legend>
			            		<!-- HIDDEN BEGIN -->
			            		<div class="bfElementTypeClass" id="bfElementTypeHiddenAdvanced" style="display:none">
			            			<label class="bfPropertyLabel" for="bfElementHiddenAdvancedOrderNumber"><?php echo BFText::_('COM_BREEZINGFORMS_ORDER_NUMBER'); ?></label>
			            			<input type="text" value="" id="bfElementHiddenAdvancedOrderNumber"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementHiddenAdvancedLogging"><?php echo BFText::_('COM_BREEZINGFORMS_LOGGING'); ?></label>
			            			<input type="checkbox" value="" id="bfElementHiddenAdvancedLogging"/>
			            		</div>
			            		<!-- HIDDEN END -->
			            		<!--  SUMMARIZE BEGIN -->
			            		<div class="bfElementTypeClass" id="bfElementTypeSummarizeAdvanced" style="display:none">
			            			<label class="bfPropertyLabel" for="bfElementAdvancedSummarizeCalc"><?php echo BFText::_('COM_BREEZINGFORMS_ELEMENT_CALC'); ?></label>
			            			<textarea id="bfElementAdvancedSummarizeCalc"></textarea>
			            		</div>
			            		<!--  SUMMARIZE END -->
			            		<!-- TEXTFIELD BEGIN -->
			            		<div class="bfElementTypeClass" id="bfElementTypeTextAdvanced" style="display:none">
				            		<label class="bfPropertyLabel" for="bfElementAdvancedPassword"><?php echo BFText::_('COM_BREEZINGFORMS_PASSWORD'); ?></label>
			            			<input type="checkbox" value="" id="bfElementAdvancedPassword"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementAdvancedReadOnly"><?php echo BFText::_('COM_BREEZINGFORMS_READONLY'); ?></label>
			            			<input type="checkbox" value="" id="bfElementAdvancedReadOnly"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementAdvancedMailback"><?php echo BFText::_('COM_BREEZINGFORMS_MAILBACK'); ?></label>
			            			<input type="checkbox" value="" id="bfElementAdvancedMailback"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementAdvancedMailbackAsSender"><?php echo BFText::_('COM_BREEZINGFORMS_MAILBACK_AS_SENDER'); ?></label>
			            			<input type="checkbox" value="" id="bfElementAdvancedMailbackAsSender"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementAdvancedMailbackfile"><?php echo BFText::_('COM_BREEZINGFORMS_MAILBACKFILE'); ?></label>
			            			<input type="text" value="" id="bfElementAdvancedMailbackfile"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementAdvancedHideLabel"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementAdvancedLogging"><?php echo BFText::_('COM_BREEZINGFORMS_LOGGING'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementAdvancedLogging"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementOrderNumber"><?php echo BFText::_('COM_BREEZINGFORMS_ORDER_NUMBER'); ?></label>
			            			<input type="text" value="" id="bfElementOrderNumber"/>
			            		</div>
			            		<!-- TEXTFIELD END -->
			            		<!-- TEXTAREA BEGIN -->
			            		<div class="bfElementTypeClass" id="bfElementTypeTextareaAdvanced" style="display:none">
			            			<label class="bfPropertyLabel" for="bfElementTextareaAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementTextareaAdvancedHideLabel"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTextareaAdvancedLogging"><?php echo BFText::_('COM_BREEZINGFORMS_LOGGING'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementTextareaAdvancedLogging"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementTextareaAdvancedOrderNumber"><?php echo BFText::_('COM_BREEZINGFORMS_ORDER_NUMBER'); ?></label>
			            			<input type="text" value="" id="bfElementTextareaAdvancedOrderNumber"/>
			            		</div>
			            		<!-- TEXTAREA END -->
			            		<!-- RADIOGROUP BEGIN -->
			            		<div class="bfElementTypeClass" id="bfElementTypeRadioGroupAdvanced" style="display:none">
			            			<label class="bfPropertyLabel" for="bfElementRadioGroupAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementRadioGroupAdvancedHideLabel"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementRadioGroupAdvancedLogging"><?php echo BFText::_('COM_BREEZINGFORMS_LOGGING'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementRadioGroupAdvancedLogging"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementRadioGroupAdvancedOrderNumber"><?php echo BFText::_('COM_BREEZINGFORMS_ORDER_NUMBER'); ?></label>
			            			<input type="text" value="" id="bfElementRadioGroupAdvancedOrderNumber"/>
			            		</div>
			            		<!-- RADIOGROUP END -->
			            		<!-- SUBMITBUTTON BEGIN -->
			            		<div class="bfElementTypeClass" id="bfElementTypeSubmitButtonAdvanced" style="display:none">
			            			<label class="bfPropertyLabel" for="bfElementSubmitButtonAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementSubmitButtonAdvancedHideLabel"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementSubmitButtonAdvancedSrc"><?php echo BFText::_('COM_BREEZINGFORMS_SOURCE'); ?></label>
			            			<input type="text" value="" id="bfElementSubmitButtonAdvancedSrc"/>
			            		</div>
			            		<!-- SUBMITBUTTON END -->
								<!-- PAYPAL BEGIN -->
			            		<div class="bfElementTypeClass" id="bfElementTypePayPalAdvanced" style="display:none">
                                                        <label class="bfPropertyLabel" for="bfElementPayPalAdvancedUseIpn"><?php echo BFText::_('COM_BREEZINGFORMS_USE_IPN'); ?></label>
			            			<input type="checkbox" value="" id="bfElementPayPalAdvancedUseIpn"/><?php echo BFText::_('COM_BREEZINGFORMS_USE_IPN_DESCRIPTION'); ?>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementPayPalAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementPayPalAdvancedHideLabel"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementPayPalAdvancedImage"><?php echo BFText::_('COM_BREEZINGFORMS_IMAGE'); ?></label>
			            			<input type="text" value="" id="bfElementPayPalAdvancedImage"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementPayPalAdvancedTestaccount"><?php echo BFText::_('COM_BREEZINGFORMS_TESTACCOUNT'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementPayPalAdvancedTestaccount"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementPayPalAdvancedTestBusiness"><?php echo BFText::_('COM_BREEZINGFORMS_TESTBUSINESS'); ?></label>
			            			<input type="text" value="" id="bfElementPayPalAdvancedTestBusiness"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementPayPalAdvancedTestToken"><?php echo BFText::_('COM_BREEZINGFORMS_TESTTOKEN'); ?></label>
			            			<input type="text" value="" id="bfElementPayPalAdvancedTestToken"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementPayPalAdvancedDownloadableFile"><?php echo BFText::_('COM_BREEZINGFORMS_DOWNLOADABLE_FILE'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementPayPalAdvancedDownloadableFile"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementPayPalAdvancedFilepath"><?php echo BFText::_('COM_BREEZINGFORMS_FILEPATH'); ?></label>
			            			<input type="text" value="" id="bfElementPayPalAdvancedFilepath"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementPayPalAdvancedDownloadTries"><?php echo BFText::_('COM_BREEZINGFORMS_DOWNLOAD_TRIES'); ?></label>
			            			<input type="text" value="" id="bfElementPayPalAdvancedDownloadTries"/>
			            		</div>
			            		<!-- PAYPAL END -->
								<!-- SOFORTUEBERWEISUNG BEGIN -->
			            		<div class="bfElementTypeClass" id="bfElementTypeSofortueberweisungAdvanced" style="display:none">
			            			<label class="bfPropertyLabel" for="bfElementSofortueberweisungAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementSofortueberweisungAdvancedHideLabel"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementSofortueberweisungAdvancedImage"><?php echo BFText::_('COM_BREEZINGFORMS_IMAGE'); ?></label>
			            			<input type="text" value="" id="bfElementSofortueberweisungAdvancedImage"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementSofortueberweisungAdvancedDownloadableFile"><?php echo BFText::_('COM_BREEZINGFORMS_DOWNLOADABLE_FILE'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementSofortueberweisungAdvancedDownloadableFile"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementSofortueberweisungAdvancedFilepath"><?php echo BFText::_('COM_BREEZINGFORMS_FILEPATH'); ?></label>
			            			<input type="text" value="" id="bfElementSofortueberweisungAdvancedFilepath"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementSofortueberweisungAdvancedDownloadTries"><?php echo BFText::_('COM_BREEZINGFORMS_DOWNLOAD_TRIES'); ?></label>
			            			<input type="text" value="" id="bfElementSofortueberweisungAdvancedDownloadTries"/>
			            		</div>
			            		<!-- SOFORTUEBERWEISUNG END -->
			            		<!-- CAPTCHA BEGIN -->
			            		<div class="bfElementTypeClass" id="bfElementTypeCaptchaAdvanced" style="display:none">
			            			<label class="bfPropertyLabel" for="bfElementCaptchaAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementCaptchaAdvancedHideLabel"/>
			            		</div>
			            		<!-- CAPTCHA END -->
                                                <!-- RECAPTCHA BEGIN -->
			            		<div class="bfElementTypeClass" id="bfElementTypeReCaptchaAdvanced" style="display:none">
			            			<label class="bfPropertyLabel" for="bfElementReCaptchaAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementReCaptchaAdvancedHideLabel"/>
			            		</div>
			            		<!-- RECAPTCHA END -->
			            		<!-- CALENDAR BEGIN -->
			            		<div class="bfElementTypeClass" id="bfElementTypeCalendarAdvanced" style="display:none">
			            			<label class="bfPropertyLabel" for="bfElementCalendarAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementCalendarAdvancedHideLabel"/>
			            		</div>
			            		<!-- CALENDAR END -->
			            		<!-- CHECKBOXGROUP BEGIN -->
			            		<div class="bfElementTypeClass" id="bfElementTypeCheckboxGroupAdvanced" style="display:none">
			            			<label class="bfPropertyLabel" for="bfElementCheckboxGroupAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementCheckboxGroupAdvancedHideLabel"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementCheckboxGroupAdvancedLogging"><?php echo BFText::_('COM_BREEZINGFORMS_LOGGING'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementCheckboxGroupAdvancedLogging"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementCheckboxGroupAdvancedOrderNumber"><?php echo BFText::_('COM_BREEZINGFORMS_ORDER_NUMBER'); ?></label>
			            			<input type="text" value="" id="bfElementCheckboxGroupAdvancedOrderNumber"/>
			            		</div>
			            		<!-- CHECKBOXGROUP END -->
			            		<!-- CHECKBOX BEGIN -->
			            		<div class="bfElementTypeClass" id="bfElementTypeCheckboxAdvanced" style="display:none">
			            			<label class="bfPropertyLabel" for="bfElementCheckboxAdvancedMailbackAccept"><?php echo BFText::_('COM_BREEZINGFORMS_MAILBACK_ACCEPT'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementCheckboxAdvancedMailbackAccept"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementCheckboxAdvancedMailbackConnectWith"><?php echo BFText::_('COM_BREEZINGFORMS_MAILBACK_CONNECT_WITH'); ?></label>
			            			<input type="text" value="" id="bfElementCheckboxAdvancedMailbackConnectWith"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementCheckboxAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementCheckboxAdvancedHideLabel"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementCheckboxAdvancedLogging"><?php echo BFText::_('COM_BREEZINGFORMS_LOGGING'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementCheckboxAdvancedLogging"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementCheckboxAdvancedOrderNumber"><?php echo BFText::_('COM_BREEZINGFORMS_ORDER_NUMBER'); ?></label>
			            			<input type="text" value="" id="bfElementCheckboxAdvancedOrderNumber"/>
			            		</div>
			            		<!-- CHECKBOX END -->
			            		<!-- CHECKBOXGROUP BEGIN -->
			            		<div class="bfElementTypeClass" id="bfElementTypeSelectAdvanced" style="display:none">
			            			<label class="bfPropertyLabel" for="bfElementSelectAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementSelectAdvancedHideLabel"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementSelectAdvancedMailback"><?php echo BFText::_('COM_BREEZINGFORMS_MAILBACK'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementSelectAdvancedMailback"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementSelectAdvancedLogging"><?php echo BFText::_('COM_BREEZINGFORMS_LOGGING'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementSelectAdvancedLogging"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementSelectAdvancedOrderNumber"><?php echo BFText::_('COM_BREEZINGFORMS_ORDER_NUMBER'); ?></label>
			            			<input type="text" value="" id="bfElementSelectAdvancedOrderNumber"/>
			            		</div>
			            		<!-- CHECKBOXGROUP END -->
								<!-- FILE BEGIN -->
			            		<div class="bfElementTypeClass" id="bfElementTypeFileAdvanced" style="display:none">
			            			<label class="bfPropertyLabel" for="bfElementFileAdvancedFlashUploader"><?php echo BFText::_('COM_BREEZINGFORMS_FLASH_UPLOADER'); ?></label>
			            			<input type="checkbox" value="" id="bfElementFileAdvancedFlashUploader"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementFileAdvancedFlashUploaderMulti"><?php echo BFText::_('COM_BREEZINGFORMS_FLASH_UPLOADER_MULTI'); ?></label>
			            			<input type="checkbox" value="" id="bfElementFileAdvancedFlashUploaderMulti"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementFileAdvancedFlashUploaderBytes"><?php echo BFText::_('COM_BREEZINGFORMS_FLASH_UPLOADER_BYTES'); ?></label>
			            			<input type="text" value="" id="bfElementFileAdvancedFlashUploaderBytes"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementFileAdvancedFlashUploaderWidth"><?php echo BFText::_('COM_BREEZINGFORMS_FLASH_UPLOADER_WIDTH'); ?></label>
			            			<input type="text" value="" id="bfElementFileAdvancedFlashUploaderWidth"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementFileAdvancedFlashUploaderHeight"><?php echo BFText::_('COM_BREEZINGFORMS_FLASH_UPLOADER_HEIGHT'); ?></label>
			            			<input type="text" value="" id="bfElementFileAdvancedFlashUploaderHeight"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementFileAdvancedFlashUploaderTransparent"><?php echo BFText::_('COM_BREEZINGFORMS_FLASH_UPLOADER_TRANSPARENT'); ?></label>
			            			<input type="checkbox" value="" id="bfElementFileAdvancedFlashUploaderTransparent"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementFileAdvancedUploadDirectory"><?php echo BFText::_('COM_BREEZINGFORMS_UPLOAD_DIRECTORY'); ?></label>
			            			<input type="text" value="" id="bfElementFileAdvancedUploadDirectory"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementFileAdvancedTimestamp"><?php echo BFText::_('COM_BREEZINGFORMS_TIMESTAMP'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementFileAdvancedTimestamp"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementFileAdvancedAllowedFileExtensions"><?php echo BFText::_('COM_BREEZINGFORMS_ALLOWED_FILE_EXTENSIONS'); ?></label>
			            			<input type="text" value="" id="bfElementFileAdvancedAllowedFileExtensions"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementFileAdvancedAttachToUserMail"><?php echo BFText::_('COM_BREEZINGFORMS_ATTACH_TO_USERMAIL'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementFileAdvancedAttachToUserMail"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementFileAdvancedAttachToAdminMail"><?php echo BFText::_('COM_BREEZINGFORMS_ATTACH_TO_ADMINMAIL'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementFileAdvancedAttachToAdminMail"/>
			            			<br/>
			            			<br/>
                                                        <label class="bfPropertyLabel" for="bfElementFileAdvancedUseUrl"><?php echo BFText::_('COM_BREEZINGFORMS_USE_URL'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementFileAdvancedUseUrl"/>
			            			<br/>
			            			<br/>
                                                        <label class="bfPropertyLabel" for="bfElementFileAdvancedUseUrlDownloadDirectory"><?php echo BFText::_('COM_BREEZINGFORMS_USE_URL_DOWNLOAD_DIRECTORY'); ?></label>
			            			<input type="text" value="" id="bfElementFileAdvancedUseUrlDownloadDirectory"/> <?php echo BFText::_('COM_BREEZINGFORMS_USE_URL_DOWNLOAD_DIRECTORY_SET_SYNCH'); ?>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementFileAdvancedHideLabel"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_LABEL'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementFileAdvancedHideLabel"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementFileAdvancedLogging"><?php echo BFText::_('COM_BREEZINGFORMS_LOGGING'); ?></label>
			            			<input checked="checked" type="checkbox" value="" id="bfElementFileAdvancedLogging"/>
			            			<br/>
			            			<br/>
			            			<label class="bfPropertyLabel" for="bfElementFileAdvancedOrderNumber"><?php echo BFText::_('COM_BREEZINGFORMS_ORDER_NUMBER'); ?></label>
			            			<input type="text" value="" id="bfElementFileAdvancedOrderNumber"/>
			            		</div>
			            		<!-- FILE END -->
                                                <div id="bfHideInMailback">
                                                    <br/>
                                                    <label class="bfPropertyLabel" for="bfElementAdvancedHideInMailback"><?php echo BFText::_('COM_BREEZINGFORMS_HIDE_IN_MAILBACK'); ?></label>
                                                    <input type="checkbox" value="" id="bfElementAdvancedHideInMailback"/>
                                                    <br/>
                                                </div>

                                                <div id="bfAdvancedLeaf">
				            		<br/>
				            		<label class="bfPropertyLabel" id="bfElementAdvancedTabIndexLabel" for="bfElementAdvancedTabIndex"><?php echo BFText::_('COM_BREEZINGFORMS_TAB_INDEX'); ?></label>
				            		<input type="text" value="" id="bfElementAdvancedTabIndex"/>
				            		<br/>
				            		<br/>
				            		<label class="bfPropertyLabel" for="bfElementAdvancedTurnOff"><?php echo BFText::_('COM_BREEZINGFORMS_TURN_OFF_INITIALLY'); ?></label>
			            			<input type="checkbox" value="" id="bfElementAdvancedTurnOff"/>
				            		<br/>
				            		<br/>
				            		<label class="bfPropertyLabel" id="bfElementAdvancedLabelPositionLabel" for="bfElementAdvancedLabelPosition"><?php echo BFText::_('COM_BREEZINGFORMS_LABEL_POSITION'); ?></label>
				            		<select id="bfElementAdvancedLabelPosition">
				            			<option value="left"><?php echo BFText::_('COM_BREEZINGFORMS_LEFT'); ?></option>
				            			<option value="top"><?php echo BFText::_('COM_BREEZINGFORMS_TOP'); ?></option>
				            			<option value="right"><?php echo BFText::_('COM_BREEZINGFORMS_RIGHT'); ?></option>
				            			<option value="bottom"><?php echo BFText::_('COM_BREEZINGFORMS_BOTTOM'); ?></option>
				            		</select>
			            		</div>
			            	</fieldset>
			            	
			            	<fieldset id="bfInitScript" style="display:none">
			            		<br/>
			            		<legend><?php echo BFText::_('COM_BREEZINGFORMS_ADVANCED_ELEMENT_INITSCRIPT'); ?></legend>
			            		<?php echo BFText::_('COM_BREEZINGFORMS_TYPE') ?>:
								<?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"/>
								<?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"/>
								<?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"/>
									
								<div id="bfInitScriptFlags" style="display:none">
									<hr/>
									<input type="checkbox" id="bfInitFormEntry" class="bfInitFormEntry" name="bfInitFormEntry" value="1"/><label for="bfInitFormEntry"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_FORMENTRY'); ?></label>
									<input type="checkbox" id="bfInitPageEntry" class="bfInitPageEntry" name="bfInitPageEntry" value="1"/><label for="bfInitPageEntry"> <?php echo BFText::_('COM_BREEZINGFORMS_ELEMENTS_PAGEENTRY'); ?></label>
								</div>
									
								<div id="bfInitScriptLibrary" style="display:none">
									<hr/>
									<?php echo BFText::_('COM_BREEZINGFORMS_SCRIPT') ?>: <select id="bfInitScriptSelection"></select>
									<br/>
									<br/>
									<div id="bfInitSelectionDescription"></div>
								</div>
									
								<div id="bfInitScriptCustom" style="display:none">
									<hr/>
									<div style="cursor: pointer;" onclick="createInitCode()"><?php echo BFText::_('COM_BREEZINGFORMS_CREATE_CODE_FRAMEWORK') ?></div>
									<textarea name="bfInitCode" id="bfInitCode" rows="10" style="width:100%" wrap="off"></textarea>
								</div>
			            	</fieldset>
			            	
			            	<fieldset id="bfActionScript" style="display:none">
			            		<br/>
			            		<legend><?php echo BFText::_('COM_BREEZINGFORMS_ADVANCED_ELEMENT_ACTIONSCRIPT'); ?></legend>
			            		
			            		<?php echo BFText::_('COM_BREEZINGFORMS_TYPE') ?>:
								<?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"/>
								<?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"/>
								<?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"/>
									
								<div id="bfActionScriptFlags" style="display:none">
									<hr/>
										
									<?php echo BFText::_('COM_BREEZINGFORMS_ACTIONS') ?>:
									<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>
									<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>
									<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>
									<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>
									<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>
								</div>
									
								<div id="bfActionScriptLibrary" style="display:none">
									<hr/>
									<?php echo BFText::_('COM_BREEZINGFORMS_SCRIPT') ?>: <select id="bfActionsScriptSelection"></select>
									<br/>
									<br/>
									<div id="bfActionsScriptSelectionDescription"></div>
								</div>
									
								<div id="bfActionScriptCustom" style="display:none">
									<hr/>
									<div style="cursor: pointer;" onclick="createActionCode()"><?php echo BFText::_('COM_BREEZINGFORMS_CREATE_CODE_FRAMEWORK') ?></div>
									<textarea name="bfActionCode" id="bfActionCode" rows="10" style="width:100%" wrap="off"></textarea>
								</div>
			            		
			            	</fieldset>
			            	
			            </div>
			            <div class="bfFadingMessage" style="display:none"></div>
			            <input type="submit" value="<?php echo BFText::_('COM_BREEZINGFORMS_PROPERTIES_SAVE'); ?>" id="bfAdvancedSaveButton"/>
	            	</div>
	            </div>
            </div>
            
            
            <div class="b">
				<div class="b">
		 			<div class="b"></div>
				</div>
			</div>
  </div>
  
  </form>
  
	</div> <!-- ##### bfQuickModeRight end ##### -->
	
	</div> <!-- ##### bfQuickModeWrapper end ##### -->
        
<?php
	}