diff options
Diffstat (limited to 'view')
29 files changed, 764 insertions, 124 deletions
diff --git a/view/css/mod_admin.css b/view/css/mod_admin.css index 409744402..8f1b98b61 100644 --- a/view/css/mod_admin.css +++ b/view/css/mod_admin.css @@ -70,3 +70,7 @@ margin-top: 0px !important; margin-left: 0px !important; } + +tr.zebra9 { background-color: #eafaf1; } +tr.zebra0 { background-color: #fbeee6; } +tr.zebra1 { background-color: #fef9e7; } diff --git a/view/de-de/invite.casual.subject.tpl b/view/de-de/invite.casual.subject.tpl new file mode 100644 index 000000000..b64cf59a9 --- /dev/null +++ b/view/de-de/invite.casual.subject.tpl @@ -0,0 +1 @@ +Schließe dich uns auf {{$projectname}} an!
\ No newline at end of file diff --git a/view/de-de/invite.casual.tpl b/view/de-de/invite.casual.tpl new file mode 100644 index 000000000..ce587a739 --- /dev/null +++ b/view/de-de/invite.casual.tpl @@ -0,0 +1,15 @@ +de casual +Bitte schließe dich meiner Community auf {{$projectname}} an. +{{$linktxt}} {{$invite_where}} + +Verwende bei der Registrierung diesen Einladungscode: + {{$invite_code}} + +Oder: + +1. Registriere dich auf auf einer beliebigen {{$projectname}}-Instanz + (sie sind alle miteinander verbunden). +2. Gib meine {{$Projectname}} Netzwerk Adresse in dem Suchfeld ein: + {{$invite_whereami}} + oder besuche {{$invite_whoami}} +3. Klicke auf [Verbinden] diff --git a/view/de-de/invite.formal.subject.tpl b/view/de-de/invite.formal.subject.tpl new file mode 100644 index 000000000..0aa97e198 --- /dev/null +++ b/view/de-de/invite.formal.subject.tpl @@ -0,0 +1 @@ +Einladung für Ihren Netzwerkzugang auf {{$invite_loc}}
\ No newline at end of file diff --git a/view/de-de/invite.formal.tpl b/view/de-de/invite.formal.tpl new file mode 100644 index 000000000..96bc64ba9 --- /dev/null +++ b/view/de-de/invite.formal.tpl @@ -0,0 +1,19 @@ +Wenn Sie mögen, können Sie sich den dezentralen Sozialen Netzwerken von {{$projectname}} +hier anschließen: {{$invite_where}} +Um den Zugang zu ermöglichen, werden Sie wahrscheinlich einmalig aufgefordert, +diesen Einladungscode anzugeben: {{$invite_code}} +Bei der Registrierung ist auch Ihre eMail Adresse zu nennen, sowie ein Kennwort festzulegen, +das vertraulich ist allein Ihnen bekannt sein soll. + +Alternative Möglichkeiten: + +1. Eine Registrierung wird an jeder der öffentlich zugänglichen {{$projectname}} Instanzen unterstützt, + weil die alle miteinander verbunden sind. Eine Übersicht ist zu finden unter: + {{$invite_anywhere}} +2. Geben Sie meine {{$projectname}} Netzwerkadresse {{$invite_whereami}} in die Suchleiste beim + Lupensymbol ein oder besuchen Sie mich unter {{$invite_whoami}} +3. Klicken Sie auf [Verbinden] + +Falls auf einer besuchten {{$projectname}} Instanz fremdsprachige Anzeigen dargestellt sind, +können Sie die Anzeige einfach auf eine eigene (oder bevorzugte) Sprache im +Hamburger Menü umschalten. diff --git a/view/de-de/register_verify_member.tpl b/view/de-de/register_verify_member.tpl new file mode 100644 index 000000000..01762cc32 --- /dev/null +++ b/view/de-de/register_verify_member.tpl @@ -0,0 +1,57 @@ + +Vielen Dank für Ihre Registrierung auf {{$sitename}}. + +Bitte lesen Sie diese Nachricht aufmerksam durch, bevor Sie eine der beschriebenen Optionen ausführen. + +Die Details für die Anmeldung sind folgende: + +Portal Adresse: {{$siteurl}} +Login Name: {{$email}} + +Die Anmeldung erfolgt mit dem von Ihnen bei der Registrierung festgelegten Kennwort. Falls Sie bereits bei der +Registrierung einen Nicknamen für Ihren Kanal festgelegt hatten, können Sie den alternativ zur Email Adresse als +Login Name benutzen. Falls noch kein Kanal besteht, werden Sie den unmittelbar nach der nächsten Anmeldung +festlegen. + +Um Ihnen vollständigen Zugriff geben zu können, benötigen wir zur Überprüfung die Bestätigung Ihrer Email Adresse. + +Der Prüfungscode ist: + +{{$hash}} + + +{{if $due}}{{$due}}{{/if}} + + + +Wir gehen davon aus, dass Sie dieses Anmeldkonto registriert haben und bitten Sie, den Prüungscode auf der folgenden Adresse +zu bestätigen: + +{{$siteurl}}/regate/{{$mail}} + + +Leider kommt es auch vor, dass Email Adressen missbräuchlich verwendet werden. Auf vielen Portalen im Internet können Böswillige versuchen, durch Eingabe einer beliebigen bekannten Email Adresse eine Benutzerkonto-Registrierung einzuleiten. Sollten Sie die +Registrierung selber nicht beabsichtigt haben, raten wir aus Sicherheitsgründen dringend davon ab, den Vorgang zu bestätigen. Das +gilt auch dann, wenn Sie nach Besuch des Portals nicht abgeneigt sein sollten, dort Zugang zu erhalten. Ein Böswiller hat die +Registrierung vielleicht schon soweit vorbereitet, dass eine Bestätigung nicht Ihnen, sondern letztlich Unberechtigten Zugang +zum Portal bewährt. +Im Fall einer mißbräuchlich versuchten Registrierung können Sie uns helfen, indem Sie den Registrierungsvorgang stornieren. +Zur Stornierung und Zurückweisung der Registrierung steht folgende Portal Adresse zur Verfügung: + + +{{$siteurl}}/regate/{{$mail}}{{if $ko}}/{{$ko}}{{/if}} + + +Falls Sie über die mißbräuchliche Nutzung Ihrer Email Adresse verunsichert sein sollten und Bedenken gegen die Durchführung der +Stornierung haben, möchten wir Sie beruhigen und vergewissern, das der Registrierungsvorgang nach einer gewissen Zeit +automatisch storniert wird. Jedenfalls bedauern wir die Unannehmlichkeiten. + + +Vielen Dank für Ihre Aufwerksamkeit und Kooperation. + +Die Betreiber der Platform + +-- +Datenschutzerklärung,Terms Of Service: +{{$siteurl}}/help/TermsOfService + diff --git a/view/en/invite.casual.subject.tpl b/view/en/invite.casual.subject.tpl new file mode 100644 index 000000000..e3c7c91fc --- /dev/null +++ b/view/en/invite.casual.subject.tpl @@ -0,0 +1 @@ +Please join us on {{$projectname}} {{$invite_loc}}
\ No newline at end of file diff --git a/view/en/invite.casual.tpl b/view/en/invite.casual.tpl new file mode 100644 index 000000000..4fd031c63 --- /dev/null +++ b/view/en/invite.casual.tpl @@ -0,0 +1,16 @@ +{{* tpl EN casual, to invite friendly to those knowing me *}} +Please join my community on {{$projectname}}. +{{$linktxt}} {{$invite_where}} + +You will need to supply this invitation code: + {{$invite_code}} + +Or: + +1. Register at any {{$projectname}} location + (they are all inter-connected). +2. Enter my {{$Projectname}} network address into the site searchbar. + {{$invite_whereami}} + or visit {{$invite_whoami}} +3. Click [Connect] + diff --git a/view/en/invite.formal.subject.tpl b/view/en/invite.formal.subject.tpl new file mode 100644 index 000000000..3c5a92763 --- /dev/null +++ b/view/en/invite.formal.subject.tpl @@ -0,0 +1 @@ +Invitation for your network access on {{$invite_loc}}
\ No newline at end of file diff --git a/view/en/invite.formal.tpl b/view/en/invite.formal.tpl new file mode 100644 index 000000000..5f70de00a --- /dev/null +++ b/view/en/invite.formal.tpl @@ -0,0 +1,32 @@ +{{* tpl EN formal, to invite most polite, like company members or business partners *}} +Please join the communication platform {{$projectname}} and this message contains the +essential data for initially connecting to. + +The site is to arrive here: {{$invite_whereami}} + +Your access is just prepared with an invite code + + {{$invite_code}} + +what please is to enter into the field of the register form, that is shown when the +link "I have an invite code" will be clicked. Please also enter your email address +in the next field. We want to let you know, the invite code is bound to your email +address and not transferable. + +For security reasons you have to supply an account password that is and should remain +only known by yourself. The non visible password has to be typed in twice to prevent +mistyping. The password is required later always when you want to login on the site. + +Depending on the site's configuration, you may receive another email to your address +with a validation code, that is to enter into the form such email will point to. This +kind of some inconvience helps to grow security for the site. + +Depending on the site's configuration, an instance administrator finally has to +confirm your access. Please be patient because that will not performed immediatly +in real time. + +Kind regards, +and wish to have best success on the site. + +Disclaimer: +...
\ No newline at end of file diff --git a/view/en/invite.material.subject.tpl b/view/en/invite.material.subject.tpl new file mode 100644 index 000000000..b74c99aa4 --- /dev/null +++ b/view/en/invite.material.subject.tpl @@ -0,0 +1 @@ +Invitation {{$invite_loc}}
\ No newline at end of file diff --git a/view/en/invite.material.tpl b/view/en/invite.material.tpl new file mode 100644 index 000000000..db1613083 --- /dev/null +++ b/view/en/invite.material.tpl @@ -0,0 +1 @@ +{{* tpl en material, to invite with the essential data in brief *}}
\ No newline at end of file diff --git a/view/en/register_verify_member.tpl b/view/en/register_verify_member.tpl index 9bdd7fa51..5db51a2e2 100644 --- a/view/en/register_verify_member.tpl +++ b/view/en/register_verify_member.tpl @@ -15,15 +15,19 @@ Your validation code is {{$hash}} +{{if $due}}{{$due}}{{/if}} + + + If you registered this account, please enter the validation code when requested or visit the following link: -{{$siteurl}}/regver/allow/{{$hash}} +{{$siteurl}}/regate/{{$mail}} To deny the request and remove the account, please visit: -{{$siteurl}}/regver/deny/{{$hash}} +{{$siteurl}}/regate/{{$mail}}{{if $ko}}/{{$ko}}{{/if}} Thank you. diff --git a/view/es-es/invite.casual.subject.tpl b/view/es-es/invite.casual.subject.tpl new file mode 100644 index 000000000..bec594c3f --- /dev/null +++ b/view/es-es/invite.casual.subject.tpl @@ -0,0 +1 @@ +Por favor, acompáñenos en {{$projectname}}
\ No newline at end of file diff --git a/view/es-es/invite.casual.tpl b/view/es-es/invite.casual.tpl new file mode 100644 index 000000000..51d5ad3cb --- /dev/null +++ b/view/es-es/invite.casual.tpl @@ -0,0 +1,14 @@ +Por favor, únase a mi comunidad en {{$projectname}}. +{{$linktxt}} {{$invite_where}} + +Tendrá que proporcionar este código de invitación: + {{$invite_code}} + +O: + +1. Registrarse en cualquier lugar {{$projectname}} + (todos están interconectados). +2. 2. Introduzca mi dirección de red {{$projectname}} en la barra de búsqueda del sitio. + {{$invite_whereami}} + o visite {{$invite_whoami}} +3. 3. Haga clic en [Conectar]. diff --git a/view/es-es/invite.formal.subject.tpl b/view/es-es/invite.formal.subject.tpl new file mode 100644 index 000000000..e4a104c46 --- /dev/null +++ b/view/es-es/invite.formal.subject.tpl @@ -0,0 +1 @@ +Invitación para su acceso a la red en {{$invite_loc}}
\ No newline at end of file diff --git a/view/es-es/invite.formal.tpl b/view/es-es/invite.formal.tpl new file mode 100644 index 000000000..6c0841f84 --- /dev/null +++ b/view/es-es/invite.formal.tpl @@ -0,0 +1,19 @@ +Si lo desea, puede unirse a las redes sociales descentralizadas de {{$projectname}} +aquí: {{$invite_where}} +Probablemente se le pedirá una vez que permita el acceso, +indicar este código de invitación: {{$invite_code}} +Durante el proceso de registro también debe proporcionar su dirección de correo electrónico y establecer una contraseña, +que es confidencial y sólo debe ser conocido por usted. + +Posibilidades alternativas: + +1. Eine Registrierung wird an jeder der öffentlich zugänglichen {{$projectname}} Instanzen unterstützt, + weil die alle miteinander verbunden sind. Eine Übersicht ist zu finden unter: + {{$invite_anywhere}} +2. Geben Sie meine {{$projectname}} Netzwerkadresse {{$invite_whereami}} in die Suchleiste beim + Lupensymbol ein oder besuchen Sie mich unter {{$invite_whoami}} +3. Klicken Sie auf [Verbinden] + +Falls auf einer besuchten {{$projectname}} Instanz fremdsprachige Anzeigen dargestellt sind, +können Sie die Anzeige einfach auf eine eigene (oder bevorzugte) Sprache im +Hamburger Menü umschalten. diff --git a/view/js/mod_register.js b/view/js/mod_register.js index 6607579a2..16f9b6da1 100644 --- a/view/js/mod_register.js +++ b/view/js/mod_register.js @@ -1,56 +1,87 @@ $(document).ready(function() { - $("#id_email").blur(function() { - var zreg_email = $("#id_email").val(); - $.get("register/email_check.json?f=&email=" + encodeURIComponent(zreg_email), function(data) { - $("#help_email").html(data.message); - zFormError("#help_email",data.error); - }); + + // set in Module + //typeof(window.tao) == 'undefined' ? window.tao = {} : ''; + //tao.zar = { vsn: '2.0.0', form: {}, msg: {} }; + //tao.zar.patano = /^d[0-9]{6}$/; + //tao.zar.patema = /^[a-z0-9.-]{2,64}@[a-z0-9.-]{4,32}\.[a-z]{2,12}$/; + + $('#zar014').click( function () { $('#zar015').toggle(); }); + + $('#id_email').change(function() { + tao.zar.form.email = $('#id_email').val(); + if (tao.zar.patano.test(tao.zar.form.email) == true ) { + //ano + } else { + if (tao.zar.patema.test(tao.zar.form.email) == false ) { + $('#help_email').removeClass('text-muted').addClass('zuirise').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); + zFormError('#help_email',data.error); + }); + } + } + if ($('#id_email').val().length > 0) { + $('#newchannel-submit-button').removeAttr('disabled'); + } }); - $("#id_password").blur(function() { - if(($("#id_password").val()).length < 6 ) { - $("#help_password").html(aStr.pwshort); - zFormError("#help_password", true); + + $('#id_password').change(function() { + if(($('#id_password').val()).length < 6 ) { + $('#help_password').removeClass('text-muted').addClass('zuirise').html(aStr.pwshort); + zFormError('#help_password', true); } else { - $("#help_password").html(""); - zFormError("#help_password", false); + $('#help_password').html(''); + zFormError('#help_password', false); + $('#id_password2').focus(); + $('#id_password2').val().length > 0 ? $('#id_password2').trigger('change') : ''; } }); - $("#id_password2").blur(function() { - if($("#id_password").val() != $("#id_password2").val()) { - $("#help_password2").html(aStr.pwnomatch); - zFormError("#help_password2", true); + $('#id_password2').change(function() { + if($('#id_password').val() != $('#id_password2').val()) { + $('#help_password2').removeClass('text-muted').addClass('zuirise').html(aStr.pwnomatch); + zFormError('#help_password2', true); + $('#id_password').focus(); } else { - $("#help_password2").html(""); - zFormError("#help_password2", false); + $('#help_password2').html(''); + zFormError('#help_password2', false); } }); - $("#id_name").blur(function() { - $("#name-spinner").show(); - var zreg_name = $("#id_name").val(); - $.get("new_channel/autofill.json?f=&name=" + encodeURIComponent(zreg_name),function(data) { - $("#id_nickname").val(data); + $('#id_name').blur(function() { + $('#name-spinner').show(); + var zreg_name = $('#id_name').val(); + $.get('new_channel/autofill.json?f=&name=' + encodeURIComponent(zreg_name),function(data) { + $('#id_nickname').val(data); if(data.error) { - $("#help_name").html(""); - zFormError("#help_name",data.error); + $('#help_name').html(''); + zFormError('#help_name',data.error); } - $("#name-spinner").hide(); + $('#name-spinner').hide(); }); }); - - $("#id_nickname").blur(function() { - $("#nick-spinner").show(); - var zreg_nick = $("#id_nickname").val(); - $.get("new_channel/checkaddr.json?f=&nick=" + encodeURIComponent(zreg_nick),function(data) { - $("#id_nickname").val(data); + $('#id_nickname').blur(function() { + $('#nick-spinner').show(); + var zreg_nick = $('#id_nickname').val(); + $.get('new_channel/checkaddr.json?f=&nick=' + encodeURIComponent(zreg_nick),function(data) { + $('#id_nickname').val(data); if(data.error) { - $("#help_nickname").html(""); - zFormError("#help_nickname",data.error); + $('#help_nickname').html(''); + zFormError('#help_nickname',data.error); } - $("#nick-spinner").hide(); + $('#nick-spinner').hide(); }); }); + //$("buttom[name='submit']").submit((function() { + $('#register-form').submit(function(e) { + if ( $('.zform-error').length > 0 ) { + e.preventDefault(); + return false; + } + }); }); 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..b0c7b3081 --- /dev/null +++ b/view/tpl/plain.tpl @@ -0,0 +1,9 @@ +<h2>{{$title}}</h2> +{{if $now}}<div>{{$now}}</div>{{/if}} +<div style="font-weight: normal; font-family: monospace;">{{$infos}}</div> +<script> + $('.register_date').each( function () { + var date = new Date($(this).data('utc')); + $(this).html(date.toLocaleString()); + }); +</script> diff --git a/view/tpl/regate.tpl b/view/tpl/regate.tpl new file mode 100644 index 000000000..bae0884dc --- /dev/null +++ b/view/tpl/regate.tpl @@ -0,0 +1,22 @@ +<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..8033d0a76 100644 --- a/view/tpl/register.tpl +++ b/view/tpl/register.tpl @@ -5,12 +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}} <div class="section-content-warning-wrapper"> + {{if $reg_is}} <div id="register-desc" class="descriptive-paragraph">{{$reg_is}}</div> + {{/if}} <div id="register-sites" class="descriptive-paragraph">{{$other_sites}}</div> + <h2>{{$now}}</h2> </div> - {{/if}} {{if $registertext}} <div class="section-content-info-wrapper"> @@ -18,15 +19,20 @@ </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}} + {{include file="field_input.tpl" field=[$email.0,$email.1,"",$email.3,"",""]}} + </div> - {{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}} @@ -38,24 +44,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 |