]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/showapplication.php
Merge branch 'oauth-continued' into 0.9.x
[quix0rs-gnu-social.git] / actions / showapplication.php
index b21b994aa23af13f5f2db476f77d11652d8c3fd5..d307ea4526c11d94b16dfefa033f00474b1ec870 100644 (file)
@@ -92,6 +92,7 @@ class ShowApplicationAction extends OwnerDesignAction
 
         if ($cur->id != $this->owner->id) {
             $this->clientError(_('You are not the owner of this application.'), 401);
+            return false;
         }
 
         return true;
@@ -221,18 +222,33 @@ class ShowApplicationAction extends OwnerDesignAction
 
         $this->elementStart('li', 'entity_reset_keysecret');
         $this->elementStart('form', array(
-            'id' => 'forma_reset_key',
+            'id' => 'form_reset_key',
             'class' => 'form_reset_key',
             'method' => 'POST',
             'action' => common_local_url('showapplication',
                                          array('id' => $this->application->id))));
-
         $this->elementStart('fieldset');
         $this->hidden('token', common_session_token());
         $this->submit('reset', _('Reset key & secret'));
         $this->elementEnd('fieldset');
         $this->elementEnd('form');
         $this->elementEnd('li');
+
+        $this->elementStart('li', 'entity_delete');
+        $this->elementStart('form', array(
+                                          'id' => 'form_delete_application',
+                                          'class' => 'form_delete_application',
+                                          'method' => 'POST',
+                                          'action' => common_local_url('deleteapplication',
+                                                                       array('id' => $this->application->id))));
+
+        $this->elementStart('fieldset');
+        $this->hidden('token', common_session_token());
+        $this->submit('delete', _('Delete'));
+        $this->elementEnd('fieldset');
+        $this->elementEnd('form');
+        $this->elementEnd('li');
+
         $this->elementEnd('ul');
         $this->elementEnd('div');
 
@@ -264,7 +280,7 @@ class ShowApplicationAction extends OwnerDesignAction
         $this->elementEnd('dl');
 
         $this->element('p', 'note',
-            _('Note: We support hmac-sha1 signatures. We do not support the plaintext signature method.'));
+            _('Note: We support HMAC-SHA1 signatures. We do not support the plaintext signature method.'));
         $this->elementEnd('div');
 
         $this->elementStart('p', array('id' => 'application_action'));
@@ -324,4 +340,3 @@ class ShowApplicationAction extends OwnerDesignAction
     }
 
 }
-