auf 2.0.0 und css Tests

This commit is contained in:
Holger Trampe 2021-10-22 09:25:43 +02:00
parent 3d07ca9dc0
commit b6fbe90806
17 changed files with 357 additions and 337 deletions

View File

@ -1,6 +1,6 @@
# Makefile for building the project # Makefile for building the project
app_name=da_registration app_name=registration
project_dir=$(CURDIR)/../$(app_name) project_dir=$(CURDIR)/../$(app_name)
build_dir=$(CURDIR)/build/artifacts build_dir=$(CURDIR)/build/artifacts

View File

@ -1,11 +1,11 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" <info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd"> xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
<id>da_registration</id> <id>registration</id>
<name>DA Registration</name> <name>DA Registration</name>
<namespace>Registration</namespace> <namespace>Registration</namespace>
<description></description> <description></description>
<version>1.5.0</version> <version>2.0.0</version>
<licence>agpl</licence> <licence>agpl</licence>
<types> <types>
<prevent_group_restriction /> <prevent_group_restriction />

View File

@ -5,8 +5,8 @@
"OCA\\Registration\\": "lib/" "OCA\\Registration\\": "lib/"
} }
}, },
"name": "nextcloud/da_registration", "name": "nextcloud/registration",
"description": "da_registration", "description": "registration",
"license": "AGPL", "license": "AGPL",
"require": { "require": {
}, },

View File

@ -1,10 +1,10 @@
#alternative-logins:not(.alternative-logins) .button.register-button { #alternative-logins:not(.alternative-logins) .button.register-button {
color: var(--color-primary-element); color: var(--color-primary-element);
background-color: red; background-color: blue;
} }
#alternative-logins.alternative-logins .button.register-button { #alternative-logins.alternative-logins .button.register-button {
color: red; color: red;
background-color: red; background-color: blue;
} }
#alternative-logins .register-button:only-child { #alternative-logins .register-button:only-child {

View File

@ -29,4 +29,4 @@ document.addEventListener('DOMContentLoaded', function () {
}); });
/******/ })() /******/ })()
; ;
//# sourceMappingURL=da_registration-form.js.map?v=f64a2674d0a4e7f46973 //# sourceMappingURL=registration-form.js.map?v=f64a2674d0a4e7f46973

View File

@ -1 +1 @@
{"version":3,"file":"da_registration-form.js?v=f64a2674d0a4e7f46973","sources":["webpack:///da_registration/src/form.js"],"sourcesContent":["\"use strict\";\n\ndocument.addEventListener('DOMContentLoaded', function () {\n var _this = this;\n\n // Password toggle\n $('#showadminpass').click(function (e) {\n e.preventDefault();\n var passwordTextField = $('#password');\n\n if (passwordTextField.attr('type') === 'password') {\n passwordTextField.attr('type', 'text');\n } else {\n passwordTextField.attr('type', 'password');\n }\n }); // Disable submit after first click\n\n $('form').submit(function () {\n // prevent duplicate form submissions\n $(_this).find(':submit').attr('disabled', 'disabled');\n $(_this).find(':submit')[0].value = t('registration', 'Loading …');\n });\n});"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;A","sourceRoot":""} {"version":3,"file":"registration-form.js?v=f64a2674d0a4e7f46973","sources":["webpack:///registration/src/form.js"],"sourcesContent":["\"use strict\";\n\ndocument.addEventListener('DOMContentLoaded', function () {\n var _this = this;\n\n // Password toggle\n $('#showadminpass').click(function (e) {\n e.preventDefault();\n var passwordTextField = $('#password');\n\n if (passwordTextField.attr('type') === 'password') {\n passwordTextField.attr('type', 'text');\n } else {\n passwordTextField.attr('type', 'password');\n }\n }); // Disable submit after first click\n\n $('form').submit(function () {\n // prevent duplicate form submissions\n $(_this).find(':submit').attr('disabled', 'disabled');\n $(_this).find(':submit')[0].value = t('registration', 'Loading …');\n });\n});"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;A","sourceRoot":""}

View File

@ -49806,4 +49806,4 @@ exports.app = app;
}(); }();
/******/ })() /******/ })()
; ;
//# sourceMappingURL=da_registration-settings.js.map?v=5d2e5fd936e0ae86b2d5 //# sourceMappingURL=registration-settings.js.map?v=5d2e5fd936e0ae86b2d5

File diff suppressed because one or more lines are too long

