Commit 95a33558 authored by Michael Herold's avatar Michael Herold
Browse files

Adds support for new domain features

parent 39d2a700
......@@ -74,7 +74,10 @@ class Progress extends form\Container implements ProgressInterface
if ($backendStatus !== null) {
$this['span'] = new html\Span();
$this['span']->addCssClass('progress');
$this['span']->addCssClass('status');
if ($backendStatus != 'old')
$this['span']->addCssClass('progress');
switch ($backendStatus) {
case 'del':
......@@ -89,6 +92,10 @@ class Progress extends form\Container implements ProgressInterface
$this->msg = _('Setup Pending');
break;
case 'old':
$this->msg = _('Deleted');
break;
default:
$this->msg = _('Unknown Status');
$this->status = '?';
......
......@@ -1520,17 +1520,19 @@ ul.listbox li:last-child, .sidebar li:last-child, ul.selectbox li:last-child {
list-style-type: square;
font-weight: normal; }
.listbox .progress, .selectbox .progress {
.listbox .status, .selectbox .status {
font-size: 0.9em;
background-image: url("progress.gif");
background-position: right;
background-size: contain;
background-repeat: no-repeat;
color: gray;
padding-right: 2em;
padding-left: 0.5em;
white-space: nowrap; }
.listbox .progress, .selectbox .progress {
padding-right: 2em;
background-image: url("progress.gif");
background-position: right;
background-size: contain;
background-repeat: no-repeat; }
/*
Copyright (C) 2015 Michael Herold <quabla@hemio.de>
......
......@@ -113,12 +113,13 @@ class Db extends \hemio\edentata\ModuleDb
)->execute();
}
public function handleSelect()
public function handleSelect($hideForeign = '0')
{
return (new sql\QuerySelectFunction(
$this->pdo
, 'domain_reseller.sel_handle')
)->execute();
, 'domain_reseller.sel_handle'
, ['p_hide_foreign' => $hideForeign]
))->execute();
}
public function handleSelectSingle($alias)
......@@ -201,6 +202,16 @@ class Db extends \hemio\edentata\ModuleDb
return $stmt->execute(['domain' => $domain]);
}
public function resellerResellerSelect()
{
$stmt = new sql\QuerySelectFunction(
$this->pdo
, 'domain_reseller.sel_reseller'
);
return $stmt->execute();
}
public function serviceDomainSelect($registered)
{
$stmt = new sql\QuerySelectFunction(
......
......@@ -29,6 +29,7 @@ use hemio\edentata\gui;
class HandleCreate extends Window
{
const HANDLE_KEYS = [
'service_entity_name',
'alias',
'fname',
'lname',
......@@ -56,14 +57,15 @@ class HandleCreate extends Window
public function handle($update = false)
{
$required = new form\Container();
$required['alias'] = new form\FieldText('alias', _('Alias'));
$required['fname'] = new form\FieldText('fname', _('First Name'));
$required['lname'] = new form\FieldText('lname', _('Last Name'));
$required[] = new form\FieldTextarea('address', _('Address'));
$required[] = new form\FieldText('pcode', _('Zip Code'));
$required[] = new form\FieldText('city', _('City'));
$required = new form\Container();
$required['registrar'] = new form\FieldSelect('service_entity_name',
_('Registar'));
$required['alias'] = new form\FieldText('alias', _('Alias'));
$required['fname'] = new form\FieldText('fname', _('First Name'));
$required['lname'] = new form\FieldText('lname', _('Last Name'));
$required[] = new form\FieldTextarea('address', _('Address'));
$required[] = new form\FieldText('pcode', _('Zip Code'));
$required[] = new form\FieldText('city', _('City'));
$required['country'] = new form\FieldSelect('country', _('Country'));
$required['country']->addOption('');
......@@ -78,7 +80,16 @@ class HandleCreate extends Window
foreach ($required as $field)
$field->setRequired();
$required['alias']->setPlaceholder(_('First Name-Last Name'));
foreach ($this->db->resellerResellerSelect() as $registar)
$required['registrar']->addOption($registar['service_entity_name']);
if ($update) {
$required['registrar']->getControlElement()->setAttribute('readonly',
true);
$required['registrar']->getControlElement()->setAttribute('disabled',
true);
$required['alias']->getControlElement()->setAttribute('readonly',
true);
$required['fname']->getControlElement()->setAttribute('readonly',
......
......@@ -87,7 +87,7 @@ class Overview extends Window
$fieldset = new gui\Fieldset(_('Handles'));
$list = new gui\Listbox();
foreach ($this->db->handleSelect() as $value) {
foreach ($this->db->handleSelect(true) as $value) {
$list->addLinkEntry(
$this->request->derive('handle_details', $value['alias'])
......
......@@ -57,9 +57,8 @@ class RegisteredCreate extends Window
$adminC->addOption('');
foreach ($this->db->registeredNameserverSelect() as $ns) {
$subservice->addOption($ns['subservice'], $ns['subservice']);
$nameserver->addOption($ns['service_entity_name'],
$ns['service_entity_name']);
$subservice->addOption($ns['subservice']);
$nameserver->addOption($ns['service_entity_name']);
}
foreach ($this->db->handleSelect() as $handle) {
......
......@@ -84,6 +84,26 @@ class RegisteredDetails extends Window
new gui\Output(_('Primary Nameserver')
, $dataDomain['service_entity_name']));
if ($dataRegist['payable'])
$fieldset[] = new gui\Output(_('Payable')
, $dataRegist['payable']);
if ($dataRegist['period'])
$fieldset[] = new gui\Output(_('Booking Period (Years)')
, $dataRegist['period']);
if ($dataRegist['registrar_status'])
$fieldset[] = new gui\Output(_('Registrar Status')
, $dataRegist['registrar_status']);
if ($dataRegist['registry_status'])
$fieldset[] = new gui\Output(_('Registry Status (Transfer Protection)')
, $dataRegist['registry_status']);
if ($dataRegist['last_status'])
$fieldset[] = new gui\Output(_('Last Update Status')
, $dataRegist['last_status']);
$list = new gui\Listbox();
if ($dataRegist === false)
......
msgid ""
msgstr ""
"Project-Id-Version: edentata dns\n"
"POT-Creation-Date: 2015-08-05 18:24+0100\n"
"PO-Revision-Date: 2015-08-05 18:25+0100\n"
"POT-Creation-Date: 2015-08-09 23:53+0100\n"
"PO-Revision-Date: 2015-08-09 23:55+0100\n"
"Last-Translator: Michael Herold <quabla@hemio.de>\n"
"Language-Team: \n"
"Language: de_DE\n"
......@@ -16,11 +16,11 @@ msgstr ""
"X-Poedit-SearchPath-0: .\n"
#: AdminC.php:34 AdminC.php:37 RegisteredCreate.php:53
#: RegisteredDetails.php:97
#: RegisteredDetails.php:117
msgid "Admin Contact"
msgstr "Admin Kontakt"
#: AdminC.php:35 RegisteredDetails.php:102
#: AdminC.php:35 RegisteredDetails.php:122
msgid "Change"
msgstr "Ändern"
......@@ -28,7 +28,7 @@ msgstr "Ändern"
msgid "New Custom DNS Record"
msgstr "Neuer Selbsterstellter DNS-Eintrag"
#: CustomCreate.php:53 CustomCreate.php:86 HandleCreate.php:49
#: CustomCreate.php:53 CustomCreate.php:86 HandleCreate.php:50
msgid "Create"
msgstr "Erstellen"
......@@ -142,55 +142,63 @@ msgstr "Aktualisieren"
msgid "Type"
msgstr "Typ"
#: HandleCreate.php:48
#: HandleCreate.php:49
msgid "New Handle"
msgstr "Neues Handle"
#: HandleCreate.php:61
#: HandleCreate.php:62
msgid "Registar"
msgstr "Registrar"
#: HandleCreate.php:63
msgid "Alias"
msgstr ""
#: HandleCreate.php:62
#: HandleCreate.php:64
msgid "First Name"
msgstr "Vorname"
#: HandleCreate.php:63
#: HandleCreate.php:65
msgid "Last Name"
msgstr "Nachname"
#: HandleCreate.php:64
#: HandleCreate.php:66
msgid "Address"
msgstr "Adresse"
#: HandleCreate.php:65
#: HandleCreate.php:67
msgid "Zip Code"
msgstr "Postleitzahl"
#: HandleCreate.php:66
#: HandleCreate.php:68
msgid "City"
msgstr "Stadt"
#: HandleCreate.php:68
#: HandleCreate.php:70
msgid "Country"
msgstr "Staat"
#: HandleCreate.php:73
#: HandleCreate.php:75
msgid "State"
msgstr "Bundesland"
#: HandleCreate.php:74
#: HandleCreate.php:76
msgid "Email"
msgstr "E-Mail"
#: HandleCreate.php:75
#: HandleCreate.php:77
msgid "Phone"
msgstr "Telefon"
#: HandleCreate.php:92
#: HandleCreate.php:83
msgid "First Name-Last Name"
msgstr "Vorname-Nachname"
#: HandleCreate.php:103
msgid "Fax"
msgstr ""
#: HandleCreate.php:96
#: HandleCreate.php:107
msgid "Mobile Phone"
msgstr "Handy"
......@@ -258,7 +266,7 @@ msgstr "Durch dieses System verwaltet"
msgid "Nameserver"
msgstr ""
#: RegisteredCreate.php:50 RegisteredDetails.php:93
#: RegisteredCreate.php:50 RegisteredDetails.php:113
msgid "Registrant (Owner)"
msgstr "Besitzer (Owner)"
......@@ -303,11 +311,31 @@ msgstr "Diese Domain wird nicht durch dieses System verwaltet."
msgid "Primary Nameserver"
msgstr "Primärer Nameserver"
#: RegisteredDetails.php:90
#: RegisteredDetails.php:88
msgid "Payable"
msgstr "Fällig"
#: RegisteredDetails.php:92
msgid "Booking Period (Years)"
msgstr "Buchungsdauer"
#: RegisteredDetails.php:96
msgid "Registrar Status"
msgstr ""
#: RegisteredDetails.php:100
msgid "Registry Status (Transfer Protection)"
msgstr "Registry Status (Transfer-Schutz)"
#: RegisteredDetails.php:104
msgid "Last Update Status"
msgstr "Letzter Aktualisierungsstatus"
#: RegisteredDetails.php:110
msgid "No detailed domain information available"
msgstr "Keine detaillierten Informationen verfügbar"
#: RegisteredDetails.php:113
#: RegisteredDetails.php:133
msgid "Domain Service Activation"
msgstr "Domain Dienst-Aktivierung"
......
......@@ -104,16 +104,17 @@ ul.listbox li:last-child {
font-weight: normal;
}
.listbox .progress {
.listbox .status {
font-size: 0.9em;
color: gray;
padding-left: 0.5em;
white-space: nowrap;
}
.listbox .progress {
padding-right: 2em;
background-image: url('progress.gif');
background-position: right;
background-size: contain;
background-repeat: no-repeat;
//float: right;
color: gray;
//font-weight: normal;
padding-right: 2em;
padding-left: 0.5em;
white-space: nowrap;
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment