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
00684956
Commit
00684956
authored
Sep 14, 2018
by
pupi1985
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add email field type to forms
parent
1a9496fd
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
39 additions
and
22 deletions
+39
-22
format.php
qa-include/app/format.php
+1
-0
account.php
qa-include/pages/account.php
+1
-1
feedback.php
qa-include/pages/feedback.php
+3
-3
forgot.php
qa-include/pages/forgot.php
+1
-0
login.php
qa-include/pages/login.php
+1
-0
register.php
qa-include/pages/register.php
+1
-0
user-profile.php
qa-include/pages/user-profile.php
+1
-1
qa-install.php
qa-include/qa-install.php
+1
-1
qa-theme-base.php
qa-include/qa-theme-base.php
+9
-0
qa-styles.css
qa-theme/Candy/qa-styles.css
+4
-4
qa-styles.css
qa-theme/Classic/qa-styles.css
+4
-4
qa-styles.css
qa-theme/Snow/qa-styles.css
+4
-4
qa-theme.php
qa-theme/Snow/qa-theme.php
+3
-1
qa-styles.css
qa-theme/SnowFlat/qa-styles.css
+2
-2
qa-theme.php
qa-theme/SnowFlat/qa-theme.php
+3
-1
No files found.
qa-include/app/format.php
View file @
00684956
...
...
@@ -1917,6 +1917,7 @@ function qa_set_up_notify_fields(&$qa_content, &$fields, $basetype, $login_email
$fields
[
'notify'
][
'tight'
]
=
true
;
$fields
[
'email'
]
=
array
(
'type'
=>
'email'
,
'id'
=>
$fieldprefix
.
'email_display'
,
'tags'
=>
'name="'
.
$fieldprefix
.
'email" id="'
.
$fieldprefix
.
'email"'
,
'value'
=>
qa_html
(
$inemail
),
...
...
qa-include/pages/account.php
View file @
00684956
...
...
@@ -279,7 +279,7 @@ $qa_content['form_profile'] = array(
'value'
=>
qa_html
(
isset
(
$inemail
)
?
$inemail
:
$useraccount
[
'email'
]),
'error'
=>
isset
(
$errors
[
'email'
])
?
qa_html
(
$errors
[
'email'
])
:
(
$pending_confirmation
?
qa_insert_login_links
(
qa_lang_html
(
'users/email_please_confirm'
))
:
null
),
'type'
=>
$pending_confirmation
?
'
text'
:
(
$isblocked
?
'static'
:
'text
'
),
'type'
=>
$pending_confirmation
?
'
email'
:
(
$isblocked
?
'static'
:
'email
'
),
),
'messages'
=>
array
(
...
...
qa-include/pages/feedback.php
View file @
00684956
...
...
@@ -132,7 +132,7 @@ $qa_content['form'] = array(
'fields'
=>
array
(
'message'
=>
array
(
'type'
=>
$feedbacksent
?
'static'
:
''
,
'type'
=>
$feedbacksent
?
'static'
:
'
text
'
,
'label'
=>
qa_lang_html_sub
(
'misc/feedback_message'
,
qa_opt
(
'site_title'
)),
'tags'
=>
'name="message" id="message"'
,
'value'
=>
qa_html
(
@
$inmessage
),
...
...
@@ -141,14 +141,14 @@ $qa_content['form'] = array(
),
'name'
=>
array
(
'type'
=>
$feedbacksent
?
'static'
:
''
,
'type'
=>
$feedbacksent
?
'static'
:
'
text
'
,
'label'
=>
qa_lang_html
(
'misc/feedback_name'
),
'tags'
=>
'name="name"'
,
'value'
=>
qa_html
(
isset
(
$inname
)
?
$inname
:
@
$userprofile
[
'name'
]),
),
'email'
=>
array
(
'type'
=>
$feedbacksent
?
'static'
:
''
,
'type'
=>
$feedbacksent
?
'static'
:
'
email
'
,
'label'
=>
qa_lang_html
(
'misc/feedback_email'
),
'tags'
=>
'name="email"'
,
'value'
=>
qa_html
(
isset
(
$inemail
)
?
$inemail
:
qa_get_logged_in_email
()),
...
...
qa-include/pages/forgot.php
View file @
00684956
...
...
@@ -89,6 +89,7 @@ $qa_content['form'] = array(
'fields'
=>
array
(
'email_handle'
=>
array
(
'type'
=>
qa_opt
(
'allow_login_email_only'
)
?
'email'
:
'text'
,
'label'
=>
qa_opt
(
'allow_login_email_only'
)
?
qa_lang_html
(
'users/email_label'
)
:
qa_lang_html
(
'users/email_handle_label'
),
'tags'
=>
'name="emailhandle" id="emailhandle"'
,
'value'
=>
qa_html
(
@
$inemailhandle
),
...
...
qa-include/pages/login.php
View file @
00684956
...
...
@@ -150,6 +150,7 @@ $qa_content['form'] = array(
'fields'
=>
array
(
'email_handle'
=>
array
(
'type'
=>
qa_opt
(
'allow_login_email_only'
)
?
'email'
:
'text'
,
'label'
=>
qa_opt
(
'allow_login_email_only'
)
?
qa_lang_html
(
'users/email_label'
)
:
qa_lang_html
(
'users/email_handle_label'
),
'tags'
=>
'name="emailhandle" id="emailhandle" dir="auto"'
,
'value'
=>
qa_html
(
@
$inemailhandle
),
...
...
qa-include/pages/register.php
View file @
00684956
...
...
@@ -169,6 +169,7 @@ $qa_content['form'] = array(
),
'email'
=>
array
(
'type'
=>
'email'
,
'label'
=>
qa_lang_html
(
'users/email_label'
),
'tags'
=>
'name="email" id="email" dir="auto"'
,
'value'
=>
qa_html
(
@
$inemail
),
...
...
qa-include/pages/user-profile.php
View file @
00684956
...
...
@@ -550,7 +550,7 @@ if (!QA_FINAL_EXTERNAL_USERS) {
$htmlemail
=
qa_html
(
isset
(
$inemail
)
?
$inemail
:
$useraccount
[
'email'
]);
$qa_content
[
'form_profile'
][
'fields'
][
'email'
]
=
array
(
'type'
=>
$userediting
?
'
text
'
:
'static'
,
'type'
=>
$userediting
?
'
email
'
:
'static'
,
'label'
=>
qa_lang_html
(
'users/email_label'
),
'tags'
=>
'name="email"'
,
'value'
=>
$userediting
?
$htmlemail
:
(
'<a href="mailto:'
.
$htmlemail
.
'">'
.
$htmlemail
.
'</a>'
),
...
...
qa-include/qa-install.php
View file @
00684956
...
...
@@ -278,7 +278,7 @@ if (qa_db_connection(false) !== null && !@$pass_failure_from_install) {
$fields
=
array
(
'handle'
=>
array
(
'label'
=>
'Username:'
,
'type'
=>
'text'
),
'password'
=>
array
(
'label'
=>
'Password:'
,
'type'
=>
'password'
),
'email'
=>
array
(
'label'
=>
'Email address:'
,
'type'
=>
'
text
'
),
'email'
=>
array
(
'label'
=>
'Email address:'
,
'type'
=>
'
email
'
),
);
$buttons
=
array
(
'super'
=>
'Set up the Super Administrator'
);
}
...
...
qa-include/qa-theme-base.php
View file @
00684956
...
...
@@ -1181,6 +1181,10 @@ class qa_html_theme_base
$this
->
form_image
(
$field
,
$style
);
break
;
case
'email'
:
$this
->
form_email
(
$field
,
$style
);
break
;
case
'custom'
:
$this
->
output_raw
(
@
$field
[
'html'
]);
break
;
...
...
@@ -1375,6 +1379,11 @@ class qa_html_theme_base
$this
->
output
(
'<div class="qa-form-'
.
$style
.
'-image">'
.
@
$field
[
'html'
]
.
'</div>'
);
}
public
function
form_email
(
$field
,
$style
)
{
$this
->
output
(
'<input '
.
@
$field
[
'tags'
]
.
' type="email" value="'
.
@
$field
[
'value'
]
.
'" class="qa-form-'
.
$style
.
'-email"/>'
);
}
public
function
form_text_single_row
(
$field
,
$style
)
{
$this
->
output
(
'<input '
.
@
$field
[
'tags'
]
.
' type="text" value="'
.
@
$field
[
'value'
]
.
'" class="qa-form-'
.
$style
.
'-text"/>'
);
...
...
qa-theme/Candy/qa-styles.css
View file @
00684956
...
...
@@ -152,8 +152,8 @@ h2 {font-size:22px; color:#c659ab; padding-top:12px; clear:both;}
.qa-form-tall-ok
{
color
:
#090
;
font-size
:
18px
;
padding
:
6px
;
text-align
:
center
;}
.qa-form-tall-label
{
background
:
url(form-cell-bg.png)
repeat-y
scroll
left
top
transparent
;
border-top
:
6px
solid
#fff
;
color
:
#253845
;
padding
:
8px
;
font-size
:
14px
;}
.qa-form-tall-data
{
background
:
url(form-cell-bg.png)
repeat-y
scroll
left
top
transparent
;
padding
:
8px
;
width
:
480px
;}
.qa-form-tall-text
,
.qa-form-tall-number
{
padding
:
3px
;}
.qa-form-tall-text
{
width
:
480px
;
border
:
1px
solid
#999
;
font-size
:
16px
;}
.qa-form-tall-text
,
.qa-form-tall-number
,
.qa-form-tall-email
{
padding
:
3px
;}
.qa-form-tall-text
,
.qa-form-tall-email
{
width
:
480px
;
border
:
1px
solid
#999
;
font-size
:
16px
;}
.qa-form-tall-number
{
width
:
48px
;
border
:
1px
solid
#999
;}
.qa-form-tall-checkbox
{
float
:
left
;
margin-right
:
4px
;}
.qa-form-tall-image
{
text-align
:
center
;
margin-top
:
12px
;}
...
...
@@ -174,8 +174,8 @@ h2 {font-size:22px; color:#c659ab; padding-top:12px; clear:both;}
.qa-form-wide-ok
{
color
:
#090
;
font-size
:
18px
;
padding
:
6px
;
text-align
:
center
;}
.qa-form-wide-label
{
border-bottom
:
2px
solid
#FFF
;
color
:
#253845
;
padding
:
10px
;
font-size
:
14px
;
font-weight
:
normal
;
white-space
:
nowrap
;}
.qa-form-wide-data
{
border-bottom
:
2px
solid
#FFF
;
padding
:
6px
10px
;}
.qa-form-wide-text
,
.qa-form-wide-number
{
padding
:
3px
;}
.qa-form-wide-text
{
width
:
320px
;
border
:
1px
solid
#999
;}
.qa-form-wide-text
,
.qa-form-wide-number
,
.qa-form-wide-email
{
padding
:
3px
;}
.qa-form-wide-text
,
.qa-form-wide-email
{
width
:
320px
;
border
:
1px
solid
#999
;}
.qa-form-wide-number
{
width
:
48px
;
border
:
1px
solid
#999
;
vertical-align
:
middle
;}
.qa-form-wide-error
{
display
:
inline-block
;
color
:
#c00
;
font-size
:
11px
;
margin-left
:
6px
;}
.qa-form-wide-note
{
font-size
:
10px
;
margin-left
:
4px
;
color
:
#666
;}
...
...
qa-theme/Classic/qa-styles.css
View file @
00684956
...
...
@@ -153,8 +153,8 @@ h2 {font-size:16px; padding-top:12px; clear:both;}
.qa-form-tall-ok
{
background
:
#efe
;
border
:
1px
solid
#090
;
color
:
#090
;
font-size
:
18px
;
padding
:
6px
;
text-align
:
center
;}
.qa-form-tall-label
{
color
:
#253845
;
padding
:
12px
8px
2px
8px
;
font-size
:
13px
;
font-weight
:
bold
;}
.qa-form-tall-data
{
padding
:
0
8px
6px
8px
;
width
:
480px
;}
.qa-form-tall-text
,
.qa-form-tall-number
{
padding
:
3px
;}
.qa-form-tall-text
{
width
:
480px
;
border
:
1px
solid
#658296
;}
.qa-form-tall-text
,
.qa-form-tall-number
,
.qa-form-tall-email
{
padding
:
3px
;}
.qa-form-tall-text
,
.qa-form-tall-email
{
width
:
480px
;
border
:
1px
solid
#658296
;}
.qa-form-tall-number
{
width
:
48px
;
border
:
1px
solid
#658296
;}
.qa-form-tall-checkbox
{
float
:
left
;
margin-right
:
6px
;}
.qa-form-tall-image
{
text-align
:
center
;
margin-top
:
12px
;}
...
...
@@ -173,8 +173,8 @@ h2 {font-size:16px; padding-top:12px; clear:both;}
.qa-form-wide-ok
{
background
:
#efe
;
border
:
1px
solid
#090
;
color
:
#090
;
font-size
:
16px
;
padding
:
6px
;
text-align
:
center
;}
.qa-form-wide-label
{
color
:
#253845
;
padding
:
6px
10px
;
font-size
:
13px
;
font-weight
:
bold
;
white-space
:
nowrap
;}
.qa-form-wide-data
{
padding
:
6px
10px
;}
.qa-form-wide-text
,
.qa-form-wide-number
{
padding
:
3px
;}
.qa-form-wide-text
{
width
:
320px
;
border
:
1px
solid
#658296
;}
.qa-form-wide-text
,
.qa-form-wide-number
,
.qa-form-wide-email
{
padding
:
3px
;}
.qa-form-wide-text
,
.qa-form-wide-email
{
width
:
320px
;
border
:
1px
solid
#658296
;}
.qa-form-wide-number
{
width
:
48px
;
border
:
1px
solid
#658296
;
vertical-align
:
middle
;}
.qa-form-wide-error
{
display
:
inline-block
;
background
:
#fee
;
border
:
1px
solid
#c00
;
color
:
#c00
;
font-size
:
11px
;
margin-left
:
6px
;
padding
:
.5em
;}
.qa-form-wide-note
{
font-size
:
10px
;
margin-left
:
4px
;}
...
...
qa-theme/Snow/qa-styles.css
View file @
00684956
...
...
@@ -1236,11 +1236,11 @@ div.header-banner {
margin-top
:
0
;
}
.qa-form-tall-text
,
.qa-form-tall-number
{
.qa-form-tall-text
,
.qa-form-tall-number
,
.qa-form-tall-email
{
padding
:
3px
;
}
.qa-form-tall-text
{
.qa-form-tall-text
,
.qa-form-tall-email
{
background
:
#fff
;
color
:
#666
;
width
:
100%
;
...
...
@@ -1376,11 +1376,11 @@ div.header-banner {
padding
:
6px
10px
;
}
.qa-form-wide-text
,
.qa-form-wide-number
{
.qa-form-wide-text
,
.qa-form-wide-number
,
.qa-form-wide-email
{
padding
:
3px
;
}
.qa-form-wide-text
{
.qa-form-wide-text
,
.qa-form-wide-email
{
background
:
#fff
;
width
:
320px
;
border
:
1px
solid
#ccc
;
...
...
qa-theme/Snow/qa-theme.php
View file @
00684956
...
...
@@ -12,9 +12,11 @@ class qa_html_theme extends qa_html_theme_base
if
(
!
qa_is_logged_in
())
{
if
(
isset
(
$this
->
content
[
'navigation'
][
'user'
][
'login'
])
&&
!
QA_FINAL_EXTERNAL_USERS
)
{
$login
=
$this
->
content
[
'navigation'
][
'user'
][
'login'
];
$emailOnly
=
qa_opt
(
'allow_login_email_only'
);
$inputType
=
$emailOnly
?
'email'
:
'text'
;
$this
->
output
(
'<form class="qam-login-form" action="'
.
$login
[
'url'
]
.
'" method="post">'
,
'<input type="
text" class="qam-login-text" name="emailhandle" dir="auto" placeholder="'
.
trim
(
qa_lang_html
(
qa_opt
(
'allow_login_email_only'
)
?
'users/email_label'
:
'users/email_handle_label'
),
':'
)
.
'"/>'
,
'<input type="
'
.
$inputType
.
'" class="qam-login-text" name="emailhandle" dir="auto" placeholder="'
.
trim
(
qa_lang_html
(
$emailOnly
?
'users/email_label'
:
'users/email_handle_label'
),
':'
)
.
'"/>'
,
'<input type="password" class="qam-login-text" name="password" dir="auto" placeholder="'
.
trim
(
qa_lang_html
(
'users/password_label'
),
':'
)
.
'"/>'
,
'<div class="qam-rememberbox"><input type="checkbox" name="remember" id="qam-rememberme" value="1"/>'
,
'<label for="qam-rememberme" class="qam-remember">'
.
qa_lang_html
(
'users/remember'
)
.
'</label></div>'
,
...
...
qa-theme/SnowFlat/qa-styles.css
View file @
00684956
...
...
@@ -1821,7 +1821,7 @@ input[type="submit"], button {
margin-top
:
0
;
}
.qa-form-tall-text
{
.qa-form-tall-text
,
.qa-form-tall-email
{
width
:
100%
;
}
...
...
@@ -1909,7 +1909,7 @@ input[type="submit"], button {
.qa-form-wide-data
{
padding-left
:
5px
;
}
.qa-form-wide-text
{
.qa-form-wide-text
,
.qa-form-wide-email
{
width
:
100%
;
}
...
...
qa-theme/SnowFlat/qa-theme.php
View file @
00684956
...
...
@@ -182,9 +182,11 @@ class qa_html_theme extends qa_html_theme_base
if
(
!
qa_is_logged_in
())
{
if
(
isset
(
$this
->
content
[
'navigation'
][
'user'
][
'login'
])
&&
!
QA_FINAL_EXTERNAL_USERS
)
{
$login
=
$this
->
content
[
'navigation'
][
'user'
][
'login'
];
$emailOnly
=
qa_opt
(
'allow_login_email_only'
);
$inputType
=
$emailOnly
?
'email'
:
'text'
;
$this
->
output
(
'<form action="'
.
$login
[
'url'
]
.
'" method="post">'
,
'<input type="
text" name="emailhandle" dir="auto" placeholder="'
.
trim
(
qa_lang_html
(
qa_opt
(
'allow_login_email_only'
)
?
'users/email_label'
:
'users/email_handle_label'
),
':'
)
.
'"/>'
,
'<input type="
'
.
$inputType
.
'" name="emailhandle" dir="auto" placeholder="'
.
trim
(
qa_lang_html
(
$emailOnly
?
'users/email_label'
:
'users/email_handle_label'
),
':'
)
.
'"/>'
,
'<input type="password" name="password" dir="auto" placeholder="'
.
trim
(
qa_lang_html
(
'users/password_label'
),
':'
)
.
'"/>'
,
'<div><input type="checkbox" name="remember" id="qam-rememberme" value="1"/>'
,
'<label for="qam-rememberme">'
.
qa_lang_html
(
'users/remember'
)
.
'</label></div>'
,
...
...
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