Compare commits

..

No commits in common. "d80bd71993b558d192ff041e639ce36acd0261ab" and "ae7237f49b8d76c0f09b568f61215a6c628375c8" have entirely different histories.

2 changed files with 2 additions and 21 deletions

View File

@ -47,27 +47,8 @@ class CRM_EntityTemplates_Utils {
$entities = CRM_EntityTemplates_BAO_EntityTemplates::getEntityTemplates($form->_entityTemplateValues['value']);
if (!empty($entities)) {
$form->add('select', 'entity_template_id', ts('Templates'), $entities, FALSE, ['placeholder' => ts('- select -'), 'class' => 'crm-select2']);
list($url, $query) = explode('?', $form->_entityTemplateValues['name']);
$queryString = $form->get('queryString');
if (empty($queryString)) {
if (!empty($_SERVER['REDIRECT_QUERY_STRING'])) {
$queryString = $_SERVER['REDIRECT_QUERY_STRING'];
}
else {
$queryString = $query;
}
}
parse_str($queryString, $queryString);
if (isset($queryString['templateId'])) {
unset($queryString['templateId']);
}
if (isset($queryString['snippet'])) {
unset($queryString['snippet']);
}
$queryString = http_build_query($queryString);
$form->set('queryString', $queryString);
$url = CRM_Utils_System::url($url, $queryString, FALSE, NULL, FALSE);
$url = CRM_Utils_System::url($url, $query);
$form->assign('redirectUrl', $url);
}
}

View File

@ -245,7 +245,7 @@ function entitytemplates_civicrm_pre($op, $objectName, $id, &$params) {
*
*/
function entitytemplates_civicrm_validateForm($formName, &$fields, &$files, &$form, &$errors) {
if (property_exists($form, '_entityTemplate') && $form->_entityTemplate) {
if ($form->_entityTemplate) {
if (!empty($fields['entity_template_title'])) {
$params = [
'title' => $fields['entity_template_title'],