diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-01-20 10:42:19 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2016-01-20 10:42:19 +0100 |
commit | d6a63016ae0e14efeefd763a1042c515b60b3f7d (patch) | |
tree | 2a9a10e609a79402bc5ea40ff25cfea76d92e8b4 | |
parent | c2a1a02fe452fe93057f36e6d37a8634df2e0bd6 (diff) | |
download | nextcloud-server-d6a63016ae0e14efeefd763a1042c515b60b3f7d.tar.gz nextcloud-server-d6a63016ae0e14efeefd763a1042c515b60b3f7d.zip |
move lost controller to core/controller
* lostpassword.css is unneeded since #11696 is merged - 1b50d4f7ceb92fffe0d38f823f175cf7e419c69e
* js is already in core/js
* css is moved to core/css/lostpassword
* template is moved to core/templates/lostpassword
-rw-r--r-- | core/application.php | 2 | ||||
-rw-r--r-- | core/controller/lostcontroller.php (renamed from core/lostpassword/controller/lostcontroller.php) | 10 | ||||
-rw-r--r-- | core/css/lostpassword/resetpassword.css (renamed from core/lostpassword/css/resetpassword.css) | 0 | ||||
-rw-r--r-- | core/lostpassword/css/lostpassword.css | 31 | ||||
-rw-r--r-- | core/templates/lostpassword/email.php (renamed from core/lostpassword/templates/email.php) | 0 | ||||
-rw-r--r-- | core/templates/lostpassword/resetpassword.php (renamed from core/lostpassword/templates/resetpassword.php) | 2 | ||||
-rw-r--r-- | tests/core/controller/lostcontrollertest.php (renamed from tests/core/lostpassword/controller/lostcontrollertest.php) | 8 |
7 files changed, 11 insertions, 42 deletions
diff --git a/core/application.php b/core/application.php index 6536f63c1d8..30376ee4f2e 100644 --- a/core/application.php +++ b/core/application.php @@ -29,7 +29,7 @@ namespace OC\Core; use OC\AppFramework\Utility\SimpleContainer; use OC\AppFramework\Utility\TimeFactory; use \OCP\AppFramework\App; -use OC\Core\LostPassword\Controller\LostController; +use OC\Core\Controller\LostController; use OC\Core\Controller\UserController; use OC\Core\Controller\AvatarController; use \OCP\Util; diff --git a/core/lostpassword/controller/lostcontroller.php b/core/controller/lostcontroller.php index c9ee8ed2ff5..0e0932b288b 100644 --- a/core/lostpassword/controller/lostcontroller.php +++ b/core/controller/lostcontroller.php @@ -25,7 +25,7 @@ * */ -namespace OC\Core\LostPassword\Controller; +namespace OC\Core\Controller; use \OCP\AppFramework\Controller; use \OCP\AppFramework\Http\TemplateResponse; @@ -45,7 +45,7 @@ use OCP\Security\StringUtils; * * Successfully changing a password will emit the post_passwordReset hook. * - * @package OC\Core\LostPassword\Controller + * @package OC\Core\Controller */ class LostController extends Controller { @@ -122,8 +122,8 @@ class LostController extends Controller { */ public function resetform($token, $userId) { return new TemplateResponse( - 'core/lostpassword', - 'resetpassword', + 'core', + 'lostpassword/resetpassword', array( 'link' => $this->urlGenerator->linkToRouteAbsolute('core.lost.setPassword', array('userId' => $userId, 'token' => $token)), ), @@ -236,7 +236,7 @@ class LostController extends Controller { $link = $this->urlGenerator->linkToRouteAbsolute('core.lost.resetform', array('userId' => $user, 'token' => $token)); - $tmpl = new \OC_Template('core/lostpassword', 'email'); + $tmpl = new \OC_Template('core', 'lostpassword/email'); $tmpl->assign('link', $link); $msg = $tmpl->fetchPage(); diff --git a/core/lostpassword/css/resetpassword.css b/core/css/lostpassword/resetpassword.css index 0b3c251e8d7..0b3c251e8d7 100644 --- a/core/lostpassword/css/resetpassword.css +++ b/core/css/lostpassword/resetpassword.css diff --git a/core/lostpassword/css/lostpassword.css b/core/lostpassword/css/lostpassword.css deleted file mode 100644 index b7f7023648d..00000000000 --- a/core/lostpassword/css/lostpassword.css +++ /dev/null @@ -1,31 +0,0 @@ -#body-login -input[type="text"]#user{ - padding-right: 20px; - padding-left: 41px; -} - -#body-login -input[type="submit"] { - text-align: center; - width: 170px; - height: 45px; - padding-top: 7px; - padding-bottom: 7px; -} - -#body-login input[type="submit"]#submit { - width: 280px; -} - -#body-login .update { - text-align: left; -} - -#body-login .update, -#body-login .error { - margin: 10px 0 5px 0; -} - -#user { - width: 226px !important; -} diff --git a/core/lostpassword/templates/email.php b/core/templates/lostpassword/email.php index 3ca424d5294..3ca424d5294 100644 --- a/core/lostpassword/templates/email.php +++ b/core/templates/lostpassword/email.php diff --git a/core/lostpassword/templates/resetpassword.php b/core/templates/lostpassword/resetpassword.php index 22dd2fc13b7..49ced424648 100644 --- a/core/lostpassword/templates/resetpassword.php +++ b/core/templates/lostpassword/resetpassword.php @@ -22,7 +22,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ -style('lostpassword', 'resetpassword'); +style('core', 'lostpassword/resetpassword'); script('core', 'lostpassword'); ?> diff --git a/tests/core/lostpassword/controller/lostcontrollertest.php b/tests/core/controller/lostcontrollertest.php index 0843d82da3f..44bc539247f 100644 --- a/tests/core/lostpassword/controller/lostcontrollertest.php +++ b/tests/core/controller/lostcontrollertest.php @@ -19,7 +19,7 @@ * */ -namespace OC\Core\LostPassword\Controller; +namespace OC\Core\Controller; use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Utility\ITimeFactory; @@ -36,7 +36,7 @@ use PHPUnit_Framework_MockObject_MockObject; /** * Class LostControllerTest * - * @package OC\Core\LostPassword\Controller + * @package OC\Core\Controller */ class LostControllerTest extends \PHPUnit_Framework_TestCase { @@ -124,8 +124,8 @@ class LostControllerTest extends \PHPUnit_Framework_TestCase { ->will($this->returnValue('https://ownCloud.com/index.php/lostpassword/')); $response = $this->lostController->resetform($token, $userId); - $expectedResponse = new TemplateResponse('core/lostpassword', - 'resetpassword', + $expectedResponse = new TemplateResponse('core', + 'lostpassword/resetpassword', array( 'link' => 'https://ownCloud.com/index.php/lostpassword/', ), |