aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-02-28 22:56:01 +0100
committerMarc Alexander <admin@m-a-styles.de>2013-02-28 22:56:01 +0100
commit8a9e1ca3f176946bc7b8ddb9be30ca8607685b80 (patch)
tree2320781beaecbeda3660b6f6e104f0c392a4c310
parent3cc4746ad3220910b6cbb17772ba594ae26e7c32 (diff)
downloadforums-8a9e1ca3f176946bc7b8ddb9be30ca8607685b80.tar
forums-8a9e1ca3f176946bc7b8ddb9be30ca8607685b80.tar.gz
forums-8a9e1ca3f176946bc7b8ddb9be30ca8607685b80.tar.bz2
forums-8a9e1ca3f176946bc7b8ddb9be30ca8607685b80.tar.xz
forums-8a9e1ca3f176946bc7b8ddb9be30ca8607685b80.zip
[feature/avatars] Auto-clear avatar dimensions when first changing avatars
In the remote avatar and gravatar the dimension input boxes will now be cleared when changing the avatar. This will only happen once per page-load. Any input after the first change will not trigger this. PHPBB3-10018
-rw-r--r--phpBB/styles/prosilver/template/ucp_avatar_options_gravatar.html14
-rw-r--r--phpBB/styles/prosilver/template/ucp_avatar_options_remote.html14
2 files changed, 28 insertions, 0 deletions
diff --git a/phpBB/styles/prosilver/template/ucp_avatar_options_gravatar.html b/phpBB/styles/prosilver/template/ucp_avatar_options_gravatar.html
index 04fd5c459d..692f50cb9a 100644
--- a/phpBB/styles/prosilver/template/ucp_avatar_options_gravatar.html
+++ b/phpBB/styles/prosilver/template/ucp_avatar_options_gravatar.html
@@ -1,3 +1,17 @@
+<script type="text/javascript">
+// <![CDATA[
+
+onload_functions.push(function() {
+ $('#avatar_gravatar_email').bind('keyup', function () {
+ $('#avatar_gravatar_width').val('');
+ $('#avatar_gravatar_height').val('');
+ $('#avatar_gravatar_email').unbind('keyup');
+ });
+});
+
+// ]]>
+</script>
+
<dl>
<dt><label for="avatar_gravatar_email">{L_GRAVATAR_AVATAR_EMAIL}{L_COLON}</label><br /><span>{L_GRAVATAR_AVATAR_EMAIL_EXPLAIN}</span></dt>
<dd><input type="text" name="avatar_gravatar_email" id="avatar_gravatar_email" value="{AVATAR_GRAVATAR_EMAIL}" class="inputbox" /></dd>
diff --git a/phpBB/styles/prosilver/template/ucp_avatar_options_remote.html b/phpBB/styles/prosilver/template/ucp_avatar_options_remote.html
index ab91e90c27..39a8483dc4 100644
--- a/phpBB/styles/prosilver/template/ucp_avatar_options_remote.html
+++ b/phpBB/styles/prosilver/template/ucp_avatar_options_remote.html
@@ -1,3 +1,17 @@
+<script type="text/javascript">
+// <![CDATA[
+
+onload_functions.push(function() {
+ $('#avatar_remote_url').bind('keyup', function () {
+ $('#avatar_remote_width').val('');
+ $('#avatar_remote_height').val('');
+ $('#avatar_remote_url').unbind('keyup');
+ });
+});
+
+// ]]>
+</script>
+
<dl>
<dt><label for="avatar_remote_url">{L_LINK_REMOTE_AVATAR}{L_COLON}</label><br /><span>{L_LINK_REMOTE_AVATAR_EXPLAIN}</span></dt>
<dd><input type="text" name="avatar_remote_url" id="avatar_remote_url" value="{AVATAR_REMOTE_URL}" class="inputbox" /></dd>