mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-25 20:08:23 +02:00
Fixed #53
This commit is contained in:
parent
f6fac77710
commit
4503cd0073
2 changed files with 41 additions and 1 deletions
|
@ -129,6 +129,28 @@ class ApplicationsController extends Controller
|
|||
'registrar' => $registrar,
|
||||
]);
|
||||
}
|
||||
|
||||
if ($phaseType === 'claims') {
|
||||
if (!isset($data['noticeid']) || $data['noticeid'] === '' ||
|
||||
!isset($data['notafter']) || $data['notafter'] === '' ||
|
||||
!isset($data['accepted']) || $data['accepted'] === '') {
|
||||
// Trigger an error or handle the situation as needed
|
||||
return view($response, 'admin/domains/createApplication.twig', [
|
||||
'domainName' => $domainName,
|
||||
'error' => "Error: 'noticeid', 'notafter', or 'accepted' cannot be empty when phaseType is 'claims'",
|
||||
'registrars' => $registrars,
|
||||
'registrar' => $registrar,
|
||||
]);
|
||||
}
|
||||
|
||||
$noticeid = $data['noticeid'];
|
||||
$notafter = $data['notafter'];
|
||||
$accepted = $data['accepted'];
|
||||
} else {
|
||||
$noticeid = null;
|
||||
$notafter = null;
|
||||
$accepted = null;
|
||||
}
|
||||
|
||||
$domain_already_reserved = $db->selectValue(
|
||||
'SELECT id FROM reserved_domain_names WHERE name = ? LIMIT 1',
|
||||
|
@ -365,7 +387,10 @@ class ApplicationsController extends Controller
|
|||
'authinfo' => $authInfo,
|
||||
'phase_name' => $phaseName,
|
||||
'phase_type' => $phaseType,
|
||||
'smd' => $smd
|
||||
'smd' => $smd,
|
||||
'tm_notice_id' => $noticeid,
|
||||
'tm_notice_accepted' => $accepted,
|
||||
'tm_notice_expires' => $notafter
|
||||
]);
|
||||
$domain_id = $db->getlastInsertId();
|
||||
|
||||
|
|
|
@ -135,6 +135,21 @@
|
|||
<textarea class="form-control" data-bs-toggle="autosize" name="smd" placeholder="Paste SMD contents…"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="noticeid" class="form-label">{{ __('Notice ID') }}</label>
|
||||
<input type="text" class="form-control" name="noticeid">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="notafter" class="form-label">{{ __('Not After Date') }}</label>
|
||||
<input type="datetime-local" class="form-control" name="notafter">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="accepted" class="form-label">{{ __('Accepted Date') }}</label>
|
||||
<input type="datetime-local" class="form-control" name="accepted">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div class="row align-items-center">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue