return 'CRM/Event/Form/ManageEvent/Tab.tpl';
}
}
+
+ /**
+ * Pre-load libraries required by Online Registration Profile fields
+ */
+ static function addProfileEditScripts() {
+ CRM_UF_Page_ProfileEditor::registerProfileScripts();
+ CRM_UF_Page_ProfileEditor::registerSchemas(array('IndividualModel', 'ParticipantModel'));
+ }
}
if (!CRM_Utils_System::isNull($eventTemplates)) {
$this->add('select', 'template_id', ts('From Template'), array('' => ts('- select -')) + $eventTemplates, FALSE, array('class' => 'crm-select2 huge'));
}
+ // Make sure this form redirects properly
+ $this->preventAjaxSubmit();
}
// add event title, make required if this is not a template
->addSetting(array('tabSettings' => array(
'active' => self::getCurrentTab($tabs),
)));
-
- // Preload libraries required by Online Registration Include Profiles
- $schemas = array('IndividualModel', 'ParticipantModel');
- if (in_array('CiviMember', CRM_Core_Config::singleton()->enableComponents)) {
- $schemas[] = 'MembershipModel';
- }
- CRM_UF_Page_ProfileEditor::registerProfileScripts();
- CRM_UF_Page_ProfileEditor::registerSchemas($schemas);
-
+ CRM_Event_Form_ManageEvent::addProfileEditScripts();
return $tabs;
}
* @return void
*/
function browse() {
+ $this->assign('includeWysiwygEditor', TRUE);
$this->_sortByCharacter = CRM_Utils_Request::retrieve('sortByCharacter',
'String',
$this
CRM.$(function($) {
var $form = $('form.{/literal}{$form.formClass}{literal}');
$('#template_id', $form).change(function() {
- $('#crm-main-content-wrapper')
+ $(this).closest('.crm-ajax-container, #crm-main-content-wrapper')
.crmSnippet({url: CRM.url('civicrm/event/add', {action: 'add', reset: 1, template_id: $(this).val()})})
.crmSnippet('refresh');
})
{foreach from=$eventSummary.tab key=k item=v}
{assign var="fld" value=$v.field}
{if NOT $values.$fld}{assign var="status" value="disabled"}{else}{assign var="status" value="enabled"}{/if}
- <li><a title="{$v.title}" class="action-item crm-hover-button {$status}"
+ <li><a title="{$v.title}" class="action-item crm-hover-button no-popup {$status}"
href="{crmURL p="`$v.url`" q="reset=1&action=update&id=`$id`"}">{$v.title}</a></li>
{/foreach}
</ul>
{include file="CRM/Event/Form/SearchEvent.tpl"}
<div class="action-link">
- <a accesskey="N" href="{$newEventURL}" id="newManageEvent" class="button">
+ <a accesskey="N" href="{$newEventURL}" id="newManageEvent" class="button crm-popup">
<span><div class="icon add-icon"></div>{ts}Add Event{/ts}</span>
</a>
<div class="clear"></div>