Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
bc8b48cc
Commit
bc8b48cc
authored
Sep 23, 2014
by
Scott Vivian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add T&C checkbox to register page
parent
cd625221
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
9 deletions
+25
-9
qa-lang-users.php
qa-include/qa-lang-users.php
+1
-0
qa-page-register.php
qa-include/qa-page-register.php
+24
-9
No files found.
qa-include/qa-lang-users.php
View file @
bc8b48cc
...
...
@@ -128,6 +128,7 @@
'send_reset_button'
=>
'Send Reset Password Email'
,
'send_reset_note'
=>
'A message will be sent to your email address with instructions.'
,
'special_users'
=>
'Special users'
,
'terms_not_accepted'
=>
'You must tick this.'
,
'unblock_user_button'
=>
'Unblock User'
,
'unsubscribe_complete'
=>
'You have been unsubscribed from mass mailings sent out by ^0. You may resubscribe at any time via your ^1account^2 page.'
,
'unsubscribe_title'
=>
'Unsubscribe'
,
...
...
qa-include/qa-page-register.php
View file @
bc8b48cc
...
...
@@ -80,6 +80,7 @@
$inemail
=
qa_post_text
(
'email'
);
$inpassword
=
qa_post_text
(
'password'
);
$inhandle
=
qa_post_text
(
'handle'
);
$interms
=
(
int
)
qa_post_text
(
'terms'
);
$inprofile
=
array
();
foreach
(
$userfields
as
$userfield
)
...
...
@@ -94,6 +95,9 @@
qa_password_validate
(
$inpassword
)
);
if
(
!
$interms
)
$errors
[
'terms'
]
=
qa_lang_html
(
'users/terms_not_accepted'
);
if
(
count
(
$inprofile
))
{
$filtermodules
=
qa_load_modules_with
(
'filter'
,
'filter_profile'
);
foreach
(
$filtermodules
as
$filtermodule
)
...
...
@@ -137,19 +141,12 @@
$qa_content
[
'error'
]
=
@
$pageerror
;
$custom
=
qa_opt
(
'show_custom_register'
)
?
trim
(
qa_opt
(
'custom_register'
))
:
''
;
$qa_content
[
'form'
]
=
array
(
'tags'
=>
'method="post" action="'
.
qa_self_html
()
.
'"'
,
'style'
=>
'tall'
,
'fields'
=>
array
(
'custom'
=>
array
(
'type'
=>
'custom'
,
'note'
=>
$custom
,
),
'handle'
=>
array
(
'label'
=>
qa_lang_html
(
'users/handle_label'
),
'tags'
=>
'name="handle" id="handle"'
,
...
...
@@ -187,8 +184,26 @@
),
);
if
(
!
strlen
(
$custom
))
unset
(
$qa_content
[
'form'
][
'fields'
][
'custom'
]);
// prepend custom message
$custom
=
qa_opt
(
'show_custom_register'
)
?
trim
(
qa_opt
(
'custom_register'
))
:
''
;
if
(
strlen
(
$custom
))
{
array_unshift
(
$qa_content
[
'form'
][
'fields'
],
array
(
'type'
=>
'custom'
,
'note'
=>
$custom
,
));
}
// show terms/conditions checkbox
$terms
=
qa_opt
(
'show_register_terms'
)
?
trim
(
qa_opt
(
'register_terms'
))
:
''
;
if
(
strlen
(
$terms
))
{
$qa_content
[
'form'
][
'fields'
][
'terms'
]
=
array
(
'type'
=>
'checkbox'
,
'label'
=>
$terms
,
'tags'
=>
'name="terms" id="terms"'
,
'value'
=>
qa_html
(
@
$interms
),
'error'
=>
qa_html
(
@
$errors
[
'terms'
]),
);
}
foreach
(
$userfields
as
$userfield
)
{
$value
=
@
$inprofile
[
$userfield
[
'fieldid'
]];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment