[ Index ]
 

Code source de vtiger CRM 5.0.2

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

title

Body

[fermer]

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

   1  {*<!--
   2  
   3  /*********************************************************************************
   4  ** The contents of this file are subject to the vtiger CRM Public License Version 1.0
   5   * ("License"); You may not use this file except in compliance with the License
   6   * The Original Code is:  vtiger CRM Open Source
   7   * The Initial Developer of the Original Code is vtiger.
   8   * Portions created by vtiger are Copyright (C) vtiger.
   9   * All Rights Reserved.
  10  *
  11   ********************************************************************************/
  12  
  13  -->*}
  14  
  15  <!-- Added this file to display the fields in Create Entity page based on ui types  -->
  16  {foreach key=label item=subdata from=$data}
  17      {if $header eq 'Product Details'}
  18          <tr>
  19      {else}
  20          <tr style="height:25px">
  21      {/if}
  22      {foreach key=mainlabel item=maindata from=$subdata}
  23          {assign var="uitype" value="$maindata[0][0]"}
  24          {assign var="fldlabel" value="$maindata[1][0]"}
  25          {assign var="fldlabel_sel" value="$maindata[1][1]"}
  26          {assign var="fldlabel_combo" value="$maindata[1][2]"}
  27          {assign var="fldname" value="$maindata[2][0]"}
  28          {assign var="fldvalue" value="$maindata[3][0]"}
  29          {assign var="secondvalue" value="$maindata[3][1]"}
  30          {assign var="thirdvalue" value="$maindata[3][2]"}
  31          {assign var="vt_tab" value="$maindata[4][0]"}
  32  
  33          {if $uitype eq 2}
  34              <td width=20% class="dvtCellLabel" align=right>
  35                  <font color="red">*</font>{$fldlabel}
  36              </td>
  37              <td width=30% align=left class="dvtCellInfo">
  38                  <input type="text" name="{$fldname}" tabindex="{$vt_tab}" value="{$fldvalue}" tabindex="{$vt_tab}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'">
  39              </td>
  40          {elseif $uitype eq 11 || $uitype eq 1 || $uitype eq 13 || $uitype eq 7 || $uitype eq 9}
  41              <td width=20% class="dvtCellLabel" align=right>{$fldlabel}</td>
  42  
  43              {if $fldname eq 'tickersymbol' && $MODULE eq 'Accounts'}
  44                  <td width=30% align=left class="dvtCellInfo">
  45                      <input type="text" name="{$fldname}" tabindex="{$vt_tab}" id ="{$fldname}" value="{$fldvalue}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn';" onBlur="this.className='detailedViewTextBox';{if $fldname eq 'tickersymbol' && $MODULE eq 'Accounts'}sensex_info(){/if}">
  46                      <span id="vtbusy_info" style="display:none;">
  47                          <img src="{$IMAGE_PATH}vtbusy.gif" border="0"></span>
  48                  </td>
  49              {else}
  50                  <td width=30% align=left class="dvtCellInfo"><input type="text" tabindex="{$vt_tab}" name="{$fldname}" id ="{$fldname}" value="{$fldvalue}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'"></td>
  51              {/if}
  52          {elseif $uitype eq 19 || $uitype eq 20}
  53              <!-- In Add Comment are we should not display anything -->
  54              {if $fldlabel eq $MOD.LBL_ADD_COMMENT}
  55                  {assign var=fldvalue value=""}
  56              {/if}
  57              <td width=20% class="dvtCellLabel" align=right>
  58                  {if $uitype eq 20}
  59                      <font color="red">*</font>
  60                  {/if}
  61                  {$fldlabel}
  62              </td>
  63              <td colspan=3>
  64                  <textarea class="detailedViewTextBox" tabindex="{$vt_tab}" onFocus="this.className='detailedViewTextBoxOn'" name="{$fldname}"  onBlur="this.className='detailedViewTextBox'" cols="90" rows="8">{$fldvalue}</textarea>
  65              </td>
  66          {elseif $uitype eq 21 || $uitype eq 24}
  67              <td width=20% class="dvtCellLabel" align=right>
  68                  {if $uitype eq 24}
  69                      <font color="red">*</font>
  70                  {/if}
  71                  {$fldlabel}
  72              </td>
  73              <td width=30% align=left class="dvtCellInfo">
  74                  <textarea value="{$fldvalue}" name="{$fldname}" tabindex="{$vt_tab}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'" rows=2>{$fldvalue}</textarea>
  75              </td>
  76          {elseif $uitype eq 15 || $uitype eq 16 || $uitype eq 111} <!-- uitype 111 added for noneditable existing picklist values - ahmed -->
  77              <td width="20%" class="dvtCellLabel" align=right>
  78                  {if $uitype eq 16}
  79                      <font color="red">*</font>
  80                  {/if}
  81                  {$fldlabel}
  82              </td>
  83              <td width="30%" align=left class="dvtCellInfo">
  84                 <select name="{$fldname}" tabindex="{$vt_tab}" class="small">
  85                  {foreach item=arr from=$fldvalue}
  86                      {foreach key=sel_value item=value from=$arr}
  87                          <option value="{$sel_value}" {$value}>
  88                                                  {if $APP.$sel_value neq ''}
  89                                                  {$APP.$sel_value}
  90                                                  {else}
  91                                                          {$sel_value}
  92                                                  {/if}
  93                                                  </option>
  94                      {/foreach}
  95                  {/foreach}
  96                 </select>
  97              </td>
  98          {elseif $uitype eq 33}
  99              <td width="20%" class="dvtCellLabel" align=right>
 100                  {$fldlabel}
 101              </td>
 102              <td width="30%" align=left class="dvtCellInfo">
 103                 <select MULTIPLE name="{$fldname}[]" size="4" style="width:160px;" tabindex="{$vt_tab}" class="small">
 104                                                                          {foreach key=sel_value item=value from=$arr}
 105                                                              <option value="{$sel_value}" {$value}>{if $APP.$sel_value}{$APP.$sel_value}{else}{$sel_value}{/if}</option>
 106                                                          
 107                                                          {/foreach}
 108                 </select>
 109              </td>
 110  
 111          {elseif $uitype eq 53}
 112              <td width="20%" class="dvtCellLabel" align=right>
 113                  {$fldlabel}
 114              </td>
 115              <td width="30%" align=left class="dvtCellInfo">
 116                  {assign var=check value=1}
 117                  {foreach key=key_one item=arr from=$fldvalue}
 118                      {foreach key=sel_value item=value from=$arr}
 119                          {if $value ne ''}
 120                              {assign var=check value=$check*0}
 121                          {else}
 122                              {assign var=check value=$check*1}
 123                          {/if}
 124                      {/foreach}
 125                  {/foreach}
 126  
 127                  {if $check eq 0}
 128                      {assign var=select_user value='checked'}
 129                      {assign var=style_user value='display:block'}
 130                      {assign var=style_group value='display:none'}
 131                  {else}
 132                      {assign var=select_group value='checked'}
 133                      {assign var=style_user value='display:none'}
 134                      {assign var=style_group value='display:block'}
 135                  {/if}
 136  
 137                  <input type="radio" tabindex="{$vt_tab}" name="assigntype" {$select_user} value="U" onclick="toggleAssignType(this.value)" >&nbsp;{$APP.LBL_USER}
 138  
 139                  {if $secondvalue neq ''}
 140                      <input type="radio" name="assigntype" {$select_group} value="T" onclick="toggleAssignType(this.value)">&nbsp;{$APP.LBL_GROUP}
 141                  {/if}
 142                  <span id="assign_user" style="{$style_user}">
 143                      <select name="assigned_user_id" class="small">
 144                          {foreach key=key_one item=arr from=$fldvalue}
 145                              {foreach key=sel_value item=value from=$arr}
 146                                  <option value="{$key_one}" {$value}>{$sel_value}</option>
 147                              {/foreach}
 148                          {/foreach}
 149                      </select>
 150                  </span>
 151  
 152                  {if $secondvalue neq ''}
 153                      <span id="assign_team" style="{$style_group}">
 154                          <select name="assigned_group_name" class="small">';
 155                              {foreach key=key_one item=arr from=$secondvalue}
 156                                  {foreach key=sel_value item=value from=$arr}
 157                                      <option value="{$sel_value}" {$value}>{$sel_value}</option>
 158                                  {/foreach}
 159                              {/foreach}
 160                          </select>
 161                      </span>
 162                  {/if}
 163              </td>
 164          {elseif $uitype eq 52 || $uitype eq 77}
 165              <td width="20%" class="dvtCellLabel" align=right>
 166                  {$fldlabel}
 167              </td>
 168              <td width="30%" align=left class="dvtCellInfo">
 169                  {if $uitype eq 52}
 170                      <select name="assigned_user_id" class="small">
 171                  {elseif $uitype eq 77}
 172                      <select name="assigned_user_id1" tabindex="{$vt_tab}" class="small">
 173                  {else}
 174                      <select name="{$fldname}" tabindex="{$vt_tab}" class="small">
 175                  {/if}
 176  
 177                  {foreach key=key_one item=arr from=$fldvalue}
 178                      {foreach key=sel_value item=value from=$arr}
 179                          <option value="{$key_one}" {$value}>{$sel_value}</option>
 180                      {/foreach}
 181                  {/foreach}
 182                  </select>
 183              </td>
 184          {elseif $uitype eq 51}
 185              {if $MODULE eq 'Accounts'}
 186                  {assign var='popuptype' value = 'specific_account_address'}
 187              {else}
 188                  {assign var='popuptype' value = 'specific_contact_account_address'}
 189              {/if}
 190              <td width="20%" class="dvtCellLabel" align=right>
 191                  {$fldlabel}
 192              </td>
 193              <td width="30%" align=left class="dvtCellInfo">
 194                  <input readonly name="account_name" style="border:1px solid #bababa;" type="text" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$secondvalue}">&nbsp;<img tabindex="{$vt_tab}" src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Accounts&action=Popup&popuptype={$popuptype}&form=TasksEditView&form_submit=false","test","width=640,height=602,resizable=0,scrollbars=0");' align="absmiddle" style='cursor:hand;cursor:pointer'>&nbsp;<input type="image" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.account_id.value=''; this.form.account_name.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
 195              </td>
 196  
 197          {elseif $uitype eq 50}
 198              <td width="20%" class="dvtCellLabel" align=right>
 199                  <font color="red">*</font>{$fldlabel}
 200              </td>
 201              <td width="30%" align=left class="dvtCellInfo">
 202                  <input readonly name="account_name" type="text" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$secondvalue}">&nbsp;<img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Accounts&action=Popup&popuptype=specific&form=TasksEditView&form_submit=false","test","width=640,height=602,resizable=0,scrollbars=0");' align="absmiddle" style='cursor:hand;cursor:pointer'>
 203              </td>
 204          {elseif $uitype eq 73}
 205              <td width="20%" class="dvtCellLabel" align=right>
 206                  <font color="red">*</font>{$fldlabel}
 207              </td>
 208              <td width="30%" align=left class="dvtCellInfo">
 209                  <input readonly name="account_name" type="text" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$secondvalue}">&nbsp;<img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Accounts&action=Popup&popuptype=specific_account_address&form=TasksEditView&form_submit=false","test","width=640,height=602,resizable=0,scrollbars=0");' align="absmiddle" style='cursor:hand;cursor:pointer'>
 210              </td>
 211  
 212          {elseif $uitype eq 75 || $uitype eq 81}
 213              <td width="20%" class="dvtCellLabel" align=right>
 214                  {if $uitype eq 81}
 215                      <font color="red">*</font>
 216                      {assign var="pop_type" value="specific_vendor_address"}
 217                      {else}{assign var="pop_type" value="specific"}
 218                  {/if}
 219                  {$fldlabel}
 220              </td>
 221              <td width="30%" align=left class="dvtCellInfo">
 222                  <input name="vendor_name" readonly type="text" style="border:1px solid #bababa;" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$secondvalue}">&nbsp;<img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Vendors&action=Popup&html=Popup_picker&popuptype={$pop_type}&form=EditView","test","width=640,height=602,resizable=0,scrollbars=0");' align="absmiddle" style='cursor:hand;cursor:pointer'>
 223                  {if $uitype eq 75}
 224                      &nbsp;<input type="image" tabindex="{$vt_tab}" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.vendor_id.value='';this.form.vendor_name.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
 225                  {/if}
 226              </td>
 227          {elseif $uitype eq 57}
 228              <td width="20%" class="dvtCellLabel" align=right>
 229                  {$fldlabel}
 230              </td>
 231              <td width="30%" align=left class="dvtCellInfo">
 232                  <input name="contact_name" readonly type="text" style="border:1px solid #bababa;" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$secondvalue}">&nbsp;<img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Contacts&action=Popup&html=Popup_picker&popuptype=specific&form=EditView","test","width=640,height=602,resizable=0,scrollbars=0");' align="absmiddle" style='cursor:hand;cursor:pointer'>&nbsp;<input type="image" tabindex="{$vt_tab}" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.contact_id.value=''; this.form.contact_name.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
 233              </td>
 234          
 235          {elseif $uitype eq 58}
 236              <td width="20%" class="dvtCellLabel" align=right>
 237                  {$fldlabel}
 238              </td>
 239              <td width="30%" align=left class="dvtCellInfo">
 240                  <input name="campaignname" readonly type="text" style="border:1px solid #bababa;" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$secondvalue}">&nbsp;<img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Campaigns&action=Popup&html=Popup_picker&popuptype=specific_campaign&form=EditView","test","width=640,height=602,resizable=0,scrollbars=0");' align="absmiddle" style='cursor:hand;cursor:pointer'>&nbsp;<input type="image" tabindex="{$vt_tab}" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.campaignid.value=''; this.form.campaignname.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
 241              </td>
 242  
 243          {elseif $uitype eq 80}
 244              <td width="20%" class="dvtCellLabel" align=right>
 245                  {$fldlabel}
 246              </td>
 247              <td width="30%" align=left class="dvtCellInfo">
 248                  <input name="salesorder_name" readonly type="text" style="border:1px solid #bababa;" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$secondvalue}">&nbsp;<img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=SalesOrder&action=Popup&html=Popup_picker&popuptype=specific&form=EditView","test","width=640,height=602,resizable=0,scrollbars=0");' align="absmiddle" style='cursor:hand;cursor:pointer'>&nbsp;<input type="image" tabindex="{$vt_tab}" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.salesorder_id.value=''; this.form.salesorder_name.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
 249              </td>
 250  
 251          {elseif $uitype eq 78}
 252              <td width="20%" class="dvtCellLabel" align=right>
 253                  {$fldlabel}
 254              </td>
 255              <td width="30%" align=left class="dvtCellInfo">
 256                  <input name="quote_name" readonly type="text" style="border:1px solid #bababa;" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$QUOTE_ID}">&nbsp;<img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Quotes&action=Popup&html=Popup_picker&popuptype=specific&form=EditView","test","width=640,height=602,resizable=0,scrollbars=0");' align="absmiddle" style='cursor:hand;cursor:pointer'>&nbsp;<input type="image" tabindex="{$vt_tab}" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.quote_id.value=''; this.form.quote_name.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
 257              </td>
 258  
 259          {elseif $uitype eq 76}
 260              <td width="20%" class="dvtCellLabel" align=right>
 261                  {$fldlabel}
 262              </td>
 263              <td width="30%" align=left class="dvtCellInfo">
 264                  <input name="potential_name" readonly type="text" style="border:1px solid #bababa;" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$secondvalue}">&nbsp;<img tabindex="{$vt_tab}" src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Potentials&action=Popup&html=Popup_picker&popuptype=specific_potential_account_address&form=EditView","test","width=640,height=602,resizable=0,scrollbars=0");' align="absmiddle" style='cursor:hand;cursor:pointer'>&nbsp;<input type="image" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.potential_id.value=''; this.form.potential_name.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
 265              </td>
 266  
 267          {elseif $uitype eq 17}
 268              <td width="20%" class="dvtCellLabel" align=right>
 269                  {$fldlabel}
 270              </td>
 271              <td width="30%" align=left class="dvtCellInfo">
 272                  &nbsp;&nbsp;http://&nbsp;
 273                  <input type="text" tabindex="{$vt_tab}" name="{$fldname}" style="border:1px solid #bababa;" size="27" onFocus="this.className='detailedViewTextBoxOn'"onBlur="this.className='detailedViewTextBox'" value="{$fldvalue}">
 274              </td>
 275  
 276          {elseif $uitype eq 85}
 277                          <td width="20%" class="dvtCellLabel" align=right>
 278                                  {$fldlabel}
 279                          </td>
 280                          <td width="30%" align=left class="dvtCellInfo">
 281                                  <img src="{$IMAGE_PATH}skype.gif" alt="Skype" title="Skype" LANGUAGE=javascript align="absmiddle"></img><input type="text" tabindex="{$vt_tab}" name="{$fldname}" style="border:1px solid #bababa;" size="27" onFocus="this.className='detailedViewTextBoxOn'"onBlur="this.className='detailedViewTextBox'" value="{$fldvalue}">
 282                          </td>
 283  
 284          {elseif $uitype eq 71 || $uitype eq 72}
 285              <td width="20%" class="dvtCellLabel" align=right>
 286                  {if $uitype eq 72}
 287                      <font color="red">*</font>
 288                  {/if}
 289                  {$fldlabel}
 290              </td>
 291              <td width="30%" align=left class="dvtCellInfo">
 292                  <input name="{$fldname}" tabindex="{$vt_tab}" type="text" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'"  value="{$fldvalue}">
 293              </td>
 294  
 295          {elseif $uitype eq 56}
 296              <td width="20%" class="dvtCellLabel" align=right>
 297                  {$fldlabel}
 298              </td>
 299              {if $fldname eq 'notime' && $ACTIVITY_MODE eq 'Events'}
 300                  {if $fldvalue eq 1}
 301                      <td width="30%" align=left class="dvtCellInfo">
 302                          <input name="{$fldname}" type="checkbox" tabindex="{$vt_tab}" onclick="toggleTime()" checked>
 303                      </td>
 304                  {else}
 305                      <td width="30%" align=left class="dvtCellInfo">
 306                          <input name="{$fldname}" tabindex="{$vt_tab}" type="checkbox" onclick="toggleTime()" >
 307                      </td>
 308                  {/if}
 309              {else}
 310                  {if $fldvalue eq 1}
 311                      <td width="30%" align=left class="dvtCellInfo">
 312                          <input name="{$fldname}" type="checkbox" tabindex="{$vt_tab}" checked>
 313                      </td>
 314                  {else}
 315                      <td width="30%" align=left class="dvtCellInfo">
 316                          <input name="{$fldname}" tabindex="{$vt_tab}" type="checkbox">
 317                      </td>
 318                  {/if}
 319              {/if}
 320          {elseif $uitype eq 23 || $uitype eq 5 || $uitype eq 6}
 321              <td width="20%" class="dvtCellLabel" align=right>
 322                  {$fldlabel}
 323              </td>
 324              <td width="30%" align=left class="dvtCellInfo">
 325                  {foreach key=date_value item=time_value from=$fldvalue}
 326                      {assign var=date_val value="$date_value"}
 327                      {assign var=time_val value="$time_value"}
 328                  {/foreach}
 329  
 330                  <input name="{$fldname}" tabindex="{$vt_tab}" id="jscal_field_{$fldname}" type="text" style="border:1px solid #bababa;" size="11" maxlength="10" value="{$date_val}">
 331                  <img src="{$IMAGE_PATH}calendar.gif" id="jscal_trigger_{$fldname}">
 332  
 333                  {if $uitype eq 6}
 334                      <input name="time_start" tabindex="{$vt_tab}" style="border:1px solid #bababa;" size="5" maxlength="5" type="text" value="{$time_val}">
 335                  {/if}
 336  
 337                  {foreach key=date_format item=date_str from=$secondvalue}
 338                      {assign var=dateFormat value="$date_format"}
 339                      {assign var=dateStr value="$date_str"}
 340                  {/foreach}
 341  
 342                  {if $uitype eq 5 || $uitype eq 23}
 343                      <br><font size=1><em old="(yyyy-mm-dd)">({$dateStr})</em></font>
 344                  {else}
 345                      <br><font size=1><em old="(yyyy-mm-dd)">({$dateStr})</em></font>
 346                  {/if}
 347  
 348                  <script type="text/javascript">
 349                      Calendar.setup ({ldelim}
 350                          inputField : "jscal_field_{$fldname}", ifFormat : "{$dateFormat}", showsTime : false, button : "jscal_trigger_{$fldname}", singleClick : true, step : 1
 351                      {rdelim})
 352                  </script>
 353  
 354  
 355              </td>
 356  
 357          {elseif $uitype eq 63}
 358              <td width="20%" class="dvtCellLabel" align=right>
 359                  {$fldlabel}
 360              </td>
 361              <td width="30%" align=left class="dvtCellInfo">
 362                  <input name="{$fldname}" type="text" size="2" value="{$fldvalue}" tabindex="{$vt_tab}" >&nbsp;
 363                  <select name="duration_minutes" tabindex="{$vt_tab}" class="small">
 364                      {foreach key=labelval item=selectval from=$secondvalue}
 365                          <option value="{$labelval}" {$selectval}>{$labelval}</option>
 366                      {/foreach}
 367                  </select>
 368  
 369          {elseif $uitype eq 68 || $uitype eq 66 || $uitype eq 62}
 370              <td width="20%" class="dvtCellLabel" align=right>
 371                  <select class="small" name="parent_type" onChange='document.EditView.parent_name.value=""; document.EditView.parent_id.value=""'>
 372                      {section name=combo loop=$fldlabel}
 373                          <option value="{$fldlabel_combo[combo]}" {$fldlabel_sel[combo]}>{$fldlabel[combo]}</option>
 374                      {/section}
 375                  </select>
 376              </td>
 377              <td width="30%" align=left class="dvtCellInfo">
 378                  <input name="{$fldname}" type="hidden" value="{$secondvalue}">
 379                  <input name="parent_name" readonly type="text" style="border:1px solid #bababa;" value="{$fldvalue}">
 380                  &nbsp;<img src="{$IMAGE_PATH}select.gif" tabindex="{$vt_tab}" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module="+ document.EditView.parent_type.value +"&action=Popup&html=Popup_picker&form=HelpDeskEditView","test","width=640,height=602,resizable=0,scrollbars=0,top=150,left=200");' align="absmiddle" style='cursor:hand;cursor:pointer'>&nbsp;<input type="image" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.parent_id.value=''; this.form.parent_name.value=''; return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
 381              </td>
 382  
 383          {elseif $uitype eq 357}
 384              <td width="20%" class="dvtCellLabel" align=right>To:&nbsp;</td>
 385              <td width="90%" colspan="3">
 386                  <input name="{$fldname}" type="hidden" value="{$secondvalue}">
 387                  <textarea readonly name="parent_name" cols="70" rows="2">{$fldvalue}</textarea>&nbsp;
 388                  <select name="parent_type" class="small">
 389                      {foreach key=labelval item=selectval from=$fldlabel}
 390                          <option value="{$labelval}" {$selectval}>{$labelval}</option>
 391                      {/foreach}
 392                  </select>
 393                  &nbsp;<img tabindex="{$vt_tab}" src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module="+ document.EditView.parent_type.value +"&action=Popup&html=Popup_picker&form=HelpDeskEditView","test","width=640,height=602,resizable=0,scrollbars=0,top=150,left=200");' align="absmiddle" style='cursor:hand;cursor:pointer'>&nbsp;<input type="image" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.parent_id.value=''; this.form.parent_name.value=''; return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
 394              </td>
 395             <tr style="height:25px">
 396              <td width="20%" class="dvtCellLabel" align=right>CC:&nbsp;</td>    
 397              <td width="30%" align=left class="dvtCellInfo">
 398                  <input name="ccmail" type="text" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'"  value="">
 399              </td>
 400              <td width="20%" class="dvtCellLabel" align=right>BCC:&nbsp;</td>
 401              <td width="30%" align=left class="dvtCellInfo">
 402                  <input name="bccmail" type="text" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'"  value="">
 403              </td>
 404             </tr>
 405  
 406          {elseif $uitype eq 59}
 407              <td width="20%" class="dvtCellLabel" align=right>
 408                  {$fldlabel}
 409              </td>
 410              <td width="30%" align=left class="dvtCellInfo">
 411                  <input name="{$fldname}" type="hidden" value="{$secondvalue}">
 412                  <input name="product_name" readonly type="text" value="{$fldvalue}">&nbsp;<img tabindex="{$vt_tab}" src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Products&action=Popup&html=Popup_picker&form=HelpDeskEditView&popuptype=specific","test","width=640,height=602,resizable=0,scrollbars=0,top=150,left=200");' align="absmiddle" style='cursor:hand;cursor:pointer'>&nbsp;<input type="image" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.product_id.value=''; this.form.product_name.value=''; return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
 413              </td>
 414  
 415          {elseif $uitype eq 55} 
 416              <td width="20%" class="dvtCellLabel" align=right>{$fldlabel}</td>
 417              <td width="30%" align=left class="dvtCellInfo">
 418                  <select name="salutationtype" class="small">
 419                      {foreach item=arr from=$fldvalue}
 420                          {foreach key=sel_value item=value from=$arr}
 421                              <option value="{$sel_value}" {$value}>{$sel_value}</option>
 422                          {/foreach}
 423                      {/foreach}
 424                  </select>
 425                  <input type="text" name="{$fldname}" tabindex="{$vt_tab}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'" value= "{$secondvalue}">
 426              </td>
 427  
 428          {elseif $uitype eq 22}
 429              <td width="20%" class="dvtCellLabel" align=right>
 430                  <font color="red">*</font>{$fldlabel}
 431              </td>
 432              <td width="30%" align=left class="dvtCellInfo">
 433                  <textarea name="{$fldname}" cols="30" tabindex="{$vt_tab}" rows="2">{$fldvalue}</textarea>
 434              </td>
 435  
 436          {elseif $uitype eq 69}
 437              <td width="20%" class="dvtCellLabel" align=right>
 438                  {$fldlabel}
 439              </td>
 440              <td colspan="3" width="30%" align=left class="dvtCellInfo">
 441                  {if $MODULE eq 'Products'}
 442                      <input name="del_file_list" type="hidden" value="">
 443                      <div id="files_list" style="border: 1px solid grey; width: 500px; padding: 5px; background: rgb(255, 255, 255) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; font-size: x-small">Files Maximum 6
 444                          <input id="my_file_element" type="file" name="file_1" tabindex="{$vt_tab}" >
 445                          {assign var=image_count value=0}
 446                          {if $maindata[3].0.name neq ''}
 447                             {foreach name=image_loop key=num item=image_details from=$maindata[3]}
 448                              <div align="center">
 449                                  <img src="{$image_details.path}{$image_details.name}" height="50">&nbsp;&nbsp;[{$image_details.name}]<input id="file_{$num}" value="Delete" type="button" class="crmbutton small delete" onclick='this.parentNode.parentNode.removeChild(this.parentNode);delRowEmt("{$image_details.name}")'>
 450                              </div>
 451                                {assign var=image_count value=$smarty.foreach.image_loop.iteration}
 452                                {/foreach}
 453                          {/if}
 454                      </div>
 455  
 456                      <script>
 457                          {*<!-- Create an instance of the multiSelector class, pass it the output target and the max number of files -->*}
 458                          var multi_selector = new MultiSelector( document.getElementById( 'files_list' ), 6 );
 459                          multi_selector.count = {$image_count}
 460                          {*<!-- Pass in the file element -->*}
 461                          multi_selector.addElement( document.getElementById( 'my_file_element' ) );
 462                      </script>
 463                  {else}
 464                      <input name="{$fldname}"  type="file" value="{$maindata[3].0.name}" tabindex="{$vt_tab}" />
 465                      <input type="hidden" name="id" value=""/>
 466                      { if $maindata[3].0.name != "" }
 467                          
 468                  <div id="replaceimage">[{$maindata[3].0.name}] <a href="javascript:;" onClick="delimage({$ID})">Del</a></div>
 469                      {/if}
 470                      
 471                  {/if}
 472              </td>
 473  
 474          {elseif $uitype eq 61}
 475              <td width="20%" class="dvtCellLabel" align=right>
 476                  {$fldlabel}
 477              </td>
 478              <td colspan="3" width="30%" align=left class="dvtCellInfo">
 479                  <input name="{$fldname}"  type="file" value="{$secondvalue}" tabindex="{$vt_tab}" />
 480                  <input type="hidden" name="id" value=""/>{$fldvalue}
 481              </td>
 482          {elseif $uitype eq 156}
 483              <td width="20%" class="dvtCellLabel" align=right>
 484                  {$fldlabel}
 485              </td>
 486                  {if $fldvalue eq 'on'}
 487                      <td width="30%" align=left class="dvtCellInfo">
 488                          {if ($secondvalue eq 1 && $CURRENT_USERID != $smarty.request.record) || ($MODE == 'create')}
 489                              <input name="{$fldname}" tabindex="{$vt_tab}" type="checkbox" checked>
 490                          {else}
 491                              <input name="{$fldname}" type="hidden" value="on">
 492                              <input name="{$fldname}" disabled tabindex="{$vt_tab}" type="checkbox" checked>
 493                          {/if}    
 494                      </td>
 495                  {else}
 496                      <td width="30%" align=left class="dvtCellInfo">
 497                          {if ($secondvalue eq 1 && $CURRENT_USERID != $smarty.request.record) || ($MODE == 'create')}
 498                              <input name="{$fldname}" tabindex="{$vt_tab}" type="checkbox">
 499                          {else}
 500                              <input name="{$fldname}" disabled tabindex="{$vt_tab}" type="checkbox">
 501                          {/if}    
 502                      </td>
 503                  {/if}
 504          {elseif $uitype eq 98}<!-- Role Selection Popup -->        
 505              <td width="20%" class="dvtCellLabel" align=right>
 506              <font color="red">*</font>
 507                  {$fldlabel}
 508              </td>
 509              <td width="30%" align=left class="dvtCellInfo">
 510              {if $thirdvalue eq 1}
 511                  <input name="role_name" id="role_name" readonly class="txtBox" tabindex="{$vt_tab}" value="{$secondvalue}" type="text">&nbsp;
 512                  <a href="javascript:openPopup();"><img src="{$IMAGE_PATH}select.gif" align="absmiddle" border="0"></a>
 513              {else}    
 514                  <input name="role_name" id="role_name" tabindex="{$vt_tab}" class="txtBox" readonly value="{$secondvalue}" type="text">&nbsp;
 515              {/if}    
 516              <input name="user_role" id="user_role" value="{$fldvalue}" type="hidden">
 517              </td>
 518          {elseif $uitype eq 104}<!-- Mandatory Email Fields -->            
 519               <td width=20% class="dvtCellLabel" align=right>
 520               <font color="red">*</font>
 521               {$fldlabel}
 522               </td>
 523               <td width=30% align=left class="dvtCellInfo"><input type="text" name="{$fldname}" id ="{$fldname}" value="{$fldvalue}" tabindex="{$vt_tab}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'"></td>
 524              {elseif $uitype eq 115}<!-- for Status field Disabled for nonadmin -->
 525              <td width="20%" class="dvtCellLabel" align=right>
 526                  {$fldlabel}
 527              </td>
 528              <td width="30%" align=left class="dvtCellInfo">
 529                 {if $secondvalue eq 1}
 530                     <select name="{$fldname}" tabindex="{$vt_tab}" class="small">
 531                 {else}
 532                     <select disabled name="{$fldname}" class="small">
 533                 {/if} 
 534                  {foreach item=arr from=$fldvalue}
 535                      {foreach key=sel_value item=value from=$arr}
 536                          <option value="{$sel_value}" {$value}>{$sel_value}</option>
 537                      {/foreach}
 538                  {/foreach}
 539                 </select>
 540              </td>
 541              {elseif $uitype eq 105}
 542              <td width="20%" class="dvtCellLabel" align=right>
 543                  {$fldlabel}
 544              </td>
 545              <td width="30%" align=left class="dvtCellInfo">
 546                      <input name="{$fldname}"  type="file" value="{$maindata[3].0.name}" tabindex="{$vt_tab}" />
 547                      <input type="hidden" name="id" value=""/>
 548                      {$maindata[3].0.name}
 549              </td>
 550              {elseif $uitype eq 103}
 551              <td width="20%" class="dvtCellLabel" align=right>
 552                  {$fldlabel}
 553              </td>
 554              <td width="30%" colspan="3" align=left class="dvtCellInfo">
 555                  <input type="text" name="{$fldname}" value="{$fldvalue}" tabindex="{$vt_tab}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'">
 556              </td>    
 557              {elseif $uitype eq 101}<!-- for reportsto field USERS POPUP -->
 558                  <td width="20%" class="dvtCellLabel" align=right>
 559                     {$fldlabel}
 560                  </td>
 561                  <td width="30%" align=left class="dvtCellInfo">
 562                  <input readonly name='reports_to_name' class="small" type="text" value='{$fldvalue}' tabindex="{$vt_tab}" ><input name='reports_to_id' type="hidden" value='{$secondvalue}'>&nbsp;<input title="Change [Alt+C]" accessKey="C" type="button" class="small" value='{$UMOD.LBL_CHANGE}' name=btn1 LANGUAGE=javascript onclick='return window.open("index.php?module=Users&action=Popup&form=UsersEditView&form_submit=false","test","width=640,height=522,resizable=0,scrollbars=0");'>
 563                  </td>
 564              {elseif $uitype eq 116}<!-- for currency in users details-->    
 565              <td width="20%" class="dvtCellLabel" align=right>
 566                  {$fldlabel}
 567              </td>
 568              <td width="30%" align=left class="dvtCellInfo">
 569                 {if $secondvalue eq 1}
 570                     <select name="{$fldname}" tabindex="{$vt_tab}" class="small">
 571                 {else}
 572                     <select disabled name="{$fldname}" tabindex="{$vt_tab}" class="small">
 573                 {/if} 
 574  
 575                  {foreach item=arr key=uivalueid from=$fldvalue}
 576                      {foreach key=sel_value item=value from=$arr}
 577                          <option value="{$uivalueid}" {$value}>{$sel_value}</option>
 578                      {/foreach}
 579                  {/foreach}
 580                 </select>
 581              </td>
 582              {elseif $uitype eq 106}
 583              <td width=20% class="dvtCellLabel" align=right>
 584                  <font color="red">*</font>{$fldlabel}
 585              </td>
 586              <td width=30% align=left class="dvtCellInfo">
 587                  {if $MODE eq 'edit'}
 588                  <input type="text" readonly name="{$fldname}" value="{$fldvalue}" tabindex="{$vt_tab}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'">
 589                  {else}
 590                  <input type="text" name="{$fldname}" value="{$fldvalue}" tabindex="{$vt_tab}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'">
 591                  {/if}
 592              </td>
 593              {elseif $uitype eq 99}
 594                  {if $MODE eq 'create'}
 595                  <td width=20% class="dvtCellLabel" align=right>
 596                      <font color="red">*</font>{$fldlabel}
 597                  </td>
 598                  <td width=30% align=left class="dvtCellInfo">
 599                      <input type="password" name="{$fldname}" tabindex="{$vt_tab}" value="{$fldvalue}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'">
 600                  </td>
 601                  {/if}
 602          {elseif $uitype eq 30}
 603              <td width="20%" class="dvtCellLabel" align=right>
 604                  {$fldlabel}
 605              </td>
 606              <td colspan="3" width="30%" align=left class="dvtCellInfo">
 607                  {assign var=check value=$secondvalue[0]}
 608                  {assign var=yes_val value=$secondvalue[1]}
 609                  {assign var=no_val value=$secondvalue[2]}
 610  
 611                  <input type="radio" name="set_reminder" tabindex="{$vt_tab}" value="Yes" {$check}>&nbsp;{$yes_val}&nbsp;
 612                  <input type="radio" name="set_reminder" value="No">&nbsp;{$no_val}&nbsp;
 613  
 614                  {foreach item=val_arr from=$fldvalue}
 615                      {assign var=start value="$val_arr[0]"}
 616                      {assign var=end value="$val_arr[1]"}
 617                      {assign var=sendname value="$val_arr[2]"}
 618                      {assign var=disp_text value="$val_arr[3]"}
 619                      {assign var=sel_val value="$val_arr[4]"}
 620                      <select name="{$sendname}" class="small">
 621                          {section name=reminder start=$start max=$end loop=$end step=1 }
 622                              {if $smarty.section.reminder.index eq $sel_val}
 623                                  {assign var=sel_value value="SELECTED"}
 624                              {else}
 625                                  {assign var=sel_value value=""}
 626                              {/if}
 627                              <OPTION VALUE="{$smarty.section.reminder.index}" "{$sel_value}">{$smarty.section.reminder.index}</OPTION>
 628                          {/section}
 629                      </select>
 630                      &nbsp;{$disp_text}
 631                  {/foreach}
 632              </td>
 633          {elseif $uitype eq 83} <!-- Handle the Tax in Inventory -->
 634              {foreach item=tax key=count from=$TAX_DETAILS}
 635                  {if $tax.check_value eq 1}
 636                      {assign var=check_value value="checked"}
 637                      {assign var=show_value value="visible"}
 638                  {else}
 639                      {assign var=check_value value=""}
 640                      {assign var=show_value value="hidden"}
 641                  {/if}
 642                  <td align="right" class="dvtCellLabel" style="border:0px solid red;">
 643                      {$tax.taxlabel} {$APP.COVERED_PERCENTAGE}
 644                      <input type="checkbox" name="{$tax.check_name}" id="{$tax.check_name}" class="small" onclick="fnshowHide(this,'{$tax.taxname}')" {$check_value}>
 645                  </td>
 646                  <td class="dvtCellInfo" align="left" style="border:0px solid red;">
 647                      <input type="text" class="detailedViewTextBox" name="{$tax.taxname}" id="{$tax.taxname}" value="{$tax.percentage}" style="visibility:{$show_value};" onBlur="fntaxValidation('{$tax.taxname}')">
 648                  </td>
 649                 </tr>
 650              {/foreach}
 651  
 652              <td colspan="2" class="dvtCellInfo">&nbsp;</td>
 653          {/if}
 654      {/foreach}
 655     </tr>
 656  {/foreach}
 657  
 658  <script language="javascript">
 659  	function fnshowHide(currObj,txtObj)
 660      {ldelim}
 661              if(currObj.checked == true)
 662                  document.getElementById(txtObj).style.visibility = 'visible';
 663              else
 664                  document.getElementById(txtObj).style.visibility = 'hidden';
 665      {rdelim}
 666      
 667  	function fntaxValidation(txtObj)
 668      {ldelim}
 669              temp= /^\d+\.\d+$/.test(document.getElementById(txtObj).value);
 670              if(temp == false)
 671                  alert("Please enter Valid TAX value");
 672      {rdelim}    
 673  
 674  function delimage(id)
 675  {ldelim}
 676      new Ajax.Request(
 677          'index.php',
 678          {ldelim}queue: {ldelim}position: 'end', scope: 'command'{rdelim},
 679              method: 'post',
 680              postBody: 'module=Contacts&action=ContactsAjax&file=DelImage&recordid='+id,
 681              onComplete: function(response)
 682                      {ldelim}
 683                      if(response.responseText.indexOf("SUCESS")>-1)
 684                          $("replaceimage").innerHTML='{$APP.LBL_IMAGE_DELETED}';
 685                      else
 686                          alert("Error while Deleting")
 687                      {rdelim}
 688          {rdelim}
 689      );
 690  
 691  {rdelim}
 692  
 693  
 694  </script>


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