frio - provide a template for invite page

This commit is contained in:
rabuzarus 2018-04-24 17:33:48 +02:00
parent 1f48373c51
commit ac753e3320
7 changed files with 42 additions and 30 deletions

View 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')
]);

View 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>

View 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;

View 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'));
}
});
}

View File

@ -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>

View 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>

View 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; }