Skip to content

Instantly share code, notes, and snippets.

@eggsurplus
eggsurplus / post_uninstall.php
Last active August 29, 2015 14:01
Remove fields to a SugarCRM layout
<?php
if (! defined('sugarEntry') || ! sugarEntry) die('Not A Valid Entry Point');
?>
Cleaning up some configurations...
<?php
post_uninstall(); //not called automatically
function post_uninstall()
{
@eggsurplus
eggsurplus / post_install.php
Last active August 29, 2015 14:01
Add fields to a SugarCRM layout
<?php
if (! defined('sugarEntry') || ! sugarEntry) die('Not A Valid Entry Point');
?>
Please be patient as the installer finishes.
<br/><br/>
You will be automatically redirected once it has completed.
<?php
function post_install()
{
global $sugar_version, $db, $dictionary, $current_user;
@eggsurplus
eggsurplus / view.detail.php
Created March 3, 2014 15:34
Disable convert lead
<?php
//custom/modules/Leads/views/view.detail.php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('include/MVC/View/views/view.detail.php');
class CustomLeadsViewDetail extends ViewDetail
{
function display()
@eggsurplus
eggsurplus / setup.js
Created February 27, 2014 16:39
Basic step wizard
({
className: 'sugarchimp-setup',
currentStep: 1,
events:
{
'click .nextStep':'nextStep',
'click .previousStep':'previousStep'
},
initialize: function(opts) {
@eggsurplus
eggsurplus / footer.hbs
Created February 27, 2014 16:36
For SugarCRM 7 wizard
@eggsurplus
eggsurplus / header.hbs
Created February 27, 2014 16:35
For SugarCRM 7 wizard
{{! /modules/YOURMODULE/clients/base/layouts/setup/header.hbs }}
<link rel="stylesheet" type="text/css" href="modules/SugarChimp/includes/assets/css/sugarchimp.css">
<div class="nav nav-success" id="sugarchimp-setup-status">
</div>
<div class="container-fluid step-panel">
<div class="wizard">
<a id="sugarchimp-setup-step1"><span class="badge">1</span> Connect</a>
<a id="sugarchimp-setup-step2"><span class="badge">2</span> Schedule</a>
{{! /modules/YOURMODULE/clients/base/views/setup/step1.hbs }}
{{> setup.header }}
<div class="tcenter">
Step 1
<br/><br/>
<button class="previousStep btn btn-success">Previous</button>
<button class="nextStep btn btn-success">Next</button>
</div>
{{> setup.footer }}
@eggsurplus
eggsurplus / setup.hbs
Created February 20, 2014 16:58
SugarCRM 7 handlebars template
<h1>Hey!</h1>
It works
@eggsurplus
eggsurplus / setup.js
Created February 20, 2014 16:57
SugarCRM view js
({
className: 'yourmodule-setup tcenter',
})
@eggsurplus
eggsurplus / setup.php
Created February 20, 2014 16:56
SugarCRM 7 layout definition
// /modules/YOURMODULE/clients/base/layouts/setup/setup.php
$viewdefs[‘YOURMODULE’]['base']['layout']['setup'] = array(
'type' => 'simple',
'components' =>
array(
array(
'view' => 'setup',
),
),
);