From: Loic Baron Date: Tue, 6 May 2014 16:17:15 +0000 (+0200) Subject: Message if success or failure on rest/update slice with list of users X-Git-Tag: myslice-1.1~114 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=e5b0000775616850505611331129a6a10c85ba68;p=myslice.git Message if success or failure on rest/update slice with list of users --- diff --git a/portal/templates/slice-tab-users-view.html b/portal/templates/slice-tab-users-view.html index e1b0618b..fb496158 100644 --- a/portal/templates/slice-tab-users-view.html +++ b/portal/templates/slice-tab-users-view.html @@ -31,6 +31,9 @@ Enabled + + + {% if 'is_pi' in pi %} {%endif%} @@ -93,15 +96,15 @@ }); }); // post rest/user - $('button#addusers').click(function() { $.post("/update/slice/",{'filters':{'slice_hrn':'{{slice}}'},'params':{'users':slice_users}}, function(data) { console.log(data); if(data.success){ // TODO: highlight row after success //$('tr[id="'+record_id+'"]').highlight(); + mysliceAlert("Success: slice updated",'success'); }else{ - alert("Rest Error for: "+data.error); + mysliceAlert("Rest Error for: "+data.error,'warning'); } }); // post update slice