$.propHooks.disabled = {
set: function (el, value, name) {
// Sync button enabled status with wrapper css
- if ($(el).is('span.crm-button > input.crm-form-submit')) {
+ if ($(el).is('.crm-button.crm-form-submit')) {
$(el).parent().toggleClass('crm-button-disabled', !!value);
}
// Sync button enabled status with dialog button
$('form[data-submit-once]', e.target)
.submit(submitOnceForm)
.on('invalid-form', submitFormInvalid);
- $('form[data-submit-once] input[type=submit]', e.target).click(function(e) {
+ $('form[data-submit-once] button[type=submit]', e.target).click(function(e) {
submitButton = e.target;
});
})
var buttonContainers = '.crm-submit-buttons, .action-link',
buttons = [],
added = [];
- $(buttonContainers, $el).find('input.crm-form-submit, a.button, button').each(function() {
+ $(buttonContainers, $el).find('.crm-form-submit, .crm-form-xbutton, a.button, button').each(function() {
var $el = $(this),
label = $el.is('input') ? $el.attr('value') : $el.text(),
identifier = $el.attr('name') || $el.attr('href');
$el.dialog('option', 'buttons', buttons);
}
// Allow a button to prevent ajax submit
- $('input[data-no-ajax-submit=true]').click(function() {
+ $('input[data-no-ajax-submit=true], button[data-no-ajax-submit=true]').click(function() {
$(this).closest('form').ajaxFormUnbind();
});
// For convenience, focus the first field
// When selecting a task
.on('change', 'select#task', function(e) {
var $form = $(this).closest('form'),
- $go = $('input.crm-search-go-button', $form);
+ $go = $('button.crm-search-go-button', $form);
var $selectedOption = $(this).find(':selected');
if (!$selectedOption.val()) {
// do not blank refresh the empty option.
})
// Add new field - if there's a hidden one, show it
// Otherwise allow form to submit and fetch more from the server
- .on('click', 'input[name^=addMore]', function() {
+ .on('click', 'button[name^=addMore]', function() {
var table = $(this).closest('table');
if ($('tr:hidden', table).length) {
$('tr:hidden', table).first().show();
<div class="premium-full-title">{$row.name}</div>
<div class="premium-full-disabled">
{ts 1=$row.min_contribution|crmMoney}You must contribute at least %1 to get this item{/ts}<br/>
- <input type="button" value="{ts 1=$row.min_contribution|crmMoney}Contribute %1 Instead{/ts}" amount="{$row.min_contribution}" />
+ <button type="button" value="{ts 1=$row.min_contribution|crmMoney}Contribute %1 Instead{/ts}" amount="{$row.min_contribution}" />
</div>
<div class="premium-full-description">
{$row.description}
amounts.sort(function(a,b){return a - b});
// make contribution instead buttons work
- $('.premium-full-disabled input').click(function(){
+ $('.premium-full-disabled button').click(function(){
var amount = Number($(this).attr('amount'));
if (price_sets[amount]) {
if (!$(price_sets[amount]).length) {
{/literal}
{/if}
{/if}
-
<script type="text/javascript">
{literal} (function($, _) { // Generic Closure
- $(".crm-submit-buttons input").click( function() {
+ $(".crm-submit-buttons button").click( function() {
$(".dedupenotify .ui-notify-close").click();
});
<script type="text/javascript">
var totalPages = {/literal}{$pager->_totalPages}{literal};
CRM.$(function($) {
- $("#crm-container .crm-pager input.crm-form-submit").click(function () {
+ $("#crm-container .crm-pager button.crm-form-submit").click(function () {
submitPagerData(this);
});
});
createChart( chartID, divName, chartValues.size.xSize, chartValues.size.ySize, allData[chartID].object );
});
+ // FIXME
$("input[id$='submit_print'],input[id$='submit_pdf']").bind('click', function(e){
// image creator php file path and append image name
var url = CRM.url('civicrm/report/chart', 'name=' + '{/literal}{$chartId}{literal}' + '.png');
params.autoClose = params.openInline = params.cancelButton = params.refreshAction = false;
ui.panel.on('crmFormLoad', function() {
// Hack: "Save and done" and "Cancel" buttons submit without ajax
- $('.cancel.crm-form-submit, input[name$=upload_done]', this).on('click', function(e) {
+ $('.cancel.crm-form-submit, button[name$=upload_done]', this).on('click', function(e) {
$(this).closest('form').ajaxFormUnbind();
});
});
{literal}
<script type="text/javascript">
CRM.$(function($) {
- var more = $('.crm-button input.validate').click(function(e) {
+ var more = $('.crm-button.validate').click(function(e) {
var message = "{/literal} {if $context eq 'Event'}
{ts escape='js'}Note: Revenue for this event registration will not be deferred as the financial type does not have a deferred revenue account setup for it. If you want the revenue to be deferred, please select a different Financial Type with a Deferred Revenue account setup for it, or setup a Deferred Revenue account for this Financial Type.{/ts}
{else if $context eq 'MembershipType'}