[ Index ]
 

Code source de vtiger CRM 5.0.2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/Smarty/templates/ -> CustomView.tpl (source)

   1  <!--*********************************************************************************
   2  ** The contents of this file are subject to the vtiger CRM Public License Version 1.0
   3   * ("License"); You may not use this file except in compliance with the License
   4   * The Original Code is:  vtiger CRM Open Source
   5   * The Initial Developer of the Original Code is vtiger.
   6   * Portions created by vtiger are Copyright (C) vtiger.
   7   * All Rights Reserved.
   8  *
   9   ********************************************************************************/
  10  -->
  11  <link rel="stylesheet" type="text/css" media="all" href="jscalendar/calendar-win2k-cold-1.css">
  12  <script type="text/javascript" src="jscalendar/calendar.js"></script>
  13  <script type="text/javascript" src="jscalendar/lang/calendar-{$APP.LBL_JSCALENDAR_LANG}.js"></script>
  14  <script type="text/javascript" src="jscalendar/calendar-setup.js"></script>
  15  <script type="text/javascript" src="modules/CustomView/CustomView.js"></script>
  16  <script language="JavaScript" type="text/javascript" src="include/calculator/calc.js"></script>
  17  <form enctype="multipart/form-data" name="CustomView" method="POST" action="index.php" onsubmit="return mandatoryCheck();">
  18  <input type="hidden" name="module" value="CustomView">
  19  <input type="hidden" name="action" value="Save">
  20  <input type="hidden" name="parenttab" value="{$CATEGORY}">
  21  <input type="hidden" name="cvmodule" value="{$CVMODULE}">
  22  <input type="hidden" name="return_module" value="{$RETURN_MODULE}">
  23  <input type="hidden" name="record" value="{$CUSTOMVIEWID}">
  24  <input type="hidden" name="return_action" value="{$RETURN_ACTION}">
  25  <script language="javascript" type="text/javascript">
  26  var typeofdata = new Array();
  27  typeofdata['V'] = ['e','n','s','c','k'];
  28  typeofdata['N'] = ['e','n','l','g','m','h'];
  29  typeofdata['T'] = ['e','n','l','g','m','h'];
  30  typeofdata['I'] = ['e','n','l','g','m','h'];
  31  typeofdata['C'] = ['e','n'];
  32  typeofdata['DT'] = ['e','n'];
  33  typeofdata['D'] = ['e','n'];
  34  var fLabels = new Array();
  35  fLabels['e'] = 'equals';
  36  fLabels['n'] = 'not equal to';
  37  fLabels['s'] = 'starts with';
  38  fLabels['c'] = 'contains';
  39  fLabels['k'] = 'does not contain';
  40  fLabels['l'] = 'less than';
  41  fLabels['g'] = 'greater than';
  42  fLabels['m'] = 'less or equal';
  43  fLabels['h'] = 'greater or equal';
  44  var noneLabel;
  45  function goto_CustomAction(module)
  46  {ldelim}
  47          document.location.href = "index.php?module="+module+"&action=CustomAction&record={$CUSTOMVIEWID}";
  48  {rdelim}
  49  
  50  function mandatoryCheck()
  51  {ldelim}
  52  
  53          var mandatorycheck = false;
  54          var i,j;
  55          var manCheck = new Array({$MANDATORYCHECK});
  56          var showvalues = "{$SHOWVALUES}";
  57          if(manCheck)
  58          {ldelim}
  59                  var isError = false;
  60                  var errorMessage = "";
  61                  if (trim(document.CustomView.viewName.value) == "") {ldelim}
  62                          isError = true;
  63                          errorMessage += "\n{$MOD.LBL_VIEW_NAME}";
  64                  {rdelim}
  65                  // Here we decide whether to submit the form.
  66                  if (isError == true) {ldelim}
  67                          alert("{$MOD.Missing_required_fields}:" + errorMessage);
  68                          return false;
  69                  {rdelim}
  70          
  71          for(i=1;i<=9;i++)
  72                  {ldelim}
  73                          var columnvalue = document.getElementById("column"+i).value;
  74                          if(columnvalue != null)
  75                          {ldelim}
  76                                  for(j=0;j<manCheck.length;j++)
  77                                  {ldelim}
  78                                          if(columnvalue == manCheck[j])
  79                                          {ldelim}
  80                                                  mandatorycheck = true;
  81                                          {rdelim}
  82                                  {rdelim}
  83                                  if(mandatorycheck == true)
  84                                  {ldelim}
  85                                          return true;
  86                                  {rdelim}else
  87                                  {ldelim}
  88                                          mandatorycheck = false;
  89                                  {rdelim}
  90                          {rdelim}
  91                  {rdelim}
  92          {rdelim}
  93          if(mandatorycheck == false)
  94          {ldelim}
  95                  alert("Must have one Required field to be selected\n"+showvalues);
  96          {rdelim}
  97          
  98          return false;
  99  {rdelim}
 100  </script>
 101  
 102  <table align="center" border="0" cellpadding="0" cellspacing="0" width="98%">
 103   <tbody><tr>
 104    <td valign="top"><img src="{$IMAGE_PATH}showPanelTopLeft.gif"></td>
 105    <td class="showPanelBg" valign="top" width="100%">
 106     <div class="small" style="padding: 20px;">
 107      <span class="lvtHeaderText"><a class="hdrLink" href="index.php?action=ListView&module={$MODULE}&parenttab={$CATEGORY}">{$APP.$MODULE}</a> &gt; {$MOD.New_Custom_View}</span> <br>
 108        <hr noshade="noshade" size="1">
 109        <form name="EditView" method="post" enctype="multipart/form-data" action="index.php">
 110              <table align="center" border="0" cellpadding="0" cellspacing="0" width="95%">
 111               <tbody><tr>
 112                <td align="left" valign="top">
 113                 <table width="100%"  border="0" cellspacing="0" cellpadding="5">
 114          <tr>
 115           <td colspan="4" class="detailedViewHeader"><strong>{$MOD.Details}</strong></td>
 116          </tr>
 117          <tr>
 118           <td class="dvtCellInfo" align="right" width="25%"><span class="style1">*</span>{$MOD.LBL_VIEW_NAME} </td>
 119           <td class="dvtCellInfo" width="25%">
 120            <input class="detailedViewTextBox" type="text" name='viewName' value="{$VIEWNAME}" onfocus="this.className='detailedViewTextBoxOn'" onblur="this.className='detailedViewTextBox'"/>
 121           </td>
 122           <td class="dvtCellInfo" width="25%">
 123            {if $CHECKED eq 'checked'}
 124                <input type="checkbox" name="setDefault" value="1" checked/>{$MOD.LBL_SETDEFAULT}
 125            {else}
 126                <input type="checkbox" name="setDefault" value="0" />{$MOD.LBL_SETDEFAULT}
 127            {/if}
 128           </td>
 129           <td class="dvtCellInfo" width="25%">
 130            {if $MCHECKED eq 'checked'}
 131                <input type="checkbox" name="setMetrics" value="1" checked/>{$MOD.LBL_LIST_IN_METRICS}
 132            {else}
 133                <input type="checkbox" name="setMetrics" value="0" />{$MOD.LBL_LIST_IN_METRICS}
 134            {/if}
 135           </td>
 136          </tr>
 137          <tr><td colspan="3">&nbsp;</td></tr>
 138          <tr>
 139           <td colspan="4" class="detailedViewHeader">
 140            <b>{$MOD.LBL_STEP_2_TITLE} </b>
 141           </td>
 142          </tr>
 143          <tr class="dvtCellLabel">
 144            <td><select name="column1" id="column1" onChange="checkDuplicate();">
 145                      <option value="">{$MOD.LBL_NONE}</option>
 146              {foreach item=filteroption key=label from=$CHOOSECOLUMN1}
 147                  <optgroup label="{$label}" class=\"select\" style=\"border:none\">
 148                      {foreach item=text from=$filteroption}
 149                              <option {$text.selected} value={$text.value}>{$text.text}</option>
 150                      {/foreach}
 151              {/foreach}
 152                        {$CHOOSECOLUMN1}
 153                    </select></td>
 154             <td><select name="column2" id="column2" onChange="checkDuplicate();">
 155                          <option value="">{$MOD.LBL_NONE}</option>
 156                          {foreach item=filteroption key=label from=$CHOOSECOLUMN2}
 157                                  <optgroup label="{$label}" class=\"select\" style=\"border:none\">
 158                                  {foreach item=text from=$filteroption}
 159                                       <option {$text.selected} value={$text.value}>{$text.text}</option>
 160                                  {/foreach}
 161                          {/foreach}
 162                          {$CHOOSECOLUMN2}
 163                        </select></td>
 164             <td><select name="column3" id="column3" onChange="checkDuplicate();">
 165                          <option value="">{$MOD.LBL_NONE}</option>
 166                          {foreach item=filteroption key=label from=$CHOOSECOLUMN3}
 167                                  <optgroup label="{$label}" class=\"select\" style=\"border:none\">
 168                                  {foreach item=text from=$filteroption}
 169                                       <option {$text.selected} value={$text.value}>{$text.text}</option>
 170                                  {/foreach}
 171                          {/foreach}
 172                          {$CHOOSECOLUMN3}
 173                        </select></td>
 174             <td><select name="column4" id="column4" onChange="checkDuplicate();">
 175                          <option value="">{$MOD.LBL_NONE}</option>
 176                          {foreach item=filteroption key=label from=$CHOOSECOLUMN4}
 177                                  <optgroup label="{$label}" class=\"select\" style=\"border:none\">
 178                                  {foreach item=text from=$filteroption}
 179                                       <option {$text.selected} value={$text.value}>{$text.text}</option>
 180                                  {/foreach}
 181                          {/foreach}
 182                          {$CHOOSECOLUMN4}
 183                        </select></td>
 184              
 185          </tr>
 186          <tr class="dvtCellInfo">
 187             <td><select name="column5" id="column5" onChange="checkDuplicate();">
 188                          <option value="">{$MOD.LBL_NONE}</option>
 189                          {foreach item=filteroption key=label from=$CHOOSECOLUMN5}
 190                                  <optgroup label="{$label}" class=\"select\" style=\"border:none\">
 191                                  {foreach item=text from=$filteroption}
 192                                       <option {$text.selected} value={$text.value}>{$text.text}</option>
 193                                  {/foreach}
 194                          {/foreach}
 195                          {$CHOOSECOLUMN5}
 196                        </select></td>
 197                     <td><select name="column6" id="column6" onChange="checkDuplicate();">
 198                          <option value="">{$MOD.LBL_NONE}</option>
 199                          {foreach item=filteroption key=label from=$CHOOSECOLUMN6}
 200                                  <optgroup label="{$label}" class=\"select\" style=\"border:none\">
 201                                  {foreach item=text from=$filteroption}
 202                                       <option {$text.selected} value={$text.value}>{$text.text}</option>
 203                                  {/foreach}
 204                          {/foreach}
 205                          {$CHOOSECOLUMN6}
 206                        </select></td>
 207                     <td><select name="column7" id="column7" onChange="checkDuplicate();">
 208                          <option value="">{$MOD.LBL_NONE}</option>
 209                          {foreach item=filteroption key=label from=$CHOOSECOLUMN7}
 210                                  <optgroup label="{$label}" class=\"select\" style=\"border:none\">
 211                                  {foreach item=text from=$filteroption}
 212                                       <option {$text.selected} value={$text.value}>{$text.text}</option>
 213                                  {/foreach}
 214                          {/foreach}
 215                          {$CHOOSECOLUMN7}
 216                        </select></td>
 217                     <td><select name="column8" id="column8" onChange="checkDuplicate();">
 218                          <option value="">{$MOD.LBL_NONE}</option>
 219                          {foreach item=filteroption key=label from=$CHOOSECOLUMN8}
 220                                  <optgroup label="{$label}" class=\"select\" style=\"border:none\">
 221                                  {foreach item=text from=$filteroption}
 222                                       <option {$text.selected} value={$text.value}>{$text.text}</option>
 223                                  {/foreach}
 224                          {/foreach}
 225                          {$CHOOSECOLUMN8}
 226              </select></td>
 227          </tr>
 228          <tr class="dvtCellLabel">
 229             <td><select name="column9" id="column9" onChange="checkDuplicate();">
 230                          <option value="">{$MOD.LBL_NONE}</option>
 231                          {foreach item=filteroption key=label from=$CHOOSECOLUMN9}
 232                                  <optgroup label="{$label}" class=\"select\" style=\"border:none\">
 233                                  {foreach item=text from=$filteroption}
 234                                       <option {$text.selected} value={$text.value}>{$text.text}</option>
 235                                  {/foreach}
 236                          {/foreach}
 237                          {$CHOOSECOLUMN9}
 238                          </select></td>
 239               <td>&nbsp;</td>
 240               <td>&nbsp;</td>
 241               <td>&nbsp;</td>
 242          </tr>    
 243          {*section name=SelectColumn start=1 loop=4 step=1}
 244          <tr class="{cycle values="dvtCellLabel,dvtCellInfo"}">
 245           {section name=Column start=1 loop=5 step=1}
 246          <td align="center">
 247          {math equation="(x-1)*4+ y" x=$smarty.section.SelectColumn.index y=$smarty.section.Column.index}.&nbsp;    
 248            <select id="column{math equation="(x-1)*4+ y" x=$smarty.section.SelectColumn.index y=$smarty.section.Column.index}" name ="column{math equation="(x-1)*4+ y" x=$smarty.section.SelectColumn.index y=$smarty.section.Column.index}" class="detailedViewTextBox">
 249             <option value="">{$MOD.LBL_NONE}</option>
 250             {foreach item=filteroption key=label from={$CHOOSECOLUMN|cat: {math equation="(x-1)*4+ y" x=$smarty.section.SelectColumn.index y=$smarty.section.Column.index}}}
 251              <optgroup label="{$label}" class=\"select\" style=\"border:none\">
 252              {foreach item=text from=$filteroption}
 253               <option {$text.selected} value={$text.value}>{$text.text}</option>
 254              {/foreach}
 255             {/foreach}
 256            </select>
 257           </td>
 258           {/section}
 259              </tr>
 260          {/section*}
 261          <tr><td colspan="4">&nbsp;</td></tr>
 262          <tr><td colspan="4"><table align="center" border="0" cellpadding="0" cellspacing="0" width="95%">
 263          <tbody><tr>
 264           <td>
 265            <table class="small" border="0" cellpadding="3" cellspacing="0" width="100%">
 266             <tbody><tr>
 267              <td class="dvtTabCache" style="width: 10px;" nowrap>&nbsp;</td>
 268              <td style="width: 100px;" nowrap class="dvtSelectedCell" id="pi" onclick="fnLoadCvValues('pi','mi','mnuTab','mnuTab2')">
 269               <b>{$MOD.LBL_STEP_3_TITLE}</b>
 270              </td>
 271              <td class="dvtUnSelectedCell" style="width: 100px;" align="center" nowrap id="mi" onclick="fnLoadCvValues('mi','pi','mnuTab2','mnuTab')">
 272               <b>{$MOD.LBL_STEP_4_TITLE}</b>
 273              </td>
 274              <td class="dvtTabCache" nowrap style="width:55%;">&nbsp;</td>
 275             </tr>
 276             </tbody>
 277                </table>
 278           </td>
 279              </tr>
 280          <tr>
 281           <td align="left" valign="top">
 282            <div id="mnuTab">
 283               <table width="100%" cellspacing="0" cellpadding="5" class="dvtContentSpace">
 284                        <tr><td><br>
 285              <table width="75%" border="0" cellpadding="5" cellspacing="0" align="center">
 286                <tr><td colspan="2" class="detailedViewHeader"><b>{$MOD.Simple_Time_Filter}</b></td></tr>
 287                <tr>
 288                   <td width="75%" align="right" class="dvtCellLabel">{$MOD.LBL_Select_a_Column} :</td>
 289                   <td width="25%" class="dvtCellInfo">
 290                  <select name="stdDateFilterField" class="select">
 291                  {foreach item=stdfilter from=$STDFILTERCOLUMNS}
 292                      <option {$stdfilter.selected} value={$stdfilter.value}>{$stdfilter.text}</option>    
 293                  {/foreach}
 294                                  </select>
 295                </tr>
 296                <tr>
 297                   <td align="right" class="dvtCellLabel">{$MOD.Select_Duration} :</td>
 298                   <td class="dvtCellInfo">
 299                      <select name="stdDateFilter" class="select" onchange='showDateRange(this.options[this.selectedIndex].value )'>
 300                  {foreach item=duration from=$STDFILTERCRITERIA}
 301                      <option {$duration.selected} value={$duration.value}>{$duration.text}</option>
 302                  {/foreach}
 303                  </select>
 304                   </td>
 305                </tr>
 306                <tr>
 307                   <td align="right" class="dvtCellLabel">{$MOD.Start_Date} :</td>
 308                   <td width="25%" align=left class="dvtCellInfo">
 309                   <input name="startdate" id="jscal_field_date_start" type="text" size="10" class="textField" value="{$STARTDATE}">
 310                   <img src="{$IMAGE_PATH}calendar.gif" id="jscal_trigger_date_start">
 311                   <script type="text/javascript">
 312                        Calendar.setup ({ldelim}
 313                       inputField : "jscal_field_date_start", ifFormat : "%Y-%m-%d", showsTime : false, button : "jscal_trigger_date_start", singleClick : true, step : 1
 314                      {rdelim})
 315                   </script></td>
 316                        </tr>
 317                <tr>
 318                   <td align="right" class="dvtCellLabel">{$MOD.End_Date} :</td> 
 319                     <td width="25%" align=left class="dvtCellInfo">
 320                   <input name="enddate" id="jscal_field_date_end" type="text" size="10" class="textField" value="{$ENDDATE}">
 321                   <img src="{$IMAGE_PATH}calendar.gif" id="jscal_trigger_date_end">
 322                   <script type="text/javascript">
 323                      Calendar.setup ({ldelim}
 324                      inputField : "jscal_field_date_end", ifFormat : "%Y-%m-%d", showsTime : false, button : "jscal_trigger_date_end", singleClick : true, step : 1
 325                      {rdelim})
 326                   </script></td>
 327                </tr>
 328              </table>
 329                </td></tr>
 330                <tr><td>&nbsp;</td></tr>
 331              </table>
 332     </div>
 333     <div id="mnuTab2">
 334        <table width="100%" cellspacing="0" cellpadding="5" class="dvtContentSpace">
 335         <tr><td>&nbsp;</td></tr>
 336         <tr><td class="dvtCellInfo">{$MOD.LBL_AF_HDR1}<br /><br />
 337      <li style="margin-left:30px;">{$MOD.LBL_AF_HDR2}</li>
 338      <li style="margin-left:30px;">{$MOD.LBL_AF_HDR3}</li>
 339      <br /><br />
 340         </td></tr>
 341         <tr><td>
 342      <table width="75%" border="0" cellpadding="5" cellspacing="0" align="center">
 343        <tr><td colspan="3" class="detailedViewHeader"><b>{$MOD.LBL_RULE}</b></td></tr>
 344        
 345        <tr class="dvtCellLabel">
 346            <td><select name="fcol1" id="fcol1" onchange="updatefOptions(this, 'fop1');">
 347                <option value="">{$MOD.LBL_NONE}</option>
 348                {foreach item=filteroption key=label from=$BLOCK1}
 349                  <optgroup label="{$label}" class=\"select\" style=\"border:none\">
 350                  {foreach item=text from=$filteroption}
 351                    <option {$text.selected} value={$text.value}>{$text.text}</option>
 352                  {/foreach}
 353                {/foreach}
 354                </select> &nbsp; <select name="fop1" id="fop1">
 355                <option value="">{$MOD.LBL_NONE}</option>
 356                {foreach item=criteria from=$FOPTION1}
 357                  <option {$criteria.selected} value={$criteria.value}>{$criteria.text}</option>
 358                {/foreach}
 359                </select>&nbsp; <input name="fval1" id="fval1" type="text" size=30 maxlength=80 value="{$VALUE1}">
 360              &nbsp;{$MOD.LBL_AND}</td>
 361          </tr>
 362      <tr class="dvtCellInfo">
 363            <td><select name="fcol2" id="fcol2" onchange="updatefOptions(this, 'fop2');">
 364                <option value="">{$MOD.LBL_NONE}</option>
 365                {foreach item=filteroption key=label from=$BLOCK2}
 366                  <optgroup label="{$label}" class=\"select\" style=\"border:none\">
 367                  {foreach item=text from=$filteroption}
 368                    <option {$text.selected} value={$text.value}>{$text.text}</option>
 369                  {/foreach}
 370                {/foreach}
 371                </select> &nbsp; <select name="fop2" id="fop2">
 372                <option value="">{$MOD.LBL_NONE}</option>
 373                {foreach item=criteria from=$FOPTION2}
 374                  <option {$criteria.selected} value={$criteria.value}>{$criteria.text}</option>
 375                {/foreach}
 376                </select>&nbsp; <input name="fval2" id="fval2" type="text" size=30 maxlength=80 value="{$VALUE2}">
 377              &nbsp;{$MOD.LBL_AND}</td>
 378          </tr>
 379      <tr class="dvtCellLabel">
 380            <td><select name="fcol3" id="fcol3" onchange="updatefOptions(this, 'fop3');">
 381                <option value="">{$MOD.LBL_NONE}</option>
 382                {foreach item=filteroption key=label from=$BLOCK3}
 383                  <optgroup label="{$label}" class=\"select\" style=\"border:none\">
 384                  {foreach item=text from=$filteroption}
 385                    <option {$text.selected} value={$text.value}>{$text.text}</option>
 386                  {/foreach}
 387                {/foreach}
 388                </select> &nbsp; <select name="fop3" id="fop3">
 389                <option value="">{$MOD.LBL_NONE}</option>
 390                {foreach item=criteria from=$FOPTION3}
 391                  <option {$criteria.selected} value={$criteria.value}>{$criteria.text}</option>
 392                {/foreach}
 393                </select>&nbsp; <input name="fval3" id="fval3" type="text" size=30 maxlength=80 value="{$VALUE3}">
 394              &nbsp;{$MOD.LBL_AND}</td>
 395          </tr>
 396      <tr class="dvtCellInfo">
 397            <td><select name="fcol4" id="fcol4" onchange="updatefOptions(this, 'fop4');">
 398                <option value="">{$MOD.LBL_NONE}</option>
 399                {foreach item=filteroption key=label from=$BLOCK4}
 400                  <optgroup label="{$label}" class=\"select\" style=\"border:none\">
 401                  {foreach item=text from=$filteroption}
 402                    <option {$text.selected} value={$text.value}>{$text.text}</option>
 403                  {/foreach}
 404                {/foreach}
 405                </select> &nbsp; <select name="fop4" id="fop4">
 406                <option value="">None</option>
 407                {foreach item=criteria from=$FOPTION4}
 408                  <option {$criteria.selected} value={$criteria.value}>{$criteria.text}</option>
 409                {/foreach}
 410                </select>&nbsp; <input name="fval4" id="fval4" type="text" size=30 maxlength=80 value="{$VALUE4}">
 411              &nbsp;{$MOD.LBL_AND}</td>
 412          </tr>
 413      <tr class="dvtCellLabel">
 414            <td><select name="fcol5" id="fcol5" onchange="updatefOptions(this, 'fop5');">
 415                <option value="">{$MOD.LBL_NONE}</option>
 416                {foreach item=filteroption key=label from=$BLOCK5}
 417                  <optgroup label="{$label}" class=\"select\" style=\"border:none\">
 418                  {foreach item=text from=$filteroption}
 419                    <option {$text.selected} value={$text.value}>{$text.text}</option>
 420                  {/foreach}
 421                {/foreach}
 422                </select> &nbsp; <select name="fop5" id="fop5">
 423                <option value="">{$MOD.LBL_NONE}</option>
 424                {foreach item=criteria from=$FOPTION5}
 425                  <option {$criteria.selected} value={$criteria.value}>{$criteria.text}</option>
 426                {/foreach}
 427                </select>&nbsp; <input name="fval5" id="fval5" type="text" size=30 maxlength=80 value="{$VALUE5}">
 428              &nbsp;</td>
 429          </tr>
 430  
 431        {*section name=advancedFilter start=1 loop=6 step=1}
 432        <tr class="{cycle values="dvtCellInfo,dvtCellLabel"}">
 433          <td align="left" width="33%">
 434            <select name="fcol{$smarty.section.advancedFilter.index}" id="fcol{$smarty.section.advancedFilter.index}" onchange="updatefOptions(this, 'fop{$smarty.section.advancedFilter.index}'); class="detailedViewTextBox">
 435            <option value="">{$MOD.LBL_NONE}</option>
 436            {foreach item=filteroption key=label from=$BLOCK}
 437          <optgroup label="{$label}" class=\"select\" style=\"border:none\">
 438          {foreach item=text from=$filteroption}
 439            <option {$text.selected} value={$text.value}>{$text.text}</option>
 440          {/foreach}
 441            {/foreach}
 442            </select>
 443          </td>
 444          <td align="left" width="33%">
 445            <select name="fcol{$smarty.section.advancedFilter.index}" id="fcol{$smarty.section.advancedFilter.index}" class="detailedViewTextBox">
 446            <option value="">{$MOD.LBL_NONE}</option>
 447            {foreach item=criteria from=$FOPTION}
 448          <option {$criteria.selected} value={$criteria.value}>{$criteria.text}</option>
 449            {/foreach}
 450            </select>
 451          </td>
 452          <td width="34%" nowrap><input name="txt" value="" class="detailedViewTextBox" type="text"  onfocus="this.className='detailedViewTextBoxOn'" onblur="this.className='detailedViewTextBox'"/>&nbsp;And</td>
 453        </tr>
 454        {/section*}
 455      </table>
 456         </td></tr>
 457         <tr><td>&nbsp;</td></tr>
 458       </table>
 459     </div>
 460    </td></tr>
 461    </table>
 462    </td></tr>
 463    <tr><td colspan="4">&nbsp;</td></tr>
 464    <tr><td colspan="4" style="padding: 5px;">
 465      <div align="center">
 466        <input title="{$APP.LBL_SAVE_BUTTON_LABEL} [Alt+S]" accesskey="S" class="crmbutton small save"  name="button2" value="{$APP.LBL_SAVE_BUTTON_LABEL}" style="width: 70px;" type="submit" onClick="return checkDuplicate();"/>
 467        <input title="{$APP.LBL_CANCEL_BUTTON_LABEL} [Alt+X]" accesskey="X" class="crmbutton small cancel" name="button2" onclick='window.history.back()' value="{$APP.LBL_CANCEL_BUTTON_LABEL}" style="width: 70px;" type="button" />
 468      </div>
 469    </td></tr>
 470    <tr><td colspan="4">&nbsp;</td></tr>
 471  </table>
 472  {$STDFILTER_JAVASCRIPT}
 473  {$JAVASCRIPT}
 474  <!-- to show the mandatory fields while creating new customview -->
 475  <script language="javascript" type="text/javascript">
 476  var k;
 477  var colOpts;
 478  var manCheck = new Array({$MANDATORYCHECK});
 479  {literal}
 480  if(document.CustomView.record.value == '')
 481  {
 482    for(k=0;k<manCheck.length;k++)
 483    {
 484        selname = "column"+(k+1);
 485        colOpts = document.getElementById(selname).options;
 486        for (l=0;l<colOpts.length;l++)
 487        {
 488          if(colOpts[l].value == manCheck[k])
 489          {
 490            colOpts[l].selected = true;
 491          }
 492        }
 493    }
 494  }
 495  function checkDuplicate()
 496  {
 497      var cvselect_array = new Array('column1','column2','column3','column4','column5','column6','column7','column8','column9')
 498          for(var loop=0;loop < cvselect_array.length-1;loop++)
 499          {
 500              selected_cv_columnvalue = $(cvselect_array[loop]).options[$(cvselect_array[loop]).selectedIndex].value;
 501              if(selected_cv_columnvalue != '')
 502              {    
 503                  for(var iloop=0;iloop < cvselect_array.length;iloop++)
 504                  {
 505                      if(iloop == loop)
 506                          iloop++;
 507                      selected_cv_icolumnvalue = $(cvselect_array[iloop]).options[$(cvselect_array[iloop]).selectedIndex].value;    
 508                      if(selected_cv_columnvalue == selected_cv_icolumnvalue)
 509                      {
 510                          alert('Columns cannot be duplicated');
 511                          $(cvselect_array[iloop]).selectedIndex = 0;
 512                          return false;
 513                      }
 514  
 515                  }
 516              }
 517          }
 518          return true;
 519  }
 520  checkDuplicate();
 521  {/literal}
 522  </script>


Généré le : Sun Feb 25 10:22:19 2007 par Balluche grâce à PHPXref 0.7