after editing a user quota, set the value of the quota field to how the server parsed the input, not the user input
this way the user can see when an invalid input is given
This commit is contained in:
parent
1746cba249
commit
ccd9b56609
|
@ -10,6 +10,6 @@ $quota= OC_Helper::computerFileSize($_POST["quota"]);
|
|||
|
||||
// Return Success story
|
||||
OC_Preferences::setValue($username,'files','quota',$quota);
|
||||
OC_JSON::success(array("data" => array( "username" => $username ,'quota'=>$quota)));
|
||||
OC_JSON::success(array("data" => array( "username" => $username ,'quota'=>OC_Helper::humanFileSize($quota))));
|
||||
|
||||
?>
|
||||
|
|
|
@ -101,8 +101,11 @@ $(document).ready(function(){
|
|||
if($(this).val().length>0){
|
||||
$.post(
|
||||
OC.filePath('settings','ajax','setquota.php'),
|
||||
{username:uid,quota:$(this).val()},
|
||||
function(result){}
|
||||
{username:uid,quota:$(this).val()},
|
||||
function(result){
|
||||
img.parent().children('span').text(result.data.quota)
|
||||
alert(result.data.quota);
|
||||
}
|
||||
);
|
||||
input.blur();
|
||||
}else{
|
||||
|
|
Loading…
Reference in New Issue