View File

@ -39902,7 +39902,7 @@ var render = function() {
[ [
_c( _c(
"SettingsSection", "SettingsSection",
{ attrs: { title: _vm.t("da_registration", "Registration settings") } }, { attrs: { title: _vm.t("registration", "Registration settings") } },
[ [
_c("p", [ _c("p", [
_c("input", { _c("input", {
@ -39953,7 +39953,7 @@ var render = function() {
}), }),
_vm._v(" "), _vm._v(" "),
_c("label", { attrs: { for: "admin_approval" } }, [ _c("label", { attrs: { for: "admin_approval" } }, [
_vm._v(_vm._s(_vm.t("da_registration", "Require admin approval"))) _vm._v(_vm._s(_vm.t("registration", "Require admin approval")))
]) ])
]), ]),
_vm._v(" "), _vm._v(" "),
@ -39961,7 +39961,7 @@ var render = function() {
_vm._v( _vm._v(
_vm._s( _vm._s(
_vm.t( _vm.t(
"da_registration", "registration",
'Enabling "admin approval" will prevent registrations from mobile and desktop clients to complete as the credentials cannot be verified by the client until the user was enabled.' 'Enabling "admin approval" will prevent registrations from mobile and desktop clients to complete as the credentials cannot be verified by the client until the user was enabled.'
) )
) )
@ -39975,7 +39975,7 @@ var render = function() {
_vm._v( _vm._v(
"\n\t\t\t\t" + "\n\t\t\t\t" +
_vm._s( _vm._s(
_vm.t("da_registration", "Registered users default group") _vm.t("registration", "Registered users default group")
) + ) +
"\n\t\t\t" "\n\t\t\t"
) )
@ -39984,7 +39984,7 @@ var render = function() {
_c("Multiselect", { _c("Multiselect", {
attrs: { attrs: {
id: "registered_user_group", id: "registered_user_group",
placeholder: _vm.t("da_registration", "Select group"), placeholder: _vm.t("registration", "Select group"),
options: _vm.groups, options: _vm.groups,
disabled: _vm.loading, disabled: _vm.loading,
searchable: true, searchable: true,
@ -40012,7 +40012,7 @@ var render = function() {
_vm._v(" "), _vm._v(" "),
_c( _c(
"SettingsSection", "SettingsSection",
{ attrs: { title: _vm.t("da_registration", "Email settings") } }, { attrs: { title: _vm.t("registration", "Email settings") } },
[ [
_c("p", [ _c("p", [
_c("label", { attrs: { for: "allowed_domains" } }, [ _c("label", { attrs: { for: "allowed_domains" } }, [
@ -40034,7 +40034,7 @@ var render = function() {
name: "allowed_domains", name: "allowed_domains",
disabled: _vm.loading, disabled: _vm.loading,
placeholder: "nextcloud.com;*.example.com", placeholder: "nextcloud.com;*.example.com",
"aria-label": _vm.t("da_registration", "Allowed email domain") "aria-label": _vm.t("registration", "Allowed email domain")
}, },
domProps: { value: _vm.allowedDomains }, domProps: { value: _vm.allowedDomains },
on: { on: {
@ -40103,7 +40103,7 @@ var render = function() {
_vm._v( _vm._v(
_vm._s( _vm._s(
_vm.t( _vm.t(
"da_registration", "registration",
"Block listed email domains instead of allowing them" "Block listed email domains instead of allowing them"
) )
) )
@ -40215,7 +40215,7 @@ var render = function() {
_vm._v(" "), _vm._v(" "),
_c("label", { attrs: { for: "disable_email_verification" } }, [ _c("label", { attrs: { for: "disable_email_verification" } }, [
_vm._v( _vm._v(
_vm._s(_vm.t("da_registration", "Disable email verification")) _vm._s(_vm.t("registration", "Disable email verification"))
) )
]) ])
]) ])
@ -40224,7 +40224,7 @@ var render = function() {
_vm._v(" "), _vm._v(" "),
_c( _c(
"SettingsSection", "SettingsSection",
{ attrs: { title: _vm.t("da_registration", "User settings") } }, { attrs: { title: _vm.t("registration", "User settings") } },
[ [
_c("p", [ _c("p", [
_c("input", { _c("input", {
@ -40276,7 +40276,7 @@ var render = function() {
_vm._v(" "), _vm._v(" "),
_c("label", { attrs: { for: "email_is_login" } }, [ _c("label", { attrs: { for: "email_is_login" } }, [
_vm._v( _vm._v(
_vm._s(_vm.t("da_registration", "Force email as login name")) _vm._s(_vm.t("registration", "Force email as login name"))
) )
]) ])
]), ]),
@ -40286,7 +40286,7 @@ var render = function() {
_c("p", [ _c("p", [
_c("label", { attrs: { for: "username_policy_regex" } }, [ _c("label", { attrs: { for: "username_policy_regex" } }, [
_vm._v( _vm._v(
_vm._s(_vm.t("da_registration", "Login name policy")) _vm._s(_vm.t("registration", "Login name policy"))
) )
]), ]),
_vm._v(" "), _vm._v(" "),
@ -40306,7 +40306,7 @@ var render = function() {
disabled: _vm.loading, disabled: _vm.loading,
placeholder: "E.g.: /^[a-z-]+\\.[a-z-]+$/", placeholder: "E.g.: /^[a-z-]+\\.[a-z-]+$/",
"aria-label": _vm.t( "aria-label": _vm.t(
"da_registration", "registration",
"Regular expression to validate login names" "Regular expression to validate login names"
) )
}, },
@ -40329,7 +40329,7 @@ var render = function() {
_vm._v( _vm._v(
_vm._s( _vm._s(
_vm.t( _vm.t(
"da_registration", "registration",
"If configured, login names will be validated through the regular expression. If the validation fails the user is prompted with a generic error. Make sure your regex is working correctly." "If configured, login names will be validated through the regular expression. If the validation fails the user is prompted with a generic error. Make sure your regex is working correctly."
) )
) )
@ -40387,7 +40387,7 @@ var render = function() {
}), }),
_vm._v(" "), _vm._v(" "),
_c("label", { attrs: { for: "show_fullname" } }, [ _c("label", { attrs: { for: "show_fullname" } }, [
_vm._v(_vm._s(_vm.t("da_registration", "Show full name field"))) _vm._v(_vm._s(_vm.t("registration", "Show full name field")))
]) ])
]), ]),
_vm._v(" "), _vm._v(" "),
@ -40442,7 +40442,7 @@ var render = function() {
_vm._v(" "), _vm._v(" "),
_c("label", { attrs: { for: "enforce_fullname" } }, [ _c("label", { attrs: { for: "enforce_fullname" } }, [
_vm._v( _vm._v(
_vm._s(_vm.t("da_registration", "Enforce full name field")) _vm._s(_vm.t("registration", "Enforce full name field"))
) )
]) ])
]) ])
@ -40498,7 +40498,7 @@ var render = function() {
}), }),
_vm._v(" "), _vm._v(" "),
_c("label", { attrs: { for: "show_phone" } }, [ _c("label", { attrs: { for: "show_phone" } }, [
_vm._v(_vm._s(_vm.t("da_registration", "Show phone field"))) _vm._v(_vm._s(_vm.t("registration", "Show phone field")))
]) ])
]) ])
: _vm._e(), : _vm._e(),
@ -40554,7 +40554,7 @@ var render = function() {
_vm._v(" "), _vm._v(" "),
_c("label", { attrs: { for: "enforce_phone" } }, [ _c("label", { attrs: { for: "enforce_phone" } }, [
_vm._v( _vm._v(
_vm._s(_vm.t("da_registration", "Enforce phone field")) _vm._s(_vm.t("registration", "Enforce phone field"))
) )
]) ])
]) ])
@ -40567,9 +40567,9 @@ var render = function() {
"SettingsSection", "SettingsSection",
{ {
attrs: { attrs: {
title: _vm.t("da_registration", "User instructions"), title: _vm.t("registration", "User instructions"),
description: _vm.t( description: _vm.t(
"da_registration", "registration",
"Caution: The user instructions will not be translated and will therefore be displayed as configured below for all users regardless of their actual language." "Caution: The user instructions will not be translated and will therefore be displayed as configured below for all users regardless of their actual language."
) )
} }
@ -40577,7 +40577,7 @@ var render = function() {
[ [
_c("h3", [ _c("h3", [
_vm._v( _vm._v(
_vm._s(_vm.t("da_registration", "Registration form instructions")) _vm._s(_vm.t("registration", "Registration form instructions"))
) )
]), ]),
_vm._v(" "), _vm._v(" "),
@ -40598,7 +40598,7 @@ var render = function() {
placeholder: placeholder:
"Please create your username following the scheme 'firstname.lastname'.", "Please create your username following the scheme 'firstname.lastname'.",
"aria-label": _vm.t( "aria-label": _vm.t(
"da_registration", "registration",
"A short message that is shown to the user in the registration process." "A short message that is shown to the user in the registration process."
) )
}, },
@ -40621,7 +40621,7 @@ var render = function() {
_vm._v( _vm._v(
_vm._s( _vm._s(
_vm.t( _vm.t(
"da_registration", "registration",
"Add additional user instructions (e.g. for choosing their login name). If configured the text is displayed in the account creation step of the registration process." "Add additional user instructions (e.g. for choosing their login name). If configured the text is displayed in the account creation step of the registration process."
) )
) )
@ -40631,7 +40631,7 @@ var render = function() {
_c("h3", [ _c("h3", [
_vm._v( _vm._v(
_vm._s( _vm._s(
_vm.t("da_registration", "Verification email instructions") _vm.t("registration", "Verification email instructions")
) )
) )
]), ]),
@ -40653,7 +40653,7 @@ var render = function() {
placeholder: placeholder:
"Please create your username following the scheme 'firstname.lastname'.", "Please create your username following the scheme 'firstname.lastname'.",
"aria-label": _vm.t( "aria-label": _vm.t(
"da_registration", "registration",
"A short message that is shown to the user in the verification email." "A short message that is shown to the user in the verification email."
) )
}, },
@ -40676,7 +40676,7 @@ var render = function() {
_vm._v( _vm._v(
_vm._s( _vm._s(
_vm.t( _vm.t(
"da_registration", "registration",
"Add additional user instructions (e.g. for choosing their login name). If configured the text is embedded in the verification-email." "Add additional user instructions (e.g. for choosing their login name). If configured the text is embedded in the verification-email."
) )
) )

File diff suppressed because one or more lines are too long

View File

@ -13,7 +13,7 @@ use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext; use OCP\AppFramework\Bootstrap\IRegistrationContext;
class Application extends App implements IBootstrap { class Application extends App implements IBootstrap {
public const APP_ID = 'da_registration'; public const APP_ID = 'registration';
public function __construct() { public function __construct() {
parent::__construct(self::APP_ID); parent::__construct(self::APP_ID);

View File

@ -2,6 +2,17 @@
declare(strict_types=1); declare(strict_types=1);
/**
* ownCloud - registration
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Pellaeon Lin <pellaeon@hs.ntnu.edu.tw>
* @author Julius Härtl <jus@bitgrid.net>
* @author 2020 Joas Schilling <coding@schilljs.com>
* @copyright Pellaeon Lin 2014
*/
namespace OCA\Registration\Controller; namespace OCA\Registration\Controller;

View File

@ -1,5 +1,14 @@
<?php <?php
/**
* ownCloud - registration
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Pellaeon Lin <pellaeon@cnmc.tw>
* @author Julius Härtl <jus@bitgrid.net>
* @copyright Pellaeon Lin 2015
*/
namespace OCA\Registration\Controller; namespace OCA\Registration\Controller;

8
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "da_registration", "name": "registration",
"version": "1.0.0", "version": "2.0.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "da_registration", "name": "registration",
"version": "1.0.0", "version": "2.0.0",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"dependencies": { "dependencies": {
"@nextcloud/axios": "^1.6.0", "@nextcloud/axios": "^1.6.0",

View File

@ -1,5 +1,5 @@
{ {
"name": "da_registration", "name": "registration",
"version": "1.0.0", "version": "1.0.0",
"description": "", "description": "",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",

View File

@ -2,6 +2,6 @@
/** @var array $_ */ /** @var array $_ */
/** @var \OCP\IL10N $l */ /** @var \OCP\IL10N $l */
script('registration', 'registration-settings'); script('registration', 'registration-settings');
style('da_registration', 'settings'); style('registration', 'settings');
?> ?>
<div id="registration_settings_form"></div> <div id="registration_settings_form"></div>

View File

@ -1,7 +1,7 @@
<?php <?php
/** @var array $_ */ /** @var array $_ */
/** @var \OCP\IL10N $l */ /** @var \OCP\IL10N $l */
style('da_registration', 'style'); style('registration', 'style');
?> ?>
<div class="error"> <div class="error">
<h2><?php p($l->t('Approval required')) ?></h2> <h2><?php p($l->t('Approval required')) ?></h2>