|
- <style>
- .full.height{background-color: #F9F9F9;}
- </style>
- <style>
- @media only screen and (max-width: 1200px) {
- ._container {
- display:block !important;
- }
- ._left-img-area {
- display: none;
- }
- ._right_content_area {
-
- }
- ._right_content_area .segment {
- margin-left: auto !important;
- border-top-left-radius: .28571429rem !important;
- border-bottom-left-radius: .28571429rem !important;
- border-left: border: 1px solid rgba(34,36,38,.15) !important;
- }
- }
- </style>
- <div class="ui container very padded {{if .LinkAccountMode}} icon{{end}}" style=" padding-top: 5.0rem; padding-bottom: 3.0rem;">
- <div class="_container" style="display:flex;justify-content:center;">
- <div class="_left-img-area" style="padding-right:0;flex:2">
- <div style="width:450px;height:100%;float:right;border-radius:0.28571429rem;border-top-right-radius: 0;
- border-bottom-right-radius: 0;border-right:none !important;overflow: hidden;
- -webkit-box-shadow: 0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.15);
- box-shadow: 0 2px 4px 0rgba(34,36,38,.12),0 2px 10px 0rgba(34,36,38,.15);">
- {{ if .ActivityTpl }}
- {{ .ActivityTpl | Safe}}
- {{ else }}
- {{ template "user/auth/signin_up_img_default" .}}
- {{ end }}
- </div>
- </div>
- <div class="_right_content_area" style="padding-left:0;flex:3;">
- <div class="ui raised very padded text container segment" style="margin-left:0;
- border-top-left-radius: 0;
- border-bottom-left-radius: 0;
- border-left: none !important;
- ">
- <div class="ui centered grid">
- <div class="sixteen wide mobile ten wide tablet ten wide computer column">
- <div class="ui bottom aligned two column grid">
- <div class="column">
- <h2 class="ui header">
- {{if .LinkAccountMode}}
- {{.i18n.Tr "auth.oauth_signup_title"}}
- {{else}}
- {{.i18n.Tr "sign_up"}}
- {{end}}
- </h2>
- </div>
- {{if not .LinkAccountMode}}
- <div class="ui right floated column">
- <a href="{{AppSubUrl}}/user/login">{{.i18n.Tr "auth.register_helper_msg"}}</a>
- </div>
- {{end}}
- </div>
- <div class="ui grid">
- <div class="column">
- <form class="ui form" action="{{.SignUpLink}}" method="post">
- {{.CsrfTokenHtml}}
- {{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister)}}
- {{template "base/alert" .}}
- {{end}}
- <div class="ui negative message" style="display:none;">
- <p></p>
- </div>
- {{if .DisableRegistration}}
- <p>{{.i18n.Tr "auth.disable_register_prompt"}}</p>
- {{else}}
- <div class="field invitation_tips" style="font-weight:400;font-size:14px;color:rgba(250,140,22,1);{{if not .invitationCode}}display:none;{{end}}">
- <span>{{.i18n.Tr "your_friend"}} <span class="__invitation_code__">{{.invitationCode}}</span> {{.i18n.Tr "invite_you_to_join_the_OpenI_AI_Collaboration_Platform_and_enjoy_abundant_free_computing_resources"}}</span>
- </div>
- <div class="field {{if and (.Err_UserName) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
- <input id="user_name" name="user_name" value="{{.user_name}}" placeholder="{{.i18n.Tr "username"}}" autofocus required>
- </div>
- <div class="field {{if .Err_Email}}error{{end}}">
- <input id="email" name="email" type="email" value="{{.email}}" placeholder="{{.i18n.Tr "email"}}" required>
- </div>
-
- {{if not .DisablePassword}}
- <div class="field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
- <input id="password" name="password" type="password" value="{{.password}}" placeholder="{{.i18n.Tr "password"}}" autocomplete="off" required>
- </div>
- <div class="field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
- <input id="retype" name="retype" type="password" value="{{.retype}}" placeholder="{{.i18n.Tr "re_type"}}" autocomplete="off" required>
- </div>
- {{end}}
-
- {{if and .EnableCaptcha (eq .CaptchaType "image")}}
- <div class="field">
- {{.Captcha.CreateHtml}}
- </div>
- <div class="field {{if .Err_Captcha}}error{{end}}">
- <input id="captcha" name="captcha" value="{{.captcha}}" placeholder="{{.i18n.Tr "captcha"}}" autocomplete="off">
- </div>
- {{end}}
-
- {{if and .EnableCaptcha (eq .CaptchaType "recaptcha")}}
- <div class="field required">
- <div class="g-recaptcha" data-sitekey="{{ .RecaptchaSitekey }}"></div>
- </div>
- {{end}}
-
- {{if .EnablePhone }}
- <div class="use-type" usetype="0">
- {{template "user/auth/phone_verify" .}}
- </div>
- {{end}}
-
- <div class="field">
- <div style="display:flex;">
- <div style="display:flex;align-items:center;">
- <span>{{.i18n.Tr "recommender"}}</span>
- </div>
- <input style="flex:1;margin-left:12px;" id="invitation_code" name="invitation_code" value="{{.invitationCode}}" {{if .invitationCode}}readonly="true"{{end}} autocomplete="off" />
- </div>
- </div>
-
- <div class="field">
- <div class="ui checkbox">
- <input name="agree" type="checkbox" tabindex="0" class="hidden" {{if .agree}}checked{{end}}><label>{{.i18n.Tr "use_and_privacy_agree" "/home/term" "/home/privacy" | Safe}}</label>
- </div>
- </div>
- <div class="ui hidden divider"></div>
- <div class="center aligned field">
- <button class="fluid large ui blue button">
- {{if .LinkAccountMode}}
- {{.i18n.Tr "auth.oauth_signup_submit"}}
- {{else}}
- {{.i18n.Tr "auth.create_new_account"}}
- {{end}}
- </button>
- </div>
- {{end}}
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <script>
- ; (function() {
- var getUrlParams = function() {
- var url = window.location.search;
- var index = url.indexOf('?');
- var obj = {};
- if (index !== -1) {
- var str = url.substr(1);
- var arr = str.split('&');
- for (var i = 0, iLen = arr.length; i < iLen; i++) {
- var list = arr[i].split('=');
- obj[list[0]] = list[1];
- }
- }
- return obj;
- };
- var sharedUser = getUrlParams()['sharedUser'];
- if (sharedUser) {
- setTimeout(function() {
- $('.invitation_tips').show().find('.__invitation_code__').text(sharedUser);
- $('input#invitation_code').val(sharedUser).attr('readonly', true);
- }, 20);
- }
- })();
- </script>
|