reveal the profile name field only if multi prifiles feature is enabled
This commit is contained in:
parent
fa3e7a574f
commit
75721b7e82
@ -655,7 +655,7 @@ class Profiles extends \Zotlabs\Web\Controller {
|
|||||||
intval($id),
|
intval($id),
|
||||||
intval(local_channel())
|
intval(local_channel())
|
||||||
);
|
);
|
||||||
if(! count($r)) {
|
if(! $r) {
|
||||||
notice( t('Profile not found.') . EOL);
|
notice( t('Profile not found.') . EOL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -712,13 +712,10 @@ class Profiles extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
$tpl = get_markup_template("profile_edit.tpl");
|
$tpl = get_markup_template("profile_edit.tpl");
|
||||||
$o .= replace_macros($tpl,array(
|
$o .= replace_macros($tpl,array(
|
||||||
|
'$multi_profiles' => ((feature_enabled(local_channel(),'multi_profiles')) ? true : false),
|
||||||
'$form_security_token' => get_form_security_token("profile_edit"),
|
'$form_security_token' => get_form_security_token("profile_edit"),
|
||||||
'$profile_clone_link' => ((feature_enabled(local_channel(),'multi_profiles')) ? 'profiles/clone/' . $r[0]['id'] . '?t='
|
'$profile_clone_link' => 'profiles/clone/' . $r[0]['id'] . '?t=' . get_form_security_token("profile_clone"),
|
||||||
. get_form_security_token("profile_clone") : ''),
|
'$profile_drop_link' => 'profiles/drop/' . $r[0]['id'] . '?t=' . get_form_security_token("profile_drop"),
|
||||||
'$profile_drop_link' => 'profiles/drop/' . $r[0]['id'] . '?t='
|
|
||||||
. get_form_security_token("profile_drop"),
|
|
||||||
|
|
||||||
'$fields' => $fields,
|
'$fields' => $fields,
|
||||||
'$vcard' => $vcard,
|
'$vcard' => $vcard,
|
||||||
'$guid' => $r[0]['profile_guid'],
|
'$guid' => $r[0]['profile_guid'],
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
<i class="fa fa-cog"></i> {{$tools_label}}
|
<i class="fa fa-cog"></i> {{$tools_label}}
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu dropdown-menu-right">
|
||||||
<a class="dropdown-item" href="profile_photo" id="profile-photo_upload-link" title="{{$profpic}}"><i class="fa fa-fw fa-user"></i> {{$profpic}}</a>
|
<a class="dropdown-item" href="profile_photo" id="profile-photo_upload-link" title="{{$profpic}}"><i class="fa fa-fw fa-user"></i> {{$profpic}}</a>
|
||||||
{{if $is_default}}
|
{{if $is_default}}
|
||||||
<a class="dropdown-item" href="cover_photo" id="cover-photo_upload-link" title="{{$coverpic}}"><i class="fa fa-fw fa-picture-o"></i> {{$coverpic}}</a>
|
<a class="dropdown-item" href="cover_photo" id="cover-photo_upload-link" title="{{$coverpic}}"><i class="fa fa-fw fa-picture-o"></i> {{$coverpic}}</a>
|
||||||
@ -15,7 +15,7 @@
|
|||||||
<a class="dropdown-item" href="thing" id="profile-edit-thing-link" title="{{$addthing}}"><i class="fa fa-fw fa-plus-circle"></i> {{$addthing}}</a>
|
<a class="dropdown-item" href="thing" id="profile-edit-thing-link" title="{{$addthing}}"><i class="fa fa-fw fa-plus-circle"></i> {{$addthing}}</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="profile/{{$profile_id}}/view" id="profile-edit-view-link" title="{{$viewprof}}">{{$viewprof}}</a>
|
<a class="dropdown-item" href="profile/{{$profile_id}}/view" id="profile-edit-view-link" title="{{$viewprof}}">{{$viewprof}}</a>
|
||||||
{{if $profile_clone_link}}
|
{{if $multi_profiles}}
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="{{$profile_clone_link}}" id="profile-edit-clone-link" title="{{$cr_prof}}">{{$cl_prof}}</a>
|
<a class="dropdown-item" href="{{$profile_clone_link}}" id="profile-edit-clone-link" title="{{$cr_prof}}">{{$cl_prof}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
@ -56,7 +56,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="personal-collapse" class="panel-collapse collapse show" data-parent="#profile-edit-wrapper" role="tabpanel" aria-labelledby="personal">
|
<div id="personal-collapse" class="panel-collapse collapse show" data-parent="#profile-edit-wrapper" role="tabpanel" aria-labelledby="personal">
|
||||||
<div class="section-content-tools-wrapper">
|
<div class="section-content-tools-wrapper">
|
||||||
|
{{if $multi_profiles}}
|
||||||
{{include file="field_input.tpl" field=$profile_name}}
|
{{include file="field_input.tpl" field=$profile_name}}
|
||||||
|
{{else}}
|
||||||
|
<input type="hidden" name="{{$profile_name.0}}" value="{{$profile_name.2}}">
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{include file="field_input.tpl" field=$name}}
|
{{include file="field_input.tpl" field=$name}}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user