当前位置: 首页>>代码示例>>PHP>>正文


PHP vmJsApi::vmValidator方法代码示例

本文整理汇总了PHP中vmJsApi::vmValidator方法的典型用法代码示例。如果您正苦于以下问题:PHP vmJsApi::vmValidator方法的具体用法?PHP vmJsApi::vmValidator怎么用?PHP vmJsApi::vmValidator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vmJsApi的用法示例。


在下文中一共展示了vmJsApi::vmValidator方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addJsJoomlaSubmitButtonNoValidate

 function addJsJoomlaSubmitButtonNoValidate($validate = false)
 {
     static $done = array(false, false);
     if (!$done[$validate]) {
         if ($validate) {
             vmJsApi::vmValidator();
             $form = "if( (a=='apply' || a=='save')){\n\t\t\t\tform.submit();\n\t\t\t} else if(a!='apply' && a!='save'){\n\t\t\t\tform.submit();\n\t\t\t}";
         } else {
             $form = "form.submit();";
         }
     }
     $j = "\n\tJoomla.submitbutton=function(a){\n\n\t\tvar options = { path: '/', expires: 2}\n\t\tif (a == 'apply') {\n\t\t\tvar idx = jQuery('#tabs li.current').index();\n\t\t\tjQuery.cookie('vmapply', idx, options);\n\t\t} else {\n\t\t\tjQuery.cookie('vmapply', '0', options);\n\t\t}\n\t\tjQuery( '#media-dialog' ).remove();\n\t\tform = document.getElementById('adminForm');\n\t\tform.task.value = a;\n\t\t" . $form . "\n\t\treturn false;\n\t};\n\n\t\tlinks = jQuery('a[onclick].toolbar');\n\n\t\tlinks.each(function(){\n\t\t\tvar onClick = new String(this.onclick);\n\t\t\tjQuery(this).click(function(e){\n\t\t\t\t//console.log('click ');\n\t\t\t\te.stopImmediatePropagation();\n\t\t\t\te.preventDefault();\n\t\t\t});\n\t\t});";
     vmJsApi::addJScript('submit', $j, false, true);
     $done[$validate] = true;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:15,代码来源:tsmviewadmin.php

示例2: addJsJoomlaSubmitButton

    function addJsJoomlaSubmitButton($validate = false)
    {
        static $done = array(false, false);
        if (!$done[$validate]) {
            if ($validate) {
                vmJsApi::vmValidator();
                $form = 'if(myValidator(form,false)){
				form.submit();
			}';
            } else {
                $form = 'Joomla.submitform(a,form)';
            }
        }
        $j = "\n\tJoomla.submitbutton=function(a){\n\n\t\tvar options = { path: '/', expires: 2}\n\t\tif (a == 'apply') {\n\t\t\tvar idx = jQuery('#tabs li.current').index();\n\t\t\tjQuery.cookie('vmapply', idx, options);\n\t\t} else {\n\t\t\tjQuery.cookie('vmapply', '0', options);\n\t\t}\n\t\tjQuery( '#media-dialog' ).remove();\n\t\tform = document.getElementById('adminForm');\n\t\tform.task.value = a;\n\t\t//form = jQuery('#adminForm');\n\t\t//form.find(name='task').val(a);\n\n\t\t" . $form . "\n\t\tconsole.log('my form',form);\n\t\t//alert('Send form');\n\n\t\treturn false;\n\t};\n\n\t\tlinks = jQuery('a[onclick].toolbar');\n\n\t\tlinks.each(function(){\n\t\t\t// Cache event\n\t\t\tvar existing_event = this.onclick;\n\n\t\t\t// Remove the event from the link\n\t\t\t//this.onclick = null;\n\t\t\tconsole.log('Disabled toolbar');\n\t\t\t// Add a check in for the class disabled\n\t\t\tjQuery(this).click(function(e){\n\t\t\t\tconsole.log('click');\n\t\t\t\te.stopImmediatePropagation();\n\t\t\t\te.preventDefault();\n\t\t\t\t//existing_event;\n\t\t\t});\n\n\t\t});";
        vmJsApi::addJScript('submit', $j, false, true);
        $done[$validate] = true;
    }
开发者ID:naka211,项目名称:studiekorrektur,代码行数:17,代码来源:vmviewadmin.php

示例3:

// VM_THEMEURL
?>
<style type="text/css">
.invalid {
	border-color: #f00;
	background-color: #ffd;
	color: #000;
}
label.invalid {
	background-color: #fff;
	color: #f00;
}
</style>

<?php 
vmJsApi::vmValidator();
?>

<h1><?php 
echo $this->page_title;
?>
</h1>
<?php 
echo shopFunctionsF::getLoginForm(false);
?>

<?php 
if ($this->userDetails->virtuemart_user_id == 0) {
    echo '<h2>' . vmText::_('COM_VIRTUEMART_YOUR_ACCOUNT_REG') . '</h2>';
}
?>
开发者ID:naka211,项目名称:studiekorrektur,代码行数:31,代码来源:edit.php

示例4: myValidator

}
</style>


<form method="post" id="adminForm" name="adminForm" action="index.php" enctype="multipart/form-data" class="form-validate" onSubmit="return myValidator(this);">
<?php 
$tabarray = array();
if ($this->userDetails->user_is_vendor) {
    $tabarray['vendor'] = 'COM_VIRTUEMART_VENDOR';
    $tabarray['vendorletter'] = 'COM_VIRTUEMART_VENDORLETTER';
}
$tabarray['shopper'] = 'COM_VIRTUEMART_SHOPPER_FORM_LBL';
//$tabarray['user'] = 'COM_VIRTUEMART_USER_FORM_TAB_GENERALINFO';
if (!empty($this->shipToFields) || $this->new) {
    $tabarray['shipto'] = 'COM_VIRTUEMART_USER_FORM_SHIPTO_LBL';
    vmdebug('Edit user', $tabarray['shipto']);
}
if (($_ordcnt = count($this->orderlist)) > 0) {
    $tabarray['orderlist'] = 'COM_VIRTUEMART_ORDER_LIST_LBL';
}
AdminUIHelper::buildTabs($this, $tabarray, 'vm-user');
?>

<?php 
echo $this->addStandardHiddenToForm();
?>
</form>

<?php 
vmJsApi::vmValidator($this->userDetails->JUser->guest);
AdminUIHelper::endAdminArea();
开发者ID:cybershocik,项目名称:Darek,代码行数:31,代码来源:edit.php

示例5: vmValidator

 public function vmValidator()
 {
     $prefiks = '';
     if ($this->address_type['ST']) {
         $prefiks = 'shipto_';
     }
     vmJsApi::vmValidator($this->userDetails->JUser->guest, $this->userFields['fields'], $prefiks);
 }
开发者ID:virtuemart-fr,项目名称:virtuemart-fr,代码行数:8,代码来源:view.html.php

示例6: vmValidator

 public function vmValidator()
 {
     vmJsApi::vmValidator($this->userDetails->JUser->guest);
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:4,代码来源:view.html.php


注:本文中的vmJsApi::vmValidator方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。