Subversion Repositories oidplus

Rev

Rev 320 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 320 Rev 360
Line 15... Line 15...
15
 * limitations under the License.
15
 * limitations under the License.
16
 */
16
 */
17
 
17
 
18
// Is currently used by plugin public-093 (rainfo) and ra-100 (edit-contact-data)!
18
// Is currently used by plugin public-093 (rainfo) and ra-100 (edit-contact-data)!
19
function deleteRa(email, goto) {
19
function deleteRa(email, goto) {
20
        if(!window.confirm("Are you really sure that you want to delete "+email+"? (The OIDs stay active)")) return false;
20
        if(!window.confirm(_L("Are you sure that you want to delete %1? (The OIDs stay active)",email))) return false;
21
 
21
 
22
        $.ajax({
22
        $.ajax({
23
                url:"ajax.php",
23
                url:"ajax.php",
24
                method:"POST",
24
                method:"POST",
25
                data: {
25
                data: {
26
                        plugin:"1.3.6.1.4.1.37476.2.5.2.4.1.1",
26
                        plugin:"1.3.6.1.4.1.37476.2.5.2.4.1.1",
27
                        action:"delete_ra",
27
                        action:"delete_ra",
28
                        email:email,
28
                        email:email,
29
                },
29
                },
30
                error:function(jqXHR, textStatus, errorThrown) {
30
                error:function(jqXHR, textStatus, errorThrown) {
31
                        alert("Error: " + errorThrown);
31
                        alert(_L("Error: %1",errorThrown));
32
                },
32
                },
33
                success:function(data) {
33
                success:function(data) {
34
                        if ("error" in data) {
34
                        if ("error" in data) {
35
                                alert("Error: " + data.error);
35
                                alert(_L("Error: %1",data.error));
36
                        } else if (data.status == 0) {
36
                        } else if (data.status == 0) {
37
                                alert("Done.");
37
                                alert(_L("Done"));
38
                                if (goto != null) {
38
                                if (goto != null) {
39
                                        $("#gotoedit").val(goto);
39
                                        $("#gotoedit").val(goto);
40
                                        window.location.href = "?goto="+encodeURIComponent(goto);
40
                                        window.location.href = "?goto="+encodeURIComponent(goto);
41
                                }
41
                                }
42
                                // reloadContent();
42
                                // reloadContent();
43
                        } else {
43
                        } else {
44
                                alert("Error: " + data.error);
44
                                alert(_L("Error: %1",data.error));
45
                        }
45
                        }
46
                }
46
                }
47
        });
47
        });
48
}
48
}