diff options
-rw-r--r-- | Zotlabs/Module/Admin/Accounts.php | 38 | ||||
-rw-r--r-- | Zotlabs/Module/Admin/Site.php | 12 | ||||
-rw-r--r-- | Zotlabs/Module/Cloud.php | 3 | ||||
-rw-r--r-- | Zotlabs/Module/Regate.php | 14 | ||||
-rw-r--r-- | Zotlabs/Module/Register.php | 65 | ||||
-rw-r--r-- | include/account.php | 2 | ||||
-rw-r--r-- | include/bbcode.php | 21 | ||||
-rw-r--r-- | include/text.php | 4 | ||||
-rw-r--r-- | view/css/mod_admin.css | 19 | ||||
-rw-r--r-- | view/js/mod_register.js | 8 | ||||
-rw-r--r-- | view/tpl/admin_site.tpl | 24 | ||||
-rw-r--r-- | view/tpl/register.tpl | 45 |
12 files changed, 158 insertions, 97 deletions
diff --git a/Zotlabs/Module/Admin/Accounts.php b/Zotlabs/Module/Admin/Accounts.php index 856ff9155..ac46c43aa 100644 --- a/Zotlabs/Module/Admin/Accounts.php +++ b/Zotlabs/Module/Admin/Accounts.php @@ -70,18 +70,44 @@ class Accounts { intval($_SESSION[self::MYP]['i'][$zarat]) ); if ($rs && ($rs[0]['reg_flags'] & ~ 48) == 0) { - // create account - $rc='ok'.$rs[0]['reg_id']; + $rc = 'ok'.$rs[0]['reg_id']; $ac = create_account_from_register($rs[0]); - if ( $ac['success'] ) $rc .= '✔'; + if ( $ac['success'] ) { + $rc .= '✔'; + + $auto_create = get_config('system','auto_channel_create',1); + + if($auto_create) { + $reonar = json_decode($rs[0]['reg_stuff'], true); + // prepare channel creation + if($reonar['chan.name']) + set_aconfig($ac['account']['account_id'], 'register', 'channel_name', $reonar['chan.name']); + + if($reonar['chan.did1']) + set_aconfig($ac['account']['account_id'], 'register', 'channel_address', $reonar['chan.did1']); + + $permissions_role = get_config('system','default_permissions_role'); + if($permissions_role) + set_aconfig($ac['account']['account_id'], 'register', 'permissions_role', $permissions_role); + // create channel + $new_channel = auto_channel_create($ac['account']['account_id']); + + if($new_channel['success']) { + $rc .= ' c,ok' . $new_channel['channel']['channel_id'] . '✔'; + } + else { + $rc .= ' c ×'; + } + } + + + } } else { - $rc='oh×'; + $rc='oh ×'; } } - - // echo json_encode(array('re' => $zarop, 'at' => '_' . $zarat, 'rc' => $rc)); } killme(); diff --git a/Zotlabs/Module/Admin/Site.php b/Zotlabs/Module/Admin/Site.php index bf47f8c62..73c24897f 100644 --- a/Zotlabs/Module/Admin/Site.php +++ b/Zotlabs/Module/Admin/Site.php @@ -491,7 +491,7 @@ class Site { '$reg_expire'=>$reg_expire, '$reg_autochannel' => array('auto_channel_create', t("Auto channel create"), - get_config('system','auto_channel_create'), + get_config('system','auto_channel_create', 1), t("Auto create a channel when register a new account. When On, the register form will show additional fields for the channel-name and the nickname."), "", "", 'ZAR0870C'), @@ -512,11 +512,11 @@ class Site { get_config('system','verify_email'), t("Check to verify email addresses used in account registration (recommended)."), "", "", 'ZAR0890C'), - '$abandon_days' => array('abandon_days', + '$abandon_days' => array('abandon_days', t('Accounts abandoned after x days'), get_config('system','account_abandon_days'), - t('Will not waste system resources polling external sites for abandonded accounts. Enter 0 for no time limit.'), - 'appears not to be implemented (2010.01)'), + t('Will not waste system resources polling external sites for abandonded accounts. Enter 0 for no time limit.') + ), // <-hilmar] '$role' => $role, @@ -553,13 +553,9 @@ class Site { '$maxloadavg' => array('maxloadavg', t("Maximum Load Average"), ((intval(get_config('system','maxloadavg')) > 0)?get_config('system','maxloadavg'):50), t("Maximum system load before delivery and poll processes are deferred - default 50.")), '$default_expire_days' => array('default_expire_days', t('Expiration period in days for imported (grid/network) content'), intval(get_config('system','default_expire_days')), t('0 for no expiration of imported content')), '$active_expire_days' => array('active_expire_days', t('Do not expire any posts which have comments less than this many days ago'), intval(get_config('system','active_expire_days',7)), ''), - '$sellpage' => array('site_sellpage', t('Public servers: Optional landing (marketing) webpage for new registrants'), get_config('system','sellpage',''), sprintf( t('Create this page first. Default is %s/register'),z_root())), '$first_page' => array('first_page', t('Page to display after creating a new channel'), get_config('system','workflow_channel_next','profiles'), t('Default: profiles')), - '$location' => array('site_location', t('Optional: site location'), get_config('system','site_location',''), t('Region or country')), - - '$form_security_token' => get_form_security_token("admin_site"), )); } diff --git a/Zotlabs/Module/Cloud.php b/Zotlabs/Module/Cloud.php index 3d1b97980..6ff95b5cf 100644 --- a/Zotlabs/Module/Cloud.php +++ b/Zotlabs/Module/Cloud.php @@ -123,7 +123,8 @@ class Cloud extends Controller { notice( t('Permission denied') . EOL); } elseif($err instanceof \Sabre\DAV\Exception\NotImplemented) { - notice( t('Please refresh page') . EOL); + // notice( t('Please refresh page') . EOL); + goaway(z_root() . '/' . \App::$query_string); } else { notice( t('Unknown error') . EOL); diff --git a/Zotlabs/Module/Regate.php b/Zotlabs/Module/Regate.php index d51927de1..6d9d5dc28 100644 --- a/Zotlabs/Module/Regate.php +++ b/Zotlabs/Module/Regate.php @@ -139,18 +139,22 @@ class Regate extends \Zotlabs\Web\Controller { // zar_log($msg . ':' . print_r($cra, true)); zar_log($msg . ' ' . $cra['account']['account_email'] . ' ' . $cra['account']['account_language']); + $nextpage = 'new_channel'; - $auto_create = (get_config('system','auto_channel_create') ? true : false); + $auto_create = get_config('system','auto_channel_create',1); if($auto_create) { // prepare channel creation if($reonar['chan.name']) - set_aconfig($cra['account']['account_id'], - 'register','channel_name',$reonar['chan.name']); + set_aconfig($cra['account']['account_id'], 'register', 'channel_name', $reonar['chan.name']); + if($reonar['chan.did1']) - set_aconfig($cra['account']['account_id'], - 'register','channel_address',$reonar['chan.did1']); + set_aconfig($cra['account']['account_id'], 'register', 'channel_address', $reonar['chan.did1']); + + $permissions_role = get_config('system','default_permissions_role'); + if($permissions_role) + set_aconfig($cra['account']['account_id'], 'register', 'permissions_role', $permissions_role); } authenticate_success($cra['account'],null,true,false,true); diff --git a/Zotlabs/Module/Register.php b/Zotlabs/Module/Register.php index 95d9da3b7..d076d9ccf 100644 --- a/Zotlabs/Module/Register.php +++ b/Zotlabs/Module/Register.php @@ -171,11 +171,10 @@ class Register extends Controller { } - $policy = intval(get_config('system','register_policy')); - $invonly = intval(get_config('system','invitation_only')); - $invalso = intval(get_config('system','invitation_also')); - $auto_create = (get_config('system','auto_channel_create') ? true : false); - $auto_create = true; + $policy = get_config('system','register_policy'); + $invonly = get_config('system','invitation_only'); + $invalso = get_config('system','invitation_also'); + $auto_create = get_config('system','auto_channel_create', 1); switch($policy) { @@ -244,8 +243,8 @@ class Register extends Controller { intval($reg['reg_id']) ); - $msg = 'ZAR0237I ' . t('Invitation code succesfully applied'); - zar_log($msg) . ', ' . $email; + $msg = t('Invitation code succesfully applied'); + zar_log('ZAR0237I ' . $msg) . ', ' . $email; // msg! info($msg . EOL); @@ -261,29 +260,29 @@ class Register extends Controller { } else { // msg! - notice('ZAR0236E ' . t('Invitation not in time or too late') . EOL); - goaway(z_root() . '/~'); + notice(t('Invitation not in time or too late') . EOL); + return; } } else { // no match email adr - $msg = 'ZAR0235S ' . t('Invitation email failed'); - zar_log($msg); + $msg = t('Invitation email failed'); + zar_log('ZAR0235S ' . $msg); notice($msg . EOL); - goaway(z_root() . '/~'); + return; } } else { // no match invitecode - $msg = 'ZAR0234S ' . t('Invitation code failed') ; - zar_log($msg); + $msg = t('Invitation code failed') ; + zar_log('ZAR0234S ' . $msg); notice( $msg . EOL); - goaway(z_root() . '/~'); + return; } } else { - notice('ZAR0232E ' . t('Invitations are not available') . EOL); - goaway(z_root() . '/~'); + notice(t('Invitations are not available') . EOL); + return; } @@ -309,20 +308,20 @@ class Register extends Controller { } else { - $msg = 'ZAR0237E ' . t('Email address already in use') . EOL; + $msg = t('Email address already in use') . EOL; notice($msg); // problem, the msg tells to anonymous about existant email addrs // use another msg instead ? TODO ? // on the other hand can play the fail2ban game - zar_log($msg . ' (' . $email . ')'); - goaway(z_root()); + zar_log('ZAR0237E ' . $msg . ' (' . $email . ')'); + return; } } else { - $msg = 'ZAR0233E ' . t('Registration on this hub is by invitation only') . EOL; + $msg = t('Registration on this hub is by invitation only') . EOL; notice($msg); - zar_log($msg); - goaway(z_root()); + zar_log('ZAR0233E ' . $msg); + return; } } @@ -442,9 +441,9 @@ class Register extends Controller { goaway(z_root() . '/regate/' . bin2hex('d' . $didnew) . 'a' ); } else { - $msg = 'ZAR0239D,' . t('Error creating dId A'); + $msg = t('Error creating dId A'); notice( $msg ); - zar_log( $msg . ' ' . $did2); + zar_log( 'ZAR0239D,' . $msg . ' ' . $did2); } } goaway(z_root() . '/regate/' . bin2hex($email) . $didx ); @@ -461,7 +460,7 @@ class Register extends Controller { if(intval(get_config('system','register_policy')) === REGISTER_CLOSED) { if(intval(get_config('system','directory_mode')) === DIRECTORY_MODE_STANDALONE) { - notice( 'ZAR0130E ' . t('Registration on this hub is disabled.') . EOL); + notice(t('Registration on this hub is disabled.') . EOL); return; } @@ -521,7 +520,7 @@ class Register extends Controller { $enable_tos = 1 - intval(get_config('system','no_termsofservice')); - $auto_create = (get_config('system','auto_channel_create') ? true : false); + $auto_create = get_config('system', 'auto_channel_create', 1); $default_role = get_config('system','default_permissions_role'); $email_verify = get_config('system','verify_email'); @@ -540,7 +539,7 @@ class Register extends Controller { $invite_code = array('invite_code', t('Please enter your invitation code'), ((x($_REQUEST,'invite_code')) ? strip_tags(trim($_REQUEST['invite_code'])) : "")); // - $name = array('name', t('Your Name'), + $name = array('name', t('Your name'), ((x($_REQUEST,'name')) ? $_REQUEST['name'] : ''), t('Real names are preferred.')); $nickhub = '@' . str_replace(array('http://','https://','/'), '', get_config('system','baseurl')); $nickname = array('nickname', t('Choose a short nickname'), @@ -565,7 +564,7 @@ class Register extends Controller { '$tao' => "typeof(window.tao) == 'undefined' ? window.tao = {} : '';\n" . "tao.zar = { vsn: '2.0.0', form: {}, msg: {} };\n" . "tao.zar.patano = /^d[0-9]{5,10}$/;\n" - . "tao.zar.patema = /^[a-z0-9.-]{2,64}@[a-z0-9.-]{4,32}\.[a-z]{2,12}$/;\n" + . "tao.zar.patema = /^[a-z0-9.-]{1,64}@[a-z0-9.-]{2,32}\.[a-z]{2,12}$/;\n" . "tao.zar.msg.ZAR0239E = '" . t('Email address not valid') . "';\n", '$form_security_token' => get_form_security_token("register"), @@ -573,7 +572,7 @@ class Register extends Controller { '$reg_is' => $registration_is, '$registertext' => bbcode(get_config('system','register_text')), '$other_sites' => $other_sites, - '$msg' => $opal['rn'] . ',' . $opal['an'], + '$msg' => $opal['msg'], '$invitations' => $invitations, '$invite_code' => $invite_code, '$haveivc' => t('I have an invite code'), @@ -593,7 +592,7 @@ class Register extends Controller { '$pass1' => $password, '$pass2' => $password2, '$submit' => t('Register'), - '$verify_note' => (($email_verify) ? t('This site requires verification. After completing this form, please check the notice or your email for further instructions.') : '') + //'$verify_note' => (($email_verify) ? t('This site requires verification. After completing this form, please check the notice or your email for further instructions.') : '') )); return $o; @@ -624,8 +623,8 @@ class Register extends Controller { } if ( $rear['is']) { - $rear['msg'] = 'ZAR0333W ' . t('This site has exceeded the number of allowed daily account registrations'); - zar_log($msg); + $rear['msg'] = t('This site has exceeded the number of allowed daily account registrations.'); + zar_log('ZAR0333W ' . $rear['msg']); $rear['is'] = true; } } diff --git a/include/account.php b/include/account.php index 7f8a8a2bf..10131c5d4 100644 --- a/include/account.php +++ b/include/account.php @@ -688,7 +688,7 @@ function account_allow($hash) { pop_lang(); - if(get_config('system','auto_channel_create')) + if(get_config('system', 'auto_channel_create', 1)) auto_channel_create($register[0]['uid']); if ($res) { diff --git a/include/bbcode.php b/include/bbcode.php index 388a828c4..228af7faa 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -1113,6 +1113,13 @@ function bbcode($Text, $options = []) { $Text = preg_replace_callback("/\[summary\](.*?)\[\/summary\]/ism", 'bb_spacefy',$Text); } + if (strpos($Text,'[/img]') !== false) { + $Text = preg_replace_callback('/\[img(.*?)\[\/(img)\]/ism','\red_escape_codeblock',$Text); + } + if (strpos($Text,'[/zmg]') !== false) { + $Text = preg_replace_callback('/\[zmg(.*?)\[\/(zmg)\]/ism','\red_escape_codeblock',$Text); + } + $Text = bb_format_attachdata($Text); // If we find any event code, turn it into an event. @@ -1236,6 +1243,8 @@ function bbcode($Text, $options = []) { if($tryoembed) { $Text = preg_replace_callback("/([^\]\='".'"'."\;\/]|^|\#\^)(https?\:\/\/$urlchars+)/ismu", 'tryoembed', $Text); } + // Is this still desired? + // We already turn naked URLs into links during creation time cleanup_bbcode() $Text = preg_replace("/([^\]\='".'"'."\;\/]|^|\#\^)(https?\:\/\/$urlchars+)/ismu", '$1<a href="$2" ' . $target . ' rel="nofollow noopener">$2</a>', $Text); } @@ -1498,9 +1507,21 @@ function bbcode($Text, $options = []) { "<span class=".'"bb-quote"'.">" . $t_wrote . "</span><blockquote>$2</blockquote>", $Text); + // Images + + if (strpos($Text,'[/img]') !== false) { + $Text = preg_replace_callback('/\[\$b64img(.*?)\[\/(img)\]/ism','\red_unescape_codeblock',$Text); + } + + if (strpos($Text,'[/zmg]') !== false) { + $Text = preg_replace_callback('/\[\$b64zmg(.*?)\[\/(zmg)\]/ism','\red_unescape_codeblock',$Text); + } + + // [img]pathtoimage[/img] if (strpos($Text,'[/img]') !== false) { + $Text = preg_replace("/\[img\](.*?)\[\/img\]/ism", '<img style="max-width: 100%;" src="$1" alt="' . t('Image/photo') . '" loading="eager" />', $Text); } // [img=pathtoimage]image description[/img] diff --git a/include/text.php b/include/text.php index c6980c5f8..1eaa890e0 100644 --- a/include/text.php +++ b/include/text.php @@ -3586,6 +3586,8 @@ function cleanup_bbcode($body) { $body = preg_replace_callback('/\[url(.*?)\[\/(url)\]/ism','\red_escape_codeblock',$body); $body = preg_replace_callback('/\[zrl(.*?)\[\/(zrl)\]/ism','\red_escape_codeblock',$body); $body = preg_replace_callback('/\[svg(.*?)\[\/(svg)\]/ism','\red_escape_codeblock',$body); + $body = preg_replace_callback('/\[img(.*?)\[\/(img)\]/ism','\red_escape_codeblock',$body); + $body = preg_replace_callback('/\[zmg(.*?)\[\/(zmg)\]/ism','\red_escape_codeblock',$body); $body = preg_replace_callback("/([^\]\='".'"'."\;\/\{]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\ +\,\(\)]+)/ismu", '\nakedoembed', $body); @@ -3598,6 +3600,8 @@ function cleanup_bbcode($body) { $body = preg_replace_callback('/\[\$b64url(.*?)\[\/(url)\]/ism','\red_unescape_codeblock',$body); $body = preg_replace_callback('/\[\$b64code(.*?)\[\/(code)\]/ism','\red_unescape_codeblock',$body); $body = preg_replace_callback('/\[\$b64svg(.*?)\[\/(svg)\]/ism','\red_unescape_codeblock',$body); + $body = preg_replace_callback('/\[\$b64img(.*?)\[\/(img)\]/ism','\red_unescape_codeblock',$body); + $body = preg_replace_callback('/\[\$b64zmg(.*?)\[\/(zmg)\]/ism','\red_unescape_codeblock',$body); // fix any img tags that should be zmg diff --git a/view/css/mod_admin.css b/view/css/mod_admin.css index 8f1b98b61..fa8f84d83 100644 --- a/view/css/mod_admin.css +++ b/view/css/mod_admin.css @@ -1,4 +1,4 @@ - + /** * ADMIN @@ -9,7 +9,7 @@ font-weight: bold; background-color: #FF0000; padding: 0em 0.3em; - + } #adminpage dl { clear: left; @@ -74,3 +74,18 @@ tr.zebra9 { background-color: #eafaf1; } tr.zebra0 { background-color: #fbeee6; } tr.zebra1 { background-color: #fef9e7; } + +.zuiqmid { + font-weight: normal; + font-family: monospace; +} + +.zui_n { + width: 5em; + text-align: center; +} + +.zuia { + cursor: pointer; + font-weight: bold; +} diff --git a/view/js/mod_register.js b/view/js/mod_register.js index 16f9b6da1..1b61e2b3d 100644 --- a/view/js/mod_register.js +++ b/view/js/mod_register.js @@ -14,11 +14,11 @@ $(document).ready(function() { //ano } else { if (tao.zar.patema.test(tao.zar.form.email) == false ) { - $('#help_email').removeClass('text-muted').addClass('zuirise').html(tao.zar.msg.ZAR0239E); + $('#help_email').removeClass('text-muted').addClass('text-danger').html(tao.zar.msg.ZAR0239E); zFormError('#help_email',true); } else { $.get('register/email_check.json?f=&email=' + encodeURIComponent(tao.zar.form.email), function(data) { - $('#help_email').removeClass('text-muted').addClass('zuirise').html(data.message); + $('#help_email').removeClass('text-muted').addClass('text-danger').html(data.message); zFormError('#help_email',data.error); }); } @@ -30,7 +30,7 @@ $(document).ready(function() { $('#id_password').change(function() { if(($('#id_password').val()).length < 6 ) { - $('#help_password').removeClass('text-muted').addClass('zuirise').html(aStr.pwshort); + $('#help_password').removeClass('text-muted').addClass('text-danger').html(aStr.pwshort); zFormError('#help_password', true); } else { @@ -42,7 +42,7 @@ $(document).ready(function() { }); $('#id_password2').change(function() { if($('#id_password').val() != $('#id_password2').val()) { - $('#help_password2').removeClass('text-muted').addClass('zuirise').html(aStr.pwnomatch); + $('#help_password2').removeClass('text-muted').addClass('text-danger').html(aStr.pwnomatch); zFormError('#help_password2', true); $('#id_password').focus(); } diff --git a/view/tpl/admin_site.tpl b/view/tpl/admin_site.tpl index 0fff7029a..b6fd2348d 100644 --- a/view/tpl/admin_site.tpl +++ b/view/tpl/admin_site.tpl @@ -5,11 +5,11 @@ <input type='hidden' name='form_security_token' value='{{$form_security_token}}'> {{include file="field_input.tpl" field=$sitename}} - + {{include file="field_input.tpl" field=$location}} {{include file="field_textarea.tpl" field=$banner}} {{include file="field_textarea.tpl" field=$siteinfo}} {{include file="field_textarea.tpl" field=$admininfo}} - + {{include file="field_select.tpl" field=$access_policy}} {{include file="field_input.tpl" field=$reply_address}} {{include file="field_input.tpl" field=$from_email}} {{include file="field_input.tpl" field=$from_email_name}} @@ -33,21 +33,19 @@ {{include file="field_input.tpl" field=$register_text}} {{include file="field_select_grouped.tpl" field=$role}} {{include file="field_select.tpl" field=$register_policy}} - {{include file="field_checkbox.tpl" field=$register_wo_email}} + {{** include file="field_checkbox.tpl" field=$register_wo_email **}} {{include file="register_duty.tpl" field=$register_duty}} {{include file="field_input.tpl" field=$register_perday}} - {{include file="field_input.tpl" field=$register_sameip}} + {{** include file="field_input.tpl" field=$register_sameip **}} {{$reg_delay}} {{$reg_expire}} {{include file="field_checkbox.tpl" field=$reg_autochannel}} {{include file="field_checkbox.tpl" field=$invitation_only}} {{include file="field_checkbox.tpl" field=$invitation_also}} {{include file="field_checkbox.tpl" field=$verify_email}} - {{include file="field_input.tpl" field=$abandon_days}} + {{include file="field_input.tpl" field=$minimum_age}} - {{include file="field_select.tpl" field=$access_policy}} - {{include file="field_input.tpl" field=$location}} - {{include file="field_input.tpl" field=$sellpage}} + {{** include file="field_input.tpl" field=$sellpage **}} {{include file="field_input.tpl" field=$first_page}} <div class="submit"> @@ -62,6 +60,7 @@ {{include file="field_checkbox.tpl" field=$open_pubstream}} {{include file="field_textarea.tpl" field=$incl}} {{include file="field_textarea.tpl" field=$excl}} + {{include file="field_input.tpl" field=$abandon_days}} <div class="submit"> <input type="submit" name="page_site" class="btn btn-primary" value="{{$submit}}" /></div> @@ -80,6 +79,7 @@ {{include file="field_input.tpl" field=$maxloadavg}} {{include file="field_input.tpl" field=$default_expire_days}} {{include file="field_input.tpl" field=$active_expire_days}} + <div class="submit"> <input type="submit" name="page_site" class="btn btn-primary" value="{{$submit}}" /> @@ -127,12 +127,4 @@ } }); }); - // [hilmar-> - $('head').append( - '<style> '+ - ' .zuiqmid { font-weight: normal; font-family: monospace; }'+ - ' .zui_n { width: 5em; text-align: center; }'+ - ' .zuia { cursor: pointer; font-weight: bold; }'+ - '</style>'); - // <-hilmar] </script> diff --git a/view/tpl/register.tpl b/view/tpl/register.tpl index b38507f92..d6f70d118 100644 --- a/view/tpl/register.tpl +++ b/view/tpl/register.tpl @@ -5,9 +5,10 @@ <div class="section-content-wrapper"> <form action="register" method="post" id="register-form"> <input type='hidden' name='form_security_token' value='{{$form_security_token}}'> - {{if $reg_is || $other_sites || $now}} + {{if $reg_is || $other_sites || $now || $msg}} <div class="section-content-warning-wrapper"> - <h3>{{$now}}</h3> + <div class="h3">{{$now}}</div> + <div id="register-desc" class="descriptive-paragraph">{{$msg}}</div> <div id="register-desc" class="descriptive-paragraph">{{$reg_is}}</div> <div id="register-sites" class="descriptive-paragraph">{{$other_sites}}</div> </div> @@ -18,6 +19,26 @@ </div> {{/if}} + {{if $auto_create}} + {{if $default_role}} + <input type="hidden" name="permissions_role" value="{{$default_role}}" /> + {{else}} + <div class="section-content-info-wrapper"> + {{$help_role}} + </div> + {{include file="field_select_grouped.tpl" field=$role}} + {{/if}} + + <div class="position-relative"> + <div id="name-spinner" class="spinner-wrapper position-absolute" style="top: 2.5rem; right: 0.5rem;"><div class="spinner s"></div></div> + {{include file="field_input.tpl" field=[$name.0,$name.1,"","","",$atform]}} + </div> + <div class="position-relative"> + <div id="nick-spinner" class="spinner-wrapper position-absolute" style="top: 2.5rem; right: 0.5rem;"><div class="spinner s"></div></div> + {{include file="field_input.tpl" field=[$nickname.0,$nickname.1,"","","",$atform]}} + </div> + {{/if}} + <div> {{if $invitations}} <a id="zar014" href="javascript:;" style="display: inline-block;">{{$haveivc}}</a> @@ -33,22 +54,6 @@ {{include file="field_password.tpl" field=$pass2}} - {{if $auto_create}} - {{if $default_role}} - <input type="hidden" name="permissions_role" value="{{$default_role}}" /> - {{else}} - <div class="section-content-info-wrapper"> - {{$help_role}} - </div> - {{include file="field_select_grouped.tpl" field=$role}} - {{/if}} - - {{include file="field_input.tpl" field=[$name.0,$name.1,"","","",$atform]}} - <div id="name-spinner" class="spinner-wrapper"><div class="spinner m"></div></div> - - {{include file="field_input.tpl" field=[$nickname.0,$nickname.1,"","","",$atform]}} - <div id="nick-spinner" class="spinner-wrapper"><div class="spinner m"></div></div> - {{/if}} {{if $enable_tos}} {{include file="field_checkbox.tpl" field=[$tos.0,$tos.1,"","","",$atform]}} @@ -59,8 +64,6 @@ <button class="btn btn-primary" type="submit" name="submit" id="newchannel-submit-button" value="{{$submit}}" {{$atform}}>{{$submit}}</button> <div id="register-submit-end" class="register-field-end"></div> </form> - <br /> - <div class="descriptive-text">{{$verify_note}} {{$msg}}</div> </div> </div> {{* @@ -76,7 +79,7 @@ {{$tao}} - var week_days = ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday']; + var week_days = ['Monday', 'Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday']; $('.register_date').each( function () { var date = new Date($(this).data('utc')); $(this).html(date.toLocaleString(undefined, {weekday: 'short', hour: 'numeric', minute: 'numeric'})); |