vesta/web/templates/admin/add_user.html
2016-11-22 07:05:19 -05:00

172 lines
8.5 KiB
HTML

<div class="l-center">
<div class="l-sort clearfix">
<div class="l-sort-toolbar clearfix float-left">
<span class="title"><b><?=__('Adding User')?></b></span>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<span class=\"vst-error\"> → ".htmlentities($_SESSION['error_msg'])."</span>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<span class=\"vst-ok\"> → ".$_SESSION['ok_msg']."</span>";
}
}
?>
</div>
</div>
</div>
<div class="l-separator"></div>
<!-- /.l-separator -->
<div class="l-center">
<?php
$back = $_SESSION['back'];
if (empty($back)) {
$back = "location.href='/list/user/'";
} else {
$back = "location.href='".$back."'";
}
?>
<form id="vstobjects" name="v_add_user" method="post">
<input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
<input type="hidden" name="ok" value="Add" />
<table class="data mode-add">
<tr class="data-add">
<td class="data-dotted">
<table class="data-col1">
<tr><td></td></tr>
</table>
</td>
<td class="data-dotted">
<table class="data-col2">
<tr>
<td class="vst-text step-top">
<?php print __('Username');?>
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" name="v_username" value="<?=htmlentities(trim($v_username, "'"))?>" tabindex="1" >
</td>
</tr>
<tr>
<td class="vst-text input-label">
<?php print __('Password');?> / <a href="javascript:randomString();" class="generate" ><?php print __('generate');?></a>
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input password" name="v_password" value="<?=htmlentities(trim($v_password, "'"))?>" tabindex="2" >
</td>
</tr>
<tr>
<td class="vst-text input-label">
<?php print __('Email');?>
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" name="v_email" id='v_email' value="<?=htmlentities(trim($v_email, "'"))?>" tabindex="3" >
</td>
</tr>
<tr>
<td class="vst-text input-label" name="v_package">
<?php print __('Package');?>
</td>
</tr>
<tr>
<td>
<select class="vst-list" name="v_package" tabindex="4" >
<?php
foreach ($data as $key => $value) {
echo "\n\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"".htmlentities($key)."\"";
if ((!empty($v_package)) && ( $key == $_POST['v_package'])){
echo 'selected' ;
} else {
if ( $key == 'default'){
echo 'selected' ;
}
}
echo ">".htmlentities($key)."</option>\n";
}
?>
</select>
</td>
</tr>
<tr>
<td class="vst-text input-label">
<?php print __('Language');?>
</td>
</tr>
<tr>
<td>
<select class="vst-list" name="v_language" tabindex="5" >
<?php
foreach ($languages as $key => $value) {
echo "\n\t\t\t\t\t\t\t\t\t<option value=\"".htmlentities($value)."\"";
$svalue = "'".$value."'";
if (( $value == $_SESSION['LANGUAGE'] ) && (empty($v_language))){
echo ' selected' ;
}
if (isset($v_language)){
if (( $value == $v_language ) || ( $svalue == $v_language)){
echo ' selected' ;
}
}
echo ">".htmlentities($value)."</option>\n";
}
?>
</select>
</td>
</tr>
<tr>
<td class="vst-text input-label">
<?php print __('First Name');?>
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" name="v_fname" value="<?=htmlentities(trim($v_fname, "'"))?>" tabindex="6" >
</td>
</tr>
<tr>
<td class="vst-text input-label">
<?php print __('Last Name');?>
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" name="v_lname" value="<?=htmlentities(trim($v_lname, "'"))?>" tabindex="7" >
</td>
</tr>
<tr>
<td class="vst-text input-label">
<?php print __('Send login credentials to email address');?>
</td>
</tr>
<tr>
<td>
<input type="text" class="vst-input" name="v_notify" id="v_notify" value="<?=htmlentities(trim($v_notify, "'"))?>" tabindex="8" >
</td>
</tr>
</table>
<table class="data-col2">
<tr>
<td class="step-top" width="116px">
<input type="submit" name="ok" value="<?=__('Add')?>" class="button">
</td>
<td class="step-top">
<input type="button" class="button cancel" value="<?=__('Back')?>" onclick="<?=$back?>">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>