aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-23 17:56:53 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-23 17:56:53 +0000
commit2565d6e5e04c756db1760081cb7acc33d78401ce (patch)
tree554f4e8ef8a0cc4d8ccc659e4030f42d477fe9c5 /views
parentee25c76e0bab45893a9d52a3820a16be2d481010 (diff)
downloadelgg-2565d6e5e04c756db1760081cb7acc33d78401ce.tar.gz
elgg-2565d6e5e04c756db1760081cb7acc33d78401ce.tar.bz2
Some tweaks to the 'saving' box
git-svn-id: https://code.elgg.org/elgg/trunk@1079 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views')
-rw-r--r--views/default/widgets/editwrapper.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/views/default/widgets/editwrapper.php b/views/default/widgets/editwrapper.php
index ad8c90b2a..a01f18310 100644
--- a/views/default/widgets/editwrapper.php
+++ b/views/default/widgets/editwrapper.php
@@ -11,9 +11,11 @@
* @link http://elgg.org/
*/
+ $guid = $vars['entity']->getGUID();
+
?>
-<form id="widgetform<?php echo $vars['entity']->getGUID(); ?>" action="<?php echo $vars['url']; ?>action/widgets/save" method="post">
+<form id="widgetform<?php echo $guid; ?>" action="<?php echo $vars['url']; ?>action/widgets/save" method="post">
<?php
@@ -28,8 +30,8 @@
</label>
</p>
<p>
- <input type="hidden" name="guid" value="<?php echo $vars['entity']->getGUID(); ?>" />
- <input type="submit" value="<?php
+ <input type="hidden" name="guid" value="<?php echo $guid; ?>" />
+ <input type="submit" id="submit<?php echo $guid; ?>" value="<?php
echo elgg_echo('save');
@@ -41,11 +43,14 @@
<script type="text/javascript">
$(document).ready(function() {
- $("#widgetform<?php echo $vars['entity']->getGUID(); ?>").submit(function () {
+ $("#widgetform<?php echo $guid; ?>").submit(function () {
+
+ $("#submit<?php echo $guid; ?>").attr("disabled","disabled");
+ $("#submit<?php echo $guid; ?>").attr("value","<?php echo elgg_echo("saving"); ?>");
- var variables = $("#widgetform<?php echo $vars['entity']->getGUID(); ?>").serialize();
- $.post($("#widgetform<?php echo $vars['entity']->getGUID(); ?>").attr("action"),variables,function() {
- $("#widget<?php echo $vars['entity']->getGUID(); ?>").load("<?php echo $vars['url']; ?>pg/view/<?php echo $vars['entity']->getGUID(); ?>?shell=no&username=<?php echo page_owner_entity()->username; ?>&context=<?php echo get_context(); ?>");
+ var variables = $("#widgetform<?php echo $guid; ?>").serialize();
+ $.post($("#widgetform<?php echo $guid; ?>").attr("action"),variables,function() {
+ $("#widget<?php echo $guid; ?>").load("<?php echo $vars['url']; ?>pg/view/<?php echo $guid; ?>?shell=no&username=<?php echo page_owner_entity()->username; ?>&context=<?php echo get_context(); ?>");
});
return false;