aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'view/tpl')
-rwxr-xr-xview/tpl/admin_accounts.tpl107
-rwxr-xr-xview/tpl/admin_site.tpl93
-rwxr-xr-xview/tpl/invite.tpl130
-rw-r--r--view/tpl/plain.tpl3
-rw-r--r--view/tpl/regate.tpl23
-rwxr-xr-xview/tpl/register.tpl35
-rw-r--r--view/tpl/register_duty.tpl28
7 files changed, 350 insertions, 69 deletions
diff --git a/view/tpl/admin_accounts.tpl b/view/tpl/admin_accounts.tpl
index 2dd56c8dc..8d6506184 100755
--- a/view/tpl/admin_accounts.tpl
+++ b/view/tpl/admin_accounts.tpl
@@ -1,15 +1,3 @@
-<script>
- function confirm_delete(uname){
- return confirm( "{{$confirm_delete}}".format(uname));
- }
- function confirm_delete_multi(){
- return confirm("{{$confirm_delete_multi}}");
- }
- function toggle_selectall(cls){
- $("."+cls).prop("checked", !$("."+cls).prop("checked"));
- return false;
- }
-</script>
<div class="generic-content-wrapper-styled" id="adminpage">
<h1>{{$title}} - {{$page}}</h1>
@@ -17,6 +5,7 @@
<input type="hidden" name="form_security_token" value="{{$form_security_token}}">
<h3>{{$h_pending}}</h3>
+ {{if $debug}}<div>{{$debug}}</div>{{/if}}
{{if $pending}}
<table id="pending">
<thead>
@@ -27,20 +16,34 @@
</tr>
</thead>
<tbody>
- {{foreach $pending as $u}}
- <tr>
- <td class="created">{{$u.account_created}}</td>
- <td class="email">{{$u.account_email}}</td>
- <td class="checkbox_bulkedit"><input type="checkbox" class="pending_ckbx" id="id_pending_{{$u.hash}}" name="pending[]" value="{{$u.hash}}"></td>
+ {{foreach $pending as $n => $u}}
+ <tr class="zebra zebra{{$u.reg_z}}">
+ <td class="created">{{$u.reg_created}}<br>{{$u.reg_n}}
+ {{if $u.reg_expires < $now}} ★EXPIRED★{{/if}}</td>
+ <td class="created">{{$u.reg_startup}}<br>{{$u.reg_expires}}</td>
+ <td class="email">{{$u.reg_did2}}<br>{{$u.reg_vfd}}</td>
+ <td class="email">{{$u.reg_email}}<br>{{$u.reg_atip}}</td>
+ <td class="checkbox_bulkedit"><input type="checkbox" class="pending_ckbx" id="id_pending_{{$n}}" name="pending[]" value="{{$n}}"></td>
<td class="tools">
- <a href="{{$baseurl}}/regmod/allow/{{$u.hash}}" class="btn btn-default btn-xs" title="{{$approve}}"><i class="fa fa-thumbs-o-up admin-icons"></i></a>
- <a href="{{$baseurl}}/regmod/deny/{{$u.hash}}" class="btn btn-default btn-xs" title="{{$deny}}"><i class="fa fa-thumbs-o-down admin-icons"></i></a>
+ <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>
+ <a id="zard_{{$n}}" {{* href="{{$baseurl}}/regmod/deny/{{$n}}" *}} class="zar2s zard btn btn-default btn-xs" title="{{$deny}}"><i class="fa fa-thumbs-o-down admin-icons"></i></a>
+ <span id="zarreax_{{$n}}" class="zarreax"></span>
</td>
</tr>
{{/foreach}}
</tbody>
</table>
- <div class="selectall"><a href="#" onclick="return toggle_selectall('pending_ckbx');">{{$select_all}}</a></div>
+ {{* before, alternate:
+ *
+ <a href="#" onclick="return toggle_selectall('pending_ckbx');">{{$select_all}}</a>
+ *
+ *}}
+ <div class="selectall">
+ <a id="zar2aas" class="zar2xas btn btn-primary" href="javascript:;">{{$sel_aprv}}</a> ◄►
+ <a id="zar2das" class="zar2xas btn btn-primary" href="javascript:;">{{$sel_deny}}</a> ◄►
+ <a id="zar2sat" class="btn btn-primary" href="javascript:;">{{$sel_tall}}</a>
+ <br><br>
+ </div>
<div class="submit">
<input type="submit" name="page_accounts_deny" class="btn btn-primary" value="{{$deny}}" />
<input type="submit" name="page_accounts_approve" class="btn btn-primary" value="{{$approve}}" />
@@ -83,7 +86,11 @@
{{/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_delete" class="btn btn-primary" onclick="return confirm_delete_multi()" value="{{$delete}}" />
@@ -93,3 +100,63 @@
{{/if}}
</form>
</div>
+{{*
+ COMMENTS for this template:
+ hilmar, 2020.01
+ script placed at the end
+*}}
+<script>
+ function confirm_delete(uname){
+ return confirm( "{{$confirm_delete}}".format(uname));
+ }
+ function confirm_delete_multi(){
+ return confirm("{{$confirm_delete_multi}}");
+ }
+ function toggle_selectall(cls){
+ $("."+cls).prop("checked", !$("."+cls).prop("checked"));
+ return false;
+ }
+ // @hilmar |->
+ typeof(window.tao) == 'undefined' ? window.tao = {} : '';
+ tao.zar = { vsn: '2.0.0', c2s: {}, t: {} };
+ {{$tao}}
+ $('#adminpage').on( 'click', '#zar2sat', function() {
+ $('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)
+ // 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');
+ if (tao.zar.c2s.ix=='') { return false; };
+ tao.zar.c2s.n=tao.zar.c2s.ix.substr(4);
+ tao.zar.c2s.x=tao.zar.c2s.ix.substr(3,1);
+ $('#zarreax'+tao.zar.c2s.n).html(tao.zar.zarax);
+ zarCSC();
+ });
+
+ function zarCSC() {
+ $.ajax({
+ 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()
+ }
+ }).done( function(r) {
+ tao.zar.r = JSON.parse(r);
+ $('#zarreax'+tao.zar.r.at).html(tao.zar.r.re + ',' + tao.zar.r.rc);
+ $('#zara'+tao.zar.r.at+',#zard'+tao.zar.r.at+',#id_pending'+tao.zar.r.at).remove();
+ //$('#zar-remsg').text(tao.zar.r.feedbk);
+ })
+ }
+
+</script>
diff --git a/view/tpl/admin_site.tpl b/view/tpl/admin_site.tpl
index 8d32ba9a4..4896a2b26 100755
--- a/view/tpl/admin_site.tpl
+++ b/view/tpl/admin_site.tpl
@@ -1,39 +1,3 @@
-<script>
- $(function(){
-
- $("#cnftheme").colorbox({
- width: 800,
- onLoad: function(){
- var theme = $("#id_theme :selected").val();
- $("#cnftheme").attr('href',"{{$baseurl}}/admin/themes/"+theme);
- },
- onComplete: function(){
- $(this).colorbox.resize();
- $("#colorbox form").submit(function(e){
- var url = $(this).attr('action');
- // can't get .serialize() to work...
- var data={};
- $(this).find("input").each(function(){
- data[$(this).attr('name')] = $(this).val();
- });
- $(this).find("select").each(function(){
- data[$(this).attr('name')] = $(this).children(":selected").val();
- });
- console.log(":)", url, data);
-
- $.post(url, data, function(data) {
- if(timer) clearTimeout(timer);
- updateInit();
- $.colorbox.close();
- })
-
- return false;
- });
-
- }
- });
- });
-</script>
<div id="adminpage" class="generic-content-wrapper-styled">
<h1>{{$title}} - {{$page}}</h1>
@@ -69,10 +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="register_duty.tpl" field=$register_duty}}
+ {{include file="field_input.tpl" field=$register_perday}}
+ {{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=$invite_only}}
+ {{include file="field_checkbox.tpl" field=$invite_also}}
{{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_select.tpl" field=$access_policy}}
+ {{include file="field_input.tpl" field=$minimum_age}}
{{include file="field_input.tpl" field=$sellpage}}
{{include file="field_input.tpl" field=$first_page}}
@@ -115,3 +88,51 @@
</form>
</div>
+{{*
+ COMMENTS for this template:
+ hilmar, 2020.01
+ script placed at the end
+*}}
+<script>
+ $(function(){
+
+ $("#cnftheme").colorbox({
+ width: 800,
+ onLoad: function(){
+ var theme = $("#id_theme :selected").val();
+ $("#cnftheme").attr('href',"{{$baseurl}}/admin/themes/"+theme);
+ },
+ onComplete: function(){
+ $(this).colorbox.resize();
+ $("#colorbox form").submit(function(e){
+ var url = $(this).attr('action');
+ // can't get .serialize() to work...
+ var data={};
+ $(this).find("input").each(function(){
+ data[$(this).attr('name')] = $(this).val();
+ });
+ $(this).find("select").each(function(){
+ data[$(this).attr('name')] = $(this).children(":selected").val();
+ });
+ console.log(":)", url, data);
+
+ $.post(url, data, function(data) {
+ if(timer) clearTimeout(timer);
+ updateInit();
+ $.colorbox.close();
+ })
+
+ return false;
+ });
+
+ }
+ });
+ });
+ // [hilmar->
+ $('head').append(
+ '<style> '+
+ ' .zuiqmid { font-weight: normal; font-family: monospace; }'+
+ ' .zui_n { width: 5em; text-align: center; }'+
+ '</style>');
+ // <-hilmar]
+</script>
diff --git a/view/tpl/invite.tpl b/view/tpl/invite.tpl
index 440e1e02b..2712cfee4 100755
--- a/view/tpl/invite.tpl
+++ b/view/tpl/invite.tpl
@@ -1,6 +1,7 @@
<div id="invite" class="generic-content-wrapper">
<div class="section-title-wrapper">
- <h2>{{$invite}}</h2>
+ <h3 class="zai_il">{{$invite}}</h3>
+ <h4 class="zai_il">{{$lcclane}}</h4>
</div>
<div class="section-content-wrapper">
@@ -8,21 +9,136 @@
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
+ <pre>{{$ihave}}<br>{{$wehave}}</pre>
+
+ <div id="zai-re" style="visibility: hidden;">
+ <div class="zai_h0 fa"></div>
+ <pre id="zai-remsg"></pre>
+ </div>
+
<div id="invite-recipient-textarea" class="form-group field custom">
- <label for="recipients">{{$addr_text}}</label>
- <textarea id="invite-recipients" name="recipients" rows="6" class="form-control"></textarea>
+
+ <label for="zaito">{{$m11}}<sup class="zai_qmc">({{$n11}})</sup></label>
+ <textarea id="zai-to" name="zaito" rows="6" class="form-control"></textarea>
+
+ <span class="font-weight-bold">{{$m10}}<sup class="zai_qmc">({{$n10}})</sup></span>
+ <a id="zai-ax" href="javascript:;" class="zai_ax zai_b">check</a><br>
+
+ <hr>
+ {{$inv_expire}}
</div>
- <div id="invite-message-textarea" class="form-group field custom">
- <label for="message">{{$msg_text}}</label>
- <textarea id="invite-message" name="message" rows="12" class="form-control">{{$default_message}}</textarea>
+ <hr>
+
+ <div class="">
+ <div class="zai_h0">{{$subject_label}}
+ <span id="zai-subject">{{$subject}}</span>
+ </div>
+
+ <div id="invite-message-textarea" class="form-group field custom">
+ <label for="zaitxt">{{$m12}}<sup class="zai_qmc">({{$n12}})</sup></label>
+ <textarea id="zai-txt" name="zaitxt" rows="6" class="form-control">{{$personal_message}}</textarea>
+ </div>
</div>
+ <div class="zai_h0">{{$m13}}</div><sup class="zai_qmc">({{$n13}})</sup> {{$tplin}}<br>
+ <pre id="zai-ims">
+ {{$standard_message}}
+ </pre>
+ <pre id="zai-due">
+ {{$due}}
+ </pre>
+
<div id="invite-submit-wrapper" class="form-group">
<button class="btn btn-primary btn-sm" type="submit" id="invite-submit" name="submit" value="{{$submit}}">{{$submit}}</button>
</div>
-
+ <input type='hidden' id="zai-reon" name='zaireon' value=''>
</form>
</div>
</div>
+
+<script>
+ // @hilmar |->
+ typeof(window.tao) == 'undefined' ? window.tao = {} : '';
+ tao.zai = { vsn: '2.0.0', s: {}, t: {} };
+ {{$tao}}
+ $('head').append(
+ '<style> '+
+ ' .zai_h0 { font-size: 1.2rem; display: inline; }'+
+ ' .zai_hi { background: #ffc107; font-weight: bold; }'+
+ ' .zai_fa { margin: 0 0.2em 0 1em; }'+
+ ' .zai_lcc, .zai_qmc, .zuiqmid { font-family: monospace; text-transform: uppercase; }'+
+ ' .zai_lcc5 { display: none; }'+
+ ' .zai_ax { margin-inline: 8rem; }'+
+ ' .zai_il { display: inline; }'+
+ ' .zai_b { font-weight: bold; }'+
+ ' .zai_n { width: 5em; text-align: center; }'+
+ ' #id_zaiexpire_fs { display: inline-block; }'+
+ ' .invites { text-transform: capitalize; }'+
+ ' .jGrowl-message { font-family: monospace; }'+
+ '</style>');
+ $('#zai-txt').attr('placeholder','{{$personal_pointer}}');
+ zaitx();
+ $('.zuiqmid').removeClass('required');
+ $('#invite')
+ .delegate('.invites', 'click', function() {
+ tao.zai.itpl=$(this).text();
+ $('.invites').removeClass('zai_hi');
+ $('#zai-'+tao.zai.itpl).addClass('zai_hi');
+ zaitx();
+ })
+ .delegate('.zai_lcc', 'click', function() {
+ tao.zai.lcc=$(this).text();
+ if ( $(this).hasClass('zai_lcc2') ) {
+ tao.zai.lccg = '.zai_lccg' + tao.zai.lcc.substr(0,2);
+ $('.zai_lcc5:not('+tao.zai.lccg+')').hide();
+ if ( $(this).hasClass('zai_hi') ) {
+ $('.zai_lcc5'+tao.zai.lccg).toggle();
+ }
+ }
+ $('.zai_lcc').removeClass('zai_hi');
+ $(this).addClass('zai_hi');
+ $.each( tao.zai.t[tao.zai.lcc], function(k,v) {
+ tao.zai.lccmy=tao.zai.lcc;
+ });
+ zaitx();
+ });
+ $('#zai-ax').click( function() {
+ tao.zai.c2s={};
+ tao.zai.c2s.to=$('#zai-to').val();
+ if (tao.zai.c2s.to=='') { return false; };
+ // tao.zai.c2s.lcc=$('.zai_lcc.zai_hi').text();
+ $.ajax({
+ type: 'POST', url: 'invite',
+ data: {
+ zaito: tao.zai.c2s.to,
+ zailcc: tao.zai.lccmy,
+ zaidurn: $('#zaiexpiren').val(),
+ zaidurq: $('input[name="zaiexpire"]:checked').val(),
+ form_security_token: $("input[name='form_security_token']").val()
+ }
+ }).done( function(r) {
+ tao.zai.r = JSON.parse(r);
+ $('#zai-re').attr('style', 'visibility: show;');
+ $('#zai-remsg').text(tao.zai.r.feedbk);
+ $('#zai-due').text(tao.zai.r.due);
+ })
+ });
+ $('#invite-submit').click( function() {
+ // $('#zai-txt').val($('#zai-ims').text());
+ tao.zai.reon = {subject: $('#zai-subject').text(),
+ lang: tao.zai.lccmy, tpl: tao.zai.itpl,
+ whereami: tao.zai.whereami, whoami: tao.zai.whoami};
+ $('#zai-reon').val(JSON.stringify(tao.zai.reon));
+ });
+ function zaitx() {
+ typeof(tao.zai.s[tao.zai.lccmy][tao.zai.itpl]) !== 'undefined'
+ ? $('#zai-subject').text(decodeURIComponent(tao.zai.s[tao.zai.lccmy][tao.zai.itpl]))
+ : $('#zai-subject').text('Invitation');
+ typeof(tao.zai.t[tao.zai.lccmy][tao.zai.itpl]) !== 'undefined'
+ ? $('#zai-ims').text(decodeURIComponent(tao.zai.t[tao.zai.lccmy][tao.zai.itpl]))
+ : $('#zai-ims').text(' ');
+ }
+ // @hilmar <-|
+</script>
diff --git a/view/tpl/plain.tpl b/view/tpl/plain.tpl
new file mode 100644
index 000000000..9af76718e
--- /dev/null
+++ b/view/tpl/plain.tpl
@@ -0,0 +1,3 @@
+<h2>{{$title}}</h2>
+{{if $now}}<div>{{$now}}</div>{{/if}}
+<div style="font-weight: normal; font-family: monospace;">{{$infos}}</div>
diff --git a/view/tpl/regate.tpl b/view/tpl/regate.tpl
new file mode 100644
index 000000000..38135d424
--- /dev/null
+++ b/view/tpl/regate.tpl
@@ -0,0 +1,23 @@
+<h2>{{$title}}</h2>
+
+<h3>{{$now}}</h3>
+
+<div class="descriptive-paragraph" style="font-size: 1.2em;"><p>{{$desc}}</p></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]}}
+
+<div class="pull-right submit-wrapper">
+ <button type="submit" name="submit" class="btn btn-primary"{{$atform}}>{{$submit}}</button>
+</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>
+
diff --git a/view/tpl/register.tpl b/view/tpl/register.tpl
index 1054c7567..451a16c2a 100755
--- a/view/tpl/register.tpl
+++ b/view/tpl/register.tpl
@@ -9,6 +9,7 @@
<div class="section-content-warning-wrapper">
<div id="register-desc" class="descriptive-paragraph">{{$reg_is}}</div>
<div id="register-sites" class="descriptive-paragraph">{{$other_sites}}</div>
+ <h2>{{$now}}</h2>
</div>
{{/if}}
@@ -19,14 +20,19 @@
{{/if}}
{{if $invitations}}
- {{include file="field_input.tpl" field=$invite_code}}
+ <div style="text-align: center;">
+ <a id="zar014" href="javascript:;" style="display: inline-block;">{{$haveivc}}</a>
+ </div>
+ <div id="zar015" style="display: none;">
+ {{include file="field_input.tpl" field=[$invite_code.0,$invite_code.1,"","","",$atform]}}
+ </div>
{{/if}}
- {{include file="field_input.tpl" field=$email}}
+ {{include file="field_input.tpl" field=[$email.0,$email.1,"",$email.3,"",""]}}
- {{include file="field_password.tpl" field=$pass1}}
+ {{include file="field_password.tpl" field=[$pass1.0,$pass1.1,"","","",$atform]}}
- {{include file="field_password.tpl" field=$pass2}}
+ {{include file="field_password.tpl" field=[$pass2.0,$pass2.1,"","","",$atform]}}
{{if $auto_create}}
{{if $default_role}}
@@ -46,12 +52,12 @@
{{/if}}
{{if $enable_tos}}
- {{include file="field_checkbox.tpl" field=$tos}}
+ {{include file="field_checkbox.tpl" field=[$tos.0,$tos.1,"","","",$atform]}}
{{else}}
<input type="hidden" name="tos" value="1" />
{{/if}}
- <button class="btn btn-primary" type="submit" name="submit" id="newchannel-submit-button" value="{{$submit}}">{{$submit}}</button>
+ <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 />
@@ -59,3 +65,20 @@
</div>
</div>
+{{*
+ COMMENTS for this template:
+ hilmar, 2020.02
+*}}
+<script>
+ $('head').append(
+ '<style> '+
+ ' .zuiqmid { font-weight: normal; font-family: monospace; }'+
+ '</style>');
+ // does not work $('#id_email').off('blur');
+ $('#id_email').change( function() {
+ if ($('#id_email').val().length > 0) {
+ $('#newchannel-submit-button').removeAttr('disabled');
+ }
+ });
+ $('#zar014').click( function () { $('#zar015').toggle(); });
+</script>
diff --git a/view/tpl/register_duty.tpl b/view/tpl/register_duty.tpl
new file mode 100644
index 000000000..d5a66e556
--- /dev/null
+++ b/view/tpl/register_duty.tpl
@@ -0,0 +1,28 @@
+{{include file="field_input.tpl" field=$register_duty}}
+<pre id="zar083msg" class='zarhid'></pre>
+<script>
+ // @hilmar |->
+ typeof(window.tao) == 'undefined' ? window.tao = {} : '';
+ tao.zar = { vsn: '2.0.0', s: {}, t: {} };
+ {{$tao}}
+ $('head').append(
+ '<style> '+
+ ' .zarmsg { font-family: monospace; }'+
+ ' .zarhid { visibility: hidden; }'+
+ '</style>');
+ tao.zar.op = 'zar083';
+ $('#zar083a').click( function() {
+ $.ajax({
+ type: 'POST', url: 'admin/site',
+ data: {
+ zarop: tao.zar.op,
+ register_duty: $('#id_register_duty').val(),
+ form_security_token: $("input[name='form_security_token']").val()
+ }
+ }).done( function(r) {
+ tao.zar.r = JSON.parse(r);
+ $('#zar083msg').attr('style', 'visibility: visible;');
+ $('#zar083msg').text(tao.zar.r.msgbg);
+ })
+ });
+ </script> \ No newline at end of file