Add TPL files

This commit is contained in:
2025-05-12 15:46:37 +00:00
parent 4a4ed02e8a
commit b4d54ba40b
894 changed files with 120580 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="list view">
<tr>
<th>&nbsp;</td>
<th align="center">{$lbl_campaign_name}</td>
<th align="center">{$lbl_revenue}</td>
</tr>
{counter name="num" assign="num"}
{foreach from=$top_campaigns item="campaign"}
<tr>
<td class="oddListRowS1" align="center" valign="top" width="6%">{$num}.</td>
<td class="oddListRowS1" align="left" valign="top" width="74%"><a href="index.php?module=Campaigns&action=DetailView&record={$campaign.campaign_id}">{$campaign.campaign_name}</a></td>
<td class="oddListRowS1" align="left" valign="top" width="20%">{$campaign.revenue}</td>
</tr>
{counter name="num"}
{/foreach}
</table>

View File

@@ -0,0 +1,294 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<link rel="stylesheet" type="text/css" href="{sugar_getjspath file='modules/Connectors/tpls/tabs.css'}"/>
<!-- begin includes for overlib -->
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000"></div>
<script type="text/javascript" src="{sugar_getjspath file='include/javascript/sugar_grp_overlib.js'}"></script>
<!-- end includes for overlib -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td colspan='100'><h2>{$title}</h2></td></tr>
<tr><td colspan='100'>
{$description}
</td></tr><tr><td><br></td></tr><tr><td colspan='100'>
<form name="ConfigureSubs" method="POST" method="POST" action="index.php">
<form enctype="multipart/form-data" id="SubsForm" name="SubsForm" method="POST" action="index.php">
<input type="hidden" name="module" value="Campaigns">
<input type="hidden" name="action" value="Subscriptions">
<input type="hidden" name="enabled_subs" value="">
<input type="hidden" name="disabled_subs" value="">
<input type="hidden" name="return_module" value="{$RETURN_MODULE}">
<input type="hidden" name="return_action" value="{$RETURN_ACTION}">
<input type="hidden" name="module_tab" value="{$smarty.request.module_tab}">
<input type="hidden" name="orig_disabled_values" id="orig_disabled_values" value="{$disabled_subs_string}">
<input type="hidden" name="orig_enabled_values" id="orig_enabled_values" value="{$enabled_subs_string}">
<input type="hidden" name="record" value="{$RECORD}">
<input type="hidden" name="subs_action" value="process">
<table border="0" cellspacing="1" cellpadding="1">
<tr>
<td>
<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="save();this.form.action.value='Subscriptions'; " type="submit" name="button" value=" {$APP.LBL_SAVE_BUTTON_LABEL} " >
<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value='{$RETURN_ACTION}'; this.form.module.value='{$RETURN_MODULE}';" type="submit" name="button" value=" {$APP.LBL_CANCEL_BUTTON_LABEL} ">
</td>
</tr>
</table>
<div class='add_table' style='margin-bottom:5px'>
<table id="ConfigureSubs" class="themeSettings edit view" style='margin-bottom:0px;' border="0" cellspacing="0" cellpadding="0">
<tr>
<td><span><b>{$MOD.LBL_ALREADY_SUBSCRIBED_HEADER}</b></span></td>
<td><span><b>{$MOD.LBL_UNSUBSCRIBED_HEADER}</b>
<img border="0" src="{sugar_getimagepath file='helpInline.gif'}"
onmouseover="return overlib('{$MOD.LBL_UNSUBSCRIBED_HEADER_EXPL}', FGCLASS, 'olFgClass', CGCLASS, 'olCgClass', BGCLASS, 'olBgClass', TEXTFONTCLASS, 'olFontClass', CAPTIONFONTCLASS, 'olCapFontClass', CLOSEFONTCLASS, 'olCloseFontClass' );" onmouseout="return nd();" >
</span></td>
</tr>
<tr>
<td width='1%'>
<div id="enabled_div" class="enabled_tab_workarea">
<ul id="enabled_ul" class="module_draglist">
{foreach from=$enabled_subs key=dirname item=name}
<li id="{$dirname}" class="noBullet2">{$name}</li>
{/foreach}
</ul>
</div>
</td>
<td>
<div id="disabled_div" class="disabled_tab_workarea">
<ul id="disabled_ul" class="module_draglist">
{foreach from=$disabled_subs key=dirname item=name}
<li id="{$dirname}" class="noBullet2">{$name}</li>
{/foreach}
</ul>
</div>
</td>
</tr>
</table>
</div>
<table border="0" cellspacing="1" cellpadding="1">
<tr>
<td>
<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="save();this.form.action.value='Subscriptions'; " type="submit" name="button" value=" {$APP.LBL_SAVE_BUTTON_LABEL} " >
<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value='{$RETURN_ACTION}'; this.form.module.value='{$RETURN_MODULE}';" type="submit" name="button" value=" {$APP.LBL_CANCEL_BUTTON_LABEL} ">
</td>
</tr>
</table>
</form>
<script type="text/javascript">
{literal}
var Dom = YAHOO.util.Dom;
var Event = YAHOO.util.Event;
var DDM = YAHOO.util.DragDropMgr;
function save() {
var enabled_display_vals = '';
var disabled_display_vals = '';
//Get the enabled div elements
var elements = document.getElementById('enabled_div');
//Get the li elements
var enabled_list = YAHOO.util.Dom.getElementsByClassName('noBullet2', 'li', elements);
for(var li in enabled_list) {
if(typeof enabled_list[li] != 'function') {
enabled_display_vals += ',' + enabled_list[li].getAttribute('id');
}
}
document.ConfigureSubs.enabled_subs.value = enabled_display_vals != '' ? enabled_display_vals.substr(1,enabled_display_vals.length) : '';
var elements = document.getElementById('disabled_div');
//Get the li elements
var disabled_list = YAHOO.util.Dom.getElementsByClassName('noBullet2', 'li', elements);
for(var li in disabled_list) {
if(typeof disabled_list[li] != 'function') {
disabled_display_vals += ',' + disabled_list[li].getAttribute('id');
}
}
document.ConfigureSubs.disabled_subs.value = disabled_display_vals != '' ? disabled_display_vals.substr(1,disabled_display_vals.length) : '';
}
(function() {
YAHOO.example.DDApp = {
init: function() {
{/literal}
new YAHOO.util.DDTarget("enabled_ul");
new YAHOO.util.DDTarget("disabled_ul");
{foreach from=$enabled_subs key=module item=moduleDisplay}
{if $module != $currentTheme}new YAHOO.example.DDList("{$module}");{/if}
{/foreach}
{foreach from=$disabled_subs key=module item=moduleDisplay}
new YAHOO.example.DDList("{$module}");
{/foreach}
{literal}
}
};
YAHOO.example.DDList = function(id, sGroup, config) {
YAHOO.example.DDList.superclass.constructor.call(this, id, sGroup, config);
var el = this.getDragEl();
Dom.setStyle(el, "opacity", 0.67);
this.goingUp = false;
this.lastY = 0;
};
YAHOO.extend(YAHOO.example.DDList, YAHOO.util.DDProxy, {
startDrag: function(x, y) {
// make the proxy look like the source element
var dragEl = this.getDragEl();
var clickEl = this.getEl();
Dom.setStyle(clickEl, "visibility", "hidden");
dragEl.innerHTML = clickEl.innerHTML;
Dom.setStyle(dragEl, "color", Dom.getStyle(clickEl, "color"));
Dom.setStyle(dragEl, "backgroundColor", Dom.getStyle(clickEl, "backgroundColor"));
Dom.setStyle(dragEl, "border", "2px solid gray");
},
endDrag: function(e) {
var srcEl = this.getEl();
var proxy = this.getDragEl();
// Show the proxy element and animate it to the src element's location
Dom.setStyle(proxy, "visibility", "");
var a = new YAHOO.util.Motion(
proxy, {
points: {
to: Dom.getXY(srcEl)
}
},
0.2,
YAHOO.util.Easing.easeOut
)
var proxyid = proxy.id;
var thisid = this.id;
// Hide the proxy and show the source element when finished with the animation
a.onComplete.subscribe(function() {
Dom.setStyle(proxyid, "visibility", "hidden");
Dom.setStyle(thisid, "visibility", "");
});
a.animate();
},
onDragDrop: function(e, id) {
// If there is one drop interaction, the li was dropped either on the list,
// or it was dropped on the current location of the source element.
if (DDM.interactionInfo.drop.length === 1) {
// The position of the cursor at the time of the drop (YAHOO.util.Point)
var pt = DDM.interactionInfo.point;
// The region occupied by the source element at the time of the drop
var region = DDM.interactionInfo.sourceRegion;
// Check to see if we are over the source element's location. We will
// append to the bottom of the list once we are sure it was a drop in
// the negative space (the area of the list without any list items)
if (!region.intersect(pt)) {
var destEl = Dom.get(id);
var destDD = DDM.getDDById(id);
destEl.appendChild(this.getEl());
destDD.isEmpty = false;
DDM.refreshCache();
}
}
},
onDrag: function(e) {
// Keep track of the direction of the drag for use during onDragOver
var y = Event.getPageY(e);
if (y < this.lastY) {
this.goingUp = true;
} else if (y > this.lastY) {
this.goingUp = false;
}
this.lastY = y;
},
onDragOver: function(e, id) {
var srcEl = this.getEl();
var destEl = Dom.get(id);
// We are only concerned with list items, we ignore the dragover
// notifications for the list.
if (destEl.nodeName.toLowerCase() == "li") {
var orig_p = srcEl.parentNode;
var p = destEl.parentNode;
if (this.goingUp) {
p.insertBefore(srcEl, destEl); // insert above
} else {
p.insertBefore(srcEl, destEl.nextSibling); // insert below
}
DDM.refreshCache();
}
}
});
Event.onDOMReady(YAHOO.example.DDApp.init, YAHOO.example.DDApp, true);
})();
{/literal}
</script>
<!-- END: main -->

