aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2021-04-17 23:46:40 +0200
committerMax Kostikov <max@kostikov.co>2021-04-17 23:46:40 +0200
commit200d3577fa32bb5107e0376dfd5ee9b3bc8b8721 (patch)
tree29be82bc3b5e67986d503ec2c37d05eb38b32db2 /view/tpl
parentb5620cb79443fcbf1820341bce05fadbb0b124be (diff)
parent8ab99747f55e60448d4468e99d97ae6c0fa566c0 (diff)
downloadvolse-hubzilla-200d3577fa32bb5107e0376dfd5ee9b3bc8b8721.tar.gz
volse-hubzilla-200d3577fa32bb5107e0376dfd5ee9b3bc8b8721.tar.bz2
volse-hubzilla-200d3577fa32bb5107e0376dfd5ee9b3bc8b8721.zip
Merge branch 'dev' of https://framagit.org/kostikov/core into dev
Diffstat (limited to 'view/tpl')
-rw-r--r--view/tpl/admin_accounts.tpl54
-rw-r--r--view/tpl/admin_site.tpl2
-rw-r--r--view/tpl/js_strings.tpl5
-rw-r--r--view/tpl/regate.tpl47
-rw-r--r--view/tpl/regate_post.tpl16
-rw-r--r--view/tpl/regate_pre.tpl64
-rw-r--r--view/tpl/register.tpl71
7 files changed, 164 insertions, 95 deletions
diff --git a/view/tpl/admin_accounts.tpl b/view/tpl/admin_accounts.tpl
index 9c78dbe54..490468e79 100644
--- a/view/tpl/admin_accounts.tpl
+++ b/view/tpl/admin_accounts.tpl
@@ -5,8 +5,8 @@
<input type="hidden" name="form_security_token" value="{{$form_security_token}}">
<h3>{{$h_pending}}</h3>
- {{if $debug}}<div>{{$debug}}</div>{{/if}}
- {{if $pending}}
+ {{if $debug}}<div>{{$debug}}</div>{{/if}}
+ {{if $pending}}
<table id="pending">
<thead>
<tr>
@@ -16,16 +16,13 @@
</tr>
</thead>
<tbody>
- {{foreach $pending as $n => $u}}
- <tr class="zebra zebra{{$u.reg_z}}">
- <td class="created">{{$u.reg_created}}<br>{{$u.reg_n}}
- </td>
-
- <td class="status">{{$u.status}}</td>
-
- <td class="created">{{$u.reg_startup}}<br>{{$u.reg_expires}}</td>
- <td class="email">{{$u.reg_did2}}</td>
- <td class="email">{{$u.reg_email}}<br>{{$u.reg_atip}}</td>
+ {{foreach $pending as $n => $u}}
+ <tr class="">
+ <td class="text-nowrap">{{$u.reg_created}}</td>
+ <td class="text-break">{{$u.reg_did2}}</td>
+ <td class="text-break">{{$u.reg_email}}</td>
+ <td class="">{{$u.reg_atip}}</td>
+ <td class="">{{$u.reg_atip_n}}</td>
<td class="checkbox_bulkedit"><input type="checkbox" class="pending_ckbx" id="id_pending_{{$n}}" name="pending[]" value="{{$n}}"></td>
<td class="tools">
<a id="zara_{{$n}}" {{* href="{{$baseurl}}/regmod/allow/{{$n}}" *}} class="zar2s zara btn btn-default btn-xs" title="{{$approve}}"><i class="fa fa-thumbs-o-up admin-icons"></i></a>
@@ -33,7 +30,10 @@
<span id="zarreax_{{$n}}" class="zarreax"></span>
</td>
</tr>
- {{/foreach}}
+ <tr>
+ <td colspan="7"><strong>{{$msg}}:</strong> {{$u.msg}}</td>
+ </tr>
+ {{/foreach}}
</tbody>
</table>
{{* before, alternate:
@@ -43,12 +43,12 @@
*}}
<div class="selectall">
<a id="zar2sat" class="btn btn-sm btn-primary" href="javascript:;">{{$sel_tall}}</a>
- <a id="zar2aas" class="zar2xas btn btn-sm btn-success" href="javascript:;"><i class="fa fa-check"></i> {{$sel_aprv}}</a>
- <a id="zar2das" class="zar2xas btn btn-sm btn-danger" href="javascript:;"><i class="fa fa-close"></i> {{$sel_deny}}</a>
+ <a id="zar2aas" class="zar2xas btn btn-sm btn-success" href="javascript:;"><i class="fa fa-check"></i> {{$sel_aprv}}</a>
+ <a id="zar2das" class="zar2xas btn btn-sm btn-danger" href="javascript:;"><i class="fa fa-close"></i> {{$sel_deny}}</a>
</div>
- {{else}}
+ {{else}}
<p>{{$no_pending}}</p>
- {{/if}}
+ {{/if}}
<h3>{{$h_users}}</h3>
@@ -84,13 +84,13 @@
{{/foreach}}
</tbody>
</table>
-
+
<div class="selectall"><a id="zarckbxtoggle" href="javascript:;">{{$select_all}}</a></div>
- {{*
+ {{*
<div class="selectall"><a href="#" onclick="return toggle_selectall('users_ckbx');">{{$select_all}}</a></div>
*}}
<div class="submit">
- <input type="submit" name="page_accounts_block" class="btn btn-primary" value="{{$block}}/{{$unblock}}" />
+ <input type="submit" name="page_accounts_block" class="btn btn-primary" value="{{$block}}/{{$unblock}}" />
<input type="submit" name="page_accounts_delete" class="btn btn-primary" onclick="return confirm_delete_multi()" value="{{$delete}}" />
</div>
{{else}}
@@ -98,7 +98,7 @@
{{/if}}
</form>
</div>
-{{*
+{{*
COMMENTS for this template:
hilmar, 2020.01
script placed at the end
@@ -119,17 +119,17 @@
tao.zar = { vsn: '2.0.0', c2s: {}, t: {} };
{{$tao}}
$('#adminpage').on( 'click', '#zar2sat', function() {
- $('input.pending_ckbx:checkbox').each( function() { this.checked = ! this.checked; });
+ $('input.pending_ckbx:checkbox').each( function() { this.checked = ! this.checked; });
});
$('#adminpage').on( 'click', '.zar2xas', function() {
tao.zar.c2s.x = $(this).attr('id').substr(4,1);
- $('input.pending_ckbx:checkbox:checked').each( function() {
- //if (this.checked)
+ $('input.pending_ckbx:checkbox:checked').each( function() {
+ //if (this.checked)
// take the underscore with to prevent numeric 0 headdage
tao.zar.c2s.n = $(this).attr('id').substr(10);
$('#zarreax'+tao.zar.c2s.n).html(tao.zar.zarax);
zarCSC();
- });
+ });
});
$('.zar2s').click( function() {
tao.zar.c2s.ix=$(this).attr('id');
@@ -142,12 +142,12 @@
function zarCSC() {
$.ajax({
- type: 'POST', url: 'admin/accounts',
+ type: 'POST', url: 'admin/accounts',
data: {
zarat: tao.zar.c2s.n,
zardo: tao.zar.c2s.x,
zarse: tao.zar.zarar[(tao.zar.c2s.n).substr(1)],
- form_security_token: $("input[name='form_security_token']").val()
+ form_security_token: $("input[name='form_security_token']").val()
}
}).done( function(r) {
tao.zar.r = JSON.parse(r);
diff --git a/view/tpl/admin_site.tpl b/view/tpl/admin_site.tpl
index b6fd2348d..5d51932eb 100644
--- a/view/tpl/admin_site.tpl
+++ b/view/tpl/admin_site.tpl
@@ -36,7 +36,7 @@
{{** 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}}
diff --git a/view/tpl/js_strings.tpl b/view/tpl/js_strings.tpl
index 291d78fb2..8f05165f1 100644
--- a/view/tpl/js_strings.tpl
+++ b/view/tpl/js_strings.tpl
@@ -69,8 +69,11 @@
'allday' : "{{$allday}}",
// mod cloud
+ 'download_info' : "{{$download_info}}",
- 'download_info' : "{{$download_info}}"
+ // mod register
+ 'email_not_valid' : "{{$email_not_valid}}",
+ 'email_required' : "{{$email_required}}"
};
diff --git a/view/tpl/regate.tpl b/view/tpl/regate.tpl
index 04a9df1de..b9239ee46 100644
--- a/view/tpl/regate.tpl
+++ b/view/tpl/regate.tpl
@@ -1,27 +1,38 @@
-<h2>{{$title}}</h2>
+<div class="generic-content-wrapper">
+ <div class="section-title-wrapper">
+ <h2>{{$title}}</h2>
+ </div>
+ <div class="section-content-wrapper">
+ {{if $now}}
+ <div class="section-content-danger-wrapper">
+ <div class="h3">{{$now}}</div>
+ </div>
+ {{else}}
+ <div class="section-content-info-wrapper">
+ {{$desc}} {{$id}}
+ <div class="h3">{{$pin}}</div>
+ </div>
-<h3>{{$now}}</h3>
+ <form action="regate/{{$did2}}" method="post">
+ <input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
+ {{include file="field_input.tpl" field=[$acpin.0,$acpin.1,"","","",$atform]}}
-<div class="descriptive-paragraph" style="font-size: 1.2em;"><p>{{$desc}}</p></div>
+ <div class="pull-right submit-wrapper">
+ <button type="submit" name="submit" class="btn btn-primary" {{$atform}}>{{$submit}}</button>
+ </div>
-<form action="regate/{{$did2}}" method="post">
-<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
-{{include file="field_input.tpl" field=[$acpin.0,$acpin.1,"","","",$atform]}}
+ {{if $resend}}
+ <div class="resend-email" >
+ <button type="submit" name="resend" class="btn btn-warning" {{$atform}}>{{$resend}}</button>
+ </div>
+ {{/if}}
-<div class="pull-right submit-wrapper">
- <button type="submit" name="submit" class="btn btn-primary"{{$atform}}>{{$submit}}</button>
+ </form>
+ {{/if}}
+ <div class="clearfix"></div>
+ </div>
</div>
-
-{{if $resend > ''}}
-<div class="resend-email" >
- <button type="submit" name="resend" class="btn btn-warning"{{$atform}}>{{$resend}}</button>
-</div>
-{{/if}}
-
-</form>
-<div class="clear"></div>
<script>
- 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'}));
diff --git a/view/tpl/regate_post.tpl b/view/tpl/regate_post.tpl
new file mode 100644
index 000000000..eccea9084
--- /dev/null
+++ b/view/tpl/regate_post.tpl
@@ -0,0 +1,16 @@
+<div class="generic-content-wrapper">
+ <div class="section-title-wrapper">
+ <h2>{{$title}}</h2>
+ </div>
+ <div class="section-content-wrapper">
+ <div class="section-content-success-wrapper">
+ <div class="h3"><i class="fa fa-check"></i> {{$strings.0}}</div>
+ </div>
+ <div class="section-content-warning-wrapper">
+ {{$strings.2}}
+ </div>
+ <div class="section-content-info-wrapper">
+ <div class="h3">{{$strings.1}} {{$id}}</div>
+ </div>
+ </div>
+</div>
diff --git a/view/tpl/regate_pre.tpl b/view/tpl/regate_pre.tpl
new file mode 100644
index 000000000..7596f6846
--- /dev/null
+++ b/view/tpl/regate_pre.tpl
@@ -0,0 +1,64 @@
+<div class="generic-content-wrapper">
+ <div class="section-title-wrapper">
+ <h2>{{$title}}</h2>
+ </div>
+ <div class="section-content-wrapper">
+ {{if $now}}
+ <div class="section-content-danger-wrapper">
+ <div class="h3">{{$now}}</div>
+ </div>
+ {{else}}
+ <div class="section-content-warning-wrapper">
+ {{$strings.0}}
+ <div id="countdown" class="h3"></div>
+ </div>
+ <div class="section-content-info-wrapper">
+ {{$strings.1}} {{$id}}
+ <div class="h3">{{$pin}}</div>
+ </div>
+ <div class="d-none">
+ {{$strings.2}}<br>
+ <span id="register_start" data-utc="{{$regdelay}}" class="register_date">
+ {{$regdelay}}
+ </span>
+ &nbsp;&dash;&nbsp;
+ <span data-utc="{{$regexpire}}" class="register_date">
+ {{$regexpire}}
+ </span>
+ </div>
+ {{/if}}
+ </div>
+</div>
+
+<script>
+ $('.register_date').each( function () {
+ var date = new Date($(this).data('utc'));
+ $(this).html(date.toLocaleString(undefined, {weekday: 'short', hour: 'numeric', minute: 'numeric'}));
+ });
+
+ var date = '{{$countdown}}';
+ date = date !== '' ? date : $('#register_start').data('utc');
+
+ if(date) {
+ doCountDown(date, 'countdown');
+ var x = setInterval(doCountDown, 1000, date, 'countdown');
+ }
+
+ function doCountDown(date, id) {
+ var countDownDate = new Date(date).getTime();
+ var now = new Date().getTime();
+ var distance = countDownDate - now;
+ var days = Math.floor(distance / (1000 * 60 * 60 * 24));
+ var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
+ var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
+ var seconds = Math.floor((distance % (1000 * 60)) / 1000);
+
+ document.getElementById(id).innerHTML = days + "d " + hours + "h "+ minutes + "m " + seconds + "s ";
+
+ if (distance < 0) {
+ clearInterval(x);
+ document.getElementById(id).innerHTML = 'Reloading...';
+ window.location.reload();
+ }
+ }
+</script>
diff --git a/view/tpl/register.tpl b/view/tpl/register.tpl
index d6f70d118..8e1530eb4 100644
--- a/view/tpl/register.tpl
+++ b/view/tpl/register.tpl
@@ -5,9 +5,13 @@
<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 || $msg}}
- <div class="section-content-warning-wrapper">
+ {{if $now}}
+ <div class="section-content-danger-wrapper">
<div class="h3">{{$now}}</div>
+ </div>
+ {{/if}}
+ {{if $reg_is || $other_sites || $msg}}
+ <div class="section-content-warning-wrapper">
<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>
@@ -19,69 +23,40 @@
</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}}
+ {{if $invitations}}
+ <a id="zar014" href="javascript:;" style="display: inline-block;">{{$haveivc}}</a>
+ <div id="zar015" style="display: none;">
+ <div class="position-relative">
+ <div id="invite-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=[$invite_code.0,$invite_code.1,"","",""]}}
+ </div>
</div>
- {{include file="field_select_grouped.tpl" field=$role}}
{{/if}}
+ {{if $auto_create}}
<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 id="name-spinner" class="spinner-wrapper position-absolute" style="top: 2.5rem; right: 0.75rem;"><div class="spinner s"></div></div>
+ {{include file="field_input.tpl" field=$name}}
</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 id="nick-hub" class="position-absolute" style="top: 2.3rem; right: 0.75rem;"><span class="text-muted">{{$nickhub}}</span></div>
+ <div id="nick-spinner" class="spinner-wrapper position-absolute" style="top: 2.5rem; right: 0.75rem;"><div class="spinner s"></div></div>
+ {{include file="field_input.tpl" field=$nickname}}
</div>
{{/if}}
-
- <div>
- {{if $invitations}}
- <a id="zar014" href="javascript:;" style="display: inline-block;">{{$haveivc}}</a>
- <div id="zar015" style="display: none;">
- {{include file="field_input.tpl" field=[$invite_code.0,$invite_code.1,"","",""]}}
- </div>
- {{/if}}
-
{{include file="field_input.tpl" field=$email}}
- </div>
-
{{include file="field_password.tpl" field=$pass1}}
-
{{include file="field_password.tpl" field=$pass2}}
-
-
+ {{if $reg_is}}
+ {{include file="field_textarea.tpl" field=$register_msg}}
+ {{/if}}
{{if $enable_tos}}
- {{include file="field_checkbox.tpl" field=[$tos.0,$tos.1,"","","",$atform]}}
+ {{include file="field_checkbox.tpl" field=$tos}}
{{else}}
<input type="hidden" name="tos" value="1" />
{{/if}}
-
<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>
</div>
</div>
-{{*
- COMMENTS for this template:
- hilmar, 2020.02
-*}}
-<script>
- $('head').append(
- '<style> '+
- ' .zuiqmid { font-weight: normal; font-family: monospace; }'+
- ' .zuirise { font-weight: bold; font-size: 100%; color: red; }'+
- '</style>');
-
- {{$tao}}
-
- 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'}));
- });
-</script>