当前位置: 首页>>代码示例>>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;未经允许,请勿转载。