mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-05 04:46:03 +01:00
more progress with the registration
This commit is contained in:
@@ -185,6 +185,9 @@ class AdminPlugin extends Plugin
|
|||||||
|
|
||||||
$self = $this;
|
$self = $this;
|
||||||
|
|
||||||
|
// make sure page is not frozen!
|
||||||
|
unset($this->grav['page']);
|
||||||
|
|
||||||
// Replace page service with admin.
|
// Replace page service with admin.
|
||||||
$this->grav['page'] = function () use ($self) {
|
$this->grav['page'] = function () use ($self) {
|
||||||
$page = new Page;
|
$page = new Page;
|
||||||
|
|||||||
@@ -220,6 +220,13 @@ class AdminController
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function taskRegister()
|
||||||
|
{
|
||||||
|
$data = $this->post;
|
||||||
|
$this->admin->setMessage('Registration Failed', 'error');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle logout.
|
* Handle logout.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -173,6 +173,7 @@ en:
|
|||||||
USERNAME: "Username"
|
USERNAME: "Username"
|
||||||
EMAIL: "Email"
|
EMAIL: "Email"
|
||||||
PASSWORD: "Password"
|
PASSWORD: "Password"
|
||||||
|
PASSWORD_CONFIRM: "Confirm Password"
|
||||||
TITLE: "Title"
|
TITLE: "Title"
|
||||||
LANGUAGE: "Language"
|
LANGUAGE: "Language"
|
||||||
ACCOUNT: "Account"
|
ACCOUNT: "Account"
|
||||||
|
|||||||
@@ -7,27 +7,33 @@ form:
|
|||||||
|
|
||||||
- name: username
|
- name: username
|
||||||
type: text
|
type: text
|
||||||
placeholder: "Choose a username"
|
placeholder: PLUGIN_ADMIN.USERNAME
|
||||||
validate:
|
validate:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
- name: email
|
- name: email
|
||||||
type: text
|
type: text
|
||||||
placeholder: "Enter your email"
|
placeholder: PLUGIN_ADMIN.EMAIL
|
||||||
validate:
|
validate:
|
||||||
|
type: email
|
||||||
|
message: PLUGIN_ADMIN.EMAIL_VALIDATION_MESSAGE
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
- name: password1
|
- name: password1
|
||||||
type: password
|
type: password
|
||||||
placeholder: Enter password
|
placeholder: PLUGIN_ADMIN.PASSWORD
|
||||||
validate:
|
validate:
|
||||||
required: true
|
required: true
|
||||||
|
message: PLUGIN_ADMIN.PASSWORD_VALIDATION_MESSAGE
|
||||||
|
pattern: '(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}'
|
||||||
|
|
||||||
- name: password2
|
- name: password2
|
||||||
type: password
|
type: password
|
||||||
placeholder: Confirm password
|
placeholder: PLUGIN_ADMIN.PASSWORD_CONFIRM
|
||||||
validate:
|
validate:
|
||||||
required: true
|
required: true
|
||||||
|
message: PLUGIN_ADMIN.PASSWORD_VALIDATION_MESSAGE
|
||||||
|
pattern: '(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}'
|
||||||
|
|
||||||
- name: spacer
|
- name: spacer
|
||||||
title: Optional
|
title: Optional
|
||||||
@@ -35,18 +41,11 @@ form:
|
|||||||
|
|
||||||
- name: fullname
|
- name: fullname
|
||||||
type: text
|
type: text
|
||||||
placeholder: "Enter your full name"
|
placeholder: PLUGIN_ADMIN.FULL_NAME
|
||||||
|
|
||||||
- name: title
|
- name: title
|
||||||
type: text
|
type: text
|
||||||
placeholder: "Enter a title"
|
placeholder: PLUGIN_ADMIN.TITLE
|
||||||
|
|
||||||
|
|
||||||
buttons:
|
|
||||||
- type: submit
|
|
||||||
value: Submit
|
|
||||||
- type: reset
|
|
||||||
value: Reset
|
|
||||||
|
|
||||||
process:
|
process:
|
||||||
register_user:
|
register_user:
|
||||||
|
|||||||
Reference in New Issue
Block a user