Commit 7f80851a authored by Sophie Herold's avatar Sophie Herold
Browse files

Changes service activation to be a bit simpler

parent ca13d2b7
v0.11.0
- Adds proper checks for localparts in gui
- Changes de_DE l10n to be more gender inclusive
- Changes headerbar to use available space by not centering the title if needed
- Fixes some small bugs
- [dns] Changes service activation to be a bit simpler
- [web] Fixes handling of x.509 certs with empty subjectKeyIdentifier
v0.10.0:
- Version number jump to get in sync with carnivora
......
......@@ -138,9 +138,13 @@ class Module extends \hemio\edentata\Module
}
break;
case 'service_create':
case 'service_choose_domain':
$content = (new ServiceChooseDomain($this))->content($this->request->subject);
break;
case 'service_choose_subdomain':
try {
$content = (new ServiceCreate($this))->content($this->request->subject);
$content = (new ServiceChooseSubdomain($this))->content($this->request->subject);
} catch (exception\Successful $e) {
edentata\Utils::htmlRedirect($e->backTo);
}
......
......@@ -50,10 +50,10 @@ class RegisteredDetails extends Window
$window->addButtonRight(
new gui\LinkButton(
$this->request->derive(
'service_create'
, $registered
'service_choose_domain'
, $registered
)
, _('Add Sub-Domain')
, _('Activate Service')
)
);
......@@ -131,7 +131,7 @@ class RegisteredDetails extends Window
protected function service($registered)
{
$fieldset = new gui\Fieldset(_('Domain Service Activation'));
$fieldset = new gui\Fieldset(_('Activated Services'));
$list = new gui\Listbox();
foreach ($this->db->serviceDomainSelect(Utils::idnToAscii($registered)) as $domain) {
......
<?php
/*
* Copyright (C) 2017 Sophie Herold <sophie@hemio.de>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace hemio\edentata\module\dns;
use hemio\edentata\gui;
/**
* Description of ServiceChooseDomain
*
* @author Sophie Herold <sophie@hemio.de>
*/
class ServiceChooseDomain extends Window {
public function content($registered) {
$window = $this->newWindow(_('Activate Service'));
$selecting = new gui\Selecting(_('Activate Service for'));
$window->addChild($selecting);
$selecting->addLink(
$this->module->request->derive('service_details', $registered, $registered)
, _msg(_('Domain: {domain}'), ['domain' => $registered])
)->setSuggested();
$selecting->addLink(
$this->module->request->derive('service_choose_subdomain', $registered)
, _msg(_('Subdomain: <custom>.{domain}'), ['domain' => $registered])
);
return $window;
}
}
......@@ -25,18 +25,21 @@ use hemio\form;
*
* @author Michael Herold <quabla@hemio.de>
*/
class ServiceCreate extends Window
class ServiceChooseSubdomain extends Window
{
public function content($registered)
{
$window = $this->newFormWindow('service_create', _('Create Sub-Domain'),
$registered,
_('Continue …'));
$window = $this->newFormWindow(
'service_create'
, _('Activate Service for Subdomain')
, $registered
, _('Continue …')
);
$domain = new form\FieldText('domain', _('Sub-Domain'));
$domain = new form\FieldText('domain', _('Subdomain'));
$domain->getControlElement()->setAttribute('placeholder',
'sub-domain.'.$registered);
'subdomain.' . $registered);
$domain->setRequired();
$window->getForm()->addChild($domain);
......
......@@ -55,7 +55,7 @@ class ServiceDetails extends Window
$fieldset = new gui\Fieldset(ucwords(str_replace('_', ' ', $srv)));
$window->getForm()->addChild($fieldset);
$switch = new gui\FieldSwitch($srv, 'Activate Service');
$switch = new gui\FieldSwitch($srv, _('Service Active'));
$switch->getControlElement()->addCssClass('display_control');
$fieldset->addChild($switch);
......
msgid ""
msgstr ""
"Project-Id-Version: edentata dns\n"
"POT-Creation-Date: 2017-01-14 18:37+0100\n"
"PO-Revision-Date: 2017-01-14 18:37+0100\n"
"POT-Creation-Date: 2017-01-14 19:25+0100\n"
"PO-Revision-Date: 2017-01-14 19:25+0100\n"
"Last-Translator: Sophie Herold <sophie@hemio.de>\n"
"Language-Team: \n"
"Language: de_DE\n"
......@@ -18,7 +18,7 @@ msgstr ""
#: AdminC.php:34 AdminC.php:37 RegisteredCreate.php:53
#: RegisteredDetails.php:118
msgid "Admin Contact"
msgstr "Admin Kontakt"
msgstr "Adminstrator*innen Kontakt"
#: AdminC.php:35 RegisteredDetails.php:123
msgid "Change"
......@@ -250,7 +250,7 @@ msgstr ""
msgid "ID"
msgstr ""
#: Module.php:163 RegisteredCreate.php:41 RegisteredDetails.php:36
#: Module.php:167 RegisteredCreate.php:41 RegisteredDetails.php:36
msgid "Domain"
msgstr ""
......@@ -323,9 +323,9 @@ msgstr "Individuellen DNS-Eintrag erstellen"
msgid "Delete registered domain"
msgstr "Registrierte Domain löschen"
#: RegisteredDetails.php:56
msgid "Add Sub-Domain"
msgstr "Neue Sub-Domain"
#: RegisteredDetails.php:56 ServiceChooseDomain.php:32
msgid "Activate Service"
msgstr "Dienst Aktivieren"
#: RegisteredDetails.php:67
msgid "Custom DNS Entries"
......@@ -368,19 +368,31 @@ msgid "No detailed domain information available"
msgstr "Keine detaillierten Informationen verfügbar"
#: RegisteredDetails.php:134
msgid "Domain Service Activation"
msgstr "Domain Dienst-Aktivierung"
msgid "Activated Services"
msgstr "Aktivierte Dienste"
#: ServiceCreate.php:33
msgid "Create Sub-Domain"
msgstr "Sub-Domain Erstellen"
#: ServiceChooseDomain.php:34
msgid "Activate Service for"
msgstr "Dienst Aktivieren für"
#: ServiceCreate.php:35
#: ServiceChooseDomain.php:39
msgid "Domain: {domain}"
msgstr ""
#: ServiceChooseDomain.php:44
msgid "Subdomain: <custom>.{domain}"
msgstr "Subdomain: <individuell>.{domain}"
#: ServiceChooseSubdomain.php:35
msgid "Activate Service for Subdomain"
msgstr "Dienst für Subdomain Aktivieren"
#: ServiceChooseSubdomain.php:37
msgid "Continue …"
msgstr "Weiter …"
#: ServiceCreate.php:37
msgid "Sub-Domain"
#: ServiceChooseSubdomain.php:40
msgid "Subdomain"
msgstr ""
#: ServiceDetails.php:39
......@@ -391,6 +403,22 @@ msgstr "Dienst-Aktivierung"
msgid "Save"
msgstr "Speichern"
#: ServiceDetails.php:58
msgid "Service Active"
msgstr "Dienst Aktiv"
#: ServiceDetails.php:65
msgid "Host/Server"
msgstr ""
#~ msgid "Domain Service Activation"
#~ msgstr "Domain Dienst-Aktivierung"
#~ msgid "Subdomain: <something>.{domain}"
#~ msgstr "Subdomain: <irgendetwas>.{domain}"
#~ msgid "Add Sub-Domain"
#~ msgstr "Neue Sub-Domain"
#~ msgid "Create Sub-Domain"
#~ msgstr "Sub-Domain Erstellen"
Markdown is supported
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