move lost controller to core/controller

* lostpassword.css is unneeded since #11696 is merged - 1b50d4f7ce
* js is already in core/js
* css is moved to core/css/lostpassword
* template is moved to core/templates/lostpassword
This commit is contained in:
Morris Jobke 2016-01-20 10:42:19 +01:00
parent c2a1a02fe4
commit d6a63016ae
7 changed files with 11 additions and 42 deletions

View file

@ -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;

View file

@ -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();

View file

@ -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;
}

View file

@ -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');
?>

View file

@ -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/',
),