Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/cydrobolt/polr.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChaoyi Zha <summermontreal@gmail.com>2017-03-25 22:59:42 +0300
committerChaoyi Zha <summermontreal@gmail.com>2017-03-25 23:04:01 +0300
commit7e0d404c7277f8708c11b2783d791bfb4cbe010a (patch)
tree452c43424780577182d2d77eaf5a20e79a01efcd /resources
parent44f69c3910e79012e4f242b76e72aaa9ca046763 (diff)
Implement email domain restriction option in env template and SetupController
Diffstat (limited to 'resources')
-rw-r--r--resources/views/env.blade.php6
-rw-r--r--resources/views/setup.blade.php27
2 files changed, 20 insertions, 13 deletions
diff --git a/resources/views/env.blade.php b/resources/views/env.blade.php
index 55da877..971df5d 100644
--- a/resources/views/env.blade.php
+++ b/resources/views/env.blade.php
@@ -77,6 +77,12 @@ SETTING_PSEUDORANDOM_ENDING={{$ST_PSEUDOR_ENDING}}
# Set to true to record advanced analytics
SETTING_ADV_ANALYTICS={{$ST_ADV_ANALYTICS}}
+# Set to true to restrict registration to a specific email domain
+SETTING_RESTRICT_EMAIL_DOMAIN={{$ST_RESTRICT_EMAIL_DOMAIN}}
+
+# A comma-separated list of permitted email domains
+SETTING_ALLOWED_EMAIL_DOMAINS={{$ST_ALLOWED_EMAIL_DOMAINS}}
+
# Set each to blank to disable mail
@if($MAIL_ENABLED)
MAIL_DRIVER=smtp
diff --git a/resources/views/setup.blade.php b/resources/views/setup.blade.php
index d0a2b40..264811a 100644
--- a/resources/views/setup.blade.php
+++ b/resources/views/setup.blade.php
@@ -14,7 +14,7 @@ Setup
<a class="navbar-brand" href="/">Polr</a>
</div>
-<div class='row'>
+<div class="row" ng-controller="SetupCtrl" class="ng-root">
<div class='col-md-3'></div>
<div class='col-md-6 setup-body well'>
@@ -175,21 +175,20 @@ Setup
</select>
<p>
- Specify Email Domain:
- <button data-content="Specifying the email will allow you to limit who is able to register." type="button" class="btn btn-xs btn-default setup-qmark" data-toggle="popover">?</button>
+ Restrict Registration Email Domains:
+ <button data-content="Restrict registration to certain email domains." type="button" class="btn btn-xs btn-default setup-qmark" data-toggle="popover">?</button>
</p>
- <select name='setting:specify_email' class='form-control'>
- <option value='false'>Specify email disabled</option>
- <option value='true'>Specify email enabled</option>
+ <select name='setting:restrict_email_domain' class='form-control'>
+ <option value='false'>Allow any email domain to register</option>
+ <option value='true'>Restrict email domains allowed to register</option>
</select>
- <p class='text-muted'>
- Please ensure if you choose to limit to a specific email domain that the domain is properly setup.
- </p>
+
<p>
- Email Domain:
- <button data-content="Enter the domain of the emails you'd like to be able to register." type="button" class="btn btn-xs btn-default setup-qmark" data-toggle="popover">?</button>
+ Permitted Email Domains:
+ <button data-content="A comma-separated list of emails permitted to register." type="button" class="btn btn-xs btn-default setup-qmark" data-toggle="popover">?</button>
</p>
- <input type='text' class='form-control' name='setting:allowed_email_domains' placeholder='gmail.com'>
+ <input type='text' class='form-control' name='setting:allowed_email_domains' placeholder='company.com,company-corp.com'>
+
<p>
Password Recovery:
<button data-content="Password recovery allows users to reset their password through email." type="button" class="btn btn-xs btn-default setup-qmark" data-toggle="popover">?</button>
@@ -252,5 +251,7 @@ Setup
@section('js')
<script src="/js/bootstrap.min.js"></script>
-<script src='/js/setup.js'></script>
+<script src='/js/angular.min.js'></script>
+<script src='/js/base.js'></script>
+<script src='/js/SetupCtrl.js'></script>
@endsection