|
From: <txm...@us...> - 2014-07-02 08:52:49
|
Revision: 12668
http://sourceforge.net/p/xoops/svn/12668
Author: txmodxoops
Date: 2014-07-02 08:52:43 +0000 (Wed, 02 Jul 2014)
Log Message:
-----------
- Fixed bugs
- Updated
- Solved issue for upload file image in modules.php and tables.php - admin
- Still work to do
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/assets/js/functions.js
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/menu.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/classes/classes.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/classes/formelements.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/xoopsversion.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/logoGenerator.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.tpl
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_tables.tpl
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-07-01 14:18:13 UTC (rev 12667)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/fields.php 2014-07-02 08:52:43 UTC (rev 12668)
@@ -143,7 +143,7 @@
$GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
// Form Add
$fieldsObj =& $tdmcreate->getHandler('fields')->create();
- $form = $fieldsObj->getFormAdd($field_mid, $field_tid, $field_numb, $field_name);
+ $form = $fieldsObj->getFormNew($field_mid, $field_tid, $field_numb, $field_name);
$GLOBALS['xoopsTpl']->assign('form', $form->render());
// Test -> Will be removed
var_dump($field_mid);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php 2014-07-01 14:18:13 UTC (rev 12667)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/modules.php 2014-07-02 08:52:43 UTC (rev 12668)
@@ -101,9 +101,10 @@
} else {
$obj =& $tdmcreate->getHandler('modules')->create();
}
+ $mod_dirname = preg_replace('/[^a-zA-Z0-9]\s+/', '', strtolower($_POST['mod_dirname']));
//Form module save
$obj->setVars(array('mod_name' => $_POST['mod_name'],
- 'mod_dirname' => preg_replace('/[^a-zA-Z0-9]\s+/', '', strtolower($_POST['mod_dirname'])),
+ 'mod_dirname' => $mod_dirname,
'mod_version' => $_POST['mod_version'],
'mod_since' => $_POST['mod_since'],
'mod_min_php' => $_POST['mod_min_php'],
@@ -126,9 +127,9 @@
$uploader = new XoopsMediaUploader(TDMC_UPLOAD_IMGMOD_PATH, $tdmcreate->getConfig('mimetypes'),
$tdmcreate->getConfig('maxsize'), null, null);
if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
- $extension = preg_replace( '/^.+\.([^.]+)$/sU' , '\\1' , $_FILES['attachedfile']['name']);
- $name_img = strtolower($_POST['mod_name']).'_slogo.'.$extension;
- $uploader->setPrefix($name_img);
+ /*$extension = preg_replace( '/.*\.([^.]+)$/', '\\1', $_FILES['attachedfile']['name']);
+ $logo_image = $mod_dirname.'_slogo.'.$extension;
+ $uploader->setPrefix($logo_image);*/
$uploader->fetchMedia($_POST['xoops_upload_file'][0]);
if (!$uploader->upload()) {
$errors = $uploader->getErrors();
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-07-01 14:18:13 UTC (rev 12667)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/tables.php 2014-07-02 08:52:43 UTC (rev 12668)
@@ -24,14 +24,10 @@
//
$mod_id = XoopsRequest::getInt('mod_id');
//
-$table_id = TDMCreate_CleanVars($_REQUEST, 'table_id');
-$table_mid = TDMCreate_CleanVars($_REQUEST, 'table_mid');
-$table_nbfields = TDMCreate_CleanVars($_REQUEST, 'table_nbfields');
-$table_fieldname = TDMCreate_CleanVars($_REQUEST, 'table_fieldname', '', 'string');
-/*$table_id = XoopsRequest::getInt('table_id');
+$table_id = XoopsRequest::getInt('table_id');
$table_mid = XoopsRequest::getInt('table_mid');
$table_nbfields = XoopsRequest::getInt('table_nbfields');
-$table_fieldname = XoopsRequest::getString('table_fieldname', '');*/
+$table_fieldname = XoopsRequest::getString('table_fieldname', '');
//
switch ($op)
{
@@ -48,8 +44,10 @@
$GLOBALS['xoopsTpl']->assign('buttons', $adminMenu->renderButton());
$GLOBALS['xoopsTpl']->assign('tdmc_url', TDMC_URL);
$GLOBALS['xoopsTpl']->assign('tdmc_icons_url', TDMC_ICONS_URL);
- $GLOBALS['xoopsTpl']->assign('tdmc_upload_imgmod_url', TDMC_UPLOAD_IMGMOD_URL);
- $GLOBALS['xoopsTpl']->assign('tdmc_upload_imgtab_url', TDMC_UPLOAD_IMGTAB_URL);
+ $GLOBALS['xoopsTpl']->assign('tdmc_upload_imgmod_url', TDMC_UPLOAD_IMGMOD_URL);
+ /*$tdmc_upload_image_url = is_dir($sysPathIcon32) ? $sysPathIcon32 : TDMC_UPLOAD_IMGTAB_PATH;
+ $GLOBALS['xoopsTpl']->assign('tdmc_table_image_url', $tdmc_upload_image_url);*/
+ $GLOBALS['xoopsTpl']->assign('tdmc_upload_imgtab_url', TDMC_UPLOAD_IMGTAB_URL);
$GLOBALS['xoopsTpl']->assign('modPathIcon16', $modPathIcon16);
$GLOBALS['xoopsTpl']->assign('sysPathIcon32', $sysPathIcon32);
// Get the list of modules
@@ -175,13 +173,11 @@
'table_fieldname' => $table_fieldname));
//Form table_image
include_once XOOPS_ROOT_PATH.'/class/uploader.php';
- $uploaddir = is_dir($sysPathIcon32) ? $sysPathIcon32 : TDMC_UPLOAD_IMGTAB_PATH;
+ $framePathIcon32 = XOOPS_ROOT_PATH . '/Frameworks/moduleclasses/icons/32';
+ $uploaddir = is_dir($framePathIcon32) ? $framePathIcon32 : TDMC_UPLOAD_IMGTAB_PATH;
$uploader = new XoopsMediaUploader($uploaddir, $tdmcreate->getConfig('mimetypes'),
$tdmcreate->getConfig('maxsize'), null, null);
- if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
- $extension = preg_replace( '/^.+\.([^.]+)$/sU' , '\\1' , $_FILES['attachedfile']['name']);
- $name_img = $_POST['table_name'].'.'.$extension;
- $uploader->setPrefix($name_img);
+ if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
$uploader->fetchMedia($_POST['xoops_upload_file'][0]);
if (!$uploader->upload()) {
$errors = $uploader->getErrors();
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/assets/js/functions.js
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/assets/js/functions.js 2014-07-01 14:18:13 UTC (rev 12667)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/assets/js/functions.js 2014-07-02 08:52:43 UTC (rev 12668)
@@ -47,7 +47,7 @@
function createNewModuleLogo(xoopsUrl) { // this is JavaScript function
iconDom = xoopsGetElementById(image4);
iconName = iconDom.src;
- str = xoopsGetElementById(mod_name).value;
+ str = xoopsGetElementById(mod_dirname).value;
res = str.toLowerCase();
caption = res.replace(' ', '');
logoDom = xoopsGetElementById(image3);
@@ -63,7 +63,7 @@
//alert(data1);
logoDom.src = data1.split('\n')[0];//the data returned has too many lines. We need only the link to the image
logoDom.load; //refresh the logo
- mycheck=caption+'_logo.png'; //name of the new logo file
+ mycheck=caption+'_slogo.png'; //name of the new logo file
//if file is not in the list of logo files, add it to the dropdown menu
var fileExist;
elems = moduleImageDom.options;
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-07-01 14:18:13 UTC (rev 12667)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/fields.php 2014-07-02 08:52:43 UTC (rev 12668)
@@ -88,29 +88,27 @@
}
/*
- * @public function getFormAdd
- *
- * @param integer $field_mid
- * @param integer $field_tid
- * @param integer $field_numb
- * @param string $f_name
+ * @private function getHeaderForm
* @param mixed $action
*/
- public function getFormAdd($field_mid = null, $field_tid = null, $field_numb = null, $f_name = null, $action = false)
+ private function getHeaderForm($action = false)
{
if ($action === false) {
$action = $_SERVER['REQUEST_URI'];
}
+ $isNew = $this->isNew();
+ $title = $isNew ? sprintf(_AM_TDMCREATE_FIELDS_NEW) : sprintf(_AM_TDMCREATE_FIELDS_EDIT);
+
$form = new TDMCreateThemeForm(null, 'form', $action, 'post', true);
$form->setExtra('enctype="multipart/form-data"');
-
+
// New Object HtmlTable
$form->addElement(new TDMCreateFormLabel('<table border="0" cellspacing="1" class="outer width100">'));
- $form->addElement(new TDMCreateFormLabel('<thead class="center">'));
- $form->addElement(new TDMCreateFormLabel('<tr class="head"><th colspan="9">'._AM_TDMCREATE_FIELD_ADD.'</th></tr>'));
+ $form->addElement(new TDMCreateFormLabel('<thead class="center">'));
+ $form->addElement(new TDMCreateFormLabel('<tr class="head"><th colspan="9">'.$title.'</th></tr>'));
$form->addElement(new TDMCreateFormLabel('<tr class="head width5">'));
- $form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_NUMBER.'</td>'));
+ $form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_ID.'</td>'));
$form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_NAME.'</td>'));
$form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_TYPE.'</td>'));
$form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_VALUE.'</th>'));
@@ -120,7 +118,26 @@
$form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_KEY.'</th>'));
$form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_PARAMETERS.'</th>'));
$form->addElement(new TDMCreateFormLabel('</tr></thead>'));
- $form->addElement(new TDMCreateFormLabel('<tbody>'));
+ $form->addElement(new TDMCreateFormLabel('<tbody>'));
+ //
+ return $form;
+ }
+
+ /*
+ * @public function getFormNew
+ *
+ * @param integer $field_mid
+ * @param integer $field_tid
+ * @param integer $field_numb
+ * @param string $f_name
+ * @param mixed $action
+ */
+ public function getFormNew($field_mid = null, $field_tid = null, $field_numb = null, $f_name = null, $action = false)
+ {
+ // Header function class
+ $fields_form = TDMCreateFields::getInstance();
+ $form = $fields_form->getHeaderForm($action);
+ //
$table_autoincrement = $this->tdmcreate->getHandler('tables')->get($field_tid);
//
$class = 'even';
@@ -228,17 +245,10 @@
$check_field_required->addOption(1, _AM_TDMCREATE_FIELD_REQUIRED);
$parameters_tray->addElement($check_field_required);
$form->addElement(new TDMCreateFormLabel('<td><div class="portlet"><div class="portlet-header">'._AM_TDMCREATE_FIELD_PARAMETERS_LIST.'</div><div class="portlet-content">'.$parameters_tray->render().'</div></div></td></tr>'));
- }
+ }
}
- // Send Form Data
- $form->addElement(new TDMCreateFormLabel('</tbody>'));
- $form->addElement(new TDMCreateFormLabel('<tfoot><tr>'));
- $form_hidden = new XoopsFormHidden('op', 'save');
- $form_button = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
- $form->addElement(new TDMCreateFormLabel('<td colspan="8">'.$form_hidden->render().'</td>'));
- $form->addElement(new TDMCreateFormLabel('<td>'.$form_button->render().'</td>'));
- $form->addElement(new TDMCreateFormLabel('</tr></tfoot></table>'));
- return $form;
+ // Footer form
+ return $fields_form->getFooterForm($form);
}
/*
@@ -249,34 +259,15 @@
* @param mixed $action
*/
public function getFormEdit($field_mid = null, $field_tid = null, $action = false)
- {
- if ($action === false) {
- $action = $_SERVER['REQUEST_URI'];
- }
-
- $form = new TDMCreateThemeForm(null, 'form', $action, 'post', true);
- $form->setExtra('enctype="multipart/form-data"');
-
- // New Object HtmlTable
- $form->addElement(new TDMCreateFormLabel('<table border="0" cellspacing="1" class="outer width100">'));
- $form->addElement(new TDMCreateFormLabel('<thead class="center">'));
- $form->addElement(new TDMCreateFormLabel('<tr class="head"><th colspan="9">'._AM_TDMCREATE_FIELD_EDIT.'</th></tr>'));
- $form->addElement(new TDMCreateFormLabel('<tr class="head width5">'));
- $form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_NUMBER.'</td>'));
- $form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_NAME.'</td>'));
- $form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_TYPE.'</td>'));
- $form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_VALUE.'</th>'));
- $form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_ATTRIBUTE.'</th>'));
- $form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_NULL.'</th>'));
- $form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_DEFAULT.'</th>'));
- $form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_KEY.'</th>'));
- $form->addElement(new TDMCreateFormLabel('<td>'._AM_TDMCREATE_FIELD_PARAMETERS.'</th>'));
- $form->addElement(new TDMCreateFormLabel('</tr></thead>'));
- $form->addElement(new TDMCreateFormLabel('<tbody>'));
+ {
+ // Header function class
+ $fields_form = TDMCreateFields::getInstance();
+ $form = $fields_form->getHeaderForm($action);
//
$class = 'even';
// Get the list of fields
$criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('field_mid', $field_mid));
$criteria->add(new Criteria('field_tid', $field_tid));
$fields = $this->tdmcreate->getHandler('fields')->getObjects($criteria);
unset($criteria);
@@ -284,6 +275,7 @@
foreach($fields as $field) {
$class = ($class == 'even') ? 'odd' : 'even';
$field_id = $field->getVar('field_id');
+ //
$form->addElement(new XoopsFormHidden('field_id['.$field_id.']', $field_id));
$form->addElement(new XoopsFormHidden('field_mid', $field_mid));
$form->addElement(new XoopsFormHidden('field_tid', $field_tid));
@@ -375,10 +367,19 @@
$check_field_required->addOption(1, _AM_TDMCREATE_FIELD_REQUIRED);
$parameters_tray->addElement($check_field_required);
$form->addElement(new TDMCreateFormLabel('<td><div class="portlet"><div class="portlet-header">'._AM_TDMCREATE_FIELD_PARAMETERS_LIST.'</div><div class="portlet-content">'.$parameters_tray->render().'</div></div></td></tr>'));
- }
+ }
$id++;
}
unset($id);
+ // Footer form
+ return $fields_form->getFooterForm($form);
+ }
+ /*
+ * @private function getFooterForm
+ * @param null
+ */
+ private function getFooterForm($form)
+ {
// Send Form Data
$form->addElement(new TDMCreateFormLabel('</tbody>'));
$form->addElement(new TDMCreateFormLabel('<tfoot><tr>'));
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/menu.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/menu.php 2014-07-01 14:18:13 UTC (rev 12667)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/admin/menu.php 2014-07-02 08:52:43 UTC (rev 12668)
@@ -74,7 +74,7 @@
\$i = 1;
\$adminmenu[\$i]['title'] = {$language}{$menu};
\$adminmenu[\$i]['link'] = 'admin/index.php';
-\$adminmenu[\$i]['icon'] = \$sysPathIcon32.'/home.png';
+\$adminmenu[\$i]['icon'] = \$sysPathIcon32.'/dashboard.png';
\$i++;\n
EOT;
foreach (array_keys($tables) as $i)
@@ -86,7 +86,7 @@
$content .= <<<EOT
\$adminmenu[\$i]['title'] = {$language}{$menu};
\$adminmenu[\$i]['link'] = 'admin/{$tables[$i]->getVar('table_name')}.php';
-\$adminmenu[\$i]['icon'] = \$sysPathIcon32.'/{$tables[$i]->getVar('table_image')}';
+\$adminmenu[\$i]['icon'] = 'assets/images/32/{$tables[$i]->getVar('table_image')}';
\$i++;\n
EOT;
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-07-01 14:18:13 UTC (rev 12667)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/architecture.php 2014-07-02 08:52:43 UTC (rev 12668)
@@ -204,6 +204,7 @@
// Module
$mod_id = $module->getVar('mod_id');
$mod_dirname = $module->getVar('mod_dirname');
+ $uploadTablesIcons32 = $this->upload_path.'/images/tables';
// Id of tables
$criteria_tables = new CriteriaCompo();
$criteria_tables->add(new Criteria('table_mid', $mod_id));
@@ -217,6 +218,7 @@
$table_mid = $tables[$t]->getVar('table_mid');
$table_id = $tables[$t]->getVar('table_id');
$table_name = $tables[$t]->getVar('table_name');
+ $table_image = $tables[$t]->getVar('table_image');
$table_admin = $tables[$t]->getVar('table_admin');
$table_user = $tables[$t]->getVar('table_user');
$table_blocks = $tables[$t]->getVar('table_blocks');
@@ -224,9 +226,12 @@
$table_comments = $tables[$t]->getVar('table_comments');
$table_notifications = $tables[$t]->getVar('table_notifications');
$table_permissions = $tables[$t]->getVar('table_permissions');
-
- $table = $this->tdmcreate->getHandler('tables')->get($table_id);
-
+ // Get Table Object
+ $table = $this->tdmcreate->getHandler('tables')->get($table_id);
+ // Copy of tables images file
+ if( file_exists($upload_table_image = $uploadTablesIcons32.'/'.$table_image)) {
+ $this->structure->copyFile('assets/images/32', $upload_table_image, $table_image);
+ }
// Creation of admin files
if ( $table_admin == 1) {
// Admin Pages File
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/classes/classes.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/classes/classes.php 2014-07-01 14:18:13 UTC (rev 12667)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/classes/classes.php 2014-07-02 08:52:43 UTC (rev 12668)
@@ -60,21 +60,21 @@
$this->setTables($tables);
}
/*
- * @public function getInitVar
+ * @private function getInitVar
* @param string $field_name
* @param string $type
*/
- public function getInitVar($field_name, $type = 'INT') {
+ private function getInitVar($field_name, $type = 'INT') {
$ret = <<<EOT
\$this->initVar('{$field_name}', XOBJ_DTYPE_{$type});\n
EOT;
return $ret;
}
/*
- * @public function getInitVars
+ * @private function getInitVars
* @param array $fields
*/
- public function getInitVars($fields) {
+ private function getInitVars($fields) {
$ret = '';
// Creation of the initVar functions list
foreach (array_keys($fields) as $f)
@@ -126,12 +126,12 @@
return $ret;
}
/*
- * @public function getHeadClass
+ * @private function getHeadClass
* @param string $module_dirname
* @param string $table_name
* @param array $fields
*/
- public function getHeadClass($module_dirname, $table_name, $fields) {
+ private function getHeadClass($module_dirname, $table_name, $fields) {
$ucf_module_dirname = ucfirst($module_dirname);
$ucf_table_name = ucfirst($table_name);
$ret = <<<EOT
@@ -167,11 +167,11 @@
}
/*
- * @public function getHeadFunctionForm
+ * @private function getHeadFunctionForm
* @param string $module
* @param string $table
*/
- public function getHeadFunctionForm($module, $table)
+ private function getHeadFunctionForm($module, $table)
{
$module_dirname = $module->getVar('mod_dirname');
$language = $this->getLanguage($module_dirname, 'AM');
@@ -199,11 +199,11 @@
return $ret;
}
/*
- * @public function getPermissionsInFunctionForm
+ * @private function getPermissionsInFunctionForm
* @param string $module_dirname
* @param string $fpif
*/
- public function getPermissionsInFunctionForm($module_dirname, $fpif) {
+ private function getPermissionsInFunctionForm($module_dirname, $fpif) {
$perm_approve = $this->getLanguage($module_dirname, 'AM', 'PERMISSIONS_APPROVE');
$perm_submit = $this->getLanguage($module_dirname, 'AM', 'PERMISSIONS_SUBMIT');
$perm_view = $this->getLanguage($module_dirname, 'AM', 'PERMISSIONS_VIEW');
@@ -246,7 +246,7 @@
* @public function getFootFunctionForm
* @param null
*/
- public function getFootFunctionForm() {
+ private function getFootFunctionForm() {
$ret = <<<EOT
\$form->addElement(new XoopsFormHidden('op', 'save'));
\$form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
@@ -263,7 +263,7 @@
* @param string $fpif
* @param string $fpmf
*/
- public function getClassHandler($module_dirname, $table_name, $fpif, $fpmf) {
+ private function getClassHandler($module_dirname, $table_name, $fpif, $fpmf) {
$ucf_module_dirname = ucfirst($module_dirname);
$ucf_table_name = ucfirst($table_name);
$ucf_mod_table_handler = $ucf_module_dirname . $ucf_table_name;
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/classes/formelements.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/classes/formelements.php 2014-07-01 14:18:13 UTC (rev 12667)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/classes/formelements.php 2014-07-02 08:52:43 UTC (rev 12668)
@@ -16,7 +16,7 @@
* @package tdmcreate
* @since 2.5.0
* @author Txmod Xoops http://www.txmodxoops.org
- * @version $Id: form_elements.php 12258 2014-01-02 09:33:29Z timgno $
+ * @version $Id: formelements.php 12258 2014-01-02 09:33:29Z timgno $
*/
defined('XOOPS_ROOT_PATH') or die('Restricted access');
@@ -30,15 +30,6 @@
parent::__construct();
$this->tdmcreate = TDMCreate::getInstance();
}
- /**
- * @param string $method
- * @param array $args
- */
- public function __call($method, $args)
- {
- $arg = isset($args[0]) ? $args[0] : null;
- return $this->getVar($method, $arg);
- }
/*
* @static function &getInstance
* @param null
@@ -61,37 +52,37 @@
$this->setTable($table);
}
/*
- * @public function getXoopsFormText
+ * @private function getXoopsFormText
* @param string $language
* @param string $field_name
* @param string $required
*/
- public function getXoopsFormText($language, $field_name, $required = 'false') {
+ private function getXoopsFormText($language, $field_name, $required = 'false') {
$ret = <<<EOT
\$form->addElement( new XoopsFormText({$language}, '{$field_name}', 50, 255, \$this->getVar('{$field_name}')){$required} );\n
EOT;
return $ret;
}
/*
- * @public function getXoopsFormText
+ * @private function getXoopsFormText
* @param string $language
* @param string $field_name
* @param string $required
*/
- public function getXoopsFormTextArea($language, $field_name, $required = 'false') {
+ private function getXoopsFormTextArea($language, $field_name, $required = 'false') {
$ret = <<<EOT
\$form->addElement( new XoopsFormTextArea({$language}, '{$field_name}', \$this->getVar('{$field_name}'), 4, 47){$required} );\n
EOT;
return $ret;
}
/*
- * @public function getXoopsFormDhtmlTextArea
+ * @private function getXoopsFormDhtmlTextArea
* @param string $language
* @param string $module_dirname
* @param string $field_name
* @param string $required
*/
- public function getXoopsFormDhtmlTextArea($language, $module_dirname, $field_name, $required = 'false') {
+ private function getXoopsFormDhtmlTextArea($language, $module_dirname, $field_name, $required = 'false') {
$ret = <<<EOT
\$editor_configs = array();
\$editor_configs['name'] = '{$field_name}';
@@ -106,12 +97,12 @@
return $ret;
}
/*
- * @public function getXoopsFormCheckBox
+ * @private function getXoopsFormCheckBox
* @param string $language
* @param string $field_name
* @param string $required
*/
- public function getXoopsFormCheckBox($language, $field_name, $required = 'false') {
+ private function getXoopsFormCheckBox($language, $field_name, $required = 'false') {
$ret = <<<EOT
\${$field_name} = \$this->isNew() ? 0 : \$this->getVar('{$field_name}');
\$check_{$field_name} = new XoopsFormCheckBox({$language}, '{$field_name}', \${$field_name});
@@ -121,35 +112,35 @@
return $ret;
}
/*
- * @public function getXoopsFormHidden
+ * @private function getXoopsFormHidden
* @param string $field_name
*/
- public function getXoopsFormHidden($field_name) {
+ private function getXoopsFormHidden($field_name) {
$ret = <<<EOT
\$form->addElement( new XoopsFormHidden('{$field_name}', \$this->getVar('{$field_name}')) );\n
EOT;
return $ret;
}
/*
- * @public function getXoopsFormUploadFile
+ * @private function getXoopsFormUploadFile
* @param string $language
* @param string $field_name
* @param string $required
*/
- public function getXoopsFormUploadFile($language, $module_dirname, $field_name, $required = 'false') {
+ private function getXoopsFormUploadFile($language, $module_dirname, $field_name, $required = 'false') {
$ret = <<<EOT
\$form->addElement( new XoopsFormFile({$language}, '{$field_name}', \$this->{$module_dirname}->getConfig('maxsize')){$required} );\n
EOT;
return $ret;
}
/*
- * @public function getXoopsFormUploadImage
+ * @private function getXoopsFormUploadImage
* @param string $language
* @param string $table_name
* @param string $field_name
* @param string $required
*/
- public function getXoopsFormUploadImage($language, $module_dirname, $table_name, $field_name, $required = 'false') {
+ private function getXoopsFormUploadImage($language, $module_dirname, $table_name, $field_name, $required = 'false') {
$stu_field_name = strtoupper($field_name);
$ret = <<<EOT
//\$form->addElement(new XoopsFormImage({$language}, '{$field_name}', \$this->{$module_dirname}->getConfig('maxsize')){$required});
@@ -187,25 +178,25 @@
return $ret;
}
/*
- * @public function getXoopsFormColorPicker
+ * @private function getXoopsFormColorPicker
* @param string $language
* @param string $field_name
* @param string $required
*/
- public function getXoopsFormColorPicker($language, $module_dirname, $field_name, $required = 'false') {
+ private function getXoopsFormColorPicker($language, $module_dirname, $field_name, $required = 'false') {
$ret = <<<EOT
\$form->addElement( new XoopsFormColorPicker({$language}, '{$field_name}', \$this->{$module_dirname}->getConfig('maxsize')){$required} );\n
EOT;
return $ret;
}
/*
- * @public function getXoopsFormSelect
+ * @private function getXoopsFormSelect
* @param string $language
* @param string $table_name
* @param string $field_name
* @param string $required
*/
- public function getXoopsFormSelect($language, $table_name, $field_name, $required = 'false') {
+ private function getXoopsFormSelect($language, $table_name, $field_name, $required = 'false') {
$ret = <<<EOT
\${$field_name}_select = new XoopsFormSelect({$language}, '{$field_name}', \$this->getVar('{$field_name}'));
\${$field_name}_select->addOptionArray({$table_name}Handler->getList());
@@ -214,24 +205,24 @@
return $ret;
}
/*
- * @public function getXoopsFormSelectUser
+ * @private function getXoopsFormSelectUser
* @param string $language
* @param string $field_name
* @param string $required
*/
- public function getXoopsFormSelectUser($language, $field_name, $required = 'false') {
+ private function getXoopsFormSelectUser($language, $field_name, $required = 'false') {
$ret = <<<EOT
\$form->addElement( new XoopsFormSelectUser({$language}, '{$field_name}', false, \$this->getVar('{$field_name}'), 1, false){$required} );\n
EOT;
return $ret;
}
/*
- * @public function getXoopsFormRadioYN
+ * @private function getXoopsFormRadioYN
* @param string $language
* @param string $field_name
* @param string $required
*/
- public function getXoopsFormRadioYN($language, $field_name, $required = 'false') {
+ private function getXoopsFormRadioYN($language, $field_name, $required = 'false') {
$ret = <<<EOT
${$field_name} = \$this->isNew() ? 0 : \$this->getVar('{$field_name}');
\$form->addElement( new XoopsFormRadioYN({$language}, '{$field_name}', ${$field_name}){$required} );\n
@@ -239,26 +230,26 @@
return $ret;
}
/*
- * @public function getXoopsFormTextDateSelect
+ * @private function getXoopsFormTextDateSelect
* @param string $language
* @param string $field_name
* @param string $required
*/
- public function getXoopsFormTextDateSelect($language, $module_dirname, $field_name, $required = 'false') {
+ private function getXoopsFormTextDateSelect($language, $module_dirname, $field_name, $required = 'false') {
$ret = <<<EOT
\$form->addElement( new XoopsFormTextDateSelect({$language}, '{$field_name}', '', \$this->getVar('{$field_name}')){$required} );\n
EOT;
return $ret;
}
/*
- * @public function getXoopsFormTable
+ * @private function getXoopsFormTable
* @param string $language
* @param string $module_dirname
* @param string $table_name
* @param string $fields
* @param string $required
*/
- public function getXoopsFormTable($language, $module_dirname, $table_name, $fields, $required = 'false')
+ private function getXoopsFormTable($language, $module_dirname, $table_name, $fields, $required = 'false')
{
$field_name = '';
foreach(array_keys($fields) as $f)
@@ -276,14 +267,14 @@
return $ret;
}
/*
- * @public function getXoopsFormTopic
+ * @private function getXoopsFormTopic
* @param string $language
* @param string $module_dirname
* @param string $table_name
* @param string $fields
* @param string $required
*/
- public function getXoopsFormTopic($language, $module_dirname, $table_name, $fields, $required = 'false')
+ private function getXoopsFormTopic($language, $module_dirname, $table_name, $fields, $required = 'false')
{
foreach(array_keys($fields) as $f)
{
@@ -327,58 +318,63 @@
foreach(array_keys($fields) as $f)
{
$field_name = $fields[$f]->getVar('field_name');
- $field_element = $fields[$f]->getVar('field_element');
+ $field_element = $fields[$f]->getVar('field_element');
+ $field_inform = $fields[$f]->getVar('field_inform');
$language = $language_funct . strtoupper($field_name);
$required = ( $fields[$f]->getVar('field_required') == 1 ) ? ', true' : '';
//
- //if($f > 0) { // If we want to hide XoopsFormHidden() or field id
- switch($field_element)
- {
- case 1:
- $ret .= $this->getXoopsFormText($language, $field_name, $required);
- break;
- case 2:
- $ret .= $this->getXoopsFormTextArea($language, $field_name, $required);
- break;
- case 3:
- $ret .= $this->getXoopsFormDhtmlTextArea($language, $module_dirname, $field_name, $required);
- break;
- case 4:
- $ret .= $this->getXoopsFormCheckBox($language, $field_name, $required);
- break;
- case 5:
- $ret .= $this->getXoopsFormRadioYN($language, $field_name, $required);
- break;
- case 6:
- $ret .= $this->getXoopsFormSelect($language, $table_name, $field_name, $required);
- break;
- case 7:
- $ret .= $this->getXoopsFormSelectUser($language, $field_name, $required);
- break;
- case 8:
- $ret .= $this->getXoopsFormColorPicker($language, $module_dirname, $field_name, $required);
- break;
- case 9:
- $ret .= $this->getXoopsFormUploadImage($language_funct, $module_dirname, $table_name, $field_name, $required);
- break;
- case 10:
- $ret .= $this->getXoopsFormUploadFile($language, $module_dirname, $field_name, $required);
- break;
- case 11:
- $ret .= $this->getXoopsFormTextDateSelect($language, $module_dirname, $field_name, $required);
- break;
- default:
- $ret .= $this->getXoopsFormHidden($field_name);
- break;
- }
- if ($field_element > 11) {
- if($table->getVar('table_category') == 1) {
- $ret .= $this->getXoopsFormTopic($language, $module_dirname, $table_name, $fields, $required);
- } else {
- $ret .= $this->getXoopsFormTable($language, $module_dirname, $table_name, $fields, $required);
+ if($field_inform == 1) {
+ // If we want to hide XoopsFormHidden() or field id
+ //if(($f > 0) && ($table->getVar('table_autoincrement') == 1)) {
+ // Switch elements
+ switch($field_element)
+ {
+ case 1:
+ $ret .= $this->getXoopsFormText($language, $field_name, $required);
+ break;
+ case 2:
+ $ret .= $this->getXoopsFormTextArea($language, $field_name, $required);
+ break;
+ case 3:
+ $ret .= $this->getXoopsFormDhtmlTextArea($language, $module_dirname, $field_name, $required);
+ break;
+ case 4:
+ $ret .= $this->getXoopsFormCheckBox($language, $field_name, $required);
+ break;
+ case 5:
+ $ret .= $this->getXoopsFormRadioYN($language, $field_name, $required);
+ break;
+ case 6:
+ $ret .= $this->getXoopsFormSelect($language, $table_name, $field_name, $required);
+ break;
+ case 7:
+ $ret .= $this->getXoopsFormSelectUser($language, $field_name, $required);
+ break;
+ case 8:
+ $ret .= $this->getXoopsFormColorPicker($language, $module_dirname, $field_name, $required);
+ break;
+ case 9:
+ $ret .= $this->getXoopsFormUploadImage($language_funct, $module_dirname, $table_name, $field_name, $required);
+ break;
+ case 10:
+ $ret .= $this->getXoopsFormUploadFile($language, $module_dirname, $field_name, $required);
+ break;
+ case 11:
+ $ret .= $this->getXoopsFormTextDateSelect($language, $module_dirname, $field_name, $required);
+ break;
+ default:
+ $ret .= $this->getXoopsFormHidden($field_name);
+ break;
}
- }
- //}
+ if ($field_element > 11) {
+ if($table->getVar('table_category') == 1) {
+ $ret .= $this->getXoopsFormTopic($language, $module_dirname, $table_name, $fields, $required);
+ } else {
+ $ret .= $this->getXoopsFormTable($language, $module_dirname, $table_name, $fields, $required);
+ }
+ }
+ //}
+ }
}
return $ret;
}
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/xoopsversion.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/xoopsversion.php 2014-07-01 14:18:13 UTC (rev 12667)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/files/user/xoopsversion.php 2014-07-02 08:52:43 UTC (rev 12668)
@@ -93,7 +93,7 @@
*/
private function getXoopsVersionHeader($module, $table, $language)
{
- $date = date('D Y/m/d G:i:s');
+ $date = date('Y/m/d');
$ret = <<<EOT
defined('XOOPS_ROOT_PATH') or die('Restricted access');
//
@@ -141,7 +141,8 @@
'release' => "{$module->getVar('mod_release')}",
'module_status' => "{$module->getVar('mod_status')}",\n
EOT;
- if ( $table->getVar('table_admin') == 1 ) {
+ if (is_object($table)) {
+ if ( $table->getVar('table_admin') == 1 ) {
$ret .= <<<EOT
// Admin system menu
'system_menu' => 1,
@@ -150,6 +151,7 @@
'adminindex' => "admin/index.php",
'adminmenu' => "admin/menu.php",\n
EOT;
+ }
} else {
$ret .= <<<EOT
// Admin system menu
@@ -158,12 +160,13 @@
'hasAdmin' => 0,\n
EOT;
}
- if ( $table->getVar('table_user') == 1 )
- {
+ if (is_object($table)) {
+ if ( $table->getVar('table_user') == 1 ) {
$ret .= <<<EOT
// Menu
'hasMain' => 1,\n
EOT;
+ }
} else {
$ret .= <<<EOT
// Menu
@@ -636,9 +639,9 @@
$filename = $this->getFileName();
$module_dirname = $module->getVar('mod_dirname');
$language = $this->getLanguage($module_dirname, 'MI');
- $content = $this->getHeaderFilesComments($module, $filename);
- if (is_object($table)) {
- $content .= $this->getXoopsVersionHeader($module, $table, $language);
+ $content = $this->getHeaderFilesComments($module, $filename);
+ $content .= $this->getXoopsVersionHeader($module, $table, $language);
+ if (is_object($table)) {
$content .= $this->getXoopsVersionMySQL($module_dirname, $table);
if ($table->getVar('table_search') == 1) {
$content .= $this->getXoopsVersionSearch($module_dirname);
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/logoGenerator.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/logoGenerator.php 2014-07-01 14:18:13 UTC (rev 12667)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/logoGenerator.php 2014-07-02 08:52:43 UTC (rev 12668)
@@ -36,7 +36,7 @@
class logoGenerator
{
- static function createLogo($logoIcon, $moduleName)
+ static function createLogo($logoIcon, $moduleDirname)
{
if (!extension_loaded("gd")) {
return false;
@@ -65,13 +65,13 @@
// Write text
$text_color = imagecolorallocate($imageModule, 0, 0, 0);
- $space_to_border = (92 - strlen($moduleName) * 7.5) / 2;
- imagefttext($imageModule, 8.5, 0, $space_to_border, 45, $text_color, $font, ucfirst($moduleName), array());
+ $space_to_border = (92 - strlen($moduleDirname) * 7.5) / 2;
+ imagefttext($imageModule, 8.5, 0, $space_to_border, 45, $text_color, $font, ucfirst($moduleDirname), array());
imagecopy($imageModule, $imageIcon, 29, 2, 0, 0, 32, 32);
- //$targetImage = TDMC_UPLOAD_IMGMOD_URL . "/" . $moduleName . "_logo.png";
- $targetImage = "/uploads/" . $dirname . "/images/repository/" . $moduleName . "_logo.png";
+ //$targetImage = TDMC_UPLOAD_IMGMOD_URL . "/" . $moduleDirname . "_slogo.png";
+ $targetImage = "/uploads/" . $dirname . "/images/repository/" . $moduleDirname . "_slogo.png";
imagepng($imageModule, XOOPS_ROOT_PATH . $targetImage );
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php 2014-07-01 14:18:13 UTC (rev 12667)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/modules.php 2014-07-02 08:52:43 UTC (rev 12668)
@@ -118,7 +118,7 @@
$action = $_SERVER['REQUEST_URI'];
}
$isNew = $this->isNew();
- $title = $isNew ? sprintf(_AM_TDMCREATE_MODULE_ADD) : sprintf(_AM_TDMCREATE_MODULE_EDIT);
+ $title = $isNew ? sprintf(_AM_TDMCREATE_MODULE_NEW) : sprintf(_AM_TDMCREATE_MODULE_EDIT);
include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php 2014-07-01 14:18:13 UTC (rev 12667)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/class/tables.php 2014-07-02 08:52:43 UTC (rev 12668)
@@ -98,7 +98,7 @@
$isNew = $this->isNew();
$table_name = $this->getVar('table_name');
$table_mid = $this->getVar('table_mid');
- $title = $isNew ? sprintf(_AM_TDMCREATE_TABLE_ADD) : sprintf(_AM_TDMCREATE_TABLE_EDIT);
+ $title = $isNew ? sprintf(_AM_TDMCREATE_TABLE_NEW) : sprintf(_AM_TDMCREATE_TABLE_EDIT);
xoops_load('xoopsformloader');
$form = new XoopsThemeForm($title, 'tableform', $action, 'post', true);
@@ -140,12 +140,13 @@
$get_table_image = $this->getVar('table_image');
$table_image = $get_table_image ? $get_table_image : 'blank.gif';
$iconsdir = '/Frameworks/moduleclasses/icons/32';
- $uploads_dir = '/uploads/'.$GLOBALS['xoopsModule']->dirname().'/images/tables';
+ $uploads_dir = '/uploads/tdmcreate/images/tables';
if(is_dir(XOOPS_ROOT_PATH . $iconsdir)){
$iconsdirectory = $iconsdir;
}else{
$iconsdirectory = $uploads_dir;
}
+ /*$iconsdirectory = $isNew ? $iconsdir : $uploads_dir;*/
//
$imgtray1 = new XoopsFormElementTray(_AM_TDMCREATE_TABLE_IMAGE,'<br />');
if(is_dir(XOOPS_ROOT_PATH . $iconsdir)) {
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php 2014-07-01 14:18:13 UTC (rev 12667)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/language/english/admin.php 2014-07-02 08:52:43 UTC (rev 12668)
@@ -68,7 +68,7 @@
//Buttons
define('_AM_TDMCREATE_ADD_MODULE', "Add new module");
//Form
-define('_AM_TDMCREATE_MODULE_ADD', "Add a new module");
+define('_AM_TDMCREATE_MODULE_NEW', "New module");
define('_AM_TDMCREATE_MODULE_EDIT', "Edit module");
//define('_AM_TDMCREATE_MODULE_IMPORTANT', "Required Information");
@@ -131,7 +131,7 @@
// Buttons
define('_AM_TDMCREATE_ADD_TABLE', "Add new table");
//Form1
-define('_AM_TDMCREATE_TABLE_ADD', "Add Table");
+define('_AM_TDMCREATE_TABLE_NEW', "New Table");
define('_AM_TDMCREATE_TABLE_EDIT', "Edit Table");
define('_AM_TDMCREATE_TABLE_MODULES', "Choose a module");
define('_AM_TDMCREATE_TABLE_NAME', "Table Name");
@@ -166,10 +166,12 @@
define('_AM_TDMCREATE_TABLE_FORM_SAVED_OK', "The table <b class='green'>%s</b> is successfully saved");
define('_AM_TDMCREATE_TABLE_FORM_UPDATED_OK', "The table <b class='green'>%s</b> is successfully updated");
-//Form2
-define('_AM_TDMCREATE_FIELD_ADD', "Add fields");
-define('_AM_TDMCREATE_FIELD_EDIT', "Edit fields");
-define('_AM_TDMCREATE_FIELD_NUMBER', "N°");
+// ------------------ Form Fields ------------------
+// Caption
+define('_AM_TDMCREATE_FIELDS_NEW', "New fields");
+define('_AM_TDMCREATE_FIELDS_EDIT', "Edit fields");
+// Fields
+define('_AM_TDMCREATE_FIELD_ID', "N°");
define('_AM_TDMCREATE_FIELD_NAME', "Field Name");
define('_AM_TDMCREATE_FIELD_TYPE', "Type");
define('_AM_TDMCREATE_FIELD_VALUE', "Value");
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.tpl
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.tpl 2014-07-01 14:18:13 UTC (rev 12667)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.tpl 2014-07-02 08:52:43 UTC (rev 12668)
@@ -46,8 +46,8 @@
<td class='xo-actions txtcenter width6'>
<a href="tables.php?op=edit&table_id=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_EDIT_TABLE}>">
<img src="<{xoModuleIcons16 edit.png}>" alt="<{$smarty.const._AM_TDMCREATE_EDIT_TABLE}>" />
- </a> <!-- &field_mid=<{$table.mid}>&field_tid=<{$table.id}>&field_numb=<{$table.nbfields}> -->
- <a href="fields.php?op=edit&field_tid=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_EDIT_FIELDS}>">
+ </a>
+ <a href="fields.php?op=edit&field_mid=<{$table.mid}>&field_tid=<{$table.id}>" title="<{$smarty.const._AM_TDMCREATE_EDIT_FIELDS}>">
<img src="<{xoModuleIcons16 inserttable.png}>" alt="<{$smarty.const._AM_TDMCREATE_EDIT_FIELDS}>" />
</a>
<a href="tables.php?op=delete&table_id=<{$table.id}>" title="<{$smarty.const._DELETE}>">
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_tables.tpl
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_tables.tpl 2014-07-01 14:18:13 UTC (rev 12667)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_tables.tpl 2014-07-02 08:52:43 UTC (rev 12668)
@@ -54,7 +54,7 @@
<a href="modules.php?op=delete&mod_id=<{$module.id}>" title="<{$smarty.const._DELETE}>">
<img src="<{xoModuleIcons16 delete.png}>" alt="<{$smarty.const._DELETE}>" alt="<{$smarty.const._DELETE}>" />
</a>
- </td>
+ </td>
</tr>
<{foreach item=table from=$module.tables}>
<tr id="table<{$table.id}>" class="<{cycle values='even,odd'}> toggleChild">
@@ -79,7 +79,7 @@
<td class='center'><img id="loading_img_table_permissions<{$table.id}>" src="<{$modPathIcon16}>/spinner.gif" style="display:none;" title="<{$smarty.const._AM_SYSTEM_LOADING}>" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /><img style="cursor:pointer;" class="tooltip" id="img_table_permissions<{$table.id}>" onclick="tdmcreate_setStatus( { op: 'display', table_id: <{$table.id}>, table_permissions: <{if $table.permissions}>0<{else}>1<{/if}> }, 'img_table_permissions<{$table.id}>', 'tables.php' )" src="<{xoModuleIcons16}><{$table.permissions}>.png" alt="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$table.name}>" title="<{$smarty.const._AM_TDMCREATE_CHANGE_DISPLAY}> <{$table.name}>" />
</td>
<td class='xo-actions txtcenter width6'>
- <a href="tables.php?op=edit&table_id=<{$table.id}>" title="<{$smarty.const._EDIT}>">
+ <a href="tables.php?op=edit&table_mid=<{$table.mid}>&table_id=<{$table.id}>" title="<{$smarty.const._EDIT}>">
<img src="<{xoModuleIcons16 edit.png}>" alt="<{$smarty.const._EDIT}>" />
</a>
<a href="fields.php?op=edit&field_tid=<{$table.id}>" title="<{$smarty.const._EDIT}>">
|