62
modules/Campaigns/chart.tpl Executable file
View File

@@ -0,0 +1,62 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<!-- BEGIN: main -->
<graphData title="{GRAPHTITLE}">
<yData defaultAltText="{Y_DEFAULT_ALT_TEXT}">
<!-- BEGIN: row -->
<dataRow title="{Y_ROW_TITLE}" endLabel="{Y_ROW_ENDLABEl}">
<!-- BEGIN: bar -->
<bar id="{Y_BAR_ID}" totalSize="{Y_BAR_SIZE}" altText="{Y_BAR_ALTTEXT}" url="{Y_BAR_URL}"/>
<!-- END: bar -->
</dataRow>
<!-- END: row -->
</yData>
<xData min="{XMIN}" max="{XMAX}" length="{XLENGTH}" kDelim="{XKDELIM}" prefix="{XPREFIX}" suffix="{XSUFFIX}"/>
<colorLegend status="on">
<mapping id="'.$outcome.'" name="'.$outcome_translation.'" color="'.$color.'"/>
</colorLegend>
<graphInfo><![CDATA[{GRAPH_DATA}]]></graphInfo>
<chartColors {COLOR_DEFS}/>
</graphData>
<!-- END: main -->

View File

@@ -0,0 +1,136 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
********************************************************************************/
*}
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th colspan="4" align="left" ><h4>{$MOD.LBL_WIZ_NEWSLETTER_TITLE_STEP2}</h4></th>
</tr>
<tr><td class="datalabel" colspan="3">{$MOD.LBL_WIZARD_BUDGET_MESSAGE}<br></td><td>&nbsp;</td></tr>
<tr><td class="datalabel" colspan="4">&nbsp;</td></tr>
<tr>
<td scope="row"><span sugar='slot14'>{$MOD.LBL_CAMPAIGN_BUDGET}</span sugar='slot'></td>
<td ><span sugar='slot14b'><input type="text" size="10" tabindex="1" maxlength="15" id="budget" name="wiz_step2_budget" title="{$MOD.LBL_CAMPAIGN_BUDGET}" value="{$CAMP_BUDGET}"></span sugar='slot'></td>
<td scope="row"><span sugar='slot15'>{$MOD.LBL_CAMPAIGN_ACTUAL_COST}</span sugar='slot'></td>
<td ><span sugar='slot15b'><input type="text" size="10" tabindex='2' maxlength="15" id="actual_cost" name="wiz_step2_actual_cost" title="{$MOD.LBL_CAMPAIGN_ACTUAL_COST}" value="{$CAMP_ACTUAL_COST}"></span sugar='slot'></td>
</tr>
<tr>
<td scope="row"><span sugar='slot16'>{$MOD.LBL_CAMPAIGN_EXPECTED_REVENUE}</span sugar='slot'></td>
<td ><span sugar='slot16b'><input type="text" size="10" tabindex="1" maxlength="15" id="expected_revenue" name="wiz_step2_expected_revenue" title="{$MOD.LBL_CAMPAIGN_EXPECTED_REVENUE}" value="{$CAMP_EXPECTED_REVENUE}"></span sugar='slot'></td>
<td scope="row"><span sugar='slot17'>{$MOD.LBL_CAMPAIGN_EXPECTED_COST}</span sugar='slot'></td>
<td ><span sugar='slot17b'><input type="text" size="10" tabindex="2" maxlength="15" id="expected_cost" name="wiz_step2_expected_cost" title="{$MOD.LBL_CAMPAIGN_EXPECTED_COST}" value="{$CAMP_EXPECTED_COST}"></span sugar='slot'></td>
</tr>
<tr>
<td scope="row"><span sugar='slot18'>{$MOD.LBL_CURRENCY}</span sugar='slot'></td>
<td><span sugar='slot18b'><select tabindex='1' title='{$MOD.LBL_CURRENCY}' name='wiz_step2_currency_id' id='currency_id' onchange='ConvertItems(this.options[selectedIndex].value);'>{$CURRENCY}</select></span sugar='slot'></td>
<td scope="row"><span sugar='slot17'>{$MOD.LBL_CAMPAIGN_IMPRESSIONS}</span sugar='slot'></td>
<td ><span sugar='slot17b'><input type="text" size="10" tabindex="2" maxlength="15" id="impressions" name="wiz_step2_impressions" title="{$MOD.LBL_CAMPAIGN_IMPRESSIONS}" value="{$CAMP_IMPRESSIONS}"></span sugar='slot'></td></tr>
<tr>
<td scope="row"><span sugar='slot18'>&nbsp;</span sugar='slot'></td>
<td><span sugar='slot18b'>&nbsp;</td>
<td scope="row"><span sugar='slot19'>&nbsp;</span sugar='slot'></td>
<td><span sugar='slot19b'>&nbsp;</span sugar='slot'></td>
</tr>
<tr>
<td valign="top" scope="row"><span sugar='slot20'>{$MOD.LBL_CAMPAIGN_OBJECTIVE}</span sugar='slot'></td>
<td colspan="4"><span sugar='slot20b'><textarea id="objective" name="wiz_step2_objective" title='{$MOD.LBL_CAMPAIGN_OBJECTIVE}' tabindex='3' cols="110" rows="5">{$OBJECTIVE}</textarea></span sugar='slot'></td>
</tr>
<tr>
<td scope="row">&nbsp;</td>
<td>&nbsp;</td>
<td scope="row">&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
<p>
<script>
var num_grp_sep ='{$NUM_GRP_SEP}';
var dec_sep = '{$DEC_SEP}';
/*
* this is the custom validation script that will validate the fields on step2 of wizard
*/
{literal}
function validate_step2(){
//add fields to validation and call generic validation script
var requiredTxt = SUGAR.language.get('app_strings', 'ERR_MISSING_REQUIRED_FIELDS');
if(validate['wizform']!='undefined'){delete validate['wizform']};
addToValidate('wizform', 'budget', 'float', false, document.getElementById('budget').title);
addToValidate('wizform', 'actual_cost', 'float', false, document.getElementById('actual_cost').title);
addToValidate('wizform', 'expected_revenue', 'float', false, document.getElementById('expected_revenue').title);
addToValidate('wizform', 'expected_cost', 'float', false, document.getElementById('expected_cost').title);
addToValidate('wizform', 'impressions', 'float', false, document.getElementById('impressions').title);
var check_date = new Date();
oldStartsWith =84;
return check_form('wizform');
}
function ConvertItems(id) {
var items = new Array();
//get the items that are to be converted
expected_revenue = document.getElementById('expected_revenue');
budget = document.getElementById('budget');
actual_cost = document.getElementById('actual_cost');
expected_cost = document.getElementById('expected_cost');
//unformat the values of the items to be converted
expected_revenue.value = unformatNumber(expected_revenue.value, num_grp_sep, dec_sep);
expected_cost.value = unformatNumber(expected_cost.value, num_grp_sep, dec_sep);
budget.value = unformatNumber(budget.value, num_grp_sep, dec_sep);
actual_cost.value = unformatNumber(actual_cost.value, num_grp_sep, dec_sep);
//add the items to an array
items[items.length] = expected_revenue;
items[items.length] = budget;
items[items.length] = expected_cost;
items[items.length] = actual_cost;
//call function that will convert currency
ConvertRate(id, items);
//Add formatting back to items
expected_revenue.value = formatNumber(expected_revenue.value, num_grp_sep, dec_sep);
expected_cost.value = formatNumber(expected_cost.value, num_grp_sep, dec_sep);
budget.value = formatNumber(budget.value, num_grp_sep, dec_sep);
actual_cost.value = formatNumber(actual_cost.value, num_grp_sep, dec_sep);
}
{/literal}
</script>

