mirror of
https://github.com/getnamingo/registry.git
synced 2025-08-02 07:41:49 +02:00
Big improvement in CP flows
This commit is contained in:
parent
7c2e6d4388
commit
f3fa1f1855
15 changed files with 244 additions and 961 deletions
|
@ -98,10 +98,8 @@ class RegistrarsController extends Controller
|
|||
// Trim the final semicolon and space
|
||||
$errorText = rtrim($errorText, '; ');
|
||||
|
||||
return view($response, 'admin/registrars/create.twig', [
|
||||
'countries' => $countries,
|
||||
'error' => $errorText,
|
||||
]);
|
||||
$this->container->get('flash')->addMessage('error', 'Error creating registrar: ' . $errorText);
|
||||
return $response->withHeader('Location', '/registrar/create')->withStatus(302);
|
||||
}
|
||||
|
||||
$db->beginTransaction();
|
||||
|
@ -270,16 +268,12 @@ class RegistrarsController extends Controller
|
|||
$db->commit();
|
||||
} catch (Exception $e) {
|
||||
$db->rollBack();
|
||||
return view($response, 'admin/registrars/create.twig', [
|
||||
'error' => $e->getMessage(),
|
||||
'countries' => $countries,
|
||||
]);
|
||||
$this->container->get('flash')->addMessage('error', 'Database failure: ' . $e->getMessage());
|
||||
return $response->withHeader('Location', '/registrar/create')->withStatus(302);
|
||||
}
|
||||
|
||||
return view($response,'admin/registrars/create.twig', [
|
||||
'registrar' => $data['name'],
|
||||
'countries' => $countries,
|
||||
]);
|
||||
$this->container->get('flash')->addMessage('success', 'Registrar ' . $data['name'] . ' successfully created and is now active.');
|
||||
return $response->withHeader('Location', '/registrars')->withStatus(302);
|
||||
}
|
||||
|
||||
$iso3166 = new ISO3166();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue