aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-11-04 17:38:49 -0800
committerfriendica <info@friendica.com>2014-11-04 17:38:49 -0800
commit1896855c8540101abb7af9bbc3aa45d738750d95 (patch)
tree8c805017a949a6b42b9d4f267fbb12e30de76742
parentd5d6158973ecb83b63d42c57c96dce849842c83b (diff)
downloadvolse-hubzilla-1896855c8540101abb7af9bbc3aa45d738750d95.tar.gz
volse-hubzilla-1896855c8540101abb7af9bbc3aa45d738750d95.tar.bz2
volse-hubzilla-1896855c8540101abb7af9bbc3aa45d738750d95.zip
minor adjustments to make the form work as designed
-rw-r--r--mod/connedit.php5
-rwxr-xr-xview/tpl/abook_edit.tpl15
2 files changed, 12 insertions, 8 deletions
diff --git a/mod/connedit.php b/mod/connedit.php
index 0e129e32d..60f284797 100644
--- a/mod/connedit.php
+++ b/mod/connedit.php
@@ -68,7 +68,7 @@ function connedit_post(&$a) {
call_hooks('contact_edit_post', $_POST);
- if($orig_record['abook_flags'] & ABOOK_FLAG_SELF) {
+ if($orig_record[0]['abook_flags'] & ABOOK_FLAG_SELF) {
$autoperms = intval($_POST['autoperms']);
}
else {
@@ -216,9 +216,10 @@ function connedit_post(&$a) {
$arr = array('channel_id' => local_user(), 'abook' => $a->poi);
call_hooks('accept_follow', $arr);
}
-
+dbg(1);
if(! is_null($autoperms))
set_pconfig(local_user(),'system','autoperms',(($autoperms) ? $abook_my_perms : 0));
+dbg(0);
connedit_clone($a);
diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl
index 0f91d6024..c2c11e4b1 100755
--- a/view/tpl/abook_edit.tpl
+++ b/view/tpl/abook_edit.tpl
@@ -9,12 +9,6 @@
</div>
{{/if}}
-{{if $self}}
-<div class="abook-autotext">
-<div id="autoperm-desc" class="descriptive-paragraph">{{$autolbl}}</div>
-{{include file="field_checkbox.tpl" field=$autoperms}}
-</div>
-{{/if}}
<div id="contact-edit-wrapper">
@@ -34,6 +28,15 @@
<form id="abook-edit-form" action="connedit/{{$contact_id}}" method="post" >
+
+{{if $self}}
+<div class="abook-autotext">
+<div id="autoperm-desc" class="descriptive-paragraph">{{$autolbl}}</div>
+{{include file="field_checkbox.tpl" field=$autoperms}}
+</div>
+{{/if}}
+
+
<input type="hidden" name="contact_id" value="{{$contact_id}}">
<input id="contact-closeness-mirror" type="hidden" name="closeness" value="{{$close}}" />