summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorcsarven <csarven@controlyourself.ca>2008-11-20 15:24:48 -0500
committercsarven <csarven@controlyourself.ca>2008-11-20 15:24:48 -0500
commita8b7d0a7b5c5f22d11eafd0cd5d8adf1f1fd399f (patch)
treee1473bbbc64108fd818fad7b07f9358529f54274 /lib/util.php
parent7c2c1855ba77f4f0d6a68fb57a020bdf7d1ae25b (diff)
Copy of (un)subscribe forms in util.php
Will remove the copies in showstream.php once everything is okay. darcs-hash:20081120202448-eefa4-e2d294d906b0ff90f9977606d18ea6655a944452.gz
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php28
1 files changed, 24 insertions, 4 deletions
diff --git a/lib/util.php b/lib/util.php
index 8fff5f605..950a74733 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -1896,12 +1896,32 @@ function common_nudge_form($profile) {
common_element_end('form');
}
-function common_subscribe_response() {
- common_element('p', array('id' => 'subscribe_response'), _('Subscribed'));
+function common_subscribe_form() {
+ common_element_start('form', array('id' => 'subscribe', 'method' => 'post', 'class' => 'subscribe',
+ 'action' => common_local_url('subscribe')));
+ common_hidden('token', common_session_token());
+ common_element('input', array('id' => 'subscribeto',
+ 'name' => 'subscribeto',
+ 'type' => 'hidden',
+ 'value' => $profile->nickname));
+ common_element('input', array('type' => 'submit',
+ 'class' => 'submit',
+ 'value' => _('Subscribe')));
+ common_element_end('form');
}
-function common_unsubscribe_response() {
- common_element('p', array('id' => 'unsubscribe_response'), _('Unsubscribed'));
+function common_unsubscribe_form() {
+ common_element_start('form', array('id' => 'unsubscribe', 'method' => 'post', 'class' => 'unsubscribe',
+ 'action' => common_local_url('unsubscribe')));
+ common_hidden('token', common_session_token());
+ common_element('input', array('id' => 'unsubscribeto',
+ 'name' => 'unsubscribeto',
+ 'type' => 'hidden',
+ 'value' => $profile->nickname));
+ common_element('input', array('type' => 'submit',
+ 'class' => 'submit',
+ 'value' => _('Unsubscribe')));
+ common_element_end('form');
}
function common_nudge_response() {