summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-07-21 16:03:46 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-07-21 16:03:46 +0200
commit37f06799589d9bb92ecfa6368197daf187251ab4 (patch)
treeb1816f22c536a4e1ae417e09b360da00d449ffc6
parentac8bd3d2512dd1bfca43d71ea10202ba9e6a82a6 (diff)
First draft for registration form
See https://github.com/FreshRSS/FreshRSS/issues/679
-rw-r--r--app/Controllers/authController.php6
-rw-r--r--app/views/auth/formLogin.phtml2
-rw-r--r--app/views/auth/register.phtml31
3 files changed, 39 insertions, 0 deletions
diff --git a/app/Controllers/authController.php b/app/Controllers/authController.php
index b55892475..1c8ad2193 100644
--- a/app/Controllers/authController.php
+++ b/app/Controllers/authController.php
@@ -346,4 +346,10 @@ class FreshRSS_auth_Controller extends Minz_ActionController {
}
}
}
+
+ /**
+ * This action gives possibility to a user to create an account.
+ */
+ public function registerAction() {
+ }
}
diff --git a/app/views/auth/formLogin.phtml b/app/views/auth/formLogin.phtml
index 979e17349..75537ee26 100644
--- a/app/views/auth/formLogin.phtml
+++ b/app/views/auth/formLogin.phtml
@@ -1,6 +1,8 @@
<div class="prompt">
<h1><?php echo _t('gen.auth.login'); ?></h1>
+ <a href="<?php echo _url('auth', 'register'); ?>"><?php echo _t('gen.auth.register.ask'); ?></a>
+
<form id="crypto-form" method="post" action="<?php echo _url('auth', 'login'); ?>">
<div>
<label for="username"><?php echo _t('gen.auth.username'); ?></label>
diff --git a/app/views/auth/register.phtml b/app/views/auth/register.phtml
new file mode 100644
index 000000000..f67ecc4d9
--- /dev/null
+++ b/app/views/auth/register.phtml
@@ -0,0 +1,31 @@
+<div class="prompt">
+ <h1><?php echo _t('gen.auth.register'); ?></h1>
+
+ <form method="post" action="<?php echo _url('user', 'create'); ?>">
+ <div>
+ <label class="group-name" for="new_user_name"><?php echo _t('gen.auth.username'); ?></label>
+ <input id="new_user_name" name="new_user_name" type="text" size="16" required="required" maxlength="16" autocomplete="off" pattern="[0-9a-zA-Z]{1,16}" />
+ </div>
+
+ <div>
+ <label class="group-name" for="new_user_passwordPlain"><?php echo _t('gen.auth.password'); ?></label>
+ <div class="stick">
+ <input type="password" id="new_user_passwordPlain" name="new_user_passwordPlain" required="required" autocomplete="off" pattern=".{7,}" />
+ <a class="btn toggle-password" data-toggle="new_user_passwordPlain"><?php echo _i('key'); ?></a>
+ </div>
+ <noscript><b><?php echo _t('gen.js.should_be_activated'); ?></b></noscript>
+ </div>
+
+ <div>
+ <label class="group-name" for="new_user_email"><?php echo _t('gen.auth.email'); ?></label>
+ <input type="email" id="new_user_email" name="new_user_email" class="extend" required="required" autocomplete="off" />
+ </div>
+
+ <div>
+ <button type="submit" class="btn btn-important"><?php echo _t('gen.action.create'); ?></button>
+ <a class="btn" href="<?php echo _url('index', 'index'); ?>"><?php echo _t('gen.action.cancel'); ?></a>
+ </div>
+ </form>
+
+ <p><a href="<?php echo _url('index', 'about'); ?>"><?php echo _t('gen.freshrss.about'); ?></a></p>
+</div>