]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Campaigns/tpls/WizardCampaignHeader.tpl
Release 6.4.0
[Github/sugarcrm.git] / modules / Campaigns / tpls / WizardCampaignHeader.tpl
1 {*
2 /*********************************************************************************
3  * SugarCRM Community Edition is a customer relationship management program developed by
4  * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
5  * 
6  * This program is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Affero General Public License version 3 as published by the
8  * Free Software Foundation with the addition of the following permission added
9  * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10  * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
11  * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
12  * 
13  * This program is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
16  * details.
17  * 
18  * You should have received a copy of the GNU Affero General Public License along with
19  * this program; if not, see http://www.gnu.org/licenses or write to the Free
20  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  * 02110-1301 USA.
22  * 
23  * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
24  * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
25  * 
26  * The interactive user interfaces in modified source and object code versions
27  * of this program must display Appropriate Legal Notices, as required under
28  * Section 5 of the GNU Affero General Public License version 3.
29  * 
30  * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31  * these Appropriate Legal Notices must retain the display of the "Powered by
32  * SugarCRM" logo. If the display of the logo is not reasonably feasible for
33  * technical reasons, the Appropriate Legal Notices must display the words
34  * "Powered by SugarCRM".
35  ********************************************************************************/
36
37 /*********************************************************************************
38
39  ********************************************************************************/
40 *}
41
42         <!-- Begin Campaign Diagnostic Link --> 
43         {$CAMPAIGN_DIAGNOSTIC_LINK}
44         <!-- End Campaign Diagnostic Link -->
45         
46         <table width="100%" border="0" cellspacing="0" cellpadding="0">
47                 <tr>
48                 <td  colspan="3"><h3>{$MOD.LBL_WIZ_NEWSLETTER_TITLE_STEP1} </h3></div></td>
49                 <td colspan="1">&nbsp;</td>
50                 </tr>
51                 <tr><td class="datalabel" colspan="3">{$MOD.LBL_WIZARD_HEADER_MESSAGE}<br></td><td>&nbsp;</td></tr>
52                 <tr><td class="datalabel" colspan="4">&nbsp;</td></tr>
53                 <tr>
54                 <td width="17%" scope="col"><span sugar='slot1'>{$MOD.LBL_NAME} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></span sugar='slot'></td>
55                 <td width="33%" ><span sugar='slot1b'><input id='name' name='wiz_step1_name' aria-required="true"  title='{$MOD.LBL_NAME}' {$DISABLED}  size='50' maxlength='50' type="text" value="{$CAMP_NAME}" ></span sugar='slot'></td>
56                 <td width="15%" scope="col"><span sugar='slot2'>{$APP.LBL_ASSIGNED_TO}</span sugar='slot'></td>
57                 <td width="35%" ><span sugar='slot2b'><input class="sqsEnabled" autocomplete="off" id="assigned_user_name" name="wiz_step1_assigned_user_name"  title='{$APP.LBL_ASSIGNED_TO}' type="text" value="{$ASSIGNED_USER_NAME}"><input id='assigned_user_id' name='wiz_step1_assigned_user_id' type="hidden" value="{$ASSIGNED_USER_ID}" />
58                 <input title="{$APP.LBL_SELECT_BUTTON_TITLE}" accessKey="{$APP.LBL_SELECT_BUTTON_KEY}" type="button" class="button" value='{$APP.LBL_SELECT_BUTTON_LABEL}' name=btn1
59                                 onclick='open_popup("Users", 600, 400, "", true, false, {$encoded_users_popup_request_data});' /></span sugar='slot'>
60                 </td>
61                 </tr>
62                 <tr>
63                 <td width="15%" scope="col"><span sugar='slot3'>{$MOD.LBL_CAMPAIGN_STATUS} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></span sugar='slot'></td>
64                 <td width="35%" ><span sugar='slot3b'><select id='status' name='wiz_step1_status'  aria-required="true" title='{$MOD.LBL_CAMPAIGN_STATUS}'>{$STATUS_OPTIONS}</select></span sugar='slot'></td>
65                 </tr>
66                 <tr>
67                 <td scope="col"><span sugar='slot5'>{$MOD.LBL_CAMPAIGN_START_DATE} </span sugar='slot'></td>
68                 <td ><span sugar='slot5b'><input id='start_date' name='wiz_step1_start_date' title='{$MOD.LBL_CAMPAIGN_START_DATE}' onblur="parseDate(this, '{$CALENDAR_DATEFORMAT}');"  type="text" size='11' maxlength='10' value="{$CAMP_START_DATE}"> {sugar_getimage name="jscalendar" ext=".gif" alt=$APP.LBL_ENTER_DATE other_attributes='align="absmiddle" id="start_date_trigger" '} <span class="dateFormat">{$USER_DATEFORMAT}</span></span sugar='slot'></td>
69                 <td scope="col"><span sugar='slot6'>{$MOD.LBL_CAMPAIGN_TYPE} </td>
70                 <td><span sugar='slot6b'><{$SHOULD_TYPE_BE_DISABLED} id='campaign_type' title='{$MOD.LBL_CAMPAIGN_TYPE}' name='wiz_step1_campaign_type' >{$CAMPAIGN_TYPE_OPTIONS}</select></span sugar='slot'></td>
71                 </tr>
72                 <tr>
73                 <td scope="col"><span sugar='slot7'>{$MOD.LBL_CAMPAIGN_END_DATE} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></span sugar='slot'></td>
74                 <td ><span sugar='slot7b'><input id='end_date' name='wiz_step1_end_date'  aria-required="true" title='{$MOD.LBL_CAMPAIGN_END_DATE}' onblur="parseDate(this, '{$CALENDAR_DATEFORMAT}');"  type="text"s size='11' maxlength='10' value="{$CAMP_END_DATE}"> {sugar_getimage name="jscalendar" ext=".gif" alt=$APP.LBL_ENTER_DATE other_attributes='align="absmiddle" id="end_date_trigger" '} <span class="dateFormat">{$USER_DATEFORMAT}</span></span sugar='slot'></td>
75                 <td scope="col"><span sugar='slot8'>{$FREQUENCY_LABEL} </span sugar='slot'></td>
76                 <td><span sugar='slot8b'><{$HIDE_FREQUENCY_IF_NEWSLETTER}  id='frequency' name='wiz_step1_frequency' title='{$MOD.LBL_CAMPAIGN_FREQUENCY}'>{$FREQ_OPTIONS}</select></span sugar='slot'></td>
77                 </tr>
78                 <tr>
79                 <td width="15%"><span sugar='slot9'>&nbsp;</span></span sugar='slot'></td>
80                 <td width="35%" ><span sugeeear='slot9b'>&nbsp;</span sugar='slot'></td>
81                 <td ><span sugar='slot10'>&nbsp;</span sugar='slot'></td>
82                 <td><span sugar='slot10b'>&nbsp;</span sugar='slot'></td>
83                 </tr>
84                 <tr>
85                 <td valign="top" scope="row"><span sugar='slot10'>{$MOD.LBL_CAMPAIGN_CONTENT}</span sugar='slot'></td>
86                 <td colspan="3"><span sugar='slot10a'><textarea id='wiz_content' name='wiz_step1_content' title='{$MOD.LBL_CAMPAIGN_CONTENT}'  cols="110" rows="5">{$CONTENT}</textarea></span sugar='slot'></td>
87                 </tr>
88                 <tr>
89                 <td scope="row">&nbsp;</td>
90                 <td>&nbsp;</td>
91                 <td scope="row">&nbsp;</td>
92                 <td>&nbsp;</td>
93                 </tr>
94         </table><p>
95
96         {literal}
97         <script type="text/javascript">
98                 Calendar.setup ({{/literal}
99                         inputField : "start_date", ifFormat : "{$CALENDAR_DATEFORMAT}", showsTime : false, button : "start_date_trigger", singleClick : true, step : 1, weekNumbers:false
100                         {literal}
101                 });
102                 
103                 Calendar.setup ({{/literal}
104                         inputField : "end_date", ifFormat : "{$CALENDAR_DATEFORMAT}", showsTime : false, button : "end_date_trigger", singleClick : true, step : 2, weekNumbers:false
105                 {literal}
106                 });
107         
108
109     /*
110      * this is the custom validation script that will validate the fields on step1 of wizard
111      */
112     
113     function validate_step1(){
114         //loop through and check for empty strings ('  ')
115         requiredTxt = SUGAR.language.get('app_strings', 'ERR_MISSING_REQUIRED_FIELDS');
116         var stepname = 'wiz_step_1_';
117         var has_error = 0;
118         var fields = new Array();
119         fields[0] = 'name'; 
120         fields[1] = 'status';
121         fields[2] = 'end_date';
122         
123         var field_value = ''; 
124         for (i=0; i < fields.length; i++){
125             if(document.getElementById(fields[i]) !=null){
126                 field_value = trim(document.getElementById(fields[i]).value);
127                 if(field_value.length<1){
128                 //throw error if string is empty            
129                 add_error_style('wizform', fields[i], requiredTxt +' ' +document.getElementById(fields[i]).title );
130                 has_error = 1;
131                 }
132             }
133         }
134         if(has_error == 1){
135             //error has been thrown, return false
136             return false;
137         }
138         //add fields to validation and call generic validation script 
139         if(validate['wizform']!='undefined'){delete validate['wizform']};
140         addToValidate('wizform', 'name', 'alphanumeric', true,  document.getElementById('name').title);
141         addToValidate('wizform', 'status', 'alphanumeric', true,  document.getElementById('status').title);
142         addToValidate('wizform', 'end_date', 'date', true,  document.getElementById('end_date').title);
143         addToValidate('wizform', 'start_date', 'date', false,  document.getElementById('start_date').title);
144         addToValidate('wizform', 'currency_id', 'alphanumeric', false,  document.getElementById('currency_id').title);
145
146
147         return check_form('wizform');
148     }    
149
150
151
152
153
154         </script>
155         {/literal}
156