From ac753e3320966efdbc25c9f87f889df38675657e Mon Sep 17 00:00:00 2001 From: rabuzarus Date: Tue, 24 Apr 2018 17:33:48 +0200 Subject: [PATCH] frio - provide a template for invite page --- mod/invite.php | 9 +++---- view/templates/invite.tpl | 31 +++++++----------------- view/theme/frio/css/style.css | 2 +- view/theme/frio/js/modal.js | 4 +++ view/theme/frio/templates/invite.tpl | 19 +++++++++++++++ view/theme/frio/templates/peoplefind.tpl | 2 +- view/theme/vier/style.css | 5 +++- 7 files changed, 42 insertions(+), 30 deletions(-) create mode 100644 view/theme/frio/templates/invite.tpl diff --git a/mod/invite.php b/mod/invite.php index 6807ff2c12..813dbf7044 100644 --- a/mod/invite.php +++ b/mod/invite.php @@ -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') ]); diff --git a/view/templates/invite.tpl b/view/templates/invite.tpl index 6fd8539c5a..2087635e4f 100644 --- a/view/templates/invite.tpl +++ b/view/templates/invite.tpl @@ -1,31 +1,18 @@
- + -
+
-

{{$invite}}

+

{{$title}}

-
-{{$addr_text}} -
+ {{include file="field_textarea.tpl" field=$recipients}} + {{include file="field_textarea.tpl" field=$message}} -
- -
+
+ +
-
-{{$msg_text}} -
- -
- -
- -
- -
- -
+
diff --git a/view/theme/frio/css/style.css b/view/theme/frio/css/style.css index 1614547b85..8a3ca86291 100644 --- a/view/theme/frio/css/style.css +++ b/view/theme/frio/css/style.css @@ -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; diff --git a/view/theme/frio/js/modal.js b/view/theme/frio/js/modal.js index 56df75d7b6..46bb1e5143 100644 --- a/view/theme/frio/js/modal.js +++ b/view/theme/frio/js/modal.js @@ -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 index 0000000000..9ff20240ae --- /dev/null +++ b/view/theme/frio/templates/invite.tpl @@ -0,0 +1,19 @@ + +
+ +

{{$title}}

+ +
+ + +
+ {{include file="field_textarea.tpl" field=$recipients}} + {{include file="field_textarea.tpl" field=$message}} + +
+ +
+
+
+
+
diff --git a/view/theme/frio/templates/peoplefind.tpl b/view/theme/frio/templates/peoplefind.tpl index f5bf57c02d..21b3e47e83 100644 --- a/view/theme/frio/templates/peoplefind.tpl +++ b/view/theme/frio/templates/peoplefind.tpl @@ -18,6 +18,6 @@ {{if $nv.inv}} - + {{/if}} diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index 710c76f6af..ba10b16021 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -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; }