Skip to content

Commit

Permalink
Fixed so employees works
Browse files Browse the repository at this point in the history
  • Loading branch information
lillem4n committed Nov 16, 2011
1 parent 051a13b commit 065045c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
13 changes: 12 additions & 1 deletion classes/controller/admin/employees.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ public function action_index()

public function action_employee()
{
$statuses = array(
'0option' => array(
'@value' => 'active',
'$content' => 'Active',
),
'1option' => array(
'@value' => 'inactive',
'$content' => 'Inactive',
),
);
xml::to_XML($statuses, $this->xml_content->appendChild($this->dom->createElement('statuses')));

if (isset($_GET['id']))
{
$employee = new Employee($_GET['id']);
Expand Down Expand Up @@ -56,7 +68,6 @@ public function action_employee()

$this->add_message($post->get('firstname').' (ID: '.$employee_id.') was added as employee');
}
else $this->redirect();
}

}
17 changes: 0 additions & 17 deletions xsl/admin/employees.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -102,23 +102,6 @@
<xsl:attribute name="action">employees/employee</xsl:attribute>
</xsl:if>

<!-- Include an error -->
<!--xsl:if test="/root/content/errors/form_errors/field_name = 'User::field_name_available'">
<xsl:call-template name="form_line">
<xsl:with-param name="id" select="'field_name'" />
<xsl:with-param name="label" select="'Field name:'" />
<xsl:with-param name="error" select="'This field name is already taken'" />
</xsl:call-template>
</xsl:if-->

<!-- no error -->
<!--xsl:if test="not(/root/content/errors/form_errors/field_name = 'User::field_name_available')">
<xsl:call-template name="form_line">
<xsl:with-param name="id" select="'field_name'" />
<xsl:with-param name="label" select="'Field name:'" />
</xsl:call-template>
</xsl:if-->

<xsl:if test="/root/meta/url_params/id">
<xsl:call-template name="form_line">
<xsl:with-param name="id" select="'id'" />
Expand Down

0 comments on commit 065045c

Please sign in to comment.