View File

@@ -0,0 +1,155 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
********************************************************************************/
*}
<!-- Begin Campaign Diagnostic Link -->
{$CAMPAIGN_DIAGNOSTIC_LINK}
<!-- End Campaign Diagnostic Link -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3"><h3>{$MOD.LBL_WIZ_NEWSLETTER_TITLE_STEP1} </h3></div></td>
<td colspan="1">&nbsp;</td>
</tr>
<tr><td class="datalabel" colspan="3">{$MOD.LBL_WIZARD_HEADER_MESSAGE}<br></td><td>&nbsp;</td></tr>
<tr><td class="datalabel" colspan="4">&nbsp;</td></tr>
<tr>
<td width="17%" scope="row"><span sugar='slot1'>{$MOD.LBL_NAME} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></span sugar='slot'></td>
<td width="33%" ><span sugar='slot1b'><input id='name' name='wiz_step1_name' title='{$MOD.LBL_NAME}' {$DISABLED} tabindex='1' size='50' maxlength='50' type="text" value="{$CAMP_NAME}" ></span sugar='slot'></td>
<td width="15%" scope="row"><span sugar='slot2'>{$APP.LBL_ASSIGNED_TO}</span sugar='slot'></td>
<td width="35%" ><span sugar='slot2b'><input class="sqsEnabled" tabindex="2" 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}" />
<input title="{$APP.LBL_SELECT_BUTTON_TITLE}" accessKey="{$APP.LBL_SELECT_BUTTON_KEY}" type="button" tabindex='2' class="button" value='{$APP.LBL_SELECT_BUTTON_LABEL}' name=btn1
onclick='open_popup("Users", 600, 400, "", true, false, {$encoded_users_popup_request_data});' /></span sugar='slot'>
</td>
</tr>
<tr>
<td width="15%" scope="row"><span sugar='slot3'>{$MOD.LBL_CAMPAIGN_STATUS} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></span sugar='slot'></td>
<td width="35%" ><span sugar='slot3b'><select tabindex='1' id='status' name='wiz_step1_status' title='{$MOD.LBL_CAMPAIGN_STATUS}'>{$STATUS_OPTIONS}</select></span sugar='slot'></td>
</tr>
<tr>
<td scope="row"><span sugar='slot5'>{$MOD.LBL_CAMPAIGN_START_DATE} </span sugar='slot'></td>
<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" tabindex='1' size='11' maxlength='10' value="{$CAMP_START_DATE}"> <img src="{sugar_getimagepath file='jscalendar.gif'}" alt="{$APP.LBL_ENTER_DATE}" id="start_date_trigger" align="absmiddle"> <span class="dateFormat">{$USER_DATEFORMAT}</span></span sugar='slot'></td>
<td scope="row"><span sugar='slot6'>{$MOD.LBL_CAMPAIGN_TYPE} </td>
<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>
</tr>
<tr>
<td scope="row"><span sugar='slot7'>{$MOD.LBL_CAMPAIGN_END_DATE} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></span sugar='slot'></td>
<td ><span sugar='slot7b'><input id='end_date' name='wiz_step1_end_date' title='{$MOD.LBL_CAMPAIGN_END_DATE}' onblur="parseDate(this, '{$CALENDAR_DATEFORMAT}');" type="text" tabindex='1' size='11' maxlength='10' value="{$CAMP_END_DATE}"> <img src="{sugar_getimagepath file='jscalendar.gif'}" alt="{$APP.LBL_ENTER_DATE}" id="end_date_trigger" align="absmiddle"> <span class="dateFormat">{$USER_DATEFORMAT}</span></span sugar='slot'></td>
<td scope="row"><span sugar='slot8'>{$FREQUENCY_LABEL} </span sugar='slot'></td>
<td><span sugar='slot8b'><{$HIDE_FREQUENCY_IF_NEWSLETTER} tabindex='1' id='frequency' name='wiz_step1_frequency' title='{$MOD.LBL_CAMPAIGN_FREQUENCY}'>{$FREQ_OPTIONS}</select></span sugar='slot'></td>
</tr>
<tr>
<td width="15%" scope="row"><span sugar='slot9'>&nbsp;</span></span sugar='slot'></td>
<td width="35%" ><span sugar='slot9b'>&nbsp;</span sugar='slot'></td>
<td scope="row"><span sugar='slot10'>&nbsp;</span sugar='slot'></td>
<td><span sugar='slot10b'>&nbsp;</span sugar='slot'></td>
<tr>
</tr>
<td valign="top" scope="row"><span sugar='slot10'>{$MOD.LBL_CAMPAIGN_CONTENT}</span sugar='slot'></td>
<td colspan="3"><span sugar='slot10a'><textarea id='wiz_content' name='wiz_step1_content' title='{$MOD.LBL_CAMPAIGN_CONTENT}' tabindex='3' cols="110" rows="5">{$CONTENT}</textarea></span sugar='slot'></td>
</tr>
<tr>
<td scope="row">&nbsp;</td>
<td>&nbsp;</td>
<td scope="row">&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table><p>
{literal}
<script type="text/javascript">
Calendar.setup ({{/literal}
inputField : "start_date", ifFormat : "{$CALENDAR_DATEFORMAT}", showsTime : false, button : "start_date_trigger", singleClick : true, step : 1, weekNumbers:false
{literal}
});
Calendar.setup ({{/literal}
inputField : "end_date", ifFormat : "{$CALENDAR_DATEFORMAT}", showsTime : false, button : "end_date_trigger", singleClick : true, step : 2, weekNumbers:false
{literal}
});
/*
* this is the custom validation script that will validate the fields on step1 of wizard
*/
function validate_step1(){
//loop through and check for empty strings (' ')
requiredTxt = SUGAR.language.get('app_strings', 'ERR_MISSING_REQUIRED_FIELDS');
var stepname = 'wiz_step_1_';
var has_error = 0;
var fields = new Array();
fields[0] = 'name';
fields[1] = 'status';
fields[2] = 'end_date';
var field_value = '';
for (i=0; i < fields.length; i++){
if(document.getElementById(fields[i]) !=null){
field_value = trim(document.getElementById(fields[i]).value);
if(field_value.length<1){
//throw error if string is empty
add_error_style('wizform', fields[i], requiredTxt +' ' +document.getElementById(fields[i]).title );
has_error = 1;
}
}
}
if(has_error == 1){
//error has been thrown, return false
return false;
}
//add fields to validation and call generic validation script
if(validate['wizform']!='undefined'){delete validate['wizform']};
addToValidate('wizform', 'name', 'alphanumeric', true, document.getElementById('name').title);
addToValidate('wizform', 'status', 'alphanumeric', true, document.getElementById('status').title);
addToValidate('wizform', 'end_date', 'date', true, document.getElementById('end_date').title);
addToValidate('wizform', 'start_date', 'date', false, document.getElementById('start_date').title);
addToValidate('wizform', 'currency_id', 'alphanumeric', false, document.getElementById('currency_id').title);
return check_form('wizform');
}
</script>
{/literal}

View File

@@ -0,0 +1,182 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
********************************************************************************/
*}
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th colspan="4" align="left" ><h4>{$MOD.LBL_WIZ_NEWSLETTER_TITLE_STEP4}</h4></th>
</tr>
<tr>
<td scope="row" colspan="4">{$MOD.LBL_WIZARD_SUBSCRIPTION_MESSAGE}<br></td>
</tr>
<tr>
<td scope="row" colspan="4">&nbsp;</td>
</tr>
<tr>
<td scope="row"><span sugar='slot26'><img border="0" src="{sugar_getimagepath file='helpInline.gif'}" onmouseover="return overlib('{$MOD.LBL_SUBSCRIPTION_TARGET_WIZARD_DESC}', FGCLASS, 'olFgClass', CGCLASS, 'olCgClass', BGCLASS, 'olBgClass', TEXTFONTCLASS, 'olFontClass', CAPTIONFONTCLASS, 'olCapFontClass', CLOSEFONTCLASS, 'olCloseFontClass' );" onmouseout="return nd();" >
{$MOD.LBL_SUBSCRIPTION_LIST_NAME}</span sugar='slot'>
</td>
<td><input type='radio' onclick="change_target_list(this,'subs');" name='wiz_subscriptions_def_type' id='wiz_subscriptions_def_type' title="{$MOD.LBL_DEFAULT_LOCATION}" value="1" >{$MOD.LBL_DEFAULT_LOCATION}<br>
<input type='radio' onclick="change_target_list(this,'subs');" name='wiz_subscriptions_def_type' id='wiz_subscriptions_def_type' title="{$MOD.LBL_CUSTOM_LOCATION}" value="2" checked >{$MOD.LBL_CUSTOM_LOCATION}
</td>
<td colspan='2'><span sugar='slot26b'>
<input class="sqsEnabled" autocomplete="off" id="subscription_name" name="wiz_step3_subscription_name" title='{$MOD.LBL_SUBSCRIPTION_LIST_NAME}' type="text" size='35' value="{$SUBSCRIPTION_NAME}">
<input id='prospect_list_type_default' name='prospect_list_type_default' type="hidden" value="default" />
<input id='wiz_step3_subscription_name_id' name='wiz_step3_subscription_list_id' title='Subscription List ID' type="hidden" value='{$SUBSCRIPTION_ID}'>
<input title="{$APP.LBL_SELECT_BUTTON_TITLE}" accessKey="{$APP.LBL_SELECT_BUTTON_KEY}" type="button" tabindex='1' class="button" value='{$APP.LBL_SELECT_BUTTON_LABEL}' name=btn1 id='wiz_step3_subscription_name_button'
onclick='open_popup("ProspectLists", 600, 400, "&list_type=default", true, false, {$encoded_subscription_popup_request_data}, "single", true);'>
</span sugar='slot'></td>
</tr>
<tr><td colspan='4'>&nbsp;</td></tr>
<tr>
<td scope="row"><span sugar='slot27'><img border="0" src="{sugar_getimagepath file='helpInline.gif'}" onmouseover="return overlib('{$MOD.LBL_UNSUBSCRIPTION_TARGET_WIZARD_DESC}', FGCLASS, 'olFgClass', CGCLASS, 'olCgClass', BGCLASS, 'olBgClass', TEXTFONTCLASS, 'olFontClass', CAPTIONFONTCLASS, 'olCapFontClass', CLOSEFONTCLASS, 'olCloseFontClass' );" onmouseout="return nd();" >
{$MOD.LBL_UNSUBSCRIPTION_LIST_NAME}</span sugar='slot'>
</td>
<td><input type='radio' onclick="change_target_list(this,'unsubs');" name='wiz_unsubscriptions_def_type' id='wiz_unsubscriptions_def_type' title="{$MOD.LBL_DEFAULT_LOCATION}" value="1">{$MOD.LBL_DEFAULT_LOCATION}<br>
<input type='radio' onclick="change_target_list(this,'unsubs');" name='wiz_unsubscriptions_def_type' id='wiz_unsubscriptions_def_type' title="{$MOD.LBL_CUSTOM_LOCATION}" value="2" checked>{$MOD.LBL_CUSTOM_LOCATION}
</td>
<td colspan='2'><span sugar='slot27b'>
<input class="sqsEnabled" autocomplete="off" id="unsubscription_name" name="wiz_step3_unsubscription_name" title='{$MOD.LBL_UNSUBSCRIPTION_LIST_NAME}' type="text" size='35' value="{$UNSUBSCRIPTION_NAME}" >
<input id='prospect_list_type_exempt' name='prospect_list_type_exempt' type="hidden" value="exempt" />
<input id='wiz_step3_unsubscription_name_id' name='wiz_step3_unsubscription_list_id' title='UnSubscription List ID' type="hidden" value='{$UNSUBSCRIPTION_ID}'>
<input title="{$APP.LBL_SELECT_BUTTON_TITLE}" accessKey="{$APP.LBL_SELECT_BUTTON_KEY}" type="button" tabindex='1' class="button" value='{$APP.LBL_SELECT_BUTTON_LABEL}' name=btn2 id='wiz_step3_unsubscription_name_button'
onclick='open_popup("ProspectLists", 600, 400, "&list_type=exempt", true, false, {$encoded_unsubscription_popup_request_data}, "single", true);'>
</span sugar='slot'></td>
</tr>
<tr><td colspan='4'>&nbsp;</td></tr>
<tr>
<td scope="row">
<span sugar='slot28'><img border="0" src="{sugar_getimagepath file='helpInline.gif'}" onmouseover="return overlib('{$MOD.LBL_TEST_TARGET_WIZARD_DESC}', FGCLASS, 'olFgClass', CGCLASS, 'olCgClass', BGCLASS, 'olBgClass', TEXTFONTCLASS, 'olFontClass', CAPTIONFONTCLASS, 'olCapFontClass', CLOSEFONTCLASS, 'olCloseFontClass' );" onmouseout="return nd();">
{$MOD.LBL_TEST_LIST_NAME}</span sugar='slot'>
</td>
<td><input type='radio' onclick="change_target_list(this,'test');" name='wiz_test_def_type' id='wiz_test_def_type' title="{$MOD.LBL_DEFAULT_LOCATION}" value="1" >{$MOD.LBL_DEFAULT_LOCATION}<br>
<input type='radio' onclick="change_target_list(this,'test');" name='wiz_test_def_type' id='wiz_test_def_type' title="{$MOD.LBL_CUSTOM_LOCATION}" value="2" checked >{$MOD.LBL_CUSTOM_LOCATION}
</td>
<td colspan='2'><span sugar='slot28b'>
<input class="sqsEnabled" autocomplete="off" id="test_name" name="wiz_step3_test_name" title='{$MOD.LBL_TEST_LIST_NAME}' type="text" size='35' value="{$TEST_NAME}">
<input id='prospect_list_type_test' name='prospect_list_type_test' type="hidden" value="test" />
<input id='wiz_step3_test_name_id' name='wiz_step3_test_list_id' title='Test List ID' type="hidden" value='{$TEST_ID}'>
<input title="{$APP.LBL_SELECT_BUTTON_TITLE}" accessKey="{$APP.LBL_SELECT_BUTTON_KEY}" type="button" tabindex='1' class="button" value='{$APP.LBL_SELECT_BUTTON_LABEL}' name=btn3 id='wiz_step3_test_name_button'
onclick='open_popup("ProspectLists", 600, 400, "&list_type=test", true, false, {$encoded_test_popup_request_data}, "single", true);'>
</span sugar='slot'></td>
</tr>
<tr>
<td scope="row">&nbsp;</td>
<td>&nbsp;</td>
<td scope="row">&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
<p>
{literal}
<script type="text/javascript" >
//this function will toggle the popup forms to be read only if "Default" is selected,
//and enable the pop up select if "Custom" is selected
function change_target_list(radiobutton,list) {
var def_value ='';
if(list == 'subs'){
list_name = 'wiz_step3_subscription_name';
{/literal}
def_id ='{$SUBSCRIPTION_ID}';
def_value ='{$SUBSCRIPTION_NAME}'
{literal}
}
if(list == 'unsubs'){
list_name = 'wiz_step3_unsubscription_name';
{/literal}
def_id ='{$UNSUBSCRIPTION_ID}';
def_value ='{$UNSUBSCRIPTION_NAME}'
{literal}
}
if(list == 'test'){
list_name = 'wiz_step3_test_name';
{/literal}
def_id ='{$TEST_ID}';
def_value ='{$TEST_NAME}'
{literal}
}
//default selected, set inputs to read only
if (radiobutton.value == '1') {
radiobutton.form[list_name].disabled=true;
radiobutton.form[list_name+"_button"].style.visibility='hidden';
radiobutton.form[list_name+"_id"].value=def_id;
//call function that populates the default value
change_target_list_names(list,def_value);
} else {
//custom selected, make inputs editable
radiobutton.form[list_name].disabled=false;
radiobutton.form[list_name+"_button"].style.visibility='visible';
radiobutton.form[list_name].value='';
radiobutton.form[list_name+"_id"].value='';
}
}
//this function will populate the "default" name on the target list. It will either do one,
//if specified, or all three widgets, if blank idis passed in
function change_target_list_names(list,def_value) {
//id was passed in, create the listname and inputname variables
if(list != ''){
switch (list){{/literal}
case 'subs':
listname = '{$MOD.LBL_SUBSCRIPTION_LIST}';
inputname = 'subscription_name';
break;
case 'unsubs':
listname = '{$MOD.LBL_UNSUBSCRIPTION_LIST}';
inputname = 'unsubscription_name';
break;
case 'test':
inputname = 'test_name';
listname = '{$MOD.LBL_TEST_LIST}';
break;
default:
inputname = '';
{literal}
}
}
//populate specified input with default value
if(def_value==''){
def_value = document.getElementById('name').value + ' ' + listname;}
document.getElementById(inputname).value = def_value;
}
</script>
{/literal}

View File

@@ -0,0 +1,307 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
********************************************************************************/
*}
<input type="hidden" id="existing_target_count" name="existing_target_count" value={$TARGET_COUNT}>
<input type="hidden" id="added_target_count" name="added_target_count" value=''>
<input type="hidden" id="wiz_list_of_existing_targets" name="wiz_list_of_existing_targets" value="">
<input type="hidden" id="wiz_list_of_targets" name="wiz_list_of_targets" value="">
<input type="hidden" id="wiz_remove_target_list" name="wiz_remove_target_list" value="">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th colspan="5" align="left" ><h4>{$MOD.LBL_TARGET_LISTS}</h4></th>
</tr>
<tr>
<td scope="row" colspan="5">{$MOD.LBL_WIZARD_TARGET_MESSAGE1}<br></td>
</tr>
<tr><td colspan=5>&nbsp;</td></tr>
<tr>
<td scope="row" colspan="4">{$MOD.LBL_SELECT_TARGET}&nbsp;
<input id="popup_target_list_type" name="popup_target_list_type" type='hidden'>
<input id="popup_target_list_name" name="popup_target_list_name" type="hidden" value="">
<input id='popup_target_list_id' name='popup_target_list_id' title='List ID' type="hidden" value=''>
<input title="{$APP.LBL_SELECT_BUTTON_TITLE}" type="button" tabindex='1' class="button" value='{$APP.LBL_SELECT_BUTTON_LABEL}' name=btn3 id='target_list_button'
onclick='open_popup("ProspectLists", 600, 400, "", true, false, {$encoded_target_list_popup_request_data}, "single", true);'>
</span sugar='slot'>
</td>
<td scope="row">&nbsp;</td>
</tr>
<tr><td colspan=5>&nbsp;</td></tr>
<tr>
<td scope="row" colspan="5">{$MOD.LBL_WIZARD_TARGET_MESSAGE2}<br></td>
</tr>
<tr>
<td width='10%' scope="row">{$MOD.LBL_TARGET_NAME}</td>
<td width='20%' scope="row">
<input id="target_list_name" name="target_list_name" type='text' size='40'>
</td>
<td width='10%' scope="row">
<span sugar='slot28'>{$MOD.LBL_TARGET_TYPE}</span sugar='slot'>
</td>
<td width='20%' >
<span sugar='slot28b'>
<select id="target_list_type" name="target_list_type">{$TARGET_OPTIONS}</select>
<input id='target_list_id' name='target_list_id' title='List ID' type="hidden" value=''>
</span sugar='slot'>
</td>
<td width='30%'><input type='button' value ='{$MOD.LBL_CREATE_TARGET}' class= 'button' onclick="add_target('false');"></td>
</tr>
<tr><td colspan=5>&nbsp;</td></tr>
</table>
<table width = '100%' class='detail view'>
<tr><td>{$MOD.LBL_TRACKERS_ADDED}</td></tr>
<tr><td>
<table bprder=1 width='100%'><tr class='detail view'>
<td width='25%'><b>{$MOD.LBL_TARGET_NAME}</b></td>
<td width='25%'><b>{$MOD.LBL_TARGET_TYPE}</b></td><td>&nbsp;</td>
<td width='25%'><b>&nbsp;</b></td>
</tr>
</table>
<div id='added_targets'>
{$EXISTING_TARGETS}
</div>
</td></tr>
</table>
<p>
<script>
var image_path = '{$IMAGE_PATH}';
{literal}
//create variables that will be used to monitor the number of target url
var targets_added = 0;
//variable that will be passed back to server to specify list of targets
var wiz_list_of_targets_array = new Array();
//this function adds selected target to list
function add_target(from_popup){
//perform validation
if(validate_step4(from_popup)){
TRGTNAME = 'target_list_name';
TRGTID = 'target_list_id';
TRGTYPE = 'target_list_type';
if(from_popup == 'true'){
TRGTNAME = 'popup_target_list_name'
TRGTID = 'popup_target_list_id'
TRGTYPE = 'popup_target_list_type'
}
//increment target count value
targets_added++;
document.getElementById('added_target_count').value = targets_added ;
//get the appropriate values from target form
var trgt_name = document.getElementById(TRGTNAME);
var trgt_id = document.getElementById(TRGTID);
var trgt_type = document.getElementById(TRGTYPE);
// var selInd = trgt_type.selectedIndex;
// trgt_type_text_value = trgt_type.options[selInd].text
var trgt_type_text = trgt_type.value ;
{/literal}
//display the selected display text, not the value
{$PL_DOM_STMT}
{literal}
//construct html to display chosen tracker
var trgt_name_html = "<input id='target_name"+targets_added +"' type='hidden' size='20' maxlength='255' name='added_target_name"+targets_added+"' value='"+trgt_name.value+"' >"+trgt_name.value;
var trgt_id_html = "<input type='hidden' name='added_target_id"+trackers_added+"' id='added_target_id"+trackers_added+"' value='"+trgt_id.value+"' >";
var trgt_type_html = "<input name='added_target_type"+trackers_added+"' id='added_target_type"+trackers_added+"' type='hidden' value='"+trgt_type.value+"'/>"+trgt_type_text;
{/literal}
//display the html
var trgt_html = "<div id='trgt_added_"+targets_added+"'> <table width='100%' class='tabDetailViewDL2'><tr class='tabDetailViewDL2' ><td width='25%'>"+trgt_name_html+"</td><td width='25%'>"+trgt_type_html+"</td><td>"+trgt_id_html+"<a href='#' onclick=\"remove_target('trgt_added_"+targets_added+"','"+targets_added+"'); \" > <img src='{sugar_getimagepath file='delete_inline.gif'}' alt='rem' align='absmiddle' border='0' height='12' width='12'>{$MOD.LBL_REMOVE}</a></td></tr></table></div>";
document.getElementById('added_targets').innerHTML = document.getElementById('added_targets').innerHTML + trgt_html;
//add values to array in string, seperated by "@@" characters
wiz_list_of_targets_array[targets_added] = trgt_id.value+"@@"+trgt_name.value+"@@"+trgt_type.value;
//assign array to hidden input, which will be used by server to process array of targets
document.getElementById('wiz_list_of_targets').value = wiz_list_of_targets_array.toString();
//now lets clear the form to allow input of new target
trgt_name.value = '';
trgt_id.value = '';
trgt_type.value = 'default';
{literal}
if(targets_added ==1){
document.getElementById('no_targets').style.display='none';
}
}
}
//this function will remove the selected target from the ui, and from the target array
function remove_target(div,num){
//clear UI
var trgt_div = document.getElementById(div);
trgt_div.style.display = 'none';
parentNE=trgt_div.parentNode;
parentNE.removeChild(trgt_div);
//clear target array from this entry and assign to form input
wiz_list_of_targets_array[num] = '';
document.getElementById('wiz_list_of_targets').value = wiz_list_of_targets_array.toString();
}
//this function will remove the existing target from the ui, and add it's value to an array for removal upon save
function remove_existing_target(div,id){
//clear UI
var trgt_div = document.getElementById(div);
trgt_div.style.display = 'none';
parentNE=trgt_div.parentNode;
parentNE.removeChild(trgt_div);
//assign this id to form input for removal
document.getElementById('wiz_remove_target_list').value += ','+id;
}
/*
* this is the custom validation script that will validate the fields on step3 of wizard
* this is called directly from the add target button
*/
function validate_step4(from_popup){
if(from_popup=='true'){
return true;
}
requiredTxt = SUGAR.language.get('app_strings', 'ERR_MISSING_REQUIRED_FIELDS');
var stepname = 'wiz_step3_';
var has_error = 0;
var fields = new Array();
fields[0] = 'target_list_name';
fields[1] = 'target_list_type';
//loop through and check for empty strings (' ')
var field_value = '';
if( (trim(document.getElementById(fields[0]).value) !='') || (trim(document.getElementById(fields[1]).value) !='')){
for (i=0; i < fields.length; i++){
field_value = trim(document.getElementById(fields[i]).value);
if(field_value.length<1){
add_error_style('wizform', fields[i], requiredTxt +' ' +document.getElementById(fields[i]).title );
has_error = 1;
}
}
}else{
//no values have been entered, return false without error
return false;
}
//error has been thrown, return false
if(has_error == 1){
return false;
}
return true;
}
/**
*This function will iterate through list of targets and gather all the values. It will
*populate these values, seperated by delimiters into hidden inputs for processing
*/
function gathertargets(){
//start with the newly added targets, get count of total added
count = parseInt(targets_added);
final_list_of_targets_array = new Array();
//iterate through list of added targets
for(i=1;i<=count;i++){
//make sure all values exist
if( document.getElementById('target_name'+i) && document.getElementById('is_optout'+i) && document.getElementById('target_url'+i) ){
//make sure the check box value is int (0/1)
var opt_val = '0';
if(document.getElementById('is_optout'+i).checked){opt_val =1;}
//add values for this target entry into array of target entries
final_list_of_targets_array[i] = document.getElementById('target_name'+i).value+"@@"+opt_val+"@@"+document.getElementById('target_url'+i).value;
}
}
//assign array of target entries to hidden input, which will be used by server to process array of targets
document.getElementById('wiz_list_of_targets').value = final_list_of_targets_array.toString();
//Now lets process existing targets, get count of existing targets
count = parseInt(document.getElementById('existing_target_count').value);
final_list_of_existing_targets_array = new Array();
//iterate through list of existing targets
for(i=0;i<count;i++){
//make sure all values exist
if( document.getElementById('existing_target_name'+i) && document.getElementById('existing_is_optout'+i) && document.getElementById('existing_target_url'+i) ){
//make sure the check box value is int (0/1)
var opt_val = '0';
if(document.getElementById('existing_is_optout'+i).checked){opt_val =1;}
//add values for this target entry into array of target entries
final_list_of_existing_targets_array[i] = document.getElementById('existing_target_id'+i).value+"@@"+document.getElementById('existing_target_name'+i).value+"@@"+opt_val+"@@"+document.getElementById('existing_target_url'+i).value;
}
}
//assign array of target entries to hidden input, which will be used by server to process array of targets
document.getElementById('wiz_list_of_existing_targets').value = final_list_of_existing_targets_array.toString();
}
/*
*This function will populate values based on popup selection, and then call the
*function to add the entry to the list of targets
*/
function set_return_prospect_list(popup_reply_data)
{
var form_name = popup_reply_data.form_name;
var name_to_value_array = popup_reply_data.name_to_value_array;
for (var the_key in name_to_value_array)
{
if(the_key == 'toJSON')
{
/* just ignore */
}
else
{
window.document.forms[form_name].elements[the_key].value = name_to_value_array[the_key];
}
}
add_target('true');
}
</script>
{/literal}

View File

@@ -0,0 +1,256 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
********************************************************************************/
*}
<input type="hidden" id="existing_tracker_count" name="existing_tracker_count" value="{$TRACKER_COUNT}">
<input type="hidden" id="added_tracker_count" name="added_tracker_count" value=''>
<input type="hidden" id="wiz_list_of_existing_trackers" name="wiz_list_of_existing_trackers" value="">
<input type="hidden" id="wiz_list_of_trackers" name="wiz_list_of_trackers" value="">
<input type="hidden" id="wiz_remove_tracker_list" name="wiz_remove_tracker_list" value="">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th colspan="4" align="left" ><h4>{$MOD.LBL_WIZ_NEWSLETTER_TITLE_STEP3}</h4></th>
</tr>
<tr><td class="datalabel" colspan="3">{$MOD.LBL_WIZARD_TRACKER_MESSAGE}<br></td><td>&nbsp;</td></tr>
<tr><td class="datalabel" colspan="4">&nbsp;</td></tr>
</table>
<div id='tracker_input_div'>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15%" scope="row"><slot>{$MOD.LBL_EDIT_TRACKER_NAME}<span class="required">&nbsp;</span></slot></td>
<td width="25%" ><slot><input id="tracker_name" type="text" size="30" tabindex='1' name="tracker_name" title="{$MOD.LBL_EDIT_TRACKER_NAME}" value="{$TRACKER_NAME}"></slot></td>
<td width="25%" scope="row"><slot><input onclick="toggle_tracker_url(this);" name="is_optout" title="{$MOD.LBL_EDIT_OPT_OUT}" id="is_optout" tabindex='2' class="checkbox" type="checkbox" />&nbsp;{$MOD.LBL_EDIT_OPT_OUT_}</slot></td>
<td width="35%" ><slot>&nbsp;</slot></td>
</tr>
<tr>
<td scope="row"><slot>{$MOD.LBL_EDIT_TRACKER_URL}&nbsp;<span class="required"></span></slot></td>
<td colspan=3><slot><input type="text" size="80" maxlength='255' tabindex='3' {$TRACKER_URL_DISABLED} name="tracker_url" title="{$MOD.LBL_EDIT_TRACKER_URL}" id="tracker_url" value="http://"></slot> <input type='button' value ='{$MOD.LBL_ADD_TRACKER}' class= 'button' onclick='javascript:add_tracker();'></td>
</tr>
<tr><td colspan='4'>&nbsp;</td></tr>
</table>
</div>
<table width='100%' border="0" cellspacing="0" cellpadding="0">
<tr><td>{$MOD.LBL_TRACKERS_ADDED}</td></tr>
<tr><td class='list view'>
<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr >
<td width='15%' scope="col" nowrap>{$MOD.LBL_EDIT_OPT_OUT}</td>
<td width='40%' scope="col">{$MOD.LBL_EDIT_TRACKER_NAME}</td>
<td width='45%' scope="col" colspan="2">{$MOD.LBL_EDIT_TRACKER_URL}</td>
</tr>
</table>
<div id='added_trackers'>
{$EXISTING_TRACKERS}
</div>
</td></tr>
</table>
<p>
<script>
var image_path = '{$IMAGE_PATH}';
{literal}
//this function toggles the tracker values based on whether the opt out check box is selected
function toggle_tracker_url(isoptout) {
tracker_url = document.getElementById('tracker_url');
if (isoptout.checked) {
tracker_url.disabled=true;
tracker_url.value="index.php?entryPoint=removeme";
} else {
tracker_url.disabled=false;
}
}
//create variables that will be used to monitor the number of tracker url
var trackers_added = 0;
//variable that will be passed back to server to specify list of trackers
var list_of_trackers_array = new Array();
//this function adds selected tracker to list
function add_tracker(){
//perform validation
if(validate_step3()){
//increment tracker count value
trackers_added++;
document.getElementById('added_tracker_count').value = trackers_added ;
//get the appropriate values from tracker form
var trkr_name = document.getElementById('tracker_name');
var trkr_url = document.getElementById('tracker_url');
var trkr_opt = document.getElementById('is_optout');
var trkr_opt_checked = '';
if(trkr_opt.checked){trkr_opt_checked = 'checked'; }
{/literal}
//construct html to display chosen tracker
var trkr_name_html = "<input id='tracker_name"+trackers_added +"' type='text' size='20' maxlength='255' name='wiz_step3_tracker_name"+trackers_added+"' title='{$MOD.LBL_EDIT_TRACKER_NAME}"+trackers_added+"' value='"+trkr_name.value+"' >";
var trkr_url_html = "<input type='text' size='60' maxlength='255' name='wiz_step3_tracker_url"+trackers_added+"' title='{$MOD.LBL_EDIT_TRACKER_URL}"+trackers_added+"' id='tracker_url"+trackers_added+"' value='"+trkr_url.value+"' >";
var trkr_opt_html = "<input name='wiz_step3_is_optout"+trackers_added+"' title='{$MOD.LBL_EDIT_OPT_OUT}"+trackers_added+"' id='is_optout"+trackers_added+"' class='checkbox' type='checkbox' "+trkr_opt_checked+" />";
//display the html
var trkr_html = "<div id='trkr_added_"+trackers_added+"'> <table width='100%' border='0' cellspacing='0' cellpadding='0'><tr class='evenListRowS1'><td width='15%'>"+trkr_opt_html+"</td><td width='40%'>"+trkr_name_html+"</td><td width='40%'>"+trkr_url_html+"</td><td><a href='#' onclick=\"javascript:remove_tracker('trkr_added_"+trackers_added+"','"+trackers_added+"'); \" > <img src='{sugar_getimagepath file='delete_inline.gif'}' alt='rem' align='absmiddle' border='0' height='12' width='12'>{$MOD.LBL_REMOVE}</a></td></tr></table></div>";
document.getElementById('added_trackers').innerHTML = document.getElementById('added_trackers').innerHTML + trkr_html;
//add values to array in string, seperated by "@@" characters
list_of_trackers_array[trackers_added] = trkr_name.value+"@@"+trkr_opt.checked+"@@"+trkr_url.value;
//assign array to hidden input, which will be used by server to process array of trackers
document.getElementById('wiz_list_of_trackers').value = list_of_trackers_array.toString();
//now lets clear the form to allow input of new tracker
trkr_name.value = '';
trkr_url.disabled = false;
trkr_url.value = 'http://';
trkr_opt.checked = false;
{literal}
if(trackers_added ==1){
document.getElementById('no_trackers').style.display='none';
}
}
}
//this function will remove the selected tracker from the ui, and from the tracker array
function remove_tracker(div,num){
//clear UI
var trkr_div = document.getElementById(div);
trkr_div.style.display = 'none';
trkr_div.parentNode.removeChild(trkr_div);
//clear tracker array from this entry and assign to form input
list_of_trackers_array[num] = '';
document.getElementById('wiz_list_of_trackers').value = list_of_trackers_array.toString();
}
//this function will remove the existing tracker from the ui, and add it's value to an array for removal upon save
function remove_existing_tracker(div,id){
//clear UI
var trkr_div = document.getElementById(div);
trkr_div.style.display = 'none';
trkr_div.parentNode.removeChild(trkr_div);
//assign this id to form input for removal
document.getElementById('wiz_remove_tracker_list').value += ','+id;
}
/**
*This function will iterate through list of trackers and gather all the values. It will
*populate these values, seperated by delimiters into hidden inputs for processing
*/
function gatherTrackers(){
//start with the newly added trackers, get count of total added
count = parseInt(trackers_added);
final_list_of_trackers_array = new Array();
//iterate through list of added trackers
for(i=1;i<=count;i++){
//make sure all values exist
if( document.getElementById('tracker_name'+i) && document.getElementById('is_optout'+i) && document.getElementById('tracker_url'+i) ){
//make sure the check box value is int (0/1)
var opt_val = '0';
if(document.getElementById('is_optout'+i).checked){opt_val =1;}
//add values for this tracker entry into array of tracker entries
final_list_of_trackers_array[i] = document.getElementById('tracker_name'+i).value+"@@"+opt_val+"@@"+document.getElementById('tracker_url'+i).value;
}
}
//assign array of tracker entries to hidden input, which will be used by server to process array of trackers
document.getElementById('wiz_list_of_trackers').value = final_list_of_trackers_array.toString();
//Now lets process existing trackers, get count of existing trackers
count = parseInt(document.getElementById('existing_tracker_count').value);
final_list_of_existing_trackers_array = new Array();
//iterate through list of existing trackers
for(i=0;i<count;i++){
//make sure all values exist
if( document.getElementById('existing_tracker_name'+i) && document.getElementById('existing_is_optout'+i) && document.getElementById('existing_tracker_url'+i) ){
//make sure the check box value is int (0/1)
var opt_val = '0';
if(document.getElementById('existing_is_optout'+i).checked){opt_val =1;}
//add values for this tracker entry into array of tracker entries
final_list_of_existing_trackers_array[i] = document.getElementById('existing_tracker_id'+i).value+"@@"+document.getElementById('existing_tracker_name'+i).value+"@@"+opt_val+"@@"+document.getElementById('existing_tracker_url'+i).value;
}
}
//assign array of tracker entries to hidden input, which will be used by server to process array of trackers
document.getElementById('wiz_list_of_existing_trackers').value = final_list_of_existing_trackers_array.toString();
}
/*
* this is the custom validation script that will validate the fields on step3 of wizard
* this is called directly from the add tracker button
*/
function validate_step3(){
requiredTxt = SUGAR.language.get('app_strings', 'ERR_MISSING_REQUIRED_FIELDS');
var stepname = 'wiz_step3_';
var has_error = 0;
var fields = new Array();
fields[0] = 'tracker_name';
fields[1] = 'tracker_url';
//loop through and check for empty strings (' ')
var field_value = '';
if(
(trim(document.getElementById(fields[0]).value) !='')
|| ((trim(document.getElementById(fields[1]).value) !='')
&& (trim(document.getElementById(fields[1]).value) !='http://'))
){
for (i=0; i < fields.length; i++){
field_value = trim(document.getElementById(fields[i]).value);
if(field_value.length<1 || field_value == 'http://'){
add_error_style('wizform', fields[i], requiredTxt +' ' +document.getElementById(fields[i]).title );
has_error = 1;
}
}
}else{
//no values have been entered, return false without error
return false;
}
//error has been thrown, return false
if(has_error == 1){
return false;
}
//add fields to validation and call generic validation script
if(validate['wizform']!='undefined'){delete validate['wizform']};
addToValidate('wizform', 'tracker_name', 'alphanumeric', false, document.getElementById('tracker_name').title);
addToValidate('wizform', 'tracker_url', 'alphanumeric', false, document.getElementById('tracker_url').title);
return check_form('wizform');
}
</script>
{/literal}

View File

@@ -0,0 +1,110 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
********************************************************************************/
*}
<div id='wiz_stage'>
<form id="wizform" name="wizform" method="POST" action="index.php">
<input type="hidden" name="module" value="Campaigns">
<input type="hidden" id='action' name="action" value='WizardNewsletter'>
<input type="hidden" id="return_module" name="return_module" value="Campaigns">
<input type="hidden" id="return_action" name="return_action" value="WizardHome">
<table class='other view' cellspacing="1">
<tr>
<td rowspan='2' width="10%" scope="row" style="vertical-align: top;">
<p>
<div id='nav'>
<table border="0" cellspacing="0" cellpadding="0" width="100%" >
<tr><td scope='row' ><div id='nav_step1'>{$MOD.LBL_CHOOSE_CAMPAIGN_TYPE}</div></td></tr>
</table>
</div>
</p>
</td>
<td rowspan='2' width='100%' class='edit view'>
<div id="wiz_message"></div>
<div id=wizard>
<div id='step1' >
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><th colspan='2' align="left" ><h4>{$MOD.LBL_CHOOSE_CAMPAIGN_TYPE}</h4></th></tr>
<tr><td colspan='2' ><p>{$MOD.LBL_HOME_START_MESSAGE}</p></td></tr>
<tr><td width='2%'>&nbsp;</td>
<td >
<input type="radio" id="wizardtype" name="wizardtype" value='1'checked >{$MOD.LBL_NEWSLETTER}<br>
<input type="radio" id="wizardtype" name="wizardtype" value='2'>{$MOD.LBL_EMAIL}<br>
<input type="radio" id="wizardtype" name='wizardtype' value='3'>{$MOD.LBL_OTHER_TYPE_CAMPAIGN}<br>
</td></tr>
</table>
</div>
</p>
</td>
</tr>
</table>
<div id ='buttons' >
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td align="right" width='40%'>&nbsp;</td>
<td align="right" width='30%'>
<table><tr>
<td><div id="start_button_div"><input id="startbutton" type='submit' title="{$MOD.LBL_START}" class="button" name="{$MOD.LBL_START}" value="{$MOD.LBL_START}"></div></td>
</tr></table>
</td>
</tr>
</table>
</div>
</form>
<script>
document.getElementById('startbutton').focus=true;
</script>
</div>

View File

@@ -0,0 +1,108 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/*********************************************************************************
********************************************************************************/
*}
{$ROLLOVERSTYLE}
<form id="wizform" name="wizform" method="POST" action="index.php">
<input type="hidden" name="module" value="Campaigns">
<input type="hidden" name="record" value="{$ID}">
<input type="hidden" id="action" name="action">
<input type="hidden" name="return_module" value="{$RETURN_MODULE}">
<input type="hidden" name="return_id" value="{$RETURN_ID}">
<input type="hidden" name="return_action" value="{$RETURN_ACTION}">
<input type='hidden' name='campaign_type' value="{$MOD.LBL_NEWSLETTER_FORENTRY}">
<input type="hidden" id="wiz_total_steps" name="totalsteps" value="{$TOTAL_STEPS}">
<input type="hidden" id="wiz_current_step" name="currentstep" value='1'>
<input type="hidden" id="direction" name="wiz_direction" value='exit'>
<p>
<div id ='buttons'>
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td align="left" width='30%'>
<table border="0" cellspacing="0" cellpadding="0" ><tr>
<td><div id="back_button_div"><input id="wiz_back_button" type='button' title="{$APP.LBL_BACK}" class="button" onclick="javascript:navigate('back');" name="back" value=" {$APP.LBL_BACK}"></div></td>
<td><div id="cancel_button_div"><input id="wiz_cancel_button" title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value='WizardHome'; this.form.module.value='Campaigns'; this.form.record.value='{$RETURN_ID}';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}"></div></td>
<td nowrap="nowrap">
<div id="save_button_div">
<input id="wiz_submit_button" class="button" onclick="this.form.action.value='WizardNewsletterSave';this.form.direction.value='continue';gatherTrackers();" accesKey="{$APP.LBL_SAVE_BUTTON_TITLE}" type="{$HIDE_CONTINUE}" name="button" value="{$MOD.LBL_SAVE_CONTINUE_BUTTON_LABEL}" ><input id="wiz_submit_finish_button" class="button" onclick="this.form.action.value='WizardNewsletterSave';this.form.direction.value='exit';gatherTrackers();" accesKey="{$APP.LBL_SAVE_BUTTON_TITLE}" type="submit" name="button" value="{$MOD.LBL_SAVE_EXIT_BUTTON_LABEL}" >
</div></td>
<td><div id="next_button_div"><input id="wiz_next_button" type='button' title="{$APP.LBL_NEXT_BUTTON_LABEL}" class="button" onclick="javascript:navigate('next');" name="button" value="{$APP.LBL_NEXT_BUTTON_LABEL}"></div></td>
</tr></table>
</td>
<td align="right" width='70%'><div id='wiz_location_message'></td>
</tr>
</table>
</div>
</p>
<table class='other view' cellspacing="1">
<tr>
<td scope='row' rowspan='2' width="10%" style="vertical-align: top;">
<div id='nav' >
{$NAV_ITEMS}
</div>
</td>
<td class='edit view' rowspan='2' width='100%'>
<div id="wiz_message"></div>
<div id=wizard>
{$STEPS}
</div>
</td>
</tr>
</table>
</form>
<script type="text/javascript" src="include/javascript/popup_parent_helper.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
<script type="text/javascript" language="javascript" src="modules/Campaigns/wizard.js"></script>
<script type='text/javascript' src='include/javascript/sugar_grp_overlib.js'></script>
<div id='overDiv' style='position:absolute; visibility:hidden; z-index:1000;'></div>
{$WIZ_JAVASCRIPT}
{$DIV_JAVASCRIPT}
{$JAVASCRIPT}
<script language="javascript">
{$HILITE_ALL}
</script>