Added launch phase type/category

This commit is contained in:
Pinga 2023-12-19 17:50:37 +02:00
parent 141dd5fd3b
commit e2d040cf29
4 changed files with 23 additions and 2 deletions

View file

@ -1045,6 +1045,7 @@ class SystemController extends Controller
$sData['tldid'] = filter_var($data['tldid'], FILTER_SANITIZE_NUMBER_INT); $sData['tldid'] = filter_var($data['tldid'], FILTER_SANITIZE_NUMBER_INT);
$sData['extension'] = substr(trim($data['extension']), 0, 10); $sData['extension'] = substr(trim($data['extension']), 0, 10);
$sData['phaseName'] = substr(trim($data['phaseName']), 0, 255); $sData['phaseName'] = substr(trim($data['phaseName']), 0, 255);
$sData['phaseCategory'] = substr(trim($data['phaseCategory']), 0, 255);
$sData['phaseType'] = substr(trim($data['phaseType']), 0, 255); $sData['phaseType'] = substr(trim($data['phaseType']), 0, 255);
$sData['phaseDescription'] = substr(trim($data['phaseDescription']), 0, 1000); $sData['phaseDescription'] = substr(trim($data['phaseDescription']), 0, 1000);
$sData['phaseStart'] = str_replace('T', ' ', $data['phaseStart']) . ':00'; $sData['phaseStart'] = str_replace('T', ' ', $data['phaseStart']) . ':00';
@ -1104,6 +1105,7 @@ class SystemController extends Controller
'tld_id' => $sData['tldid'], 'tld_id' => $sData['tldid'],
'phase_name' => $sData['phaseName'], 'phase_name' => $sData['phaseName'],
'phase_type' => $sData['phaseType'], 'phase_type' => $sData['phaseType'],
'phase_category' => $sData['phaseCategory'],
'phase_description' => $sData['phaseDescription'], 'phase_description' => $sData['phaseDescription'],
'start_date' => $sData['phaseStart'], 'start_date' => $sData['phaseStart'],
'end_date' => $sData['phaseEnd'], 'end_date' => $sData['phaseEnd'],

View file

@ -295,6 +295,7 @@
<tr> <tr>
<th>Phase Type</th> <th>Phase Type</th>
<th>Phase Name</th> <th>Phase Name</th>
<th>Phase Category</th>
<th>Phase Description</th> <th>Phase Description</th>
<th>Start Date</th> <th>Start Date</th>
<th>End Date</th> <th>End Date</th>
@ -305,13 +306,14 @@
<tr> <tr>
<td>{{ phase.phase_type|capitalize }}</td> <td>{{ phase.phase_type|capitalize }}</td>
<td>{{ phase.phase_name|default('N/A') }}</td> <td>{{ phase.phase_name|default('N/A') }}</td>
<td>{{ phase.phase_category }}</td>
<td>{{ phase.phase_description }}</td> <td>{{ phase.phase_description }}</td>
<td>{{ phase.start_date }}</td> <td>{{ phase.start_date }}</td>
<td>{{ phase.end_date }}</td> <td>{{ phase.end_date }}</td>
</tr> </tr>
{% else %} {% else %}
<tr> <tr>
<td colspan="6">No launch phases found.</td> <td colspan="7">No launch phases found.</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
@ -334,7 +336,22 @@
<div class="mb-3"> <div class="mb-3">
<label for="phaseName" class="form-label">Phase Name</label> <label for="phaseName" class="form-label">Phase Name</label>
<input type="text" class="form-control" id="phaseName" name="phaseName" placeholder="Enter phase name"> <input type="text" class="form-control" id="phaseName" name="phaseName" placeholder="Enter phase name">
<small class="form-hint">The "Phase name" field is required only if the "Type" is set to "Custom".</small> <small class="form-hint">The "Phase Name" field is required only if the "Type" is set to "Custom".</small>
</div>
<div class="mb-3">
<div class="form-label">Phase Category</div>
<div>
<label class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="phaseCategory" id="First-Come-First-Serve" value="First-Come-First-Serve" checked>
<span class="form-check-label">First-Come-First-Serve</span>
<small class="form-hint">Single application only.</small>
</label>
<label class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="phaseCategory" id="Application" value="Application">
<span class="form-check-label">Application</span>
<small class="form-hint">Multiple applications allowed.</small>
</label>
</div>
</div> </div>
<div class="mb-3"> <div class="mb-3">
<label for="phaseDescription" class="form-label required">Phase Description</label> <label for="phaseDescription" class="form-label required">Phase Description</label>

View file

@ -7,6 +7,7 @@ CREATE TABLE IF NOT EXISTS `registry`.`launch_phases` (
`tld_id` int(10) unsigned DEFAULT NULL, `tld_id` int(10) unsigned DEFAULT NULL,
`phase_name` VARCHAR(75) DEFAULT NULL, `phase_name` VARCHAR(75) DEFAULT NULL,
`phase_type` VARCHAR(50) NOT NULL, `phase_type` VARCHAR(50) NOT NULL,
`phase_category` VARCHAR(75) NOT NULL,
`phase_description` TEXT, `phase_description` TEXT,
`start_date` DATETIME(3) NOT NULL, `start_date` DATETIME(3) NOT NULL,
`end_date` DATETIME(3) DEFAULT NULL, `end_date` DATETIME(3) DEFAULT NULL,

View file

@ -8,6 +8,7 @@ CREATE TABLE registry.launch_phases (
"tld_id" INT CHECK ("tld_id" >= 0), "tld_id" INT CHECK ("tld_id" >= 0),
"phase_name" VARCHAR(75) DEFAULT NULL, "phase_name" VARCHAR(75) DEFAULT NULL,
"phase_type" VARCHAR(50) NOT NULL, "phase_type" VARCHAR(50) NOT NULL,
"phase_category" VARCHAR(75) NOT NULL,
"phase_description" TEXT, "phase_description" TEXT,
"start_date" TIMESTAMP(3) NOT NULL, "start_date" TIMESTAMP(3) NOT NULL,
"end_date" TIMESTAMP(3) DEFAULT NULL, "end_date" TIMESTAMP(3) DEFAULT NULL,