Added code of conduct
Change-Id: I69c3218e14a8f65caa482df204625cb254ba2a74 Signed-off-by: smarcet <smarcet@gmail.com>
This commit is contained in:
parent
28b87e27f1
commit
57295af06e
@ -15,6 +15,7 @@ use App\Http\Controllers\Controller;
|
||||
use App\Http\Utils\CountryList;
|
||||
use App\Services\Auth\IUserService;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
@ -149,14 +150,20 @@ final class RegisterController extends Controller
|
||||
*/
|
||||
protected function validator(array $data)
|
||||
{
|
||||
return Validator::make($data, [
|
||||
$rules = [
|
||||
'first_name' => 'required|string|max:100',
|
||||
'last_name' => 'required|string|max:100',
|
||||
'country_iso_code' => 'required|string|country_iso_alpha2_code',
|
||||
'email' => 'required|string|email|max:255',
|
||||
'password' => 'required|string|confirmed|password_policy',
|
||||
'g-recaptcha-response' => 'required|recaptcha',
|
||||
]);
|
||||
];
|
||||
|
||||
if(!empty(Config::get("app.code_of_conduct_link", null))){
|
||||
$rules['agree_code_of_conduct'] = 'required|string|in:on';
|
||||
}
|
||||
|
||||
return Validator::make($data, $rules);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -220,9 +220,10 @@ return [
|
||||
],
|
||||
|
||||
'version' => env('APP_VERSION', 'XX.XX.XX'),
|
||||
'app_name' => env('APP_NAME', 'OpenStackId'),
|
||||
'app_name' => env('APP_NAME', 'OpenStackID'),
|
||||
'tenant_name' => env('TENANT_NAME', 'OpenStack'),
|
||||
'logo_url' => env('LOGO_URL', '/assets/img/openstack-logo-full.svg'),
|
||||
'tenant_favicon' => env('TENANT_FAV_ICON_URL', '/assets/img/favicon-32x32.png'),
|
||||
'help_email' => env('HELP_EMAIL', 'support@openstack.org')
|
||||
'help_email' => env('HELP_EMAIL', 'support@openstack.org'),
|
||||
'code_of_conduct_link' => env("CODE_OF_CONDUCT_LINK","https://www.openstack.org/legal/community-code-of-conduct"),
|
||||
];
|
||||
|
5
public/assets/css/auth/register.css
vendored
5
public/assets/css/auth/register.css
vendored
@ -91,4 +91,9 @@ body{
|
||||
}
|
||||
.signup-form form a:hover{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.agree_code_of_conduct a {
|
||||
color: #337ab7 !important;
|
||||
text-decoration: none !important;
|
||||
}
|
@ -48,6 +48,7 @@
|
||||
minlength: 8,
|
||||
equalTo : "#password"
|
||||
},
|
||||
'agree_code_of_conduct': {required: true},
|
||||
'g_recaptcha_hidden': {required: true}
|
||||
},
|
||||
messages: {
|
||||
|
@ -84,12 +84,22 @@
|
||||
<div class="form-group password-container">
|
||||
<input type="password" class="form-control" id="password-confirm" name="password_confirmation" placeholder="Confirm Password" required="required" autocomplete="new-password" data-lpignore="true">
|
||||
</div>
|
||||
<i class="fa fa-info-circle"> The password must be 8–30 characters, and must include a special character.</i>
|
||||
<div class="form-group">
|
||||
<div class="recaptcha-container" >
|
||||
{!! Recaptcha::render(['id'=>'captcha', 'class'=>'input-block-level', 'callback'=>'verifyCaptchaCallback']) !!}
|
||||
<input type="hidden"name="g_recaptcha_hidden" id="g_recaptcha_hidden">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(Config::get("app.code_of_conduct_link"))
|
||||
<div class="checkbox agree_code_of_conduct">
|
||||
<label>
|
||||
<input name="agree_code_of_conduct" id="agree_code_of_conduct" type="checkbox"> I agree to the <a href="{!! Config::get("app.code_of_conduct_link") !!}" target="_blank">{!! Config::get("app.tenant_name") !!} Community Code of Conduct</a>?
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-lg btn-block">Register Now</button>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user