[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/pkg/vtiger/modules/ConfigEditor/templates/ -> index.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  {literal}
  10  <style type="text/css">
  11  .detailedViewTextBoxThisOn {
  12      background-color:#FFFFDD;
  13      border:1px solid #BABABA;
  14      color:#000000;
  15      font-family:Arial,Helvetica,sans-serif;
  16      font-size:11px;
  17      padding-left:5px;
  18      width:20%;
  19  }
  20  
  21  .detailedViewTextBoxThis {
  22      background-color:#FFFFFF;
  23      border:1px solid #BABABA;
  24      color:#000000;
  25      font-family:Arial,Helvetica,sans-serif;
  26      font-size:11px;
  27      padding-left:5px;
  28      width:20%;
  29  }
  30  </style>
  31      <script type="text/javascript">
  32  		function msg()
  33          {
  34              alert("invalid entry");
  35              exit;
  36          }
  37  
  38  		function trim(str)
  39          {
  40              while (str.substring(0,1) == ' ') // check for white spaces from beginning
  41              {
  42                  str = str.substring(1, str.length);
  43              }
  44              while (str.substring(str.length-1, str.length) == ' ') // check white space from end
  45              {
  46                  str = str.substring(0,str.length-1);
  47              }
  48              return str;
  49          }
  50  
  51  		function valid(name) {
  52              var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
  53              var id=document.getElementById('key_HELPDESK_SUPPORT_EMAIL_ID');
  54              var name = document.getElementById('key_HELPDESK_SUPPORT_NAME');
  55              var size = document.getElementById('key_upload_maxsize');
  56              var maxEntries = document.getElementById('key_list_max_entries_per_page');
  57              var history1 = document.getElementById('key_history_max_viewed');
  58              var maxtext = document.getElementById('key_listview_max_textlength');
  59              var reg1 = /^([0-9]*)$/;
  60              name.value = trim(name.value);
  61              if ((name.value).indexOf("\"") != -1 || (name.value).indexOf("'") != -1 || (name.value).indexOf(";") != -1){
  62                  var invalidSupportName = document.getElementById('invalidSupportName').value;
  63                  document.getElementById('msg_HELPDESK_SUPPORT_NAME').innerHTML = invalidSupportName;
  64                  name.focus();
  65                  return false;
  66              }
  67  
  68              maxEntries.value = trim(maxEntries.value);
  69              size.value = trim(size.value);
  70              history1.value = trim(history1.value);
  71              maxtext.value = trim(maxtext.value);
  72              var uploadSize = document.getElementById('uploadSize').value;
  73              var invalidEmail = document.getElementById('invalidEmail').value;
  74              var emptyName = document.getElementById('emptyName').value;
  75              var maxListEntries= document.getElementById('maxListEntries').value;
  76              var maxHistory= document.getElementById('maxHistory').value;
  77              var maxTextLength= document.getElementById('maxTextLength').value;
  78              if(reg.test(id.value) == false){
  79                  document.getElementById('msg_HELPDESK_SUPPORT_EMAIL_ID').innerHTML = invalidEmail;
  80                  id.focus();
  81                  return false;
  82              }else if(name.value == ''){
  83                  document.getElementById('msg_HELPDESK_SUPPORT_NAME').innerHTML = emptyName;
  84                  name.focus();
  85                  return false;
  86              }else if((reg1.test(size.value) == false) || (size.value <= 0) || (size.value > 5) || (size.value == NaN)){
  87                  document.getElementById('msg_upload_maxsize').innerHTML =uploadSize;
  88                  size.focus();
  89                  return false;
  90              }else if((reg1.test(maxEntries.value) == false)||(maxEntries.value <= 0) || (maxEntries.value>100)){
  91                  document.getElementById('msg_list_max_entries_per_page').innerHTML=maxListEntries;
  92                  maxEntries.focus();
  93                  return false;
  94              }else if((reg1.test(history1.value) == false)||(history1.value <= 0) || (history1.value > 5)){
  95                  document.getElementById('msg_history_max_viewed').innerHTML=maxHistory;
  96                  history1.focus();
  97                  return false;
  98              }else if((reg1.test(maxtext.value) == false) || (maxtext.value < 0) || (maxtext.value > 100) || (maxtext.value === "")){
  99                  document.getElementById('msg_listview_max_textlength').innerHTML=maxTextLength;
 100                  maxtext.focus();
 101                  return false;
 102              }
 103              return true;
 104          }
 105  
 106  
 107      </script>
 108  {/literal}
 109  <script language="JavaScript" type="text/javascript" src="modules/{$MODULE}/{$MODULE}.js"></script>
 110  <body onload="replaceUploadSize();">
 111  <input type="hidden" value="{$MOD.LBL_MAX_UPLOAD_SIZE_MSG}" id="uploadSize"></input>
 112  <input type="hidden" value="{$MOD.LBL_INVALID_EMAIL_MSG}" id="invalidEmail"></input>
 113  <input type="hidden" value="{$MOD.LBL_RESTRICTED_CHARACTERS}" id="invalidSupportName"></input>
 114  <input type="hidden" value="{$MOD.LBL_MAX_LISTVIEW_ENTRIES_MSG}" id="maxListEntries"></input>
 115  <input type="hidden" value="{$MOD.LBL_MAX_HISTORY_VIEWED_MSG}" id="maxHistory"></input>
 116  <input type="hidden" value="{$MOD.LBL_MAX_TEXTLENGTH_LISTVIEW_MSG}" id="maxTextLength"></input>
 117  <input type="hidden" value="{$MOD.LBL_EMPTY_NAME_MSG}" id="emptyName"></input>
 118  <input type="hidden" value="{$MOD.LBL_HELP_INFO}" id="helpInfo"></input>
 119  
 120  <table cellspacing="0" cellpadding="2" border="0" width="100%" class="level2Bg">
 121      <tbody>
 122          <tr>
 123              <td>
 124                  <table cellspacing="0" cellpadding="0" border="0">
 125                      <tbody>
 126                          <tr>
 127                              <td nowrap="" class="level2SelTab"><a href="index.php?module=Settings&amp;action=index&amp;parenttab=Settings">Settings</a></td>
 128                              <td nowrap="" class="level2SelTab"><a href="index.php?module=Settings&amp;action=ModuleManager&amp;parenttab=Settings">Module Manager</a></td>
 129                          </tr>
 130                      </tbody>
 131                  </table>
 132              </td>
 133          </tr>
 134      </tbody>
 135  </table>
 136  
 137  <table border=0 cellspacing=0 cellpadding=0 width=98% align=center>
 138      <tr>
 139          <td>
 140              &nbsp;
 141          </td>
 142      </tr>
 143      <tr>
 144          <td valign=top align=right width=8><img src="{'showPanelTopLeft.gif'|@vtiger_imageurl:$THEME}"></td>
 145          <td class="showPanelBg" valign="top" width="100%" >
 146  
 147              <div style="padding: 20px;">
 148                  <form onsubmit="VtigerJS_DialogBox.block();" action="index.php" method="POST" name="EditView">
 149                      <div align="center">
 150                          {include file="SetMenu.tpl"}
 151                          <table cellspacing="0" cellpadding="5" border="0" width="100%" class="settingsSelUITopLine">
 152                              <tbody>
 153                                  <tr>
 154                                      <td width="50" valign="top" rowspan="2"><img height="48" border="0" width="48" title="Users" alt="Users" src="themes/images/migrate.gif"></td>
 155                                      <td valign="bottom" class="heading2"><b><a href="index.php?module=Settings&amp;action=index&amp;parenttab=Settings">{$MOD.LBL_SETTINGS}</a> &gt; {$MOD.LBL_CONFIG_EDITOR} </b></td>
 156                                  </tr>
 157                                  <tr>
 158                                      <td valign="top"class="small">{$MOD.LBL_CONFIG_EDIT}</td>
 159                                  </tr>
 160                              </tbody>
 161                          </table>
 162                          <br>
 163                          <br>
 164                          <table width="95%" cellspacing="0" cellpadding="0" border="0" class="small" align="center">
 165                              <tr>
 166                                  <td>
 167                                      <table width="100%" cellspacing="0" cellpadding="3" border="0" class="small">
 168                                      <tr>
 169                                          <td nowrap="" style="width: 10px;" class="dvtTabCache">&nbsp;</td>
 170                                          <td width="75" nowrap="" align="center" class="dvtSelectedCell" style="width: 15%;"><b>{$MOD.LBL_CONFIG_FILE}</b></td>
 171                                          <td nowrap="" align="center" style="width: 100px;" class="dvtTabCache">
 172                                          {if $WARNING}
 173                                          <div style='background-color: #FFFABF; padding: 2px; margin: 0 0 2px 0; border: 1px solid yellow'>
 174                                          <b style='color: red'>{$WARNING}</b>
 175                                          {/if}&nbsp;
 176                                          </td>
 177                                          <td nowrap="" style="width: 65%;" class="dvtTabCache">&nbsp;</td>
 178                                      </tr>
 179                                      </table>
 180                                  </td>
 181                              </tr>
 182                              <tr>
 183                                  <td valign="top" align="left">
 184                                      <div id="basicTab">
 185                                          <table border=0 cellspacing=0 cellpadding=3 width=100% class="dvtContentSpace">
 186                                              <tr>
 187                                                  <td align="left" style="padding:10px;">
 188                                                      <table border=0 cellspacing=0 cellpadding=5 width=100% class="small">
 189                                                          <tr>
 190                                                              <td colspan=2>
 191                                                                  <div align="center">
 192                                                                      <input type='submit' class="crmbutton small save" value="{$APP.LBL_SAVE_LABEL}" onclick="if(valid(this)){ldelim}return true;{rdelim}else{ldelim}return false;{rdelim}">
 193                                                                      <input type='button' class="crmbutton small cancel" value="{$APP.LBL_CANCEL_BUTTON_LABEL}" onclick="location.href='index.php?module=Settings&action=index&parenttab=Settings'">
 194  
 195                                                                      <input type='hidden' name='module' value='ConfigEditor'>
 196                                                                      <input type='hidden' name='action' value='ConfigEditorAjax'>
 197                                                                      <input type='hidden' name='file' value='index'>
 198                                                                      <input type='hidden' name='type' value='save'>
 199  
 200                                                                  </div>
 201                                                              </td>
 202                                                          </tr>
 203                                                          {if $CONFIGREADER}
 204                                                          <tr>
 205                                                              <td class="detailedViewHeader" colspan="2">
 206                                                                  {$MOD.LBL_CONFIG_EDIT_CAUTION_INFO}<b>{$MOD.LBL_DOUBLE_CHECK_INFO}</b>
 207                                                              </td>
 208                                                          </tr>
 209                                                          {/if}
 210  
 211                                                          {foreach item=CONFIGLINE from=$CONFIGREADER->getAll()}
 212                                                              {if $CONFIGLINE->isViewable() || $CONFIGLINE->isEditable()}
 213  
 214                                                                  {assign var="VARMETA" value=$CONFIGLINE->meta()}
 215  
 216                                                                  <tr bgcolor=white valign=center style="height:25px;">
 217                                                                      <td class="dvtCellLabel" width="15%">
 218                                                                          {if $VARMETA.label}
 219                                                                              {if $VARMETA.label == 'Helpdesk Support Email-Id'}
 220                                                                                  {$VARMETA.label} <img border="0" src="themes/images/help_icon.gif" onclick="vtlib_field_help_show_this(this, '{$CONFIGLINE->variableName()}' );" style="cursor: pointer;">
 221                                                                              {else}
 222                                                                                  {$VARMETA.label}
 223                                                                              {/if}
 224                                                                          {else}
 225                                                                              {$CONFIGLINE->variableName()}
 226                                                                          {/if}
 227                                                                      </td>
 228                                                                      <td class="dvtCellInfo">
 229                                                                          {if $CONFIGLINE->isEditable()}
 230                                                                              {if $VARMETA.values}
 231                                                                                  <select class="small" name="key_{$CONFIGLINE->variableName()}" id="key_{$CONFIGLINE->variableName()}">
 232                                                                                  {foreach item=VARVALUEOPTION key=VARVALUEOPTIONKEY from=$VARMETA.values}
 233                                                                                      <option value="{$VARVALUEOPTIONKEY}" {if $CONFIGLINE->variableValue() eq $VARVALUEOPTIONKEY}selected=true{/if}>{$VARVALUEOPTION}</option>
 234                                                                                  {/foreach}
 235                                                                                  </select>
 236                                                                              {else}
 237                                                                                  <b><span class="warning" id="msg_{$CONFIGLINE->variableName()}"></span></b>
 238                                                                                  {if $CONFIGLINE->variableName() == 'upload_maxsize'}
 239                                                                                  <input size="2" type="text" name="key_{$CONFIGLINE->variableName()}" id="key_{$CONFIGLINE->variableName()}" value="{$CONFIGLINE->variableValue()}"  onblur="class='detailedViewTextBoxThis'" onfocus="class='detailedViewTextBoxThisOn'" class="detailedViewTextBoxThis" >     {$MOD.LBL_MB}
 240                                                                                  {else}
 241                                                                                  <input type="text" name="key_{$CONFIGLINE->variableName()}" id="key_{$CONFIGLINE->variableName()}" value="{$CONFIGLINE->variableValue()}"  onblur="this.className='detailedViewTextBox'" onfocus="this.className='detailedViewTextBoxOn'" class="detailedViewTextBox" >
 242                                                                                  {/if}
 243                                                                              {/if}
 244                                                                          {else}
 245                                                                              {$CONFIGLINE->variableValue()}
 246                                                                          {/if}
 247                                                                      </td>
 248                                                                  </tr>
 249                                                              {/if}
 250                                                          {/foreach}
 251                                                      </table>
 252  
 253                                                      <tr>
 254                                                          <td colspan=2>
 255                                                              <div align="center">
 256                                                                  <input type='submit' class="crmbutton small save" value="{$APP.LBL_SAVE_LABEL}" onclick="if(valid(this)){ldelim}return true;{rdelim}else{ldelim}return false;{rdelim}">
 257                                                                  <input type='button' class="crmbutton small cancel" value="{$APP.LBL_CANCEL_BUTTON_LABEL}" onclick="location.href='index.php?module=Settings&action=index&parenttab=Settings'">
 258  
 259                                                                  <input type='hidden' name='module' value='ConfigEditor'>
 260                                                                  <input type='hidden' name='action' value='ConfigEditorAjax'>
 261                                                                  <input type='hidden' name='file' value='index'>
 262                                                                  <input type='hidden' name='type' value='save'>
 263                                                              </div>
 264                                                          </td>
 265                                                      </tr>
 266                                                  </td>
 267                                              </tr>
 268                                          </table>
 269                                      </div>
 270                                  </td>
 271                              </tr>
 272                          </table>
 273                      </div>
 274                  </form>
 275              </div>
 276          </td>
 277          <td valign=top align=right><img src="{'showPanelTopRight.gif'|@vtiger_imageurl:$THEME}"></td>
 278      </tr>
 279  </table>
 280  </body>


Generated: Fri Nov 28 20:08:37 2014 Cross-referenced by PHPXref 0.7.1