[Vtigercrm-commits] [vtiger-commits] r10053 - in /vtigercrm/branches/5.0.3: Smarty/templates/ include/js/ modules/Users/
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Sat Jan 13 06:37:27 EST 2007
Author: richie
Date: Sat Jan 13 04:37:17 2007
New Revision: 10053
Log:
validation fixes
Modified:
vtigercrm/branches/5.0.3/Smarty/templates/ActivityEditView.tpl
vtigercrm/branches/5.0.3/Smarty/templates/CreateView.tpl
vtigercrm/branches/5.0.3/Smarty/templates/DetailView.tpl
vtigercrm/branches/5.0.3/Smarty/templates/DisplayFields.tpl
vtigercrm/branches/5.0.3/Smarty/templates/UserDetailView.tpl
vtigercrm/branches/5.0.3/Smarty/templates/salesEditView.tpl
vtigercrm/branches/5.0.3/include/js/general.js
vtigercrm/branches/5.0.3/include/js/popup.js
vtigercrm/branches/5.0.3/modules/Users/Users.php
vtigercrm/branches/5.0.3/modules/Users/about_us.php
Modified: vtigercrm/branches/5.0.3/Smarty/templates/ActivityEditView.tpl
==============================================================================
--- vtigercrm/branches/5.0.3/Smarty/templates/ActivityEditView.tpl (original)
+++ vtigercrm/branches/5.0.3/Smarty/templates/ActivityEditView.tpl Sat Jan 13 04:37:17 2007
@@ -20,6 +20,7 @@
<script type="text/javascript" src="jscalendar/calendar-setup.js"></script>
<script type="text/javascript" src="modules/{$MODULE}/Activity.js"></script>
<script type="text/javascript">
+var gVTModule = '{$smarty.request.module}';
</script>
{*<!-- Contents -->*}
Modified: vtigercrm/branches/5.0.3/Smarty/templates/CreateView.tpl
==============================================================================
--- vtigercrm/branches/5.0.3/Smarty/templates/CreateView.tpl (original)
+++ vtigercrm/branches/5.0.3/Smarty/templates/CreateView.tpl Sat Jan 13 04:37:17 2007
@@ -21,6 +21,7 @@
<script type="text/javascript" src="modules/{$MODULE}/{$SINGLE_MOD}.js"></script>
<script type="text/javascript">
+var gVTModule = '{$smarty.request.module}';
function sensex_info()
{ldelim}
var Ticker = $('tickersymbol').value;
Modified: vtigercrm/branches/5.0.3/Smarty/templates/DetailView.tpl
==============================================================================
--- vtigercrm/branches/5.0.3/Smarty/templates/DetailView.tpl (original)
+++ vtigercrm/branches/5.0.3/Smarty/templates/DetailView.tpl Sat Jan 13 04:37:17 2007
@@ -28,6 +28,7 @@
<script>
{literal}
+var gVTModule = '{$smarty.request.module}';
function callConvertLeadDiv(id)
{
new Ajax.Request(
Modified: vtigercrm/branches/5.0.3/Smarty/templates/DisplayFields.tpl
==============================================================================
--- vtigercrm/branches/5.0.3/Smarty/templates/DisplayFields.tpl (original)
+++ vtigercrm/branches/5.0.3/Smarty/templates/DisplayFields.tpl Sat Jan 13 04:37:17 2007
@@ -537,7 +537,7 @@
{foreach key=sel_value item=value from=$arr}
<option value="{$sel_value}" {$value}>{$sel_value}</option>
<!-- code added to pass Status field value, if Disabled for nonadmin -->
- {if $value eq 'selected'}
+ {if $value eq 'selected' && $secondvalue neq 1}
{assign var="user_stat" value="$sel_value"}
{/if}
<!--code ends -->
@@ -588,7 +588,7 @@
{foreach key=sel_value item=value from=$arr}
<option value="{$uivalueid}" {$value}>{$sel_value}</option>
<!-- code added to pass Currency field value, if Disabled for nonadmin -->
- {if $value eq 'selected'}
+ {if $value eq 'selected' && $secondvalue neq 1}
{assign var="curr_stat" value="$uivalueid"}
{/if}
<!--code ends -->
Modified: vtigercrm/branches/5.0.3/Smarty/templates/UserDetailView.tpl
==============================================================================
--- vtigercrm/branches/5.0.3/Smarty/templates/UserDetailView.tpl (original)
+++ vtigercrm/branches/5.0.3/Smarty/templates/UserDetailView.tpl Sat Jan 13 04:37:17 2007
@@ -246,6 +246,7 @@
<div id="tempdiv" style="display:block;position:absolute;left:350px;top:200px;"></div>
<!-- added for validation -->
<script language="javascript">
+ var gVTModule = '{$smarty.request.module}';
var fieldname = new Array({$VALIDATION_DATA_FIELDNAME});
var fieldlabel = new Array({$VALIDATION_DATA_FIELDLABEL});
var fielddatatype = new Array({$VALIDATION_DATA_FIELDDATATYPE});
Modified: vtigercrm/branches/5.0.3/Smarty/templates/salesEditView.tpl
==============================================================================
--- vtigercrm/branches/5.0.3/Smarty/templates/salesEditView.tpl (original)
+++ vtigercrm/branches/5.0.3/Smarty/templates/salesEditView.tpl Sat Jan 13 04:37:17 2007
@@ -20,6 +20,7 @@
<script type="text/javascript" src="jscalendar/calendar-setup.js"></script>
<script type="text/javascript" src="modules/{$MODULE}/{$SINGLE_MOD}.js"></script>
<script type="text/javascript">
+var gVTModule = '{$smarty.request.module}';
function sensex_info()
{ldelim}
var Ticker = $('tickersymbol').value;
Modified: vtigercrm/branches/5.0.3/include/js/general.js
==============================================================================
--- vtigercrm/branches/5.0.3/include/js/general.js (original)
+++ vtigercrm/branches/5.0.3/include/js/general.js Sat Jan 13 04:37:17 2007
@@ -705,6 +705,17 @@
}
function formValidate() {
+;
+//Validation for Portal User
+
+if(gVTModule == 'Contacts' && gValidationCall != 'tabchange')
+{
+ if(getObj('portal').checked && trim(getObj('email').value) == '') {
+ alert("Portal user should provide email Id for portal login");
+ return false;
+ }
+}
+
for (var i=0; i<fieldname.length; i++) {
if(getObj(fieldname[i]) != null)
{
@@ -1148,6 +1159,8 @@
var oform = document.forms['EditView'];
oform.action.value='Save';
+ //global variable to check the validation calling function to avoid validating when tab change
+ gValidationCall = 'tabchange';
if((moduletype == 'inventory' && validateInventory(module)) ||(moduletype == 'normal') && formValidate())
if(formValidate())
{
@@ -1170,6 +1183,7 @@
tagName2.style.display='none';
}
+ gValidationCall = '';
}
function fnCopy(source,design){
Modified: vtigercrm/branches/5.0.3/include/js/popup.js
==============================================================================
--- vtigercrm/branches/5.0.3/include/js/popup.js (original)
+++ vtigercrm/branches/5.0.3/include/js/popup.js Sat Jan 13 04:37:17 2007
@@ -13,3 +13,8 @@
mywindow = window.open("copyright.html","mywindow", "height=115, width=575");
mywindow.moveTo(210,620);
}
+
+function newpopup(str){
+ window.open (str,"mywinw","menubar=1,resizable=1");
+// window.parent.close();
+}
Modified: vtigercrm/branches/5.0.3/modules/Users/Users.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Users/Users.php (original)
+++ vtigercrm/branches/5.0.3/modules/Users/Users.php Sat Jan 13 04:37:17 2007
@@ -1013,7 +1013,8 @@
if($_REQUEST[$this->homeorder_array[$i]] != '')
$save_array[] = $this->homeorder_array[$i];
}
- $homeorder = implode(',',$save_array);
+ if(count($save_array))
+ $homeorder = implode(',',$save_array);
$query = "update vtiger_users set homeorder ='$homeorder' where id=$id";
$adb->query($query);
$log->debug("Exiting from function saveHomeOrder($id)");
Modified: vtigercrm/branches/5.0.3/modules/Users/about_us.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Users/about_us.php (original)
+++ vtigercrm/branches/5.0.3/modules/Users/about_us.php Sat Jan 13 04:37:17 2007
@@ -35,6 +35,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>vtiger CRM 5 - Free, Commercial grade Open Source CRM</title>
<link href="<? echo $theme_path;?>style.css" rel="stylesheet" type="text/css">
+<script language="javascript" type="text/javascript" src="include/js/popup.js"></script>
</head>
<style>
.rollOver{
@@ -68,9 +69,6 @@
text-align:left;
padding-bottom:1px;
}
-
-
-
</style>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="500">
@@ -131,35 +129,35 @@
<tr><td>Valmir Carlos Trindade</td></tr>
<tr><td> </td></tr>
<tr><th><?php echo $mod_strings['LBL_CREDITS'];?> - <?php echo $mod_strings['LBL_THIRD_PARTY'];?></th></tr>
- <tr><td><a href="http://adodb.sourceforge.net" target="_blank">ADOdb</a></td></tr>
- <tr><td><a href="http://www.os-solution.com/demo/ajaxcsspopupchat/index.php" target="_blank">Ajax Popup Chat</a></td></tr>
- <tr><td><a href="http://httpd.apache.org/" target="_blank">Apache HTTP Server</a></td></tr>
- <tr><td><a href="http://www.linuxscope.net/articles/mailAttachmentsPHP.html" target="_blank">Attachments in E-mail Client</a></td></tr>
- <tr><td><a href="http://www.hmhd.com/steve" target="_blank">Calculator</a></td></tr>
- <tr><td><a href="http://www.dynamicdrive.com/dynamicindex14/carousel2.htm" target="_blank">Carousel Slideshow</a></td></tr>
- <tr><td><a href="http://www.troywolf.com/articles/php/class_http/" target="_blank">class_http</a></td></tr>
- <tr><td><a href="http://freshmeat.net/projects/phpexcelreader/" target="_blank">ExcelReader</a></td></tr>
- <tr><td><a href="http://www.fckeditor.net/download/default.html" target="_blank">FCKeditor</a></td></tr>
- <tr><td><a href="http://www.fpdf.org" target="_blank">FPDF</a></td></tr>
- <tr><td><a href="http://www.getluky.net" target="_blank">freetag</a></td></tr>
- <tr><td><a href="http://www.boutell.com/gd/" target="_blank">gdwin32</a></td></tr>
- <tr><td><a href="http://pear.php.net/package/Image_Graph" target="_blank">Graph</a></td></tr>
- <tr><td><a href="http://slayeroffice.com/code/imageCrossFade/xfade2.html" target="_blank">Image Crossfade Redux</a></td></tr>
- <tr><td><a href="http://pear.php.net/pepr/pepr-proposal-show.php?id=212" target="_blank">Image_Canvas</a></td></tr>
- <tr><td><a href="http://pear.php.net/package/Image_Color" target="_blank">Image_Color</a></td></tr>
- <tr><td><a href="http://www.dynarch.com/projects/calendar/" target="_blank">jscalendar</a></td></tr>
- <tr><td><a href="http://www.vxr.it/log4php/" target="_blank">log4php</a></td></tr>
- <tr><td><a href="http://magpierss.sourceforge.net/" target="_blank">MagpieRSS</a></td></tr>
- <tr><td><a href="http://wiki.wonko.com/software/mailfeed/" target="_blank">Mailfeed</a></td></tr>
- <tr><td><a href="http://www.mysql.com" target="_blank">MySQL</a></td></tr>
- <tr><td><a href="http://sourceforge.net/projects/nusoap" target="_blank">nusoap</a></td></tr>
- <tr><td><a href="http://www.php.net" target="_blank">PHP</a></td></tr>
- <tr><td><a href="http://phpmailer.sourceforge.net/" target="_blank">PHPMailer</a></td></tr>
- <tr><td><a href="http://phpsysinfo.sourceforge.net/" target="_blank">phpSysinfo</a></td></tr>
- <tr><td><a href="http://prototype.conio.net" target="_blank">Prototype</a></td></tr>
- <tr><td><a href="http://script.aculo.us" target="_blank">script.oculo.us</a></td></tr>
- <tr><td><a href="http://smarty.php.net/" target="_blank">Smarty Template Engine</a></td></tr>
- <tr><td><a href="http://www.sugarcrm.com" target="_blank">SugarCRM</a> (SPL 1.1.2)</td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://adodb.sourceforge.net')">ADOdb</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://www.os-solution.com/demo/ajaxcsspopupchat/index.php')">Ajax Popup Chat</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://httpd.apache.org/')">Apache HTTP Server</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://www.linuxscope.net/articles/mailAttachmentsPHP.html')">Attachments in E-mail Client</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://www.hmhd.com/steve')">Calculator</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://www.dynamicdrive.com/dynamicindex14/carousel2.htm')">Carousel Slideshow</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://www.troywolf.com/articles/php/class_http/')">class_http</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://freshmeat.net/projects/phpexcelreader/')">ExcelReader</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://www.fckeditor.net/download/default.html')">FCKeditor</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://www.fpdf.org')">FPDF</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://www.getluky.net')">freetag</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://www.boutell.com/gd/')">gdwin32</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://pear.php.net/package/Image_Graph')">Graph</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://slayeroffice.com/code/imageCrossFade/xfade2.html')">Image Crossfade Redux</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://pear.php.net/pepr/pepr-proposal-show.php?id=212')">Image_Canvas</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://pear.php.net/package/Image_Color')">Image_Color</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://www.dynarch.com/projects/calendar/')">jscalendar</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://www.vxr.it/log4php/')">log4php</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://magpierss.sourceforge.net/')">MagpieRSS</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://wiki.wonko.com/software/mailfeed/')">Mailfeed</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://www.mysql.com')">MySQL</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://sourceforge.net/projects/nusoap')">nusoap</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://www.php.net')">PHP</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://phpmailer.sourceforge.net/')">PHPMailer</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://phpsysinfo.sourceforge.net/')">phpSysinfo</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://prototype.conio.net')">Prototype</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://script.aculo.us')">script.oculo.us</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://smarty.php.net/')">Smarty Template Engine</a></td></tr>
+ <tr><td><a href="javascript:;" onClick=" newpopup('http://www.sugarcrm.com')">SugarCRM</a> (SPL 1.1.2)</td></tr>
<tr><td> </td></tr>
<tr><td><b><?php echo $mod_strings['LBL_COMMUNITY'];?></b></td></tr>
<tr><td> </td></tr>
@@ -176,8 +174,8 @@
<tr>
<td width="70%" align="left" class="small">
<span class="small" style="color:#999999;"><?php echo $mod_strings['LBL_VERSION'] ." ".$patch_string;?></span> |
- <a href="http://www.vtiger.com/copyrights/LICENSE_AGREEMENT.txt" target="_blank"><?php echo $mod_strings['LBL_READ_LICENSE'];?></a> |
- <a href="http://www.vtiger.com/index.php?option=com_content&task=view&id=26&Itemid=54" target="_blank"><?php echo $mod_strings['LBL_CONTACT_US'];?></a>
+ <a href="javascript:;" onClick=" newpopup('http://www.vtiger.com/copyrights/LICENSE_AGREEMENT.txt')"><?php echo $mod_strings['LBL_READ_LICENSE'];?></a> |
+ <a href="javascript:;" onClick=" newpopup('http://www.vtiger.com/index.php?option=com_content&task=view&id=26&Itemid=54')"><?php echo $mod_strings['LBL_CONTACT_US'];?></a>
</td>
<td align="right">
<input type="button" name="close" value=" <?php echo $mod_strings['LBL_CLOSE'];?> " onClick="window.close();" class="crmbutton small cancel">
More information about the vtigercrm-commits
mailing list