mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 20:51:30 +00:00
nicer layout
This commit is contained in:
parent
84a61cbd14
commit
ff4151093c
|
@ -76,36 +76,46 @@ $(document).ready( function() {
|
||||||
$this->contentStart();
|
$this->contentStart();
|
||||||
$this->pageNavigation(getMLText("my_account"), "my_account");
|
$this->pageNavigation(getMLText("my_account"), "my_account");
|
||||||
$this->contentHeading(getMLText('2_factor_auth'));
|
$this->contentHeading(getMLText('2_factor_auth'));
|
||||||
echo "<div class=\"alert\">".getMLText('2_factor_auth_info')."</div>";
|
$this->infoMsg(getMLText('2_factor_auth_info'));
|
||||||
$this->rowStart();
|
$this->rowStart();
|
||||||
$this->contentContainerStart('span6');
|
$this->columnStart(6);
|
||||||
|
$this->contentHeading(getMLText('2_fact_auth_new_secret'));
|
||||||
|
|
||||||
$tfa = new \RobThree\Auth\TwoFactorAuth('SeedDMS');
|
$tfa = new \RobThree\Auth\TwoFactorAuth('SeedDMS');
|
||||||
$oldsecret = $user->getSecret();
|
$oldsecret = $user->getSecret();
|
||||||
$secret = $tfa->createSecret();
|
$secret = $tfa->createSecret();
|
||||||
?>
|
?>
|
||||||
<form class="form-horizontal" action="../op/op.Setup2Factor.php" method="post" id="form" name="form1">
|
<form class="form-horizontal" action="../op/op.Setup2Factor.php" method="post" id="form" name="form1">
|
||||||
<div class="control-group"><label class="control-label"><?php printMLText('2_fact_auth_secret'); ?></label><div class="controls">
|
<?php
|
||||||
<input id="secret" class="secret" type="text" name="secret" size="30" value="<?php echo $secret; ?>"><br />
|
$this->formField(
|
||||||
</div></div>
|
getMLText('2_fact_auth_secret'),
|
||||||
|
array(
|
||||||
|
'element'=>'input',
|
||||||
|
'type'=>'text',
|
||||||
|
'name'=>'secret',
|
||||||
|
'class'=>'secret',
|
||||||
|
'value'=>htmlspecialchars($secret),
|
||||||
|
'required'=>true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$this->formSubmit(getMLText('submit_2_fact_auth'));
|
||||||
|
?>
|
||||||
<div class="control-group"><label class="control-label"></label><div class="controls">
|
<div class="control-group"><label class="control-label"></label><div class="controls">
|
||||||
<img src="<?php echo $tfa->getQRCodeImageAsDataUri($sitename, $secret); ?>">
|
<img src="<?php echo $tfa->getQRCodeImageAsDataUri($sitename, $secret); ?>">
|
||||||
</div></div>
|
</div></div>
|
||||||
<?php
|
|
||||||
$this->formSubmit(getMLText('submit_2_fact_auth'));
|
|
||||||
?>
|
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
if($oldsecret) {
|
if($oldsecret) {
|
||||||
$this->contentContainerEnd();
|
$this->columnEnd();
|
||||||
$this->contentContainerStart('span6');
|
$this->columnStart(6);
|
||||||
|
$this->contentHeading(getMLText('2_fact_auth_current_secret'));
|
||||||
echo '<div>'.$oldsecret.'</div>';
|
echo '<div>'.$oldsecret.'</div>';
|
||||||
echo '<div><img src="'.$tfa->getQRCodeImageAsDataUri($sitename, $oldsecret).'"></div>';
|
echo '<div><img src="'.$tfa->getQRCodeImageAsDataUri($sitename, $oldsecret).'"></div>';
|
||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->contentContainerEnd();
|
$this->columnEnd();
|
||||||
$this->rowEnd();
|
$this->rowEnd();
|
||||||
$this->contentEnd();
|
$this->contentEnd();
|
||||||
$this->htmlEndPage();
|
$this->htmlEndPage();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user