Merge pull request #1292 from patricknelson/issue-1288-button-type

FIX (partial) for #1288 where non-submit buttons are being activated on "enter" key press.
This commit is contained in:
Damian Mooyman 2015-10-07 12:13:07 +13:00
commit c963706a88
3 changed files with 5 additions and 4 deletions

View File

@ -122,6 +122,7 @@
updateURLFromTitle = $('<button />', {
'class': 'update ss-ui-button-small',
'text': ss.i18n._t('URLSEGMENT.UpdateURL'),
'type': 'button',
'click': function(e) {
e.preventDefault();
self.updateURLSegment(self.val());

View File

@ -3,7 +3,7 @@
<a class="ss-ui-button cms-content-addpage-button tool-button font-icon-plus" href="$LinkPageAdd" data-url-addpage="{$LinkPageAdd('', 'ParentID=%s')}"><% _t('CMSMain.AddNewButton', 'Add new') %></a>
<% if $View == 'Tree' %>
<button class="cms-content-batchactions-button tool-button font-icon-check-mark-2" data-toolid="batch-actions">
<button type="button" class="cms-content-batchactions-button tool-button font-icon-check-mark-2" data-toolid="batch-actions">
<% _t("CMSPagesController_ContentToolbar_ss.MULTISELECT","Batch actions") %>
</button>
<% end_if %>

View File

@ -2,16 +2,16 @@
<a class="preview" href="$URL" target="_blank">
$URL
</a>
<button class="ss-ui-button ss-ui-button-small edit">
<button type="button" class="ss-ui-button ss-ui-button-small edit">
<% _t('URLSegmentField.Edit', 'Edit') %>
</button>
</div>
<div class="edit-holder">
<input $AttributesHTML />
<button class="update ss-ui-button-small">
<button type="button" class="update ss-ui-button-small">
<% _t('URLSegmentField.OK', 'OK') %>
</button>
<button class="cancel ss-ui-button-small ss-ui-action-minor">
<button type="button" class="cancel ss-ui-button-small ss-ui-action-minor">
<% _t('URLSegmentField.Cancel', 'Cancel') %>
</button>
<% if $HelpText %><p class="help">$HelpText</p><% end_if %>