當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Helper_Include::addValidation方法代碼示例

本文整理匯總了PHP中Helper_Include::addValidation方法的典型用法代碼示例。如果您正苦於以下問題:PHP Helper_Include::addValidation方法的具體用法?PHP Helper_Include::addValidation怎麽用?PHP Helper_Include::addValidation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Helper_Include的用法示例。


在下文中一共展示了Helper_Include::addValidation方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: defined

<?php

/**
* @version 			SEBLOD 3.x Core ~ $Id: default.php sebastienheraud $
* @package			SEBLOD (App Builder & CCK) // SEBLOD nano (Form Builder)
* @url				http://www.seblod.com
* @editor			Octopoos - www.octopoos.com
* @copyright		Copyright (C) 2013 SEBLOD. All Rights Reserved.
* @license 			GNU General Public License version 2 or later; see _LICENSE.php
**/
defined('_JEXEC') or die;
$app = JFactory::getApplication();
Helper_Include::addScriptDeclaration($this->config['javascript']);
if (JCck::getConfig_Param('validation', 2) > 1 && $this->config['validation'] != '') {
    Helper_Include::addValidation($this->config['validation'], $this->config['validation_options']);
    $js = 'if (task == "form.cancel") { Joomla.submitform(task, document.getElementById("seblod_form")); } else { if (jQuery("#seblod_form").validationEngine("validate",task) === true) { if (jQuery("#seblod_form").isStillReady() === true) { jQuery("#seblod_form input[name=\'config[unique]\']").val("seblod_form"); Joomla.submitform(task, document.getElementById("seblod_form")); } } }';
} else {
    $js = 'if (jQuery("#seblod_form").isStillReady() === true) { jQuery("#seblod_form input[name=\'config[unique]\']").val("seblod_form"); Joomla.submitform(task, document.getElementById("seblod_form")); }';
}
?>

<script type="text/javascript">
<?php 
echo $this->config['submit'];
?>
 = function(task) { <?php 
echo $js;
?>
 }
</script>
開發者ID:olafzieger,項目名稱:joomla3.x-seblod-test,代碼行數:30,代碼來源:default.php

示例2: validate

 public static function validate($config, $id = 'adminForm')
 {
     $config['validation'] = count($config['validation']) ? implode(',', $config['validation']) : '"null":{}';
     $config['validation_options'] = new JRegistry(array('validation_background_color' => '#242424', 'validation_color' => '#ffffff', 'validation_position' => 'topRight', 'validation_scroll' => 0));
     Helper_Include::addValidation($config['validation'], $config['validation_options'], $id);
     if (isset($config['fields']) && count($config['fields'])) {
         JFactory::getDocument()->addScriptDeclaration('var cck_dev = ' . json_encode($config['fields']) . ';');
     }
 }
開發者ID:olafzieger,項目名稱:joomla3.x-seblod-test,代碼行數:9,代碼來源:dev.php

示例3: defined

<?php

/**
* @version 			SEBLOD 3.x Core ~ $Id: default.php sebastienheraud $
* @package			SEBLOD (App Builder & CCK) // SEBLOD nano (Form Builder)
* @url				http://www.seblod.com
* @editor			Octopoos - www.octopoos.com
* @copyright		Copyright (C) 2013 SEBLOD. All Rights Reserved.
* @license 			GNU General Public License version 2 or later; see _LICENSE.php
**/
defined('_JEXEC') or die;
if ((int) $config['error'] == 1) {
    return;
}
if (JCck::getConfig_Param('validation', 2) > 1 && $config['validation'] != '') {
    Helper_Include::addValidation($config['validation'], $config['validation_options'], $formId);
    $js = 'if (jQuery("#' . $formId . '").validationEngine("validate",task) === true) { if (jQuery("#' . $formId . '").isStillReady() === true) { jQuery("#' . $formId . ' input[name=\'config[unique]\']").val("' . $formId . '"); JCck.Core.submitForm("save", document.getElementById("' . $formId . '")); } }';
} else {
    $js = 'if (jQuery("#' . $formId . '").isStillReady() === true) { jQuery("#' . $formId . ' input[name=\'config[unique]\']").val("' . $formId . '"); JCck.Core.submitForm("save", document.getElementById("' . $formId . '")); }';
}
?>
<script type="text/javascript">
<?php 
echo $config['submit'];
?>
 = function(task) { <?php 
echo $js;
?>
 }
</script>
<?php 
開發者ID:codigoaberto,項目名稱:SEBLOD,代碼行數:31,代碼來源:default.php


注:本文中的Helper_Include::addValidation方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。