Projet

Général

Profil

Révision c304a780

Ajouté par Assos Assos il y a environ 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/ctools/plugins/contexts/user_edit_form.inc
1 1
<?php
2

  
2 3
/**
3 4
 * @file
4
 *
5
 * Plugin to provide a user_edit_form context
5
 * Plugin to provide a user_edit_form context.
6 6
 */
7 7

  
8 8
/**
......
81 81

  
82 82
    $form = drupal_build_form($form_id, $form_state);
83 83

  
84
    // Fill in the 'node' portion of the context
84
    // Fill in the 'node' portion of the context.
85 85
    $context->data     = $user;
86 86
    $context->title    = isset($user->name) ? $user->name : '';
87 87
    $context->argument = $user->uid;
......
133 133
 * Validate a node.
134 134
 */
135 135
function ctools_context_user_edit_form_settings_form_validate($form, &$form_state) {
136
  // Validate the autocomplete
136
  // Validate the autocomplete.
137 137
  if (empty($form_state['values']['uid']) && empty($form_state['values']['user'])) {
138 138
    form_error($form['user'], t('You must select a user.'));
139 139
    return;
......
162 162

  
163 163
  form_set_value($form['uid'], $user->uid, $form_state);
164 164
}
165

  
165 166
function ctools_context_user_edit_form_settings_form_submit($form, &$form_state) {
166 167
  if ($form_state['values']['set_identifier']) {
167 168
    $user = user_load($form_state['values']['uid']);

Formats disponibles : Unified diff