0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-25 02:31:59 -05:00

Merge pull request #3359 from morficus/issue-3352

Preventing rouge modals from popping up when hitting enter-key in settings section
This commit is contained in:
Hannah Wolfe 2014-07-24 12:15:26 +01:00
commit 2b8594e375
9 changed files with 16 additions and 16 deletions

View file

@ -1,6 +1,6 @@
<header class="floatingheader"> <header class="floatingheader">
<button class="button-back" href="#">Back</button> <button type="button" class="button-back" href="#">Back</button>
<button {{bind-attr class="featured:featured:unfeatured"}} title="Feature this post" {{action "toggleFeatured"}}> <button type="button" {{bind-attr class="featured:featured:unfeatured"}} title="Feature this post" {{action "toggleFeatured"}}>
<span class="hidden">Star</span> <span class="hidden">Star</span>
</button> </button>
<small> <small>

View file

@ -8,10 +8,10 @@
</section> </section>
{{#if confirm}} {{#if confirm}}
<footer class="modal-footer"> <footer class="modal-footer">
<button {{bind-attr class="acceptButtonClass :js-button-accept"}} {{action "confirm" "accept"}}> <button type="button" {{bind-attr class="acceptButtonClass :js-button-accept"}} {{action "confirm" "accept"}}>
{{confirm.accept.text}} {{confirm.accept.text}}
</button> </button>
<button {{bind-attr class="rejectButtonClass :js-button-reject"}} {{action "confirm" "reject"}}> <button type="button" {{bind-attr class="rejectButtonClass :js-button-reject"}} {{action "confirm" "reject"}}>
{{confirm.reject.text}} {{confirm.reject.text}}
</button> </button>
</footer> </footer>

View file

@ -44,4 +44,4 @@
</tbody> </tbody>
</table> </table>
</form> </form>
<button class="delete" {{action "openModal" "delete-post" this}}>Delete This Post</button> <button type="button" class="delete" {{action "openModal" "delete-post" this}}>Delete This Post</button>

View file

@ -1,6 +1,6 @@
<div class="no-posts-box"> <div class="no-posts-box">
<div class="no-posts"> <div class="no-posts">
<h3>You Haven't Written Any Posts Yet!</h3> <h3>You Haven't Written Any Posts Yet!</h3>
{{#link-to "editor.new"}}<button class="button-add large" title="New Post">Write a new Post</button>{{/link-to}} {{#link-to "editor.new"}}<button type="button" class="button-add large" title="New Post">Write a new Post</button>{{/link-to}}
</div> </div>
</div> </div>

View file

@ -16,7 +16,7 @@
{{#if package}}{{package.name}} - {{package.version}}{{else}}{{name}} - package.json missing :({{/if}} {{#if package}}{{package.name}} - {{package.version}}{{else}}{{name}} - package.json missing :({{/if}}
</td> </td>
<td> <td>
<button {{action toggleApp this}} {{bind-attr class=":js-button-active activeClass:button-delete inactiveClass:button-add activeClass:js-button-deactivate"}}> <button type="button" {{action toggleApp this}} {{bind-attr class=":js-button-active activeClass:button-delete inactiveClass:button-add activeClass:js-button-deactivate"}}>
{{buttonText}} {{buttonText}}
</button> </button>
</td> </td>

View file

@ -5,7 +5,7 @@
{{#link-to 'settings' class='button-back button'}}Back{{/link-to}} {{#link-to 'settings' class='button-back button'}}Back{{/link-to}}
<section class="page-actions"> <section class="page-actions">
<button class="button-save" {{action "save"}}>Save</button> <button type="button" class="button-save" {{action "save"}}>Save</button>
</section> </section>
</div> </div>
</header> </header>
@ -33,9 +33,9 @@
<div class="form-group"> <div class="form-group">
<label for="blog-logo">Blog Logo</label> <label for="blog-logo">Blog Logo</label>
{{#if logo}} {{#if logo}}
<button class="js-modal-logo" {{action "openModal" "upload" this "logo"}}><img id="blog-logo" {{bind-attr src=logo}} alt="logo"></button> <button type="button" class="js-modal-logo" {{action "openModal" "upload" this "logo"}}><img id="blog-logo" {{bind-attr src=logo}} alt="logo"></button>
{{else}} {{else}}
<button class="button-add js-modal-logo" {{action "openModal" "upload" this "logo"}}>Upload Image</button> <button type="button" class="button-add js-modal-logo" {{action "openModal" "upload" this "logo"}}>Upload Image</button>
{{/if}} {{/if}}
<p>Display a sexy logo for your publication</p> <p>Display a sexy logo for your publication</p>
</div> </div>
@ -43,9 +43,9 @@
<div class="form-group"> <div class="form-group">
<label for="blog-cover">Blog Cover</label> <label for="blog-cover">Blog Cover</label>
{{#if cover}} {{#if cover}}
<button class="js-modal-cover" {{action "openModal" "upload" this "cover"}}><img id="blog-cover" {{bind-attr src=cover}} alt="cover photo"></button> <button type="button" class="js-modal-cover" {{action "openModal" "upload" this "cover"}}><img id="blog-cover" {{bind-attr src=cover}} alt="cover photo"></button>
{{else}} {{else}}
<button class="button-add js-modal-cover" {{action "openModal" "upload" this "cover"}}>Upload Image</button> <button type="button" class="button-add js-modal-cover" {{action "openModal" "upload" this "cover"}}>Upload Image</button>
{{/if}} {{/if}}
<p>Display a cover image on your site</p> <p>Display a cover image on your site</p>
</div> </div>

View file

@ -28,7 +28,7 @@
<header class="user-profile-header"> <header class="user-profile-header">
<img id="user-cover" class="cover-image" {{bind-attr src=cover title=coverTitle}} /> <img id="user-cover" class="cover-image" {{bind-attr src=cover title=coverTitle}} />
<button class="edit-cover-image js-modal-cover button" {{action "openModal" "upload" user "cover"}}>Change Cover</button> <button type="button" class="edit-cover-image js-modal-cover button" {{action "openModal" "upload" user "cover"}}>Change Cover</button>
</header> </header>
<form class="user-profile" novalidate="novalidate" autocomplete="off"> <form class="user-profile" novalidate="novalidate" autocomplete="off">
@ -37,7 +37,7 @@
<figure class="user-image"> <figure class="user-image">
<div id="user-image" class="img" {{bind-attr style=image}} href="#"><span class="hidden">{{name}}"s Picture</span></div> <div id="user-image" class="img" {{bind-attr style=image}} href="#"><span class="hidden">{{name}}"s Picture</span></div>
<button {{action "openModal" "upload" user "image"}} class="edit-user-image js-modal-image">Edit Picture</button> <button type="button" {{action "openModal" "upload" user "image"}} class="edit-user-image js-modal-image">Edit Picture</button>
</figure> </figure>
<div class="form-group"> <div class="form-group">

View file

@ -26,7 +26,7 @@
<p>Must be at least 8 characters</p> <p>Must be at least 8 characters</p>
</div> </div>
<footer> <footer>
<button class="button-add large" {{action "setup"}} {{bind-attr disabled=submitting}}>Ok, Let's Do This</button> <button type="submit" class="button-add large" {{action "setup"}} {{bind-attr disabled=submitting}}>Ok, Let's Do This</button>
</footer> </footer>
</form> </form>
</div> </div>

View file

@ -21,7 +21,7 @@
<p>Must be at least 8 characters</p> <p>Must be at least 8 characters</p>
</div> </div>
<footer> <footer>
<button class="button-add large" {{action "signup"}} {{bind-attr disabled=submitting}}>Create Account</button> <button type="submit" class="button-add large" {{action "signup"}} {{bind-attr disabled=submitting}}>Create Account</button>
</footer> </footer>
</form> </form>
</div> </div>