- Timestamp:
- Jan 24, 2019 7:22:55 PM (5 years ago)
- Location:
- trunk/bin/module_maker
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/module_maker/skel/adm_list.ihtml
r461 r655 8 8 <input type="text" class="sc-small" size="20" name="search_query" value="<?php echo getFormData('search_query'); ?>" title="<?php echo oTxt(_("Fields searched: __///__ %SEARCH_FIELDS%.")); ?>" /> 9 9 <select name="filter___///__" class="sc-small"> 10 <?php // printSelectForm('__///___tbl', "CONCAT(__///___id, '—', city, '—', title)", '__///___id', getFormData('filter___///__'), array('' => 'Any __///__'), 'ORDER BY __///__ ASC'); ?> 10 <?php // HTML::printSelectOptions(HTML::getSelectOptions('__///___tbl', '__///___title', '__///___id', getFormData('filter___///__'), array('' => 'Any __///__'), 'ORDER BY __///__ ASC')); ?> 11 </select> 12 <select name="filter___///__" class="sc-small"> 13 <?php // HTML::printSelectOptions(HTML::getSelectOptionsEnum('__///___tbl', '__///___', getFormData('filter___///__'), array('' => 'Any type'))); ?> 11 14 </select> 12 15 <input type="submit" value="<?php echo _("Filter"); ?>" /> -
trunk/bin/module_maker/skel/admin.php
r558 r655 30 30 31 31 $auth->requireLogin(); 32 $app->sslOn();33 32 34 33 require_once 'codebase/lib/PageNumbers.inc.php'; … … 89 88 if (getFormData('break_list_cache', false)) { 90 89 // Remove any stale cached list data. 91 $cache->delete(' list');90 $cache->delete('%NAME_SINGULAR% list'); 92 91 } 93 92 … … 284 283 285 284 // Remove any stale cached list data. 286 $cache->delete(' list');285 $cache->delete('%NAME_SINGULAR% list'); 287 286 288 287 // Get the information for this object. … … 315 314 316 315 // Remove any stale cached list data. 317 $cache->delete(' list');316 $cache->delete('%NAME_SINGULAR% list'); 318 317 319 318 %INSERT% … … 343 342 344 343 // Remove any stale cached list data. 345 $cache->delete(' list');344 $cache->delete('%NAME_SINGULAR% list'); 346 345 347 346 %UPDATE% … … 351 350 $version->create('%DB_TBL%', '%PRIMARY_KEY%', $frm['%PRIMARY_KEY%'], $frm['__///__']); 352 351 353 $app->raiseMsg(sprintf(_("The %ITEM_TITLE% <em>%s</em> has been updated. "), $frm['__///__']), MSG_SUCCESS, __FILE__, __LINE__);352 $app->raiseMsg(sprintf(_("The %ITEM_TITLE% <em>%s</em> has been updated. <a href=\"%s\" class=\"small secondary button\">Edit again</a>"), $frm['__///__'], $app->ohref('?op=edit&%PRIMARY_KEY%=' . $frm['%PRIMARY_KEY%'])), MSG_SUCCESS, __FILE__, __LINE__); 354 353 355 354 // Unlock record. … … 415 414 $cache_hash = md5($sql . '|' . $page->total_items); 416 415 if ($tmp_prefs->get('cache_hash') != $cache_hash) { 417 $cache->delete(' list');416 $cache->delete('%NAME_SINGULAR% list'); 418 417 $tmp_prefs->set('cache_hash', $cache_hash); 419 418 } 420 419 421 420 // First try to return from the cache. 422 if ($cache->exists(' list')) {423 $list = $cache->get(' list');421 if ($cache->exists('%NAME_SINGULAR% list')) { 422 $list = $cache->get('%NAME_SINGULAR% list'); 424 423 return $list; 425 424 } … … 433 432 // Save this list into the cache. 434 433 if (isset($list) && !empty($list)) { 435 $cache->set(' list', $list);434 $cache->set('%NAME_SINGULAR% list', $list); 436 435 } 437 436 … … 451 450 452 451 // Remove any stale cached list data. 453 $cache->delete(' list');452 $cache->delete('%NAME_SINGULAR% list'); 454 453 455 454 // Count the ranks with invalid numbers -
trunk/bin/module_maker/validation.cli.php
r612 r655 286 286 case 'numeric' : 287 287 case 'float' : 288 $max = str_repeat('9', $max_dig - $max_dec);289 if ($max_dec > 0) {290 $max .= '.' . str_repeat('9', $max_dec);291 }292 288 if ($unsigned) { 293 289 $negative_ok = 'false'; 294 $min = 0;295 290 } else { 296 291 $negative_ok = 'true'; 297 $min = -$max;298 292 } 299 293 $negative_ok = $unsigned ? 'false' : 'true'; 300 $o[] = "\$fv->isDecimal('$field', sprintf(_(\"%s must be a number between %d and %d.\"), _(\"$title\"), $min, $max), $negative_ok, $max_dig, $max_dec);";294 $o[] = "\$fv->isDecimal('$field', $max_dig, $max_dec, false, sprintf(_(\"%s must be a number with a maximum of %d integer digits and %d fractional digits, e.g., {EX}.\"), _(\"$title\"), ${max_dig}-${max_dec}, $max_dec), MSG_ERR, __FILE__, __LINE__);"; 301 295 break; 302 296
Note: See TracChangeset
for help on using the changeset viewer.