##// END OF EJS Templates
agregado el controlador staff y algunas funciones como agregar nuevo.
agregado el controlador staff y algunas funciones como agregar nuevo.

File last commit:

r2:3
r2:3
Show More
form.php
84 lines | 3.2 KiB | text/x-php | XmlPhpLexer
<?php
$html_areas = "";
$html_users = "";
if($lstAreas){
$html_areas = '<select name="lstArea" class="form_select">';
$html_areas .= '<option value="-1">Seleccione...</option>';
$countA = count($lstAreas);
for($i=0; $i<$countA; $i++){
$_obj = $lstAreas[$i];
$html_areas .= '<option value="'.$_obj->idarea.'">'.$_obj->name."</option>";
}
$html_areas .= '</select>';
}
if($lstUsers){
$html_users = '<select name="lstUser" class="form_select">';
$html_users .= '<option value="-1">Seleccione...</option>';
$countU = count($lstUsers);
for($i=0; $i<$countU; $i++){
$_obj = $lstUsers[$i];
$html_users .= '<option value="'.$_obj->iduser.'">'.$_obj->lastname.', '.$_obj->firstname."</option>";
}
$html_users .= '</select>';
}
?>
<style>
#div_addform{ margin: 0 auto; width: 100%; padding-bottom: 10px}
#div_addform .row_reg{margin-top: 2px; border: 0px solid #0070a3}
#div_addform .row_reg label{float: left; width: 100px; text-align: right; padding-right: 5px; border: 0px solid #1cc; line-height: 25px}
#div_addform .row_reg input{float: left; width: 400px; line-height: 25px}
</style>
<script type="text/javascript">
$(function(){
$('#btnSave').click(function(){
$('#frm_addStaff').submit();
});
});
</script>
<?php include("../fckeditor/fckeditor.php"); ?>
<div class="toolbar_right">
<ul>
<li><a>Cancel</a></li>
<li><a href="#" id="btnSave">Save</a></li>
</ul>
<div style="clear: both; overflow: hidden"></div>
</div>
<div style="margin: 0 auto; width: 100%;">
<form name="frm_addStaff" id="frm_addStaff" method="post" action="index.php">
<span style="">
<label class="title_form" style="text-transform: uppercase; padding-left: 10px; margin-bottom: 10px; letter-spacing: 0.1em">
<?php echo $frm_title; ?>
</label>
</span>
<div id="div_addform">
<div class="row_reg">
<label for="lblArea">Area:</label>
<?php echo $html_areas; ?>
<div style="clear: both; overflow: hidden"></div>
</div>
<div class="row_reg">
<label for="lblUser">Usuario:</label>
<?php echo $html_users; ?>
<div style="clear: both; overflow: hidden"></div>
</div>
<div class="row_reg_content">
<label style="vertical-align: top;">Description:</label>
<span>
<?php
$oFCKeditor = new FCKeditor('description') ;
//$oFCKeditor->BasePath = $sBasePath ;
$oFCKeditor->BasePath = '../fckeditor/';
$oFCKeditor->ToolbarSet = 'Basic';
$oFCKeditor->Width = '100%';
$oFCKeditor->Height = '200';
$oFCKeditor->Create();
?>
</span>
<div style="clear: both; overflow: hidden"></div>
</div>
</div>
<input type="hidden" name="option" value="com_staff" />
<input type="hidden" name="controller" value="staff" />
<input type="hidden" name="action" value="save" />
</form>
</div>