Add legal information

This commit is contained in:
Varakh 2018-05-15 21:31:17 +02:00
parent a52ae4cc2b
commit fdb67c8d15
6 changed files with 44 additions and 2 deletions

View file

@ -11,12 +11,32 @@ sign.up.flash.already_in_use_email_and_username: "%username%/%email% is already
sign.up.flash.already_in_use_email: "%email% is already in use." sign.up.flash.already_in_use_email: "%email% is already in use."
sign.up.flash.already_in_use_username: "%username% is already in use." sign.up.flash.already_in_use_username: "%username% is already in use."
sign.up.form.button: Sign up sign.up.form.button: Sign up
sign.up.form.username: Username: sign.up.form.username: Nickname:
sign.up.form.username.placeholder: username sign.up.form.username.placeholder: nickname
sign.up.form.email: Email (only used for one time email verification, not persisted further): sign.up.form.email: Email (only used for one time email verification, not persisted further):
sign.up.form.email.placeholder: xyz@domain.tld sign.up.form.email.placeholder: xyz@domain.tld
sign.up.form.password: Password: sign.up.form.password: Password:
sign.up.form.password.placeholder: Password: sign.up.form.password.placeholder: Password:
sign.up.form.legalmodal.open: I've read the privacy policy and I agree to it.
sign.up.form.legalmodal.header: Privacy Policy
sign.up.form.legalmodal.text: |
<h5>Signing up process</h5>
<ul>
<li>Email (maximal: 7 days, typical: deleted after verification process is completed)</li>
<li>Credentials (minimal: stored as long as the account exists, typical: check user JID against well-known spammer patterns)</li>
</ul>
<h5>Using the service</h5>
<ul>
<li><a href="https://wiki.xmpp.org/web/GDPR#Q1.1b_List_what_data_is_processed">What data is processed?</a></li>
<li><a href="https://wiki.xmpp.org/web/GDPR#Q1.1c_List_what_processing_is_done">How is data processing done?</a></li>
</ul>
<h5>General</h5>
<ul>
<li>I agree that accepting the privacy policy is required in order to use the service.</li>
<li>I agree to not sue the operator of this (free) service for any misconfiguration concering any data protection laws (e.g. the General Data Protection Regulation).</li>
</ul>
# Verification # Verification
verification.mail.subject: "%server%: jabber account verification" verification.mail.subject: "%server%: jabber account verification"

1
public/css/jquery.modal.min.css vendored Normal file
View file

@ -0,0 +1 @@
.blocker{position:fixed;top:0;right:0;bottom:0;left:0;width:100%;height:100%;overflow:auto;z-index:1;padding:20px;box-sizing:border-box;background-color:#000;background-color:rgba(0,0,0,0.75);text-align:center}.blocker:before{content:"";display:inline-block;height:100%;vertical-align:middle;margin-right:-0.05em}.blocker.behind{background-color:transparent}.modal{display:none;vertical-align:middle;position:relative;z-index:2;max-width:500px;box-sizing:border-box;width:90%;background:#fff;padding:15px 30px;-webkit-border-radius:8px;-moz-border-radius:8px;-o-border-radius:8px;-ms-border-radius:8px;border-radius:8px;-webkit-box-shadow:0 0 10px #000;-moz-box-shadow:0 0 10px #000;-o-box-shadow:0 0 10px #000;-ms-box-shadow:0 0 10px #000;box-shadow:0 0 10px #000;text-align:left}.modal a.close-modal{position:absolute;top:-12.5px;right:-12.5px;display:block;width:30px;height:30px;text-indent:-9999px;background-size:contain;background-repeat:no-repeat;background-position:center center;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAAA3hJREFUaAXlm8+K00Acx7MiCIJH/yw+gA9g25O49SL4AO3Bp1jw5NvktC+wF88qevK4BU97EmzxUBCEolK/n5gp3W6TTJPfpNPNF37MNsl85/vN/DaTmU6PknC4K+pniqeKJ3k8UnkvDxXJzzy+q/yaxxeVHxW/FNHjgRSeKt4rFoplzaAuHHDBGR2eS9G54reirsmienDCTRt7xwsp+KAoEmt9nLaGitZxrBbPFNaGfPloGw2t4JVamSt8xYW6Dg1oCYo3Yv+rCGViV160oMkcd8SYKnYV1Nb1aEOjCe6L5ZOiLfF120EjWhuBu3YIZt1NQmujnk5F4MgOpURzLfAwOBSTmzp3fpDxuI/pabxpqOoz2r2HLAb0GMbZKlNV5/Hg9XJypguryA7lPF5KMdTZQzHjqxNPhWhzIuAruOl1eNqKEx1tSh5rfbxdw7mOxCq4qS68ZTjKS1YVvilu559vWvFHhh4rZrdyZ69Vmpgdj8fJbDZLJpNJ0uv1cnr/gjrUhQMuI+ANjyuwftQ0bbL6Erp0mM/ny8Fg4M3LtdRxgMtKl3jwmIHVxYXChFy94/Rmpa/pTbNUhstKV+4Rr8lLQ9KlUvJKLyG8yvQ2s9SBy1Jb7jV5a0yapfF6apaZLjLLcWtd4sNrmJUMHyM+1xibTjH82Zh01TNlhsrOhdKTe00uAzZQmN6+KW+sDa/JD2PSVQ873m29yf+1Q9VDzfEYlHi1G5LKBBWZbtEsHbFwb1oYDwr1ZiF/2bnCSg1OBE/pfr9/bWx26UxJL3ONPISOLKUvQza0LZUxSKyjpdTGa/vDEr25rddbMM0Q3O6Lx3rqFvU+x6UrRKQY7tyrZecmD9FODy8uLizTmilwNj0kraNcAJhOp5aGVwsAGD5VmJBrWWbJSgWT9zrzWepQF47RaGSiKfeGx6Szi3gzmX/HHbihwBser4B9UJYpFBNX4R6vTn3VQnez0SymnrHQMsRYGTr1dSk34ljRqS/EMd2pLQ8YBp3a1PLfcqCpo8gtHkZFHKkTX6fs3MY0blKnth66rKCnU0VRGu37ONrQaA4eZDFtWAu2fXj9zjFkxTBOo8F7t926gTp/83Kyzzcy2kZD6xiqxTYnHLRFm3vHiRSwNSjkz3hoIzo8lCKWUlg/YtGs7tObunDAZfpDLbfEI15zsEIY3U/x/gHHc/G1zltnAgAAAABJRU5ErkJggg==')}.modal-spinner{display:none;position:fixed;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);padding:12px 16px;border-radius:5px;background-color:#111;height:20px}.modal-spinner>div{border-radius:100px;background-color:#fff;height:20px;width:2px;margin:0 1px;display:inline-block;-webkit-animation:sk-stretchdelay 1.2s infinite ease-in-out;animation:sk-stretchdelay 1.2s infinite ease-in-out}.modal-spinner .rect2{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.modal-spinner .rect3{-webkit-animation-delay:-1.0s;animation-delay:-1.0s}.modal-spinner .rect4{-webkit-animation-delay:-0.9s;animation-delay:-0.9s}@-webkit-keyframes sk-stretchdelay{0%,40%,100%{-webkit-transform:scaleY(0.5)}20%{-webkit-transform:scaleY(1.0)}}@keyframes sk-stretchdelay{0%,40%,100%{transform:scaleY(0.5);-webkit-transform:scaleY(0.5)}20%{transform:scaleY(1.0);-webkit-transform:scaleY(1.0)}}

5
public/js/jquery.modal.min.js vendored Normal file
View file

@ -0,0 +1,5 @@
/*
A simple jQuery modal (http://github.com/kylefox/jquery-modal)
Version 0.9.1
*/
!function(o){"object"==typeof module&&"object"==typeof module.exports?o(require("jquery"),window,document):o(jQuery,window,document)}(function(o,t,i,e){var s=[],l=function(){return s.length?s[s.length-1]:null},n=function(){var o,t=!1;for(o=s.length-1;o>=0;o--)s[o].$blocker&&(s[o].$blocker.toggleClass("current",!t).toggleClass("behind",t),t=!0)};o.modal=function(t,i){var e,n;if(this.$body=o("body"),this.options=o.extend({},o.modal.defaults,i),this.options.doFade=!isNaN(parseInt(this.options.fadeDuration,10)),this.$blocker=null,this.options.closeExisting)for(;o.modal.isActive();)o.modal.close();if(s.push(this),t.is("a"))if(n=t.attr("href"),this.anchor=t,/^#/.test(n)){if(this.$elm=o(n),1!==this.$elm.length)return null;this.$body.append(this.$elm),this.open()}else this.$elm=o("<div>"),this.$body.append(this.$elm),e=function(o,t){t.elm.remove()},this.showSpinner(),t.trigger(o.modal.AJAX_SEND),o.get(n).done(function(i){if(o.modal.isActive()){t.trigger(o.modal.AJAX_SUCCESS);var s=l();s.$elm.empty().append(i).on(o.modal.CLOSE,e),s.hideSpinner(),s.open(),t.trigger(o.modal.AJAX_COMPLETE)}}).fail(function(){t.trigger(o.modal.AJAX_FAIL);var i=l();i.hideSpinner(),s.pop(),t.trigger(o.modal.AJAX_COMPLETE)});else this.$elm=t,this.anchor=t,this.$body.append(this.$elm),this.open()},o.modal.prototype={constructor:o.modal,open:function(){var t=this;this.block(),this.anchor.blur(),this.options.doFade?setTimeout(function(){t.show()},this.options.fadeDuration*this.options.fadeDelay):this.show(),o(i).off("keydown.modal").on("keydown.modal",function(o){var t=l();27===o.which&&t.options.escapeClose&&t.close()}),this.options.clickClose&&this.$blocker.click(function(t){t.target===this&&o.modal.close()})},close:function(){s.pop(),this.unblock(),this.hide(),o.modal.isActive()||o(i).off("keydown.modal")},block:function(){this.$elm.trigger(o.modal.BEFORE_BLOCK,[this._ctx()]),this.$body.css("overflow","hidden"),this.$blocker=o('<div class="'+this.options.blockerClass+' blocker current"></div>').appendTo(this.$body),n(),this.options.doFade&&this.$blocker.css("opacity",0).animate({opacity:1},this.options.fadeDuration),this.$elm.trigger(o.modal.BLOCK,[this._ctx()])},unblock:function(t){!t&&this.options.doFade?this.$blocker.fadeOut(this.options.fadeDuration,this.unblock.bind(this,!0)):(this.$blocker.children().appendTo(this.$body),this.$blocker.remove(),this.$blocker=null,n(),o.modal.isActive()||this.$body.css("overflow",""))},show:function(){this.$elm.trigger(o.modal.BEFORE_OPEN,[this._ctx()]),this.options.showClose&&(this.closeButton=o('<a href="#close-modal" rel="modal:close" class="close-modal '+this.options.closeClass+'">'+this.options.closeText+"</a>"),this.$elm.append(this.closeButton)),this.$elm.addClass(this.options.modalClass).appendTo(this.$blocker),this.options.doFade?this.$elm.css({opacity:0,display:"inline-block"}).animate({opacity:1},this.options.fadeDuration):this.$elm.css("display","inline-block"),this.$elm.trigger(o.modal.OPEN,[this._ctx()])},hide:function(){this.$elm.trigger(o.modal.BEFORE_CLOSE,[this._ctx()]),this.closeButton&&this.closeButton.remove();var t=this;this.options.doFade?this.$elm.fadeOut(this.options.fadeDuration,function(){t.$elm.trigger(o.modal.AFTER_CLOSE,[t._ctx()])}):this.$elm.hide(0,function(){t.$elm.trigger(o.modal.AFTER_CLOSE,[t._ctx()])}),this.$elm.trigger(o.modal.CLOSE,[this._ctx()])},showSpinner:function(){this.options.showSpinner&&(this.spinner=this.spinner||o('<div class="'+this.options.modalClass+'-spinner"></div>').append(this.options.spinnerHtml),this.$body.append(this.spinner),this.spinner.show())},hideSpinner:function(){this.spinner&&this.spinner.remove()},_ctx:function(){return{elm:this.$elm,$elm:this.$elm,$blocker:this.$blocker,options:this.options}}},o.modal.close=function(t){if(o.modal.isActive()){t&&t.preventDefault();var i=l();return i.close(),i.$elm}},o.modal.isActive=function(){return s.length>0},o.modal.getCurrent=l,o.modal.defaults={closeExisting:!0,escapeClose:!0,clickClose:!0,closeText:"Close",closeClass:"",modalClass:"modal",blockerClass:"jquery-modal",spinnerHtml:'<div class="rect1"></div><div class="rect2"></div><div class="rect3"></div><div class="rect4"></div>',showSpinner:!0,showClose:!0,fadeDuration:null,fadeDelay:1},o.modal.BEFORE_BLOCK="modal:before-block",o.modal.BLOCK="modal:block",o.modal.BEFORE_OPEN="modal:before-open",o.modal.OPEN="modal:open",o.modal.BEFORE_CLOSE="modal:before-close",o.modal.CLOSE="modal:close",o.modal.AFTER_CLOSE="modal:after-close",o.modal.AJAX_SEND="modal:ajax:send",o.modal.AJAX_SUCCESS="modal:ajax:success",o.modal.AJAX_FAIL="modal:ajax:fail",o.modal.AJAX_COMPLETE="modal:ajax:complete",o.fn.modal=function(t){return 1===this.length&&new o.modal(this,t),this},o(i).on("click.modal",'a[rel~="modal:close"]',o.modal.close),o(i).on("click.modal",'a[rel~="modal:open"]',function(t){t.preventDefault(),o(this).modal()})});

View file

@ -42,6 +42,7 @@ final class SignUpAction
'username' => 'required|alpha_numeric|max_len,64|min_len,3', 'username' => 'required|alpha_numeric|max_len,64|min_len,3',
'email' => 'required|valid_email|max_len,64|min_len,5', 'email' => 'required|valid_email|max_len,64|min_len,5',
'password' => 'required|max_len,255|min_len,8', 'password' => 'required|max_len,255|min_len,8',
'legal' => 'required|boolean'
]); ]);
if (!$validator->run($body)) { if (!$validator->run($body)) {
$validator->addErrorsToFlashMessage($this->flash); $validator->addErrorsToFlashMessage($this->flash);

View file

@ -10,9 +10,11 @@
<link rel="stylesheet" href="{{ base_url() }}/css/main.css"> <link rel="stylesheet" href="{{ base_url() }}/css/main.css">
<link rel="stylesheet" href="{{ base_url() }}/css/google-fonts.css"> <link rel="stylesheet" href="{{ base_url() }}/css/google-fonts.css">
<link rel="stylesheet" href="{{ base_url() }}/css/font-awesome.css"> <link rel="stylesheet" href="{{ base_url() }}/css/font-awesome.css">
<link rel="stylesheet" href="{{ base_url() }}/css/jquery.modal.min.css">
<!-- jQuery --> <!-- jQuery -->
<script src="{{ base_url() }}/js/jquery-1.10.2.min.js"></script> <script src="{{ base_url() }}/js/jquery-1.10.2.min.js"></script>
<script src="{{ base_url() }}/js/jquery.modal.min.js"></script>
</head> </head>
<body> <body>

View file

@ -12,7 +12,20 @@
<br/><br/> <br/><br/>
<label for="password">{% trans %}sign.up.form.password{% endtrans %}</label><br/> <label for="password">{% trans %}sign.up.form.password{% endtrans %}</label><br/>
<input type="password" id="password" name="password" class="form-control" placeholder="{% trans %}sign.up.form.password.placeholder{% endtrans %}" required> <input type="password" id="password" name="password" class="form-control" placeholder="{% trans %}sign.up.form.password.placeholder{% endtrans %}" required>
<br/><br/>
<!-- Link to open the modal -->
<input type="checkbox" id="legal" name="legal" class="form-control" /><a href="#legalModal" rel="modal:open">{% trans %}sign.up.form.legalmodal.open{% endtrans %}</a>
<br/><br/> <br/><br/>
<input class="" type="submit" name="signup_button" value="{% trans %}sign.up.form.button{% endtrans %}"/> <input class="" type="submit" name="signup_button" value="{% trans %}sign.up.form.button{% endtrans %}"/>
</form> </form>
<!-- legal modal -->
<div id="legalModal" class="modal">
<h1>{% trans %}sign.up.form.legalmodal.header{% endtrans %}</h1>
<p>{{ 'sign.up.form.legalmodal.text'|trans|raw }}</p>
</div>
{% endblock %} {% endblock %}