Esempio n. 1
0
:</label><br />
				<select name="profile[orgtype]" id="field-orgtype">
					<option value=""<?php 
if (!$this->profile->get('orgtype')) {
    echo ' selected="selected"';
}
?>
><?php 
echo Lang::txt('COM_MEMBERS_SELECT');
?>
</option>
					<?php 
include_once PATH_CORE . DS . 'components' . DS . 'com_members' . DS . 'tables' . DS . 'organizationtype.php';
$database = App::get('db');
$rot = new \Components\Members\Tables\OrganizationType($database);
if ($types = $rot->find('list')) {
    foreach ($types as $orgtype) {
        echo '<option value="' . $this->escape($orgtype->type) . '"';
        if ($this->profile->get('orgtype') == $orgtype->type) {
            echo ' selected="selected"';
        }
        echo '>' . $this->escape(stripslashes($orgtype->title)) . '</option>' . "\n";
    }
}
?>
				</select>
			</div>
			<div class="input-wrap">
				<label for="field-organization"><?php 
echo Lang::txt('COM_MEMBERS_FIELD_ORGANIZATION');
?>
Esempio n. 2
0
if ($this->registration->Employment != REG_HIDE && $this->profile->get('orgtype')) {
    ?>
				<?php 
    if ($this->params->get('access_orgtype') == 0 || $this->params->get('access_orgtype') == 1 && $loggedin || $this->params->get('access_orgtype') == 2 && $isUser) {
        ?>
					<li class="profile-orgtype field">
						<div class="field-content">
							<div class="key"><?php 
        echo Lang::txt('PLG_GROUPS_PROFILE_EMPLOYMENT_TYPE');
        ?>
</div>
							<?php 
        //get organization types from db
        include_once PATH_CORE . DS . 'components' . DS . 'com_members' . DS . 'tables' . DS . 'organizationtype.php';
        $xot = new \Components\Members\Tables\OrganizationType($database);
        $orgtypes = $xot->find('list');
        //output value
        $orgtype = $this->escape($this->profile->get('orgtype'));
        foreach ($orgtypes as $ot) {
            $orgtype = $ot->type == $this->profile->get('orgtype') ? $this->escape($ot->title) : $orgtype;
        }
        ?>
							<div class="value">
								<?php 
        echo $orgtype;
        ?>
							</div>
						</div>
					</li>
				<?php 
    }
Esempio n. 3
0
			<fieldset>
				<legend><?php 
    echo Lang::txt('COM_MEMBERS_REGISTER_LEGEND_PERSONAL_INFO');
    ?>
</legend>

				<?php 
    if ($this->registrationEmployment != REG_HIDE) {
        ?>
					<?php 
        $message = !empty($this->xregistration->_invalid['orgtype']) ? '<span class="error">' . $this->xregistration->_invalid['orgtype'] . '</span>' : '';
        $fieldclass = $message ? ' class="fieldWithErrors"' : '';
        include_once PATH_CORE . DS . 'components' . DS . 'com_members' . DS . 'tables' . DS . 'organizationtype.php';
        $database = App::get('db');
        $rot = new \Components\Members\Tables\OrganizationType($database);
        $types = $rot->find('list');
        ?>
					<label for="orgtype"<?php 
        echo $fieldclass;
        ?>
>
						<?php 
        echo Lang::txt('COM_MEMBERS_REGISTER_EMPLOYMENT_TYPE');
        ?>
: <?php 
        echo $this->registrationEmployment == REG_REQUIRED ? '<span class="required">' . Lang::txt('COM_MEMBERS_REGISTER_FORM_REQUIRED') . '</span>' : '';
        ?>
						<select name="orgtype" id="orgtype">
							<?php 
        if (empty($this->registration['orgtype']) || !empty($this->xregistration->_invalid['orgtype'])) {
            ?>