]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #4925 from rabuzarus/20180424_-_frio_invite_template
authorHypolite Petovan <mrpetovan@gmail.com>
Tue, 24 Apr 2018 15:37:10 +0000 (11:37 -0400)
committerGitHub <noreply@github.com>
Tue, 24 Apr 2018 15:37:10 +0000 (11:37 -0400)
frio - provide a template for invite page

mod/invite.php
view/templates/invite.tpl
view/theme/frio/css/style.css
view/theme/frio/js/modal.js
view/theme/frio/templates/invite.tpl [new file with mode: 0644]
view/theme/frio/templates/peoplefind.tpl
view/theme/vier/style.css

index 6807ff2c12e034bb8084fae928bd9a25f7c2bb09..813dbf7044a33f734918f2bc6316240eb1fb9c4a 100644 (file)
@@ -144,14 +144,13 @@ function invite_content(App $a) {
 
        $o = replace_macros($tpl, [
                '$form_security_token' => get_form_security_token("send_invite"),
-               '$invite'              => L10n::t('Send invitations'),
-               '$addr_text'           => L10n::t('Enter email addresses, one per line:'),
-               '$msg_text'            => L10n::t('Your message:'),
-               '$default_message'     => L10n::t('You are cordially invited to join me and other close friends on Friendica - and help us to create a better social web.') . "\r\n" . "\r\n"
+               '$title'               => L10n::t('Send invitations'),
+               '$recipients'          => ['recipients', L10n::t('Enter email addresses, one per line:')],
+               '$message'             => ['message', L10n::t('Your message:'),L10n::t('You are cordially invited to join me and other close friends on Friendica - and help us to create a better social web.') . "\r\n" . "\r\n"
                        . $linktxt
                        . "\r\n" . "\r\n" . (($invonly) ? L10n::t('You will need to supply this invitation code: $invite_code') . "\r\n" . "\r\n" : '') .L10n::t('Once you have registered, please connect with me via my profile page at:')
                        . "\r\n" . "\r\n" . System::baseUrl() . '/profile/' . $a->user['nickname']
-                       . "\r\n" . "\r\n" . L10n::t('For more information about the Friendica project and why we feel it is important, please visit http://friendi.ca') . "\r\n" . "\r\n"  ,
+                       . "\r\n" . "\r\n" . L10n::t('For more information about the Friendica project and why we feel it is important, please visit http://friendi.ca') . "\r\n" . "\r\n"],
                '$submit'              => L10n::t('Submit')
        ]);
 
index 6fd8539c5acc45289f3ed04f61fa85329d1e14e6..2087635e4fb34c42b8b9b7e4f62448c1a222b750 100644 (file)
@@ -1,31 +1,18 @@
 
 <form action="invite" method="post" id="invite-form" >
 
-<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
+       <input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
 
-<div id="invite-wrapper">
+       <div id="invite-wrapper">
 
-<h3>{{$invite}}</h3>
+               <h3>{{$title}}</h3>
 
-<div id="invite-recipient-text">
-{{$addr_text}}
-</div>
+               {{include file="field_textarea.tpl" field=$recipients}}
+               {{include file="field_textarea.tpl" field=$message}}
 
-<div id="invite-recipient-textarea">
-<textarea id="invite-recipients" name="recipients" rows="8" cols="32" ></textarea>
-</div>
+               <div id="invite-submit-wrapper">
+                       <input type="submit" name="submit" value="{{$submit|escape:'html'}}" />
+               </div>
 
-<div id="invite-message-text">
-{{$msg_text}}
-</div>
-
-<div id="invite-message-textarea">
-<textarea id="invite-message" name="message" rows="10" cols="72" >{{$default_message}}</textarea>
-</div>
-
-<div id="invite-submit-wrapper">
-<input type="submit" name="submit" value="{{$submit|escape:'html'}}" />
-</div>
-
-</div>
+       </div>
 </form>
index 1614547b85d411b8b69540b97da67798e555864d..8a3ca862916ce05f7de56465d817efda1b9566d3 100644 (file)
@@ -2118,7 +2118,7 @@ ul.dropdown-menu li:hover {
 #adminpage, .delegate-content-wrapper, .uexport-content-wrapper,
 .viewcontacts-content-wrapper, .dfrn_request-content-wrapper,
 .friendica-content-wrapper, .credits-content-wrapper, .nogroup-content-wrapper,
-.profperm-content-wrapper {
+.profperm-content-wrapper, .invite-content-wrapper {
     min-height: calc(100vh - 150px);
     padding: 15px;
     padding-bottom: 20px;
index 56df75d7b68269fa5ea9ced61d7ad80b0e1998eb..46bb1e5143819306de62c3d93c60a81487bb8928 100644 (file)
@@ -207,6 +207,10 @@ function addToModal(url) {
                                //Get first element with the class "heading"
                                //and use it as title.
                                loadModalTitle();
+
+                               // We need to initialize autosize again for new
+                               // modal conent.
+                               autosize($('.modal .text-autosize'));
                        }
                });
 }
diff --git a/view/theme/frio/templates/invite.tpl b/view/theme/frio/templates/invite.tpl
new file mode 100644 (file)
index 0000000..9ff2024
--- /dev/null
@@ -0,0 +1,19 @@
+
+<div id="invite-wrapper">
+
+       <h3 class="heading">{{$title}}</h3>
+
+       <form action="invite" method="post" id="invite-form" >
+               <input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
+
+               <div id="invite-content-wrapper">
+                       {{include file="field_textarea.tpl" field=$recipients}}
+                       {{include file="field_textarea.tpl" field=$message}}
+
+                       <div id="invite-submit-wrapper" class="form-group pull-right">
+                               <button type="submit" name="submit" class="btn btn-primary">{{$submit|escape:'html'}}</button>
+                       </div>
+                       <div class="clear"></div>
+               </div>
+       </form>
+</div>
index f5bf57c02d4407f40ecf796959b77c93b6f4e49f..21b3e47e839fae395dd7d51a03c698f21037d55c 100644 (file)
@@ -18,6 +18,6 @@
        <div class="side-link" id="side-suggest-link"><a href="suggest" >{{$nv.suggest}}</a></div>
 
        {{if $nv.inv}} 
-       <div class="side-link" id="side-invite-link" ><a href="invite" >{{$nv.inv}}</a></div>
+       <div class="side-link" id="side-invite-link" ><button type="button" class="btn-link" onclick="addToModal('invite'); return false;">{{$nv.inv}}</button></div>
        {{/if}}
 </div>
index 710c76f6af2bf26ace1f979c5f3d40a45ef53c77..ba10b16021959413ad77b3b2dcadd8e53198788f 100644 (file)
@@ -3341,7 +3341,10 @@ img.photo-album-photo {
 .videos .video-top-wrapper:hover .video-delete {
   opacity: 1;
 }
-
+/* invite page */
+#invite-wrapper textarea {
+  width: 100%;
+}
 /* upload/select popup */
   fbrowser.image .photo-album-image-wrapper { margin-left: 10px; }
   #message-preview { margin-top: 15px; }