Skip to content

Commit

Permalink
Alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
coudot committed Feb 16, 2024
1 parent 7574ade commit 0940527
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 29 deletions.
10 changes: 5 additions & 5 deletions templates/change.tpl
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{if $prehook_return and $display_prehook_error and $prehook_return > 0}
<div class="result alert alert-warning">
<p><i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i> {$prehook_output[0]}</p>
<i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i> {$prehook_output[0]}
</div>
{/if}
{if $posthook_return and $display_posthook_error and $posthook_return > 0}
<div class="result alert alert-warning">
<p><i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i> {$posthook_output[0]}</p>
<i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i> {$posthook_output[0]}
</div>
{/if}
{if $result !== "passwordchanged"}
{if $show_help }
<div class="result alert alert-warning">
<p><i class="fa fa-fw fa-exclamation-circle" aria-hidden="true"></i> {$msg_changehelp}</p>
<i class="fa fa-fw fa-exclamation-circle" aria-hidden="true"></i> {$msg_changehelp}
{if $msg_changehelpextramessage}
<p>{$msg_changehelpextramessage|unescape: "html" nofilter}</p>
<br />{$msg_changehelpextramessage|unescape: "html" nofilter}
{/if}
{if !$show_menu and ($use_questions or $use_tokens or $use_sms or $change_sshkey) }
<ul>
Expand Down Expand Up @@ -91,6 +91,6 @@
{/if}
{elseif $msg_passwordchangedextramessage}
<div class="result alert alert-{$result_criticity}">
<p><i class="fa fa-fw {$result_fa_class}" aria-hidden="true"></i> {$msg_passwordchangedextramessage|unescape: "html" nofilter}</p>
<i class="fa fa-fw {$result_fa_class}" aria-hidden="true"></i> {$msg_passwordchangedextramessage|unescape: "html" nofilter}
</div>
{/if}
4 changes: 2 additions & 2 deletions templates/changesshkey.tpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{if $result !== 'sshkeychanged'}
{if $show_help }
<div class="help alert alert-warning"><p>
<div class="help alert alert-warning">
<i class="fa fa-fw fa-info-circle"></i> {$msg_changesshkeyhelp}
</p></div>
</div>
{/if}
<div class="alert alert-info">
<form action="#" method="post" class="form-horizontal">
Expand Down
6 changes: 2 additions & 4 deletions templates/index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,16 @@
{if count($dependency_errors)}
{foreach from=$dependency_errors key=result item=result_array}
<div class="result alert alert-{$result_array['criticity']}">
<p><i class="fa fa-fw {$result_array['fa_class']}" aria-hidden="true"></i> {$result_array['error']|unescape: "html" nofilter}
</p>
<i class="fa fa-fw {$result_array['fa_class']}" aria-hidden="true"></i> {$result_array['error']|unescape: "html" nofilter}
</div>
{/foreach}
{else}
{if $error != ""}
<div class="result alert alert-{$result_criticity}">
<p><i class="fa fa-fw {$result_fa_class}" aria-hidden="true"></i> {$error|unescape: "html" nofilter}
<i class="fa fa-fw {$result_fa_class}" aria-hidden="true"></i> {$error|unescape: "html" nofilter}
{if $show_extended_error and $extended_error_msg}
({$extended_error_msg})
{/if}
</p>
</div>
{/if}
{include file="$action.tpl"}
Expand Down
2 changes: 1 addition & 1 deletion templates/policy.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{if $pwd_show_policy === "onerror" and !$pwd_show_policy_onerror }
{else}
<div class="help alert alert-warning">
<p>{$msg_policy|unescape: "html" nofilter}</p>
{$msg_policy|unescape: "html" nofilter}
<ul>
{if $pwd_min_length } <li>{$msg_policyminlength|unescape: "html" nofilter} {$pwd_min_length}</li> {/if}
{if $pwd_max_length } <li>{$msg_policymaxlength|unescape: "html" nofilter} {$pwd_max_length}</li> {/if}
Expand Down
8 changes: 4 additions & 4 deletions templates/resetbyquestions.tpl
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{if $prehook_return and $display_prehook_error and $prehook_return > 0}
<div class="result alert alert-warning">
<p><i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i> {$prehook_output[0]}</p>
<i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i> {$prehook_output[0]}
</div>
{/if}
{if $posthook_return and $display_posthook_error and $posthook_return > 0}
<div class="result alert alert-warning">
<p><i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i> {$posthook_output[0]}</p>
<i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i> {$posthook_output[0]}
</div>
{/if}
{if $result !== 'passwordchanged'}
{if $show_help}
<div class="help alert alert-warning">
<p><i class="fa fa-fw fa-info-circle"></i> {$msg_resetbyquestionshelp|unescape: "html" nofilter}</p>
<i class="fa fa-fw fa-info-circle"></i> {$msg_resetbyquestionshelp|unescape: "html" nofilter}
{if $question_populate_enable }
<p><i class="fa fa-fw fa-info-circle"></i> {$msg_questionspopulatehint}</p>
<br /><i class="fa fa-fw fa-info-circle"></i> {$msg_questionspopulatehint}
{/if}
</div>
{/if}
Expand Down
8 changes: 4 additions & 4 deletions templates/resetbytoken.tpl
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{if $prehook_return and $display_prehook_error and $prehook_return > 0}
<div class="result alert alert-warning">
<p><i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i> {$prehook_output[0]}</p>
<i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i> {$prehook_output[0]}
</div>
{/if}
{if $posthook_return and $display_posthook_error and $posthook_return > 0}
<div class="result alert alert-warning">
<p><i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i> {$posthook_output[0]}</p>
<i class="fa fa-fw fa-exclamation-triangle" aria-hidden="true"></i> {$posthook_output[0]}
</div>
{/if}
{if $result !== "passwordchanged"}
{if $show_help and $source !== "sms"}
<div class="help alert alert-warning"><p><i class="fa fa-fw fa-info-circle"></i> {$msg_resetbytokenhelp|unescape: "html" nofilter}</p></div>
<div class="help alert alert-warning"><i class="fa fa-fw fa-info-circle"></i> {$msg_resetbytokenhelp|unescape: "html" nofilter}</div>
{elseif show_help and $source === "sms"}
<div class="help alert alert-warning"><p><i class="fa fa-fw fa-info-circle"></i>{$msg_resetbysmshelp|unescape: "html" nofilter}</p></div>
<div class="help alert alert-warning"><i class="fa fa-fw fa-info-circle"></i>{$msg_resetbysmshelp|unescape: "html" nofilter}</div>
{/if}
{if $result !== "tokenrequired" and $result !== "tokennotvalid"}
{if $pwd_show_policy !== "never" and $pwd_show_policy_pos === 'above'}
Expand Down
5 changes: 2 additions & 3 deletions templates/sendsms.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,10 @@
{else}
{if $show_help}
<div class="help alert alert-warning">
<p><i class="fa fa-fw fa-info-circle"></i> {$msg_sendsmshelp}</p>
<i class="fa fa-fw fa-info-circle"></i> {$msg_sendsmshelp}
{if $attribute_phone_update}
<p><i class="fa fa-fw fa-pencil-square-o"></i>
<br /><i class="fa fa-fw fa-pencil-square-o"></i>
{$msg_sendsmshelpupdatephone|unescape: "html" nofilter}
</p>
{/if}
</div>
{/if}
Expand Down
7 changes: 3 additions & 4 deletions templates/sendtoken.tpl
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{if $result !== 'tokensent'}
{if $show_help}
<div class="help alert alert-warning"><p><i class="fa fa-fw fa-info-circle"></i>
<div class="help alert alert-warning"><i class="fa fa-fw fa-info-circle"></i>
{if $mail_address_use_ldap}
{$msg_sendtokenhelpnomail|unescape: "html" nofilter}
{else}
{$msg_sendtokenhelp|unescape: "html" nofilter}
{/if}</p>
{/if}
{if $attribute_mail_update}
<p><i class="fa fa-fw fa-pencil-square-o"></i>
<br /><i class="fa fa-fw fa-pencil-square-o"></i>
{$msg_sendtokenhelpupdatemail|unescape: "html" nofilter}
</p>
{/if}
</div>
{/if}
Expand Down
2 changes: 1 addition & 1 deletion templates/setattributes.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{if $result !== "attributeschanged"}
{if $show_help}
<div class="help alert alert-warning">
<p><i class="fa fa-fw fa-info-circle"></i> {$msg_setattributeshelp|unescape: "html" nofilter}</p>
<i class="fa fa-fw fa-info-circle"></i> {$msg_setattributeshelp|unescape: "html" nofilter}
</div>
{/if}
<div class="alert alert-info">
Expand Down
2 changes: 1 addition & 1 deletion templates/setquestions.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{if $show_help}
<div class="help alert alert-warning">
<p><i class="fa fa-fw fa-info-circle"></i> {$msg_setquestionshelp|unescape: "html" nofilter}</p>
<i class="fa fa-fw fa-info-circle"></i> {$msg_setquestionshelp|unescape: "html" nofilter}
</div>
{/if}
<div class="alert alert-info">
Expand Down

0 comments on commit 0940527

Please sign in to comment.