[ Index ] |
|
Code source de vtiger CRM 5.0.2 |
1 {*<!-- 2 /********************************************************************************* 3 ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 4 * ("License"); You may not use this file except in compliance with the License 5 * The Original Code is: vtiger CRM Open Source 6 * The Initial Developer of the Original Code is vtiger. 7 * Portions created by vtiger are Copyright (C) vtiger. 8 * All Rights Reserved. 9 * 10 ********************************************************************************/ 11 -->*} 12 <script language="JAVASCRIPT" type="text/javascript" src="include/js/smoothscroll.js"></script> 13 <script language="JavaScript" type="text/javascript" src="include/js/menu.js"></script> 14 15 <script language="JavaScript" type="text/javascript"> 16 var allOptions = null; 17 18 function setAllOptions(inputOptions) 19 {ldelim} 20 allOptions = inputOptions; 21 {rdelim} 22 23 function modifyMergeFieldSelect(cause, effect) 24 {ldelim} 25 var selected = cause.options[cause.selectedIndex].value; id="mergeFieldValue" 26 var s = allOptions[cause.selectedIndex]; 27 28 effect.length = s; 29 for (var i = 0; i < s; i++) 30 {ldelim} 31 effect.options[i] = s[i]; 32 {rdelim} 33 document.getElementById('mergeFieldValue').value = ''; 34 {rdelim} 35 {literal} 36 function init() 37 { 38 var blankOption = new Option('--None--', '--None--'); 39 var allOpts = new Object(0); 40 var options = null; 41 42 options = new Object(19); 43 options[0] = blankOption; 44 45 46 options[1] = new Option('Account: Account Name', '$accounts-accountname$'); 47 options[2] = new Option('Account: Account Type', '$accounts-account_type$'); 48 options[3] = new Option('Account: Industry', '$accounts-industry$'); 49 options[4] = new Option('Account: Annual Revenue', '$accounts-annualrevenue$'); 50 options[5] = new Option('Account: Phone', '$accounts-phone$'); 51 options[6] = new Option('Account: Email', '$accounts-email1$'); 52 options[7] = new Option('Account: Rating', '$accounts-rating$'); 53 options[8] = new Option('Account: Website', '$accounts-website$'); 54 options[9] = new Option('Account: Fax', '$accounts-fax$'); 55 56 allOpts[1] = options; 57 58 options = new Object(11); 59 options[0] = blankOption; 60 61 options[1] = new Option('Contact: First Name', '$contacts-firstname$'); 62 options[2] = new Option('Contact: Last Name', '$contacts-lastname$'); 63 options[3] = new Option('Contact: Salutation', '$contacts-salutation$'); 64 options[4] = new Option('Contact: Title', '$contacts-title$'); 65 options[5] = new Option('Contact: Email', '$contacts-email$'); 66 options[6] = new Option('Contact: Department', '$contacts-department$'); 67 options[7] = new Option('Contact: Other Email','$contacts-otheremail$'); 68 options[8] = new Option('Contact: Phone', '$contacts-phone$'); 69 options[9] = new Option('Contact: Mobile', '$contacts-mobile$'); 70 options[10] = new Option('Contact: Currency', '$contacts-currency$'); 71 72 allOpts[2] = options; 73 74 75 options = new Object(19); 76 options[0] = blankOption; 77 78 79 options[1] = new Option('Lead: First Name', '$leads-firstname$'); 80 options[2] = new Option('Lead: Last Name', '$leads-lastname$'); 81 options[3] = new Option('Lead: Lead Source', '$leads-leadsource$'); 82 options[4] = new Option('Lead: Status', '$leads-leadstatus$'); 83 options[5] = new Option('Lead: Rating', '$leads-rating$'); 84 options[6] = new Option('Lead: Industry', '$leads-industry$'); 85 options[7] = new Option('Lead: Yahoo ID', '$leads-yahooid$'); 86 options[8] = new Option('Lead: Email', '$leads-email$'); 87 options[9] = new Option('Lead: Annual Revenue', '$leads-annualrevenue$'); 88 options[10] = new Option('Lead: Title', '$leads-designation$'); 89 options[11] = new Option('Lead: Salutation', '$leads-salutation$'); 90 91 allOpts[3] = options; 92 93 options = new Object(19); 94 options[0] = blankOption; 95 96 options[1] = new Option('User: First Name', '$users-first_name$'); 97 options[2] = new Option('User: Last Name', '$users-last_name$'); 98 options[3] = new Option('User: Title', '$users-title$'); 99 options[4] = new Option('User: Department', '$users-department$'); 100 options[5] = new Option('User: HomePhone', '$users-phone_home$'); 101 options[6] = new Option('User: Mobile', '$users-phone_mobile$'); 102 options[7] = new Option('User: Signature', '$users-signature$'); 103 options[8] = new Option('User: Email', '$users-email$'); 104 options[9] = new Option('User: Street', '$users-address_street$'); 105 options[10] = new Option('User: City', '$users-address_city$'); 106 options[11] = new Option('User: State', '$users-address_state$'); 107 options[11] = new Option('User: Country', '$users-address_country$'); 108 options[11] = new Option('User: PostalCode', '$users-address_postalcode$'); 109 110 allOpts[4] = options; 111 112 setAllOptions(allOpts); 113 } 114 115 function cancelForm(frm) 116 { 117 frm.action.value='detailviewemailtemplate'; 118 frm.parenttab.value='Settings'; 119 frm.submit(); 120 } 121 {/literal} 122 </script> 123 124 <br> 125 <table align="center" border="0" cellpadding="0" cellspacing="0" width="98%"> 126 <tbody><tr> 127 <td valign="top"><img src="{$IMAGE_PATH}showPanelTopLeft.gif"></td> 128 <td class="showPanelBg" style="padding: 10px;" valign="top" width="100%"> 129 <br> 130 <div align=center> 131 132 {include file='SetMenu.tpl'} 133 <!-- DISPLAY --> 134 <table border=0 cellspacing=0 cellpadding=5 width=100% class="settingsSelUITopLine"> 135 <form action="index.php" method="post" name="templatecreate" onsubmit="return check4null(templatecreate);"> 136 <input type="hidden" name="action"> 137 <input type="hidden" name="mode" value="{$EMODE}"> 138 <input type="hidden" name="module" value="Users"> 139 <input type="hidden" name="templateid" value="{$TEMPLATEID}"> 140 <input type="hidden" name="parenttab" value="PARENTTAB}"> 141 <tr> 142 <td width=50 rowspan=2 valign=top><img src="{$IMAGE_PATH}ViewTemplate.gif" alt="Users" width="45" height="60" border=0 title="Users"></td> 143 {if $EMODE eq 'edit'} 144 <td class=heading2 valign=bottom><b><a href="index.php?module=Settings&action=index&parenttab=Settings">{$MOD.LBL_SETTINGS}</a> > <a href="index.php?module=Users&action=listemailtemplates&parenttab=Settings">{$UMOD.LBL_EMAIL_TEMPLATES}</a> > {$MOD.LBL_EDIT} "{$TEMPLATENAME}" </b></td> 145 {else} 146 <td class=heading2 valign=bottom><b><a href="index.php?module=Settings&action=index&parenttab=Settings">{$MOD.LBL_SETTINGS}</a> > <a href="index.php?module=Users&action=listemailtemplates&parenttab=Settings">{$UMOD.LBL_EMAIL_TEMPLATES}</a> > {$MOD.LBL_CREATE_EMAIL_TEMPLATES} </b></td> 147 {/if} 148 149 </tr> 150 <tr> 151 <td valign=top class="small">{$UMOD.LBL_EMAIL_TEMPLATE_DESC}</td> 152 </tr> 153 </table> 154 155 <br> 156 <table border=0 cellspacing=0 cellpadding=10 width=100% > 157 <tr> 158 <td> 159 160 <table border=0 cellspacing=0 cellpadding=5 width=100% class="tableHeading"> 161 <tr> 162 {if $EMODE eq 'edit'} 163 <td class="big"><strong>{$UMOD.LBL_PROPERTIES} "{$TEMPLATENAME}" </strong></td> 164 {else} 165 <td class="big"><strong>{$MOD.LBL_CREATE_EMAIL_TEMPLATES}</strong></td> 166 {/if} 167 <td class="small" align=right> 168 <input type="submit" value="{$APP.LBL_SAVE_BUTTON_LABEL}" class="crmButton small save" onclick="this.form.action.value='saveemailtemplate'; this.form.parenttab.value='Settings'" > 169 {if $EMODE eq 'edit'} 170 <input type="submit" value="{$APP.LBL_CANCEL_BUTTON_LABEL}" class="crmButton small cancel" onclick="cancelForm(this.form)" /> 171 {else} 172 <input type="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}" class="crmButton small cancel" onclick="window.history.back()" > 173 {/if} 174 </td> 175 </tr> 176 </table> 177 178 <table border=0 cellspacing=0 cellpadding=5 width=100% > 179 <tr> 180 <td width=20% class="small cellLabel"><font color="red">*</font><strong>{$UMOD.LBL_NAME}</strong></td> 181 <td width=80% class="small cellText"><input name="templatename" type="text" value="{$TEMPLATENAME}" class="detailedViewTextBox" tabindex="1"> </td> 182 </tr> 183 <tr> 184 <td valign=top class="small cellLabel"><strong>{$UMOD.LBL_DESCRIPTION}</strong></td> 185 <td class="cellText small" valign=top><span class="small cellText"> 186 <input name="description" type="text" value="{$DESCRIPTION}" class="detailedViewTextBox" tabindex="2"> 187 </span></td> 188 </tr> 189 <tr> 190 <td valign=top class="small cellLabel"><strong>{$UMOD.LBL_FOLDER}</strong></td> 191 <td class="cellText small" valign=top> 192 {if $EMODE eq 'edit'} 193 <select name="foldername" class="small" tabindex="" style="width:100%" tabindex="3"> 194 {foreach item=arr from=$FOLDERNAME} 195 <option value="{$FOLDERNAME}" {$arr}>{$FOLDERNAME}</option> 196 {if $FOLDERNAME == 'Public'} 197 <option value="Personal">{$UMOD.LBL_PERSONAL}</option> 198 {else} 199 <option value="Public">{$UMOD.LBL_PUBLIC}</option> 200 {/if} 201 {/foreach} 202 </select> 203 {else} 204 <select name="foldername" class="small" tabindex="" value="{$FOLDERNAME}" style="width:100%" tabindex="3"> 205 <option value="Personal">{$UMOD.LBL_PERSONAL}</option> 206 <option value="Public" selected>{$UMOD.LBL_PUBLIC}</option> 207 </select> 208 {/if} 209 210 </td> 211 </tr> 212 213 214 <tr> 215 <td colspan="2" valign=top class="cellText small"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="thickBorder"> 216 <tr> 217 <td valign=top><table width="100%" border="0" cellspacing="0" cellpadding="5" > 218 <tr> 219 <td colspan="3" valign="top" class="small" style="background-color:#cccccc"><strong>{$UMOD.LBL_EMAIL_TEMPLATE}</strong></td> 220 </tr> 221 <tr> 222 <td width="15%" valign="top" class="cellLabel small"><font color='red'>*</font>{$UMOD.LBL_SUBJECT}</td> 223 <td width="85%" colspan="2" class="cellText small"><span class="small cellText"> 224 <input name="subject" type="text" value="{$SUBJECT}" class="detailedViewTextBox" tabindex="4"> 225 </span></td> 226 </tr> 227 <tr> 228 <td valign="top" width=10% class="cellLabel small">{$UMOD.LBL_MESSAGE}</td> 229 <td valign="top" width=60% class="cellText small"><p><textarea name="body" style="width:90%;height:200px" class=small tabindex="5">{$BODY}</textarea></p> 230 </td> 231 <td valign="top" width=30% class="cellText small" style="border-left:2px dotted #cccccc;"><table width="100%" border="0" cellspacing="0" cellpadding="5" > 232 <tr> 233 <td class="small"><strong>{$UMOD.LBL_MERGE_FIELDS}<br> 234 </strong>{$UMOD.LBL_USE_MERGE_FIELDS_TO_EMAIL_CONTENT}</td> 235 </tr> 236 <tr> 237 <td class="small" nowrap><strong>{$UMOD.LBL_STEP} 1. {$UMOD.LBL_SELECT_FIELD_TYPE}</strong></td> 238 </tr> 239 <tr><td><select class="detailedViewTextBox" id="entityType" ONCHANGE="modifyMergeFieldSelect(this, document.getElementById('mergeFieldSelect'));" tabindex="6"> 240 <OPTION VALUE="0" selected>{$APP.LBL_NONE} 241 <OPTION VALUE="1">{$UMOD.LBL_ACCOUNT_FIELDS} 242 <OPTION VALUE="2">{$UMOD.LBL_CONTACT_FIELDS} 243 <OPTION VALUE="3" >{$UMOD.LBL_LEAD_FIELDS} 244 <OPTION VALUE="4" >{$UMOD.LBL_USER_FIELDS} 245 </select></td></tr> 246 <tr> 247 <td class="small"><strong>{$UMOD.LBL_STEP} 2. {$UMOD.LBL_SELECT_FIELD} </strong></td> 248 </tr> 249 <tr><td><select class="detailedViewTextBox" id="mergeFieldSelect" onchange="document.getElementById('mergeFieldValue').value=this.options[this.selectedIndex].value;" tabindex="7"><option value="0" selected>{$APP.LBL_NONE}</select></td></tr> 250 <tr> 251 <td class="small"><strong>{$UMOD.LBL_STEP} 3. {$UMOD.LBL_COPY_PASTE} </strong></td> 252 </tr> 253 <tr><td><input type="text" id="mergeFieldValue" name="variable" value="variable" class="detailedViewTextBoxOn" tabindex="8"/></td></tr> 254 </table></td> 255 </tr> 256 </table></td> 257 258 </tr> 259 </table></td> 260 </tr> 261 </table> 262 <br> 263 <table border=0 cellspacing=0 cellpadding=5 width=100% > 264 <tr> 265 <td class="small" nowrap align=right><a href="#top">{$MOD.LBL_SCROLL}</a></td> 266 </tr> 267 </table> 268 </td> 269 </tr> 270 </table> 271 272 273 274 </td> 275 </tr> 276 </table> 277 </td> 278 </tr> 279 </form> 280 </table> 281 282 </div> 283 284 </td> 285 <td valign="top"><img src="{$IMAGE_PATH}showPanelTopRight.gif"></td> 286 </tr> 287 </tbody> 288 </table> 289 <script> 290 291 function check4null(form) 292 {ldelim} 293 294 var isError = false; 295 var errorMessage = ""; 296 // Here we decide whether to submit the form. 297 if (trim(form.templatename.value) =='') {ldelim} 298 isError = true; 299 errorMessage += "\n template name"; 300 form.templatename.focus(); 301 {rdelim} 302 if (trim(form.foldername.value) =='') {ldelim} 303 isError = true; 304 errorMessage += "\n folder name"; 305 form.foldername.focus(); 306 {rdelim} 307 if (trim(form.subject.value) =='') {ldelim} 308 isError = true; 309 errorMessage += "\n subject"; 310 form.subject.focus(); 311 {rdelim} 312 313 // Here we decide whether to submit the form. 314 if (isError == true) {ldelim} 315 alert("Missing required fields: " + errorMessage); 316 return false; 317 {rdelim} 318 return true; 319 320 {rdelim} 321 322 init(); 323 324 </script>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 10:22:19 2007 | par Balluche grâce à PHPXref 0.7 |