Skip to content

Commit

Permalink
Migrate form-group and input-group
Browse files Browse the repository at this point in the history
  • Loading branch information
coudot committed Jul 10, 2024
1 parent 1aa2145 commit 01481c3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 54 deletions.
71 changes: 21 additions & 50 deletions templates/display.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,13 @@
<div class="alert alert-success"><i class="fa fa-fw fa-check"></i> {$msg_passwordok}</div>
{/if}
<input type="hidden" name="dn" value="{$dn}" />
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-fw fa-lock"></i></span>
<input type="password" name="currentpassword" id="currentpassword" class="form-control" placeholder="{$msg_currentpassword}" />
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-success">
<i class="fa fa-fw fa-check-square-o"></i> {$msg_submit}
</button>
<div class="input-group mb-3">
<span class="input-group-text"><i class="fa fa-fw fa-lock"></i></span>
<input type="password" name="currentpassword" id="currentpassword" class="form-control" placeholder="{$msg_currentpassword}" />
</div>
<button type="submit" class="btn btn-success">
<i class="fa fa-fw fa-check-square-o"></i> {$msg_submit}
</button>
</form>
</div>
</div>
Expand Down Expand Up @@ -165,33 +161,14 @@
<div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$posthookresult}</div>
{/if}
<input type="hidden" name="dn" value="{$dn}" />
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-fw fa-lock"></i></span>
<input type="password" name="newpassword" id="newpassword" class="form-control" placeholder="{$msg_newpassword}" />
</div>
<div class="input-group mb-3">
<span class="input-group-text"><i class="fa fa-fw fa-lock"></i></span>
<input type="password" name="newpassword" id="newpassword" class="form-control" placeholder="{$msg_newpassword}" />
</div>
{if $use_resetpassword_resetchoice}
<div class="form-group row">
<div class="col-md-9"><p>{$msg_forcereset}</p></div>
<div class="col-md-3 text-right">
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary{if $resetpassword_reset_default} active{/if}">
{if $resetpassword_reset_default}
<input type="radio" name="pwdreset" id="true" value="true" checked /> {$msg_true}
{else}
<input type="radio" name="pwdreset" id="true" value="true" /> {$msg_true}
{/if}
</label>
<label class="btn btn-primary{if !$resetpassword_reset_default} active{/if}">
{if !$resetpassword_reset_default}
<input type="radio" name="pwdreset" id="false" value="false" checked /> {$msg_false}
{else}
<input type="radio" name="pwdreset" id="false" value="false" /> {$msg_false}
{/if}
</label>
</div>
</div>
<div class="form-check form-switch mb-3">
<input class="form-check-input" type="checkbox" role="switch" name="pwdreset" id="pwdresetcheckbox"{if $resetpassword_reset_default} checked{/if} value="{if $resetpassword_reset_default}true{else}false{/if}" >
<label class="form-check-label" for="pwdresetcheckbox">{$msg_forcereset}</label>
</div>
{else}
{if $resetpassword_reset_default}
Expand All @@ -200,11 +177,9 @@
<input type="hidden" name="pwdreset" value="false" />
{/if}
{/if}
<div class="form-group">
<button type="submit" class="btn btn-success">
<i class="fa fa-fw fa-check-square-o"></i> {$msg_submit}
</button>
</div>
<button type="submit" class="btn btn-success">
<i class="fa fa-fw fa-check-square-o"></i> {$msg_submit}
</button>
</form>
</div>
</div>
Expand All @@ -229,11 +204,9 @@
<div class="alert alert-danger"><i class="fa fa-fw fa-exclamation-triangle"></i> {$msg_accountnotunlocked}</div>
{/if}
<input type="hidden" name="dn" value="{$dn}" />
<div class="form-group">
<button type="submit" class="btn btn-success">
<i class="fa fa-fw fa-unlock"></i> {$msg_unlockaccount}
</button>
</div>
<button type="submit" class="btn btn-success">
<i class="fa fa-fw fa-unlock"></i> {$msg_unlockaccount}
</button>
</form>
{/if}
</div>
Expand All @@ -256,11 +229,9 @@
<div class="alert alert-danger"><i class="fa fa-fw fa-exclamation-triangle"></i> {$msg_accountnotlocked}</div>
{/if}
<input type="hidden" name="dn" value="{$dn}" />
<div class="form-group">
<button type="submit" class="btn btn-success">
<i class="fa fa-fw fa-lock"></i> {$msg_lockaccount}
</button>
</div>
<button type="submit" class="btn btn-success">
<i class="fa fa-fw fa-lock"></i> {$msg_lockaccount}
</button>
</form>
</div>
{/if}
Expand Down
6 changes: 2 additions & 4 deletions templates/menu.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@
</ul>
<form class="d-flex" role="search" action="index.php?page=search" method="post">
<div class="input-group">
<input type="text" class="form-control" placeholder="{$msg_search}" name="search" value="{$search}" />
<span class="input-group-btn">
<button class="btn btn-default" type="submit">&nbsp;<i class="fa fa-fw fa-search"></i></button>
</span>
<input type="text" class="form-control border-secondary" placeholder="{$msg_search}" name="search" value="{$search}" />
<button class="btn btn-outline-secondary" type="submit">&nbsp;<i class="fa fa-fw fa-search"></i></button>
</div>
</form>
</div>
Expand Down

0 comments on commit 01481c3

Please sign in to comment.