Merge branch 'develop' of https://github.com/getgrav/grav-plugin-admin into develop

This commit is contained in:
Andy Miller
2017-09-05 16:25:23 -06:00
2 changed files with 24 additions and 20 deletions

View File

@@ -692,3 +692,5 @@ PLUGIN_ADMIN:
2FA_SECRET: "2FA Secret" 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_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" 2FA_REGENERATE: "Regenerate"
CASE_INSENSITIVE_URLS: "Case Insensitive URLs"
CASE_INSENSITIVE_URLS_HELP: "Enables Grav routing to locate resources regardless of text case."

View File

@@ -51,27 +51,29 @@
var form = this, var form = this,
$fields = $('[form=' + this.id + ']'); $fields = $('[form=' + this.id + ']');
$fields.filter('button, input').filter('[type=reset],[type=submit]').click(function() { $fields.filter('button, input')
var type = this.type.toLowerCase(); .filter('[type=reset],[type=submit],[type=image],button')
if (type === 'reset') { .click(function() {
// reset form var type = this.type.toLowerCase();
form.reset(); if (type === 'reset') {
// for elements outside form // reset form
$fields.each(function() { form.reset();
this.value = this.defaultValue; // for elements outside form
this.checked = this.defaultChecked; $fields.each(function() {
}).filter('select').each(function() { this.value = this.defaultValue;
$(this).find('option').each(function() { this.checked = this.defaultChecked;
this.selected = this.defaultSelected; }).filter('select').each(function() {
$(this).find('option').each(function() {
this.selected = this.defaultSelected;
});
}); });
}); } else {
} else if (type.match(/^submit|image$/i)) { $(form).appendField({
$(form).appendField({ name: this.name,
name: this.name, value: this.value
value: this.value }).submit();
}).submit(); }
} });
});
}); });
}); });