[TikiWiki-commits] [Git][tikiwiki/tiki][master] [ENH][UI][UX] Convert tiki-invite.tpl to Bootstrap
Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <68c842a5742d6_2c43e02c011fb@gitlab-sidekiq-low-urgency-cpu-bound-v2-679dd6fdf9-4rw5m.mail> |
Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
0a759563 by Landry Bitege at 2025-09-15T16:37:32+00:00
[ENH][UI][UX] Convert tiki-invite.tpl to Bootstrap
---
* [ENH][UI][UX] Convert tiki-invite.tpl to Bootstrap
See merge request tikiwiki/tiki!8355
- - - - -
2 changed files:
- templates/tiki-invite.tpl
- templates/tiki-list_invite.tpl
Changes:
=====================================
templates/tiki-invite.tpl
=====================================
@@ -1,7 +1,7 @@
{title url="tiki-invite.php"}{tr}Invitation{/tr}{/title}
-<div class="t_navbar">
- {button class="btn btn-primary" _text="{tr}Invitations list{/tr}" href="tiki-list_invite.php"}
+<div class="t_navbar mb-4">
+ {button href="tiki-list_invite.php" _type="link" _icon_name="list" _text="{tr}Invitations List{/tr}"}
</div>
{if $sentresult}
@@ -33,35 +33,55 @@
<input type='submit' name='back' value="{tr}Go back{/tr}" class="btn btn-secondary">
<input type='submit' name='confirm' value="{tr}Ok{/tr}" class="btn btn-primary">
</form>
-
+
{else}
+ <hr>
<form method='POST' action='tiki-invite.php'>
- <br>
- <div style='text-align: right'>
- Load a previous invitation settings :
- <select name='loadprevious' onchange='this.form.submit()'>
- <option value=''>-</option>
- {foreach from=$previous item=prev}
- <option value='{$prev.id}'>{$prev.datetime|escape}, {tr}by{/tr} {$prev.inviter|escape}</option>
- {/foreach}
- </select>
+ <div class="mb-3 row">
+ <label class="col-form-label col-sm-5" for="loadprevious">{tr}Load a previous invitation settings{/tr}</label>
+ <div class="col-sm-7">
+ <select name='loadprevious' onchange='this.form.submit()' class="form-select">
+ <option value=''>-</option>
+ {foreach from=$previous item=prev}
+ <option value='{$prev.id}'>{$prev.datetime|escape}, {tr}by{/tr} {$prev.inviter|escape}</option>
+ {/foreach}
+ </select>
+ </div>
</div>
- <br>
- <div>{tr}Fill this box with the list of emails you want to invite :{/tr}</div>
- <div><textarea name='emailslist' style='width: 100%; height: 150px;'>{$smarty.request.emailslist|escape}</textarea></div>
- <div>{tr}Format of the list above :{/tr}
- <div><input type='radio' name='emailslist_format' value='csv' {if (! $smarty.request.emailslist_format) || $smarty.request.emailslist_format == 'csv'}checked{/if} > {tr}CSV Style: One line per invitation, with the format: lastname,firstname,email{/tr}</div>
- <div><input type='radio' name='emailslist_format' value='all' {if $smarty.request.emailslist_format == 'all'}checked{/if}> {tr}Everything that appear as an email in the text will be detected and used (in that case, {literal}{firstname} and {lastname}{/literal} will be ignored in the email content){/tr}</div>
+ <div class="mb-3 row">
+ <label class="col-form-label col-sm-5" for="emailslist">{tr}Fill this box with the list of emails you want to invite{/tr}</label>
+ <div class="col-sm-7">
+ <textarea name='emailslist' class="form-control" style='width: 100%; height: 150px;'>{$smarty.request.emailslist|escape}</textarea>
+ </div>
</div>
- <br>
- <div>{tr}Type here the email subject you'll want to be sent to them :{/tr}</div>
- <div><input name='emailsubject' style='width: 100%;' value='{if isset($smarty.request.emailsubject)}{$smarty.request.emailsubject|escape}{else}Invitation{/if}'></div>
+ <div class="mb-3 row">
+ <label class="col-form-label col-sm-5" for="emailslist_format">{tr}Format of the list above{/tr}</label>
+ <div class="col-sm-7">
+ <div class="form-check">
+ <input class="form-check-input" type='radio' name='emailslist_format' value='csv' {if (! $smarty.request.emailslist_format) || $smarty.request.emailslist_format == 'csv'}checked{/if} >
+ <label class="form-check-label">{tr}CSV Style: One line per invitation, with the format: lastname,firstname,email{/tr}</label>
+ </div>
+ <br>
+ <div class="form-check">
+ <input class="form-check-input" type='radio' name='emailslist_format' value='all' {if $smarty.request.emailslist_format == 'all'}checked{/if}>
+ <label class="form-check-label">{tr}Everything that appear as an email in the text will be detected and used (in that case, \{literal}{firstname} and {lastname}{/literal} will be ignored in the email content){/tr}</label>
+ </div>
+ </div>
+ </div>
+
+ <div class="mb-3 row">
+ <label class="col-form-label col-sm-5" for="emailsubject">{tr}Type here the email subject you'll want to be sent to them{/tr}</label>
+ <div class="col-sm-7">
+ <input name='emailsubject' class="form-control" value='{if isset($smarty.request.emailsubject)}{$smarty.request.emailsubject|escape}{else}Invitation{/if}'>
+ </div>
+ </div>
- <br>
- <div>{tr}Type here the email content you'll want to be sent to them (and let the {literal}{link}{/literal} word, it will be replaced with the good link for registering) :{/tr}</div>
- <div><textarea name='emailcontent' style='width: 100%; height: 150px;'>{if isset($smarty.request.emailcontent)}{$smarty.request.emailcontent|escape}{else}Hi {literal}{firstname} {lastname}{/literal},
+ <div class="mb-3 row">
+ <label class="col-form-label col-sm-5" for="emailcontent">{tr}Type here the email content you'll want to be sent to them (and let the \{literal}{link}{/literal} word, it will be replaced with the good link for registering){/tr}</label>
+ <div class="col-sm-7">
+ <textarea name='emailcontent' class="form-control" style='width: 100%; height: 150px;'>{tr}{if isset($smarty.request.emailcontent)}{$smarty.request.emailcontent|escape}{else}Hi \{literal}{firstname} {lastname}{/literal},
We would like to invite you to register on our web site
To register, just follow this link:
@@ -69,35 +89,44 @@ To register, just follow this link:
{literal}{link}{/literal}
Kind regards
-{/if}</textarea> {* code style is broken because textarea contents must not have extra spaces *}
+{/if}{/tr}</textarea>
+ </div>
</div>
- <br>
- <div>{tr}Type here the content that the user will see when he'll click on the link from the mail :{/tr}</div>
- <div>
- <textarea name='wikicontent' style='width: 100%; height: 150px;'>{if isset($smarty.request.emailcontent)}{$smarty.request.wikicontent|escape}{else}Hi {literal}{firstname} {lastname}{/literal},
+ <div class="mb-3 row">
+ <label class="col-form-label col-sm-5" for="wikicontent">{tr}Type here the content that the user will see when he'll click on the link from the mail{/tr}</label>
+ <div class="col-sm-7">
+ <textarea name='wikicontent' class="form-control" style='width: 100%; height: 150px;'>{tr}{if isset($smarty.request.emailcontent)}{$smarty.request.wikicontent|escape}{else}Hi \{literal}{firstname} {lastname}{/literal},
You are here because you have just clicked on the link from my invitation email.
-{/if}</textarea> {* code style is broken because textarea contents must not have extra spaces *}
+{/if}{/tr}</textarea>
+ </div>
</div>
{if count($invitegroups) > 0 && count($usergroups) > 0}
- <br>
- <div>{tr}Choose one or more groups that you want these subscriptions to be in. Don't choose any if you don't want anything special :{/tr}</div>
- <div>
- <select multiple="multiple" name='invitegroups[]'>
- {foreach from=$usergroups item=ug}
- <option value='{$ug|escape}' {if is_array($smarty.request.invitegroups) && in_array($ug,$smarty.request.invitegroups)}selected{/if}>{$ug|escape}{if !empty($invitegroups[$ug])} ({$invitegroups[$ug]|escape}){/if}</option>
- {/foreach}
- </select>
+ <div class="mb-3 row">
+ <label class="col-form-label col-sm-5" for="invitegroups">{tr}Choose one or more groups that you want these subscriptions to be in. Don't choose any if you don't want anything special{/tr}</label>
+ <div class="col-sm-7">
+ <select multiple="multiple" name='invitegroups[]' id='invitegroups' class="form-select">
+ {foreach from=$usergroups item=ug}
+ <option value='{$ug|escape}' {if is_array($smarty.request.invitegroups) && in_array($ug,$smarty.request.invitegroups)}selected{/if}>{$ug|escape}{if !empty($invitegroups[$ug])} ({$invitegroups[$ug]|escape}){/if}</option>
+ {/foreach}
+ </select>
+ </div>
</div>
{else}
<input type='hidden' name='invitegroups' value=''>
{/if}
- <br>
- <div>Redirect to this wiki page after invitation acceptance (let it blank if unwanted) : <input type='text' name='wikipageafter' value='{$smarty.request.wikipageafter|escape}'></div>
- <br>
- <div><input type='submit' name='send' value="{tr}Send{/tr}" class="btn btn-primary"></div>
+ <div class="mb-3 row">
+ <label class="col-form-label col-sm-5" for="wikipageafter">{tr}Redirect to this wiki page after invitation acceptance (leave it blank if unwanted){/tr}</label>
+ <div class="col-sm-7">
+ <input type='text' name='wikipageafter' value='{$smarty.request.wikipageafter|escape}'>
+ </div>
+ </div>
+
+ <div class="mb-3 clearfix text-center">
+ <input type='submit' name='send' value="{tr}Send{/tr}" class="btn btn-primary">
+ </div>
</form>
{/if}
=====================================
templates/tiki-list_invite.tpl
=====================================
@@ -1,31 +1,54 @@
{title}{tr}Invitations list{/tr}{/title}
-<div class="t_avbar">
- {button href="tiki-invite.php" class="btn btn-primary" _text="{tr}Invite{/tr}"}
- {if $tiki_p_admin eq 'y'}{button href="tiki-adminusers.php" _text="{tr}Admin users{/tr}"}{/if}
+<div class="t_navbar mb-4">
+ {button href="tiki-invite.php" class="btn btn-primary" _type="link" _icon_name="group" _text="{tr}Invite{/tr}"}
+ {if $tiki_p_admin eq 'y'}
+ {button href="tiki-adminusers.php" class="btn btn-primary" _type="link" _icon_name="user" _text="{tr}Add Users{/tr}"}
+ {/if}
</div>
+<hr>
+
<div class="clearfix">
- <form class="text-center" action="tiki-list_invite.php" method="post">
+ <form action="tiki-list_invite.php" method="post">
{if $tiki_p_admin eq 'y'}
- <label>
- {tr}Inviter:{/tr}
- <input type="text" name="inviter" value="{$inviter|escape}">
- </label>
+ <div class="mb-3 row">
+ <label class="col-form-label col-sm-5" for="inviter">{tr}Inviter{/tr}</label>
+ <div class="col-sm-7">
+ <input type="text" class="form-control" id="inviter" name="inviter" value="{$inviter|escape}">
+ </div>
+ </div>
{/if}
- <label>
- {tr}Only successful invitations:{/tr}
- <input type="checkbox" name="only_success"{if $only_success eq 'y'} checked="checked"{/if}>
- </label>
- <label>
- {tr}Only pending invitations:{/tr}
- <input type="checkbox" name="only_pending"{if $only_pending eq 'y'} checked="checked"{/if}>
- </label>
- <br>
- <input type="submit" class="btn btn-info btn-sm" name="filter" value="{tr}Filter{/tr}">
+
+ <div class="mb-3 row">
+ <div class="offset-sm-5 col-sm-7">
+ <div class="form-check">
+ <label class="form-check-label">
+ <input class="form-check-input" name="only_success" type="checkbox" {if $only_success eq 'y'} checked="checked"{/if}>{tr}Only successful invitations{/tr}
+ </label>
+ </div>
+ </div>
+ </div>
+ <div class="mb-3 row">
+ <div class="offset-sm-5 col-sm-7">
+ <div class="form-check">
+ <label class="form-check-label">
+ <input class="form-check-input" name="only_pending" type="checkbox" {if $only_pending eq 'y'} checked="checked"{/if}>{tr}Only pending invitations{/tr}
+ </label>
+ </div>
+ </div>
+ </div>
+
+ <div class="mb-3 row">
+ <div class="col-sm-7 offset-sm-5">
+ <input type="submit" class="btn btn-primary btn-sm" name="filter" value="{tr}Filter{/tr}">
+ </div>
+ </div>
</form>
</div>
+<hr>
+
{tr}Number of invitations:{/tr} {$count}
{if $count > 0}
<div class="table-responsive">
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/0a759563db4d47160754923be349122bceba0b72
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/0a759563db4d47160754923be349122bceba0b72
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs