diff --git a/e107_admin/image.php b/e107_admin/image.php index 5f033443a..a5a8619f9 100644 --- a/e107_admin/image.php +++ b/e107_admin/image.php @@ -611,7 +611,7 @@ class media_admin_ui extends e_admin_ui // protected $defaultOrder = 'desc'; protected $listOrder = 'm.media_id desc'; // show newest images first. public $deleteConfirmScreen = true; - public $deleteConfirmMessage = 'You are about to delete %d records and ALL CORRESPONDING FILES! Please confirm to continue!'; + public $deleteConfirmMessage = 'You are about to delete [x] records and ALL CORRESPONDING FILES! Please confirm to continue!'; //TODO - finish 'user' type, set 'data' to all editable fields, set 'noedit' for all non-editable fields /* diff --git a/e107_admin/newspost.php b/e107_admin/newspost.php index 0e017af0b..86ada2829 100644 --- a/e107_admin/newspost.php +++ b/e107_admin/newspost.php @@ -175,6 +175,8 @@ class news_cat_form_ui extends e_admin_form_ui + + // Submitted News Area. diff --git a/e107_handlers/admin_ui.php b/e107_handlers/admin_ui.php index 402865a7a..59bd3f501 100644 --- a/e107_handlers/admin_ui.php +++ b/e107_handlers/admin_ui.php @@ -4930,11 +4930,15 @@ class e_admin_form_ui extends e_form $id_array = explode(',', $ids); $delcount = count($id_array); - if(!empty($controller->deleteConfirmMessage)) - e107::getMessage()->addWarning(sprintf($controller->deleteConfirmMessage, $delcount)); + if(!empty($controller->deleteConfirmMessage)) + { + e107::getMessage()->addWarning(str_replace("[x]","".$delcount."", $controller->deleteConfirmMessage)); + } else - e107::getMessage()->addWarning(sprintf(LAN_UI_DELETE_WARNING, $delcount)); - + { + e107::getMessage()->addWarning(str_replace("[x]","".$delcount."",LAN_UI_DELETE_WARNING)); + } + $fieldsets['confirm'] = array( 'fieldset_pre' => '', // markup to be added before opening fieldset element 'fieldset_post' => '', // markup to be added after closing fieldset element @@ -4946,7 +4950,7 @@ class e_admin_form_ui extends e_form 'table_rows' => '', // rows array ( tags) 'table_body' => '', // string body - used only if rows empty 'pre_triggers' => '', - 'triggers' => array('hidden' => $this->hidden('etrigger_delete['.$ids.']', $ids), 'delete_confirm' => array(LAN_CONFDELETE, 'submit', $ids), 'cancel' => array(LAN_CANCEL, 'cancel')), + 'triggers' => array('hidden' => $this->hidden('etrigger_delete['.$ids.']', $ids), 'delete_confirm' => array(LAN_CONFDELETE, 'confirm', $ids), 'cancel' => array(LAN_CANCEL, 'cancel')), ); if($delcount > 1) { diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 251a2674e..84d556775 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -1365,6 +1365,7 @@ class e_form break; case 'warning': + case 'confirm': $options['class'] .= 'btn-warning'; break; @@ -1879,6 +1880,7 @@ class e_form $trclass = vartrue($fieldvalues['__trclass']) ? ' class="'.$trclass.'"' : ''; unset($fieldvalues['__trclass']); + foreach ($fieldarray as $field => $data) { @@ -1889,6 +1891,9 @@ class e_form $field = $data['alias']; } + + + //Not found if((!varset($data['forced']) && !in_array($field, $currentlist)) || varset($data['nolist'])) { @@ -1906,7 +1911,13 @@ class e_form } $tdclass = vartrue($data['class']); - if($field == 'checkboxes') $tdclass = $tdclass ? $tdclass.' autocheck e-pointer' : 'autocheck e-pointer'; + + if($field == 'checkboxes') $tdclass = $tdclass ? $tdclass.' autocheck e-pointer' : 'autocheck e-pointer'; + + if($field == 'options') $tdclass = $tdclass ? $tdclass.' options' : 'options'; + + + // there is no other way for now - prepare user data if('user' == vartrue($data['type']) /* && isset($data['readParms']['idField'])*/) { @@ -3480,9 +3491,11 @@ class e_form } - - // JUST A DRAFT - generic renderForm solution - /* + /** + * Generic renderForm solution + * @param @forms + * @param @nocontainer + */ function renderForm($forms, $nocontainer = false) { $text = ''; @@ -3518,9 +3531,10 @@ class e_form } return $text; } - */ - // JUST A DRAFT - generic renderFieldset solution, will be split to renderTable, renderCol/Row/Box etc - /* + + /** + * Generic renderFieldset solution, will be split to renderTable, renderCol/Row/Box etc - Still in use. + */ function renderFieldset($id, $fdata) { $colgroup = ''; @@ -3618,7 +3632,7 @@ class e_form "; return $text; } - */ + // The 2 functions below are for demonstration purposes only, and may be moved/modified before release. /* function filterType($fieldarray) diff --git a/e107_handlers/news_class.php b/e107_handlers/news_class.php index f9f4e0fa1..167772d1d 100644 --- a/e107_handlers/news_class.php +++ b/e107_handlers/news_class.php @@ -174,8 +174,8 @@ class news { $data['data']['news_id'] = $news['news_id']; e107::getEvent()->trigger('newsupd', $data['data']); - $message = LAN_NEWS_21; - $emessage->add(LAN_NEWS_21, E_MESSAGE_SUCCESS, $smessages); + $message = LAN_UPDATED; + $emessage->add(LAN_UPDATED, E_MESSAGE_SUCCESS, $smessages); e107::getCache()->clear('news.php'); diff --git a/e107_languages/English/admin/lan_admin.php b/e107_languages/English/admin/lan_admin.php index 9b182937a..093301617 100644 --- a/e107_languages/English/admin/lan_admin.php +++ b/e107_languages/English/admin/lan_admin.php @@ -374,7 +374,7 @@ define("LAN_UI_EDIT_LABEL", "Update record #%1$s"); define("LAN_UI_CREATE_LABEL", "Create new record"); define("LAN_UI_PREF_LABEL", "Settings"); define("LAN_UI_DELETE_LABEL", "Confirm Delete"); -define("LAN_UI_DELETE_WARNING", "You are about to delete %1$d records. Please confirm to continue."); +define("LAN_UI_DELETE_WARNING", "You are about to delete [x] records. Please confirm to continue."); define("LAN_UI_BATCH_CREATELINK", "Create Link"); define("LAN_USER_MANAGEALL", "Manage all User, Userclass and Extended User-Field settings"); diff --git a/e107_themes/bootstrap/admin_style.css b/e107_themes/bootstrap/admin_style.css index 54799d066..cc1edf418 100644 --- a/e107_themes/bootstrap/admin_style.css +++ b/e107_themes/bootstrap/admin_style.css @@ -734,6 +734,8 @@ i.searchquery { .tab-pane table.adminform td { border-top:0px} .tab-pane table.adminform tr { border-bottom:1px solid #DDDDDD} +.table .options { white-space:nowrap } + /****************************************************************/