Extended profile - fix regression whereby if there was only one item, you could still delete it!
This commit is contained in:
parent
d51625ab3d
commit
a715b133ff
@ -68,19 +68,17 @@ SN_EXTENDED.removeRow = function() {
|
||||
var div = $(this).closest('div');
|
||||
var id = $(div).attr('id');
|
||||
var cls = $(div).attr('class');
|
||||
var cnt = SN_EXTENDED.rowCount(cls);
|
||||
|
||||
var that = this;
|
||||
|
||||
$("#confirm-dialog").dialog({
|
||||
buttons : {
|
||||
"Confirm" : function() {
|
||||
$(this).dialog("close");
|
||||
var target = $(that).closest('tr');
|
||||
target.fadeOut("slow", function() {
|
||||
$(that).remove();
|
||||
});
|
||||
$(target).remove();
|
||||
SN_EXTENDED.reorder(cls);
|
||||
$(this).dialog("close");
|
||||
});
|
||||
},
|
||||
"Cancel" : function() {
|
||||
$(this).dialog("close");
|
||||
@ -88,6 +86,8 @@ SN_EXTENDED.removeRow = function() {
|
||||
}
|
||||
});
|
||||
|
||||
var cnt = SN_EXTENDED.rowCount(cls);
|
||||
|
||||
if (cnt > 1) {
|
||||
$("#confirm-dialog").dialog("open");
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ class ProfileDetailSettingsAction extends ProfileSettingsAction
|
||||
// CSRF protection
|
||||
$token = $this->trimmed('token');
|
||||
if (!$token || $token != common_session_token()) {
|
||||
$this->show_form(
|
||||
$this->showForm(
|
||||
_m(
|
||||
'There was a problem with your session token. '
|
||||
. 'Try again, please.'
|
||||
|
Loading…
Reference in New Issue
Block a user