diff --git a/languages/en.yaml b/languages/en.yaml index 64a1dec3..c170ff89 100644 --- a/languages/en.yaml +++ b/languages/en.yaml @@ -692,3 +692,5 @@ PLUGIN_ADMIN: 2FA_SECRET: "2FA Secret" 2FA_SECRET_HELP: "Scan this QR code into your [Authenticator App](https://learn.getgrav.org/admin-panel/2fa#apps). Also it's a good idea to backup the secret in a safe location, in case you need to reinstall your app. Check the [Grav docs](https://learn.getgrav.org/admin-panel/2fa) for more information " 2FA_REGENERATE: "Regenerate" + CASE_INSENSITIVE_URLS: "Case Insensitive URLs" + CASE_INSENSITIVE_URLS_HELP: "Enables Grav routing to locate resources regardless of text case." \ No newline at end of file diff --git a/themes/grav/js/form-attr.polyfill.js b/themes/grav/js/form-attr.polyfill.js index 3fa79256..c0c3d884 100644 --- a/themes/grav/js/form-attr.polyfill.js +++ b/themes/grav/js/form-attr.polyfill.js @@ -51,27 +51,29 @@ var form = this, $fields = $('[form=' + this.id + ']'); - $fields.filter('button, input').filter('[type=reset],[type=submit]').click(function() { - var type = this.type.toLowerCase(); - if (type === 'reset') { - // reset form - form.reset(); - // for elements outside form - $fields.each(function() { - this.value = this.defaultValue; - this.checked = this.defaultChecked; - }).filter('select').each(function() { - $(this).find('option').each(function() { - this.selected = this.defaultSelected; + $fields.filter('button, input') + .filter('[type=reset],[type=submit],[type=image],button') + .click(function() { + var type = this.type.toLowerCase(); + if (type === 'reset') { + // reset form + form.reset(); + // for elements outside form + $fields.each(function() { + this.value = this.defaultValue; + this.checked = this.defaultChecked; + }).filter('select').each(function() { + $(this).find('option').each(function() { + this.selected = this.defaultSelected; + }); }); - }); - } else if (type.match(/^submit|image$/i)) { - $(form).appendField({ - name: this.name, - value: this.value - }).submit(); - } - }); + } else { + $(form).appendField({ + name: this.name, + value: this.value + }).submit(); + } + }); }); });