Removed unnessary controller functions that just call a view, HTML/CSS consistency updates

This commit is contained in:
2024-04-22 14:27:48 +10:00
parent 001618d719
commit ceffc7ff14
45 changed files with 2009 additions and 2011 deletions

View File

@@ -323,7 +323,7 @@ class SystemController extends Controller
// Make sure that no other system has this address active.
if ($o->role === Address::NODE_ACTIVE)
return redirect()->back()->withErrors(['demaddress'=>sprintf('%s cannot be demoted any more',$o->ftn3D)]);
return redirect()->back()->withErrors(['address'=>sprintf('%s cannot be demoted any more',$o->ftn3D)]);
$o->role = ($o->role << 1);
$o->save();
@@ -494,7 +494,7 @@ class SystemController extends Controller
// Make sure that no other system has this address active.
if ($o->role === Address::NODE_NC)
return redirect()->back()->withErrors(['proaddress'=>sprintf('%s cannot be promoted any more',$o->ftn3D)]);
return redirect()->back()->withErrors(['address'=>sprintf('%s cannot be promoted any more',$o->ftn3D)]);
$o->role = ($o->role >> 1);
$o->save();
@@ -564,7 +564,7 @@ class SystemController extends Controller
'active'=>TRUE,
])->single())) {
return redirect()->back()->withErrors(['susaddress'=>sprintf('%s is already active on system [<a href="%s">%s</a>]',$o->ftn,url('system/addedit',$x->system_id),$x->system->name)]);
return redirect()->back()->withErrors(['address'=>sprintf('%s is already active on system [<a href="%s">%s</a>]',$o->ftn,url('system/addedit',$x->system_id),$x->system->name)]);
}
$o->active = (! $o->active);