Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
80887202
Commit
80887202
authored
Feb 14, 2012
by
Hugh Davenport
Committed by
Gerrit Code Review
Feb 14, 2012
Browse files
Merge "Display locked email as uneditable on Edit profile page (bug #917935)"
parents
17d64420
61c9b6eb
Changes
3
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/internal/index.php
View file @
80887202
...
...
@@ -134,6 +134,9 @@ foreach ( $element_list as $element => $type ) {
if
(
isset
(
$lockedfields
[
$element
])
&&
!
$USER
->
get
(
'admin'
))
{
$items
[
$element
][
'disabled'
]
=
true
;
if
(
$element
==
'email'
)
{
$items
[
$element
][
'help'
]
=
false
;
}
}
}
...
...
htdocs/lib/form/elements/emaillist.php
View file @
80887202
...
...
@@ -71,6 +71,7 @@ function pieform_element_emaillist(Pieform $form, $element) {
$smarty
->
assign
(
'name'
,
$element
[
'name'
]);
$smarty
->
assign
(
'addbuttonstr'
,
get_string
(
'addbutton'
,
'artefact.internal'
));
$smarty
->
assign
(
'validationemailstr'
,
json_encode
(
get_string
(
'validationemailwillbesent'
,
'artefact.internal'
)));
$smarty
->
assign
(
'disabled'
,
!
empty
(
$element
[
'disabled'
]));
return
$smarty
->
fetch
(
'form/emaillist.tpl'
);
}
...
...
htdocs/theme/raw/templates/form/emaillist.tpl
View file @
80887202
{{
if
$disabled
}}
{
{
foreach
from
=
$validated
item
=
email
}
}
<div
class=
"validated"
>
<label>
<input
disabled
{
{
if
$email
==
$default
}
}
checked
{
{/
if
}
}
type=
"radio"
name=
"{
{
$name
}
}_locked"
value=
"{
{
$email
}
}"
>
{
{
$email
}
}
</label>
</div>
<input
type=
"hidden"
name=
"{
{
$name
}
}_valid[]"
value=
"{
{
$email
}
}"
>
{
{
if
$email
==
$default
}
}
<input
type=
"hidden"
name=
"{
{
$name
}
}_selected"
value=
"{
{
$email
}
}"
>
{
{/
if
}
}
{
{/
foreach
}
}
{
{
foreach
from
=
$unvalidated
item
=
email
}
}
<div
class=
"unvalidated"
>
{
{
$email
}
}
</div>
<input
type=
"hidden"
name=
"{
{
$name
}
}_invalid[]"
value=
"{
{
$email
}
}"
>
{
{/
foreach
}
}
{
{
else
}
}
<script
type=
"text/javascript"
>
var
{
{
$name
}
}
_newrefinput
=
null
;
var
{
{
$name
}
}
_newref
=
null
;
...
...
@@ -79,3 +95,4 @@
{
{/
foreach
}
}
</div>
<a
href=
""
onclick=
"{
{
$name
}
}_new(); return false;"
>
{
{
str
tag
=
"addemail"
}
}
</a>
{
{/
if
}
}
Write
Preview
Supports
Markdown
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