aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'view/tpl')
-rw-r--r--view/tpl/admin_accounts.tpl113
-rw-r--r--view/tpl/admin_site.tpl99
-rw-r--r--view/tpl/field_checkbox.tpl22
-rw-r--r--view/tpl/field_duration.qmc.tpl87
-rw-r--r--view/tpl/field_input.tpl18
-rw-r--r--view/tpl/field_select.tpl17
-rw-r--r--view/tpl/invite.tpl130
-rw-r--r--view/tpl/plain.tpl37
-rw-r--r--view/tpl/regate.tpl29
-rw-r--r--view/tpl/register.tpl43
-rw-r--r--view/tpl/register_duty.tpl28
11 files changed, 539 insertions, 84 deletions
diff --git a/view/tpl/admin_accounts.tpl b/view/tpl/admin_accounts.tpl
index 2dd56c8dc..9c78dbe54 100644
--- 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,24 +16,36 @@
</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}}
+ </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>
+ <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>
- <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}}" />
- </div>
+ {{* before, alternate:
+ *
+ <a href="#" onclick="return toggle_selectall('pending_ckbx');">{{$select_all}}</a>
+ *
+ *}}
+ <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>
+ </div>
{{else}}
<p>{{$no_pending}}</p>
{{/if}}
@@ -83,7 +84,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 +98,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..0fff7029a 100644
--- 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,7 +33,17 @@
{{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=$invite_only}}
+ {{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}}
+ {{$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}}
@@ -81,7 +55,6 @@
</div>
<h3>{{$corporate}}</h3>
- {{include file="field_checkbox.tpl" field=$verify_email}}
{{include file="field_checkbox.tpl" field=$feed_contacts}}
{{include file="field_checkbox.tpl" field=$force_publish}}
{{include file="field_checkbox.tpl" field=$disable_discover_tab}}
@@ -105,7 +78,6 @@
{{include file="field_input.tpl" field=$force_queue}}
{{include file="field_input.tpl" field=$poll_interval}}
{{include file="field_input.tpl" field=$maxloadavg}}
- {{include file="field_input.tpl" field=$abandon_days}}
{{include file="field_input.tpl" field=$default_expire_days}}
{{include file="field_input.tpl" field=$active_expire_days}}
@@ -115,3 +87,52 @@
</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; }'+
+ ' .zuia { cursor: pointer; font-weight: bold; }'+
+ '</style>');
+ // <-hilmar]
+</script>
diff --git a/view/tpl/field_checkbox.tpl b/view/tpl/field_checkbox.tpl
index f779f937c..b1665f75f 100644
--- a/view/tpl/field_checkbox.tpl
+++ b/view/tpl/field_checkbox.tpl
@@ -1,5 +1,25 @@
<div id="{{$field.0}}_container" class="clearfix form-group checkbox">
- <label for="id_{{$field.0}}">{{$field.1}}</label>
+ <label for="id_{{$field.0}}">{{$field.1}}{{if $field.6}}<sup class="required zuiqmid"> {{$field.6}}</sup>{{/if}}</label>
<div class="float-right"><input type="checkbox" name='{{$field.0}}' id='id_{{$field.0}}' value="1" {{if $field.2}}checked="checked"{{/if}} {{if $field.5}}{{$field.5}}{{/if}} /><label class="switchlabel" for='id_{{$field.0}}'> <span class="onoffswitch-inner" data-on='{{if $field.4}}{{$field.4.1}}{{/if}}' data-off='{{if $field.4}}{{$field.4.0}}{{/if}}'></span><span class="onoffswitch-switch"></span></label></div>
<small class="form-text text-muted">{{$field.3}}</small>
</div>
+{{*
+ COMMENTS for this template:
+ @author hilmar runge, 2020.01
+ $field array index:
+ .0 field name: name=... for input, id=id_... for input, id=label_... for label, id=help_... for small text
+ .1 label text
+ .2 checked
+ .3 form text
+ .4 on/off value:
+ .4.0 off
+ .4.1 on
+ .5 additional operands for html input statement
+ .6 label text addition, used for qmc
+ css classes used:
+ .clearfix, .form_group, .checkbox
+ .floatright
+ .switchlabel, .onoffswitch-switch
+ .required, .code
+ .form-control, .form-text, .text-muted
+*}}
diff --git a/view/tpl/field_duration.qmc.tpl b/view/tpl/field_duration.qmc.tpl
new file mode 100644
index 000000000..5ef11a6b9
--- /dev/null
+++ b/view/tpl/field_duration.qmc.tpl
@@ -0,0 +1,87 @@
+{{if $wrapper!="no"}}<div id="{{$qmc}}{{$field.name}}_wrapper" class="form-group">{{/if}}
+
+<label for="{{$qmc}}{{$field.name}}fs">{{$label}}
+ {{if $qmcid}}<sup class="zuiqmid required">{{$qmcid}}</sup>{{/if}}
+</label>
+<fieldset name="{{$qmc}}{{$field.name}}fs" id="id_{{$qmc}}{{$field.name}}_fs" title="{{$field.title}}">
+
+<input id="{{$qmc}}{{$field.name}}n"
+ name="{{$qmc}}{{$field.name}}n"
+ class="inline-block mr-1 text-center" style="width: 5rem;"
+ type="number"
+{{if $field.min}} min="{{$field.min}}"{{/if}}
+{{if $field.max}} max="{{$field.max}}"{{/if}}
+ size="{{$field.size}}"
+ value="{{$field.value}}"
+ title="{{$field.title}}">
+
+{{foreach $rabot as $k=>$v}}
+ <input id="{{$qmc}}{{$field.name}}{{$k}}" name="{{$qmc}}{{$field.name}}"
+ type="radio" value="{{$k}}" {{if $field.default==$k}} checked="checked"{{/if}}>
+ <label for="{{$qmc}}{{$field.name}}{{$k}}">{{$v}}</label>
+{{/foreach}}
+
+</fieldset>
+
+<span id="{{$qmc}}{{$field.name}}_help" class="form-text text-muted">{{$help}}</span>
+
+{{if $wrapper!="no"}}</div>{{/if}}
+
+{{*
+ * Template field_duration.qmc.tpl
+ * **********************************
+ * Hilmar Runge, 2020.02
+ * The template generates one input field for numeric values and a radio button group, where one
+ * (and only one or no) selection can be active. The primary intented use is for entering time/date
+ * data in the form of amount (numeric) and the units (ie hours, days etc).
+ * Instead of using positional array parameters, keyed (named) parameters are treated. Imo, named parameters
+ * are easier to apply, the position does not matter and if one is not wanted or required, only omit it.
+ *
+ * The parameters in this template are:
+ * ************************************
+ * label A label for the whole. Optional.
+ * help An optional explanation text.
+ * qmc Optional a qualified message component prefix, best use case is 3 letters lowercase and depends
+ * on the module or component used in the system. Part of id's and names in html and css.
+ * qmcid The qmc message id. Optional. Should be qmc+4digits+1charsufffix (8 chars uppercase).
+ * field keyed array parameters:
+ * name The (unique) name of the elements also used for html ids,
+ * will be suffixed by 'n' for the numeric input and 'u' for the units
+ * title The title of the element
+ * legend a headline for the radio buttons (optional)
+ * rabot the keyed array of radio buttons, where:
+ * k the key becomes the submitted value
+ * v the string value is the label text for the radio button.
+ *
+ * Example to apply in php like:
+ * *****************************
+ $testcase = replace_macros(get_markup_template('field_radio_group.qmc.tpl'),
+ array(
+ 'label' => t('Exiration duration',
+ 'qmc' => 'zai', // not required
+ 'qmcid' => 'ZAI0000I', // not required
+ 'wrapper' => 'no', // when no wrapper around is desired
+ 'field' => // fieldset properties
+ array(
+ 'name' => 'due',
+ 'min' => "1", // the minimum value for the numeric input
+ 'max' => "99", // the maximum value for the numeric input
+ 'size' => "2", // the max digits for the numeric input
+ 'title' => 'time/date unit',
+ 'default' => 'd' // say 'default' => '' if none defaults (or omit)
+ ),
+ 'rabot' => // the radio buttons
+ array(
+ 'i' => 'Minute(s)',
+ 'h' => 'Hour(s)' ,
+ 'd' => 'Day(s)' ,
+ 'w' => 'Week(s)' ,
+ 'm' => 'Month(s)' ,
+ 'y' => 'Year(s)'
+ )
+ )
+ );
+ *
+ *}}
+
+
diff --git a/view/tpl/field_input.tpl b/view/tpl/field_input.tpl
index 65a837e5f..53139a0e7 100644
--- a/view/tpl/field_input.tpl
+++ b/view/tpl/field_input.tpl
@@ -1,5 +1,19 @@
<div id="id_{{$field.0}}_wrapper" class="form-group">
- <label for="id_{{$field.0}}" id="label_{{$field.0}}">{{$field.1}}{{if $field.4}}<span class="required"> {{$field.4}}</span>{{/if}}</label>
+ <label for="id_{{$field.0}}" id="label_{{$field.0}}">{{$field.1}}{{if $field.4}}<sup class="required zuiqmid"> {{$field.4}}</sup>{{/if}}</label>
<input class="form-control" name="{{$field.0}}" id="id_{{$field.0}}" type="text" value="{{$field.2}}"{{if $field.5}} {{$field.5}}{{/if}}>
- <small id="help_{{$field.0}}" class="form-text text-muted">{{$field.3}}</small>
+ <span id="help_{{$field.0}}" class="form-text text-muted">{{$field.3}}</span>
</div>
+{{*
+ COMMENTS for this template:
+ @author hilmar runge, 2020.01
+ $field array index:
+ .0 field name: name=... for input, id=id_... for input, id=label_... for label, id=help_... for text
+ .1 label text
+ .2 field value
+ .3 help text
+ .4 label text addition, used for qmc
+ .5 additional html attributes
+ css classes used:
+ .required, .code
+ .form-control, .form-text, .text-muted
+*}}
diff --git a/view/tpl/field_select.tpl b/view/tpl/field_select.tpl
index 7cc624fab..57be3b1ab 100644
--- a/view/tpl/field_select.tpl
+++ b/view/tpl/field_select.tpl
@@ -1,7 +1,22 @@
<div id="id_{{$field.0}}_wrapper" class="form-group">
- <label for="id_{{$field.0}}">{{$field.1}}</label>
+ <label for="id_{{$field.0}}">{{$field.1}}{{if $field.5}}<sup class="required zuiqmid"> {{$field.5}}</sup>{{/if}}</label>
<select class="form-control" name="{{$field.0}}" id="id_{{$field.0}}">
{{foreach $field.4 as $opt=>$val}}<option value="{{$opt}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option>{{/foreach}}
</select>
<small class="form-text text-muted">{{$field.3}}</small >
</div>
+{{*
+ COMMENTS for this template:
+ @author hilmar runge, 2020.01
+ $field array index:
+ .0 field name: name=... for input, id=id_... for input, id=label_... for label, id=help_... for small text
+ .1 label text
+ .2 selected field
+ .3 form text
+ .4 option value(s)
+ .5 label text addition, used for qmc
+ css classes used:
+ .required, .code
+ .form-group, .form-control, .form-text, .text-muted
+*}}
+
diff --git a/view/tpl/invite.tpl b/view/tpl/invite.tpl
index 440e1e02b..2712cfee4 100644
--- 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..e7aa9c63c
--- /dev/null
+++ b/view/tpl/plain.tpl
@@ -0,0 +1,37 @@
+<h2>{{$title}}</h2>
+{{if $now}}<div>{{$now}}</div>{{/if}}
+<div style="font-weight: normal; font-family: monospace;">{{$infos}}</div>
+<div id="countdown" class="h3"></div>
+<script>
+ $('.register_date').each( function () {
+ var date = new Date($(this).data('utc'));
+ $(this).html(date.toLocaleString());
+ });
+
+
+ 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/regate.tpl b/view/tpl/regate.tpl
new file mode 100644
index 000000000..04a9df1de
--- /dev/null
+++ b/view/tpl/regate.tpl
@@ -0,0 +1,29 @@
+<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>
+<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'}));
+ });
+</script>
diff --git a/view/tpl/register.tpl b/view/tpl/register.tpl
index 1054c7567..b38507f92 100644
--- a/view/tpl/register.tpl
+++ b/view/tpl/register.tpl
@@ -5,24 +5,29 @@
<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}}
+ {{if $reg_is || $other_sites || $now}}
<div class="section-content-warning-wrapper">
+ <h3>{{$now}}</h3>
<div id="register-desc" class="descriptive-paragraph">{{$reg_is}}</div>
<div id="register-sites" class="descriptive-paragraph">{{$other_sites}}</div>
</div>
{{/if}}
-
{{if $registertext}}
<div class="section-content-info-wrapper">
<div id="register-text" class="descriptive-paragraph">{{$registertext}}</div>
</div>
{{/if}}
+ <div>
{{if $invitations}}
- {{include file="field_input.tpl" field=$invite_code}}
+ <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}}
@@ -38,24 +43,42 @@
{{include file="field_select_grouped.tpl" field=$role}}
{{/if}}
- {{include file="field_input.tpl" field=$name}}
+ {{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}}
+ {{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}}
+ {{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 />
- <div class="descriptive-text">{{$verify_note}}</div>
-
+ <br />
+ <div class="descriptive-text">{{$verify_note}} {{$msg}}</div>
</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>
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