$this->_testButtonName = $this->getButtonName('refresh', 'test');
- $this->add('submit', $this->_testButtonName, ts('Save & Send Test Email'));
-
$this->addFormRule(array('CRM_Admin_Form_Setting_Smtp', 'formRule'));
parent::buildQuickForm();
+ $buttons = $this->getElement('buttons')->getElements();
+ $buttons[] = $this->createElement('submit', $this->_testButtonName, ts('Save & Send Test Email'), array('crm-icon' => 'mail-closed'));
+ $this->getElement('buttons')->setElements($buttons);
}
/**
//hack to support cancel button functionality
array(
'type' => 'submit',
+ 'class' => 'cancel',
+ 'icon' => 'close',
'name' => ts('Cancel'),
),
)
$mergeParams .= "&gid={$gid}";
}
- $searchRows[$mainId]['actions'] = CRM_Utils_System::href(ts('merge'), 'civicrm/contact/merge', $mergeParams);
- $searchRows[$mainId]['actions'] .= " | <a id='notDuplicate' href='#' onClick=\"processDupes( {$main['srcID']}, {$main['dstID']}, 'dupe-nondupe', 'dupe-listing'); return false;\">" . ts('not a duplicate') . "</a>";
+ $searchRows[$mainId]['actions'] = '<a class="action-item crm-hover-button" href="'. CRM_Utils_System::url('civicrm/contact/merge', $mergeParams) . '">' . ts('merge') . '</a>';
+ $searchRows[$mainId]['actions'] .= "<a class='action-item crm-hover-button crm-notDuplicate' href='#' onClick=\"processDupes( {$main['srcID']}, {$main['dstID']}, 'dupe-nondupe', 'dupe-listing'); return false;\">" . ts('not a duplicate') . "</a>";
}
else {
$searchRows[$mainId]['actions'] = '<em>' . ts('Insufficient access rights - cannot merge') . '</em>';
CRM_Utils_JSON::output($paperSize);
}
+ /**
+ * Used to store selected contacts across multiple pages in advanced search.
+ */
public static function selectUnselectContacts() {
$name = CRM_Utils_Array::value('name', $_REQUEST);
$cacheKey = CRM_Utils_Array::value('qfKey', $_REQUEST);
*/
function smarty_block_crmButton($params, $text, &$smarty) {
// Generate url (pass 'html' param as false to avoid double-encode by htmlAttributes)
- $params['href'] = CRM_Utils_System::crmURL($params + array('h' => FALSE));
+ if (empty($params['href'])) {
+ $params['href'] = CRM_Utils_System::crmURL($params + array('h' => FALSE));
+ }
// Always add class 'button' - fixme probably should be crm-button
$params['class'] = 'button ' . CRM_Utils_Array::value('class', $params, '');
// Any jQuery-UI icon works
<div class="spacer"></div>
<div class="crm-submit-buttons">
{include file="CRM/common/formButtons.tpl"}
- <span class="float-left"> </span>
- <span class="crm-button crm-button-type-next crm-button_qf_Smtp_refresh_test">{$form._qf_Smtp_refresh_test.html}</span>
</div>
</div>
case "0":
$("#bySMTP").show( );
$("#bySendmail").hide( );
- $("#_qf_Smtp_refresh_test").show( );
+ $("#_qf_Smtp_refresh_test").prop('disabled', false);
if (mailSetting == '5') {
alert(archiveWarning);
}
case "1":
$("#bySMTP").hide( );
$("#bySendmail").show( );
- $("#_qf_Smtp_refresh_test").show( );
+ $("#_qf_Smtp_refresh_test").prop('disabled', false);
if (mailSetting == '5') {
alert(archiveWarning);
}
break;
case "3":
$('.mailoption').hide();
- $("#_qf_Smtp_refresh_test").show( );
+ $("#_qf_Smtp_refresh_test").prop('disabled', false);
if (mailSetting == '5') {
alert(archiveWarning);
}
default:
$("#bySMTP").hide( );
$("#bySendmail").hide( );
- $("#_qf_Smtp_refresh_test").hide( );
+ $("#_qf_Smtp_refresh_test").prop('disabled', true);
}
}
</div>
<div class="crm-submit-buttons">
- {if $prev}<a href="{$prev}" class="button"><span><div class="icon ui-icon-triangle-1-w"></div> {ts}Prev{/ts}</span></a>{/if}
{include file="CRM/common/formButtons.tpl" location="top"}
- {if $next}<a href="{$next}" class="button"><span><div class="icon ui-icon-triangle-1-e"></div> {ts}Next{/ts}</span></a>{/if}
+ {if $prev}<a href="{$prev}" class="crm-hover-button action-item"><span class="icon ui-icon-triangle-1-w"></span> {ts}Previous{/ts}</a>{/if}
+ {if $next}<a href="{$next}" class="crm-hover-button action-item">{ts}Next{/ts} <span class="icon ui-icon-triangle-1-e"></span></a>{/if}
</div>
<div class="action-link">
</div>
<div class="action-link">
- <a id='notDuplicate' href="#" class="action-item crm-hover-button" title={ts}Mark this pair as not a duplicate.{/ts} onClick="processDupes( {$main_cid}, {$other_cid}, 'dupe-nondupe', 'merge-contact', '{if $rgid}{crmURL p="civicrm/contact/dedupefind" q="reset=1&action=update&rgid=$rgid"}{/if}' );return false;">
+ <a href="#" class="action-item crm-hover-button crm-notDuplicate" title={ts}Mark this pair as not a duplicate.{/ts} onClick="processDupes( {$main_cid}, {$other_cid}, 'dupe-nondupe', 'merge-contact', '{if $rgid}{crmURL p="civicrm/contact/dedupefind" q="reset=1&action=update&rgid=$rgid"}{/if}' );return false;">
<span class="icon ui-icon-circle-close"></span>
{ts}Mark this pair as not a duplicate.{/ts}
</a>
</div>
<div class="crm-submit-buttons">
- {if $prev}<a href="{$prev}" class="button"><span><div class="icon ui-icon-triangle-1-w"></div> {ts}Prev{/ts}</span></a>{/if}
{include file="CRM/common/formButtons.tpl" location="bottom"}
- {if $next}<a href="{$next}" class="button"><span><div class="icon ui-icon-triangle-1-e"></div> {ts}Next{/ts}</span></a>{/if}
</div>
{literal}
<tr class="{cycle values="odd-row,even-row"}">
<td>{$link}</td>
<td style="text-align: right">{$merge}</td>
- <td style="text-align: right"><a id='notDuplicate' href="#" title={ts}not a duplicate{/ts} onClick="processDupes( {$main.srcID}, {$main.dstID}, 'dupe-nondupe' );return false;">{ts}not a duplicate{/ts}</a></td>
+ <td style="text-align: right"><a class='crm-notDuplicate' href="#" title={ts}not a duplicate{/ts} onClick="processDupes( {$main.srcID}, {$main.dstID}, 'dupe-nondupe' );return false;">{ts}not a duplicate{/ts}</a></td>
</tr>
{/if}
{/foreach}
</div>
{if $context eq 'search'}
- <a href="{$backURL}" class="button"><span>{ts}Done{/ts}</span></a>
+ {crmButton href=$backURL icon="close"}{ts}Done{/ts}{/crmButton}
{else}
{if $gid}
{capture assign=backURL}{crmURL p="civicrm/contact/dedupefind" q="reset=1&rgid=`$rgid`&gid=`$gid`&action=renew" a=1}{/capture}
{capture assign=backURL}{crmURL p="civicrm/contact/dedupefind" q="reset=1&rgid=`$rgid`&action=renew" a=1}{/capture}
{/if}
<a href="{$backURL}" title="{ts}Refresh List of Duplicates{/ts}" onclick="return confirm('{ts escape="js"}This will refresh the duplicates list. Click OK to proceed.{/ts}');" class="button">
- <span><div class="icon ui-icon-refresh"></div> {ts}Refresh Duplicates{/ts}</span>
+ <span><span class="icon ui-icon-refresh"></span> {ts}Refresh Duplicates{/ts}</span>
</a>
{if $gid}
<dt>{ts}To{/ts}</dt><dd>{$toName|escape}</dd>
<dt>{ts}Subject{/ts}</dt><dd>{$subject}</dd>
<dt>{ts}Message{/ts}</dt><dd>{$message}</dd>
-<dt> </dt><dd><a class="button cancel crm-form-submit" href="{crmURL p='civicrm/contact/view' q="history=1&show=1&selectedChild=activity"}">{ts}Done{/ts}</a></dd>
+<dt> </dt><dd>{crmButton class="cancel" icon="close" p='civicrm/contact/view' q="history=1&show=1&selectedChild=activity"}">{ts}Done{/ts}{/crmButton}</dd>
</dl>
</fieldset>
</div>
{/if}
</table>
<div class="crm-submit-buttons">
- <a class="button cancel" href="{crmURL p='civicrm/contact/view' q="selectedChild=note&reset=1&cid=`$contactId`"}">{ts}Done{/ts}</a>
+ {crmButton class="cancel" icon="close" p='civicrm/contact/view' q="selectedChild=note&reset=1&cid=`$contactId`"}{ts}Done{/ts}{/crmButton}
</div>
{if $comments}
<dt>{ts}Message{/ts}</dt><dd>{$message}</dd>
<dt> </dt>
<dd class="crm-submit-buttons">
- <a class="button cancel" href="{crmURL p='civicrm/contact/view/activity' q="history=1&show=1"}">{ts}Done{/ts}</a>
+ {crmButton class="cancel" icon="close" p='civicrm/contact/view/activity' q="history=1&show=1"}">{ts}Done{/ts}{/crmButton}
</dd>
</dl>
</fieldset>