Fixed and closed #418: Same & Continue now properly handles attachment upload controls activation. Also fixed issue in redirect on cancel.
This commit is contained in:
parent
123c1755ff
commit
3eb812dfd4
3 changed files with 18 additions and 10 deletions
|
@ -70,14 +70,7 @@ namespace ScrewTurn.Wiki {
|
|||
}
|
||||
|
||||
DetectPermissions();
|
||||
|
||||
// Setup buttons and controls
|
||||
if(!canUpload) {
|
||||
btnUpload.Enabled = false;
|
||||
}
|
||||
if(!canDelete) {
|
||||
chkOverwrite.Enabled = false;
|
||||
}
|
||||
SetupControls();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -101,6 +94,18 @@ namespace ScrewTurn.Wiki {
|
|||
lstProviders.Visible = isAdmin;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets up buttons and controls using the permissions.
|
||||
/// </summary>
|
||||
private void SetupControls() {
|
||||
if(!canUpload) {
|
||||
btnUpload.Enabled = false;
|
||||
}
|
||||
if(!canDelete) {
|
||||
chkOverwrite.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the PageInfo object.
|
||||
/// </summary>
|
||||
|
@ -113,6 +118,7 @@ namespace ScrewTurn.Wiki {
|
|||
btnUpload.Enabled = value != null;
|
||||
lblNoUpload.Visible = !btnUpload.Enabled;
|
||||
DetectPermissions();
|
||||
SetupControls();
|
||||
rptItems.DataBind();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue