Commit 677a98f6 authored by alexpott's avatar alexpott

Issue #1970068 by dawehner, Bojhan: Please remove all please(s) from the views UI.

parent 99b39dc7
...@@ -132,7 +132,7 @@ public function tokenForm(&$form, &$form_state) { ...@@ -132,7 +132,7 @@ public function tokenForm(&$form, &$form_state) {
), ),
); );
$form['tokens']['help'] = array( $form['tokens']['help'] = array(
'#markup' => '<p>' . t('The following tokens are available. If you would like to have the characters \'[\' and \']\' please use the html entity codes \'%5B\' or \'%5D\' or they will get replaced with empty space.') . '</p>', '#markup' => '<p>' . t('The following tokens are available. If you would like to have the characters \'[\' and \']\' use the html entity codes \'%5B\' or \'%5D\' or they will get replaced with empty space.') . '</p>',
); );
foreach (array_keys($options) as $type) { foreach (array_keys($options) as $type) {
if (!empty($options[$type])) { if (!empty($options[$type])) {
......
...@@ -863,7 +863,7 @@ public function buildOptionsForm(&$form, &$form_state) { ...@@ -863,7 +863,7 @@ public function buildOptionsForm(&$form, &$form_state) {
// We have some options, so make a list. // We have some options, so make a list.
if (!empty($options)) { if (!empty($options)) {
$output = t('<p>The following tokens are available for this field. Note that due to rendering order, you cannot use fields that come after this field; if you need a field not listed here, rearrange your fields. $output = t('<p>The following tokens are available for this field. Note that due to rendering order, you cannot use fields that come after this field; if you need a field not listed here, rearrange your fields.
If you would like to have the characters \'[\' and \']\' please use the html entity codes \'%5B\' or \'%5D\' or they will get replaced with empty space.</p>'); If you would like to have the characters \'[\' and \']\' use the html entity codes \'%5B\' or \'%5D\' or they will get replaced with empty space.</p>');
foreach (array_keys($options) as $type) { foreach (array_keys($options) as $type) {
if (!empty($options[$type])) { if (!empty($options[$type])) {
$items = array(); $items = array();
......
...@@ -195,14 +195,14 @@ public function validateOptionsForm(&$form, &$form_state) { ...@@ -195,14 +195,14 @@ public function validateOptionsForm(&$form, &$form_state) {
$error = TRUE; $error = TRUE;
} }
if ($error) { if ($error) {
form_set_error('pager_options][expose][items_per_page_options', t('Please insert a list of integer numeric values separated by commas: e.g: 10, 20, 50, 100')); form_set_error('pager_options][expose][items_per_page_options', t('Insert a list of integer numeric values separated by commas: e.g: 10, 20, 50, 100'));
} }
// Take sure that the items_per_page is part of the expose settings. // Take sure that the items_per_page is part of the expose settings.
if (!empty($form_state['values']['pager_options']['expose']['items_per_page']) && !empty($form_state['values']['pager_options']['items_per_page'])) { if (!empty($form_state['values']['pager_options']['expose']['items_per_page']) && !empty($form_state['values']['pager_options']['items_per_page'])) {
$items_per_page = $form_state['values']['pager_options']['items_per_page']; $items_per_page = $form_state['values']['pager_options']['items_per_page'];
if (array_search($items_per_page, $options) === FALSE) { if (array_search($items_per_page, $options) === FALSE) {
form_set_error('pager_options][expose][items_per_page_options', t('Please insert the items per page (@items_per_page) from above.', form_set_error('pager_options][expose][items_per_page_options', t('Insert the items per page (@items_per_page) from above.',
array('@items_per_page' => $items_per_page)) array('@items_per_page' => $items_per_page))
); );
} }
......
...@@ -223,7 +223,7 @@ public function buildOptionsForm(&$form, &$form_state) { ...@@ -223,7 +223,7 @@ public function buildOptionsForm(&$form, &$form_state) {
'#description' => t('Disabling SQL rewriting will disable node_access checks as well as other modules that implement hook_query_alter().'), '#description' => t('Disabling SQL rewriting will disable node_access checks as well as other modules that implement hook_query_alter().'),
'#type' => 'checkbox', '#type' => 'checkbox',
'#default_value' => !empty($this->options['disable_sql_rewrite']), '#default_value' => !empty($this->options['disable_sql_rewrite']),
'#suffix' => '<div class="messages warning sql-rewrite-warning js-hide">' . t('WARNING: Disabling SQL rewriting means that node access security is disabled. This may allow users to see data they should not be able to see if your view is misconfigured. Please use this option only if you understand and accept this security risk.') . '</div>', '#suffix' => '<div class="messages warning sql-rewrite-warning js-hide">' . t('WARNING: Disabling SQL rewriting means that node access security is disabled. This may allow users to see data they should not be able to see if your view is misconfigured. Use this option only if you understand and accept this security risk.') . '</div>',
); );
$form['distinct'] = array( $form['distinct'] = array(
'#type' => 'checkbox', '#type' => 'checkbox',
......
...@@ -775,11 +775,12 @@ function &views_set_page_view($view = NULL) { ...@@ -775,11 +775,12 @@ function &views_set_page_view($view = NULL) {
} }
/** /**
* Find out what, if any, page view is currently in use. Please note that * Find out what, if any, page view is currently in use.
* this returns a reference, so be careful! You can unintentionally modify the
* $view object.
* *
* @return Drupal\views\ViewExecutable * Note that this returns a reference, so be careful! You can unintentionally
* modify the $view object.
*
* @return \Drupal\views\ViewExecutable
* A fully formed, empty $view object. * A fully formed, empty $view object.
*/ */
function &views_get_page_view() { function &views_get_page_view() {
...@@ -802,11 +803,13 @@ function &views_set_current_view($view = NULL) { ...@@ -802,11 +803,13 @@ function &views_set_current_view($view = NULL) {
} }
/** /**
* Find out what, if any, current view is currently in use. Please note that * Find out what, if any, current view is currently in use.
* this returns a reference, so be careful! You can unintentionally modify the
* $view object.
* *
* @return Drupal\views\ViewExecutable * Note that this returns a reference, so be careful! You can unintentionally
* modify the $view object.
*
* @return \Drupal\views\ViewExecutable
* THe current view object.
*/ */
function &views_get_current_view() { function &views_get_current_view() {
return views_set_current_view(); return views_set_current_view();
......
...@@ -136,7 +136,7 @@ public function getDisplayTabs(ViewUI $view) { ...@@ -136,7 +136,7 @@ public function getDisplayTabs(ViewUI $view) {
$tabs[$id]['#access'] = TRUE; $tabs[$id]['#access'] = TRUE;
// Add a class to mark the error and a title to make a hover tip. // Add a class to mark the error and a title to make a hover tip.
$tabs[$id]['#link']['localized_options']['attributes']['class'][] = 'error'; $tabs[$id]['#link']['localized_options']['attributes']['class'][] = 'error';
$tabs[$id]['#link']['localized_options']['attributes']['title'] = t('This display has one or more validation errors; please review it.'); $tabs[$id]['#link']['localized_options']['attributes']['title'] = t('This display has one or more validation errors.');
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment