2014-02-20 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/fields_manager.php: added the id column in the list of fields because it is needed in some api calls. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9451 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
07b6e0f844
commit
f4e359fdbd
|
@ -1,3 +1,8 @@
|
||||||
|
2014-02-20 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* godmode/agentes/fields_manager.php: added the id column in the
|
||||||
|
list of fields because it is needed in some api calls.
|
||||||
|
|
||||||
2014-02-19 Miguel de Dios <miguel.dedios@artica.es>
|
2014-02-19 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* godmode/agentes/module_manager_editor_common.php: added lost id
|
* godmode/agentes/module_manager_editor_common.php: added lost id
|
||||||
|
|
|
@ -55,7 +55,7 @@ if ($create_field) {
|
||||||
/* Update field */
|
/* Update field */
|
||||||
if ($update_field) {
|
if ($update_field) {
|
||||||
/*Check if name field is empty*/
|
/*Check if name field is empty*/
|
||||||
if( $name != "") {
|
if ( $name != "") {
|
||||||
$values = array('name' => $name, 'display_on_front' => $display_on_front);
|
$values = array('name' => $name, 'display_on_front' => $display_on_front);
|
||||||
|
|
||||||
$result = db_process_sql_update('tagent_custom_fields', $values, array('id_field' => $id_field));
|
$result = db_process_sql_update('tagent_custom_fields', $values, array('id_field' => $id_field));
|
||||||
|
@ -87,12 +87,14 @@ $fields = db_get_all_fields_in_table('tagent_custom_fields');
|
||||||
$table->width = '98%';
|
$table->width = '98%';
|
||||||
if ($fields) {
|
if ($fields) {
|
||||||
$table->head = array ();
|
$table->head = array ();
|
||||||
$table->head[0] = __('Field');
|
$table->head[0] = __('ID');
|
||||||
$table->head[1] = __('Display on front').ui_print_help_tip (__('The fields with display on front enabled will be displayed into the agent details'), true);
|
$table->head[1] = __('Field');
|
||||||
$table->head[2] = __('Actions');
|
$table->head[2] = __('Display on front').ui_print_help_tip (__('The fields with display on front enabled will be displayed into the agent details'), true);
|
||||||
|
$table->head[3] = __('Actions');
|
||||||
$table->align = array ();
|
$table->align = array ();
|
||||||
$table->align[1] = 'center';
|
$table->align[0] = 'right';
|
||||||
$table->align[2] = 'center';
|
$table->align[2] = 'center';
|
||||||
|
$table->align[3] = 'center';
|
||||||
$table->data = array ();
|
$table->data = array ();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -101,25 +103,29 @@ else {
|
||||||
|
|
||||||
if ($fields === false) $fields = array();
|
if ($fields === false) $fields = array();
|
||||||
|
|
||||||
|
|
||||||
foreach ($fields as $field) {
|
foreach ($fields as $field) {
|
||||||
|
|
||||||
$data[0] = '<b>'.$field['name'].'</b>';
|
$data[0] = $field['id_field'];
|
||||||
|
|
||||||
if($field['display_on_front']) {
|
$data[1] = '<b>'.$field['name'].'</b>';
|
||||||
$data[1] = html_print_image('images/tick.png', true);
|
|
||||||
|
if ($field['display_on_front']) {
|
||||||
|
$data[2] = html_print_image('images/tick.png', true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$data[1] = html_print_image('images/delete.png', true);
|
$data[2] = html_print_image('images/delete.png', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$data[2] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configure_field&id_field='.$field['id_field'].'">' . html_print_image("images/config.png", true, array("alt" => __('Edit'), "title" => __('Edit'), "border" => '0')) . '</a>';
|
$data[3] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configure_field&id_field='.$field['id_field'].'">' . html_print_image("images/config.png", true, array("alt" => __('Edit'), "title" => __('Edit'), "border" => '0')) . '</a>';
|
||||||
$data[2] .= ' <a href="index.php?sec=gagente&sec2=godmode/agentes/fields_manager&delete_field=1&id_field='.$field['id_field'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">' . html_print_image("images/cross.png", true, array("alt" => __('Delete'), "title" => __('Delete'), "border" => '0')) . '</a>';
|
$data[3] .= ' <a href="index.php?sec=gagente&sec2=godmode/agentes/fields_manager&delete_field=1&id_field='.$field['id_field'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">' . html_print_image("images/cross.png", true, array("alt" => __('Delete'), "title" => __('Delete'), "border" => '0')) . '</a>';
|
||||||
|
|
||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($fields)
|
if ($fields) {
|
||||||
html_print_table ($table);
|
html_print_table ($table);
|
||||||
|
}
|
||||||
|
|
||||||
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configure_field">';
|
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configure_field">';
|
||||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||||
|
|
Loading…
Reference in New Issue