Revize 1506
Přidáno uživatelem Ondřej Fibich před asi 12 roky(ů)
freenetis/branches/network/application/models/iface.php | ||
---|---|---|
*/
|
||
public function get_type($type = NULL)
|
||
{
|
||
if (empty($type) && $this->id)
|
||
if (empty($type) && isset($this) && $this->id)
|
||
{
|
||
$type = $this->type;
|
||
}
|
||
... | ... | |
*/
|
||
public function get_default_name($type = NULL)
|
||
{
|
||
if (empty($type) && $this->id)
|
||
if (empty($type) && isset($this) && $this->id)
|
||
{
|
||
$type = $this->type;
|
||
}
|
||
... | ... | |
*/
|
||
public function get_wireless_mode($mode = NULL)
|
||
{
|
||
if (!$mode && isset($this->id))
|
||
if (!$mode && isset($this) && $this->id)
|
||
{
|
||
$mode = $this->wireless_mode;
|
||
}
|
freenetis/branches/network/application/controllers/devices.php | ||
---|---|---|
->rules('required')
|
||
->options($arr_users)
|
||
->selected($selected)
|
||
->style('width: 250px');
|
||
->style('width: 200px');
|
||
|
||
$group_device->dropdown('device_type')
|
||
->options($types)
|
||
->rules('required')
|
||
->style('width: 250px');
|
||
->style('width: 200px');
|
||
|
||
$group_device->dropdown('device_template_id')
|
||
->options($arr_device_templates)
|
||
->label('Device template')
|
||
->rules('required')
|
||
->style('width: 250px')
|
||
->style('width: 200px')
|
||
->add_button('device_templates');
|
||
|
||
$group_device_details = $form->group('Device detail')->visible(FALSE);
|
||
... | ... | |
$group_device_details->input('login')
|
||
->label('Username')
|
||
->rules('length[0,30]')
|
||
->autocomplete('json/device_login')
|
||
->style('width: 250px');
|
||
->autocomplete('json/device_login');
|
||
}
|
||
|
||
if ($this->acl_check_new(get_class($this), 'password'))
|
||
... | ... | |
$group_device_details->input('login_password')
|
||
->label('Password')
|
||
->rules('length[0,30]')
|
||
->autocomplete('json/device_password')
|
||
->style('width: 250px');
|
||
->autocomplete('json/device_password');
|
||
}
|
||
|
||
$group_device_details->dropdown('first_engineer_id')
|
||
... | ... | |
->options($arr_engineers)
|
||
->rules('required')
|
||
->selected($selected_engineer)
|
||
->style('width: 250px');
|
||
->style('width: 200px');
|
||
|
||
$group_device_details->textarea('device_comment')
|
||
->label('Comment')
|
||
... | ... | |
$group_payment = $form->group('Device repayments')->visible(FALSE);
|
||
|
||
$group_payment->input('price')
|
||
->rules('valid_numeric')
|
||
->style('width: 250px');
|
||
->rules('valid_numeric');
|
||
|
||
$group_payment->input('payment_rate')
|
||
->label('Monthly payment rate')
|
||
->rules('valid_numeric')
|
||
->style('width: 250px');
|
||
->rules('valid_numeric');
|
||
|
||
$group_payment->date('buy_date')
|
||
->label('Buy date')
|
||
... | ... | |
->rules('required')
|
||
->options($arr_towns)
|
||
->selected($selected_town_id)
|
||
->style('width: 250px')
|
||
->style('width: 200px')
|
||
->add_button('towns');
|
||
|
||
$group_address->dropdown('street_id')
|
||
... | ... | |
->options($arr_streets)
|
||
->selected($selected_street_id)
|
||
->add_button('streets')
|
||
->style('width: 250px');
|
||
->style('width: 200px');
|
||
|
||
$group_address->input('street_number')
|
||
->rules('length[1,50]')
|
||
->value($selected_street_number)
|
||
->style('width: 250px');
|
||
->value($selected_street_number);
|
||
|
||
$group_address->dropdown('country_id')
|
||
->label('Country')
|
||
->rules('required')
|
||
->options($arr_countries)
|
||
->selected(Settings::get('default_country'))
|
||
->style('width: 250px');
|
||
->style('width: 200px');
|
||
|
||
$group_address->input('gpsx')
|
||
->label(__('GPS').' X: '.help::hint('gps_coordinates'))
|
||
->rules('gps')
|
||
->value($gpsx)
|
||
->style('width: 250px');
|
||
->value($gpsx);
|
||
|
||
$group_address->input('gpsy')
|
||
->label(__('GPS').' Y: '.help::hint('gps_coordinates'))
|
||
->rules('gps')
|
||
->value($gpsy)
|
||
->style('width: 250px');
|
||
->value($gpsy);
|
||
|
||
$form->group('Ethernet interfaces');
|
||
$form->group('Wireless interfaces');
|
||
... | ... | |
->options($arr_users)
|
||
->rules('required')
|
||
->selected($device->user_id)
|
||
->style('width: 250px');
|
||
->style('width: 200px');
|
||
|
||
$group_device->dropdown('type')
|
||
->label('Type')
|
||
->options($arr_types)
|
||
->rules('required')
|
||
->selected($device->type)
|
||
->style('width: 250px');
|
||
->style('width: 200px');
|
||
|
||
$group_device_details = $form->group('Device detail');
|
||
|
||
$group_device_details->input('trade_name')
|
||
->label('Trade name')
|
||
->rules('length[1,200]')
|
||
->value($device->trade_name)
|
||
->style('width: 520px');
|
||
->value($device->trade_name);
|
||
|
||
$group_device_details->dropdown('PPPoE_logging_in')
|
||
->label('PPPoE')
|
||
... | ... | |
->label('Username')
|
||
->rules('length[0,30]')
|
||
->value($device->login)
|
||
->autocomplete('json/device_login')
|
||
->style('width: 250px');
|
||
->autocomplete('json/device_login');
|
||
}
|
||
|
||
if ($this->acl_check_edit(get_class($this), 'password'))
|
||
... | ... | |
->label('Password')
|
||
->rules('length[0,30]')
|
||
->value($device->password)
|
||
->autocomplete('json/device_password')
|
||
->style('width: 250px');
|
||
->autocomplete('json/device_password');
|
||
}
|
||
|
||
$group_device_details->textarea('comment')
|
||
... | ... | |
|
||
$group_payment->input('price')
|
||
->rules('valid_numeric')
|
||
->value($device->price ? $device->price : '')
|
||
->style('width: 250px');
|
||
->value($device->price ? $device->price : '');
|
||
|
||
$group_payment->input('payment_rate')
|
||
->label('Monthly payment rate')
|
||
->rules('valid_numeric')
|
||
->value($device->payment_rate ? $device->payment_rate : '')
|
||
->style('width: 250px');
|
||
->value($device->payment_rate ? $device->payment_rate : '');
|
||
|
||
$group_payment->date('buy_date')
|
||
->label('Buy date')
|
||
... | ... | |
->options($arr_towns)
|
||
->selected($device->address_point->town_id)
|
||
->add_button('towns')
|
||
->style('width: 250px');
|
||
->style('width: 200px');
|
||
|
||
$group_address->dropdown('street_id')
|
||
->label('Street')
|
||
->options($arr_streets)
|
||
->selected($device->address_point->street_id)
|
||
->add_button('streets')
|
||
->style('width: 250px');
|
||
->style('width: 200px');
|
||
|
||
$group_address->input('street_number')
|
||
->rules('length[1,50]')
|
||
->value($device->address_point->street_number)
|
||
->style('width: 250px');
|
||
->value($device->address_point->street_number);
|
||
|
||
$group_address->dropdown('country_id')
|
||
->label('country')
|
||
->rules('required')
|
||
->options($arr_countries)
|
||
->selected($device->address_point->country_id)
|
||
->style('width: 250px');
|
||
->style('width: 200px');
|
||
|
||
$group_address->input('gpsx')
|
||
->label(__('GPS').' X: '.help::hint('gps_coordinates'))
|
||
->value($gpsx)
|
||
->rules('gps')
|
||
->style('width: 250px');
|
||
->rules('gps');
|
||
|
||
$group_address->input('gpsy')
|
||
->label(__('GPS').' Y: '.help::hint('gps_coordinates'))
|
||
->value($gpsy)
|
||
->rules('gps')
|
||
->style('width: 250px');
|
||
->rules('gps');
|
||
|
||
$form->submit('Edit');
|
||
|
freenetis/branches/network/application/views/devices/add.php | ||
---|---|---|
</tr>
|
||
<tr>
|
||
<th><label><?php echo __('Port mode') ?>:</label></th>
|
||
<td><?php echo form::dropdown('port_mode_input', $port_modes,'class="textbox"') ?></td>
|
||
<td><?php echo form::dropdown('port_mode_input', $port_modes, 'style="width:200px"') ?></td>
|
||
</tr>
|
||
<tr>
|
||
<th><label><?php echo __('Wireless mode') ?>:</label></th>
|
||
<td><?php echo form::dropdown('wireless_mode_input', $wireless_modes,'class="textbox"') ?></td>
|
||
<td><?php echo form::dropdown('wireless_mode_input', $wireless_modes, 'style="width:200px"') ?></td>
|
||
</tr>
|
||
<tr>
|
||
<th><label><?php echo __('Wireless antenna') ?>:</label></th>
|
||
<td><?php echo form::dropdown('wireless_antenna_input', $wireless_antennas,'class="textbox"') ?></td>
|
||
<td><?php echo form::dropdown('wireless_antenna_input', $wireless_antennas, 'style="width:200px"') ?></td>
|
||
</tr>
|
||
</table>
|
||
<button class="submit" type="button"><?php echo __('Save') ?></button>
|
||
... | ... | |
<table class="form" cellspacing="0">
|
||
<tr>
|
||
<th><label><?php echo __('Name') ?>:</label></th>
|
||
<td><?php echo form::input('link_name_input','','class="textbox"') ?></td>
|
||
<td><?php echo form::input('link_name_input', '', 'class="textbox"') ?></td>
|
||
</tr>
|
||
<tr>
|
||
<th><label><?php echo __('Comment') ?>:</label></th>
|
||
<td><?php echo form::textarea('link_comment_input','','class="textbox" rows="5" cols="20"') ?></td>
|
||
<td><?php echo form::textarea('link_comment_input', '', 'class="textbox" rows="5" cols="20"') ?></td>
|
||
</tr>
|
||
<tr>
|
||
<th><label><?php echo __('Medium') ?>:</label></th>
|
||
<td><?php echo form::dropdown('eth_medium_input',$eth_mediums) ?>
|
||
<td><?php echo form::dropdown('eth_medium_input', $eth_mediums, '', 'style="width:200px"') ?>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th><label><?php echo __('Medium') ?>:</label></th>
|
||
<td><?php echo form::dropdown('wl_medium_input',$wl_mediums) ?>
|
||
<td><?php echo form::dropdown('wl_medium_input', $wl_mediums, '', 'style="width:200px"') ?>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th><label><?php echo __('Medium') ?>:</label></th>
|
||
<td><?php echo form::dropdown('port_medium_input',$port_mediums) ?>
|
||
<td><?php echo form::dropdown('port_medium_input', $port_mediums, '', 'style="width:200px"') ?>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th><label><?php echo __('Norm') ?>:</label></th>
|
||
<td><?php echo form::dropdown('norm_input', $norms) ?></td>
|
||
<td><?php echo form::dropdown('norm_input', $norms, '', 'style="width:200px"') ?></td>
|
||
</tr>
|
||
<tr>
|
||
<th><label><?php echo __('Bitrate') ?>:</label></th>
|
||
<td><?php echo form::input('bitrate_input','','class="number textbox" style="width:100px; margin-right:5px;"') ?>
|
||
<td><?php echo form::input('bitrate_input', '', 'class="number textbox" style="width:100px; margin-right:5px;"') ?>
|
||
<?php echo form::dropdown('bitrate_unit_input', $bit_units) ?>
|
||
</td>
|
||
</tr>
|
||
... | ... | |
</tr>
|
||
<tr>
|
||
<th><label><?php echo __('SSID') ?>:</label></th>
|
||
<td><?php echo form::input('ssid_input','','class="textbox"') ?></td>
|
||
<td><?php echo form::input('ssid_input', '', 'class="textbox"') ?></td>
|
||
</tr>
|
||
<tr>
|
||
<th><label><?php echo __('Frequency') ?>:</label></th>
|
||
<td><?php echo form::input('frequency_input','','class="number textbox"') ?></td>
|
||
<td><?php echo form::input('frequency_input', '', 'class="number textbox"') ?></td>
|
||
</tr>
|
||
<tr>
|
||
<th><label><?php echo __('Channel') ?>:</label></th>
|
||
... | ... | |
</tr>
|
||
<tr>
|
||
<th><label><?php echo __('Channel width') ?>:</label></th>
|
||
<td><?php echo form::input('channel_width_input','','class="number textbox"') ?></td>
|
||
<td><?php echo form::input('channel_width_input', '', 'class="number textbox"') ?></td>
|
||
</tr>
|
||
<tr>
|
||
<th><label><?php echo __('Polarization') ?>:</label></th>
|
||
<td><?php echo form::dropdown('polarization_input', $polarizations) ?></td>
|
||
<td><?php echo form::dropdown('polarization_input', $polarizations, '', 'style="width:200px"') ?></td>
|
||
</tr>
|
||
</table>
|
||
<button class="submit" type="button"><?php echo __('Save') ?></button>
|
Také k dispozici: Unified diff
Opravy:
- drobne opravy