changed premissions
This commit is contained in:
parent
9eb6fe8360
commit
8672e5eb9f
0
images/search.ai
Normal file → Executable file
0
images/search.ai
Normal file → Executable file
0
images/search.png
Normal file → Executable file
0
images/search.png
Normal file → Executable file
Before Width: | Height: | Size: 399 B After Width: | Height: | Size: 399 B |
0
js/materio_flag-ck.js
Normal file → Executable file
0
js/materio_flag-ck.js
Normal file → Executable file
0
js/materio_flag.js
Normal file → Executable file
0
js/materio_flag.js
Normal file → Executable file
0
js/materio_page_title-ck.js
Normal file → Executable file
0
js/materio_page_title-ck.js
Normal file → Executable file
0
js/materio_page_title.js
Normal file → Executable file
0
js/materio_page_title.js
Normal file → Executable file
File diff suppressed because one or more lines are too long
3
js/materio_search_api_ajax.js
Normal file → Executable file
3
js/materio_search_api_ajax.js
Normal file → Executable file
@ -1,4 +1,7 @@
|
||||
// @codekit-prepend "gui.js"
|
||||
// @koala-prepend "gui.js"
|
||||
|
||||
|
||||
|
||||
(function($) {
|
||||
|
||||
|
1
js/materio_search_api_ajax.min.js
vendored
Normal file
1
js/materio_search_api_ajax.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(e){MaterioSearchApiAjax=function(){function t(){a(),f()}function a(){e("#materio-search-api-search-form").bind("submit",function(){return setTimeout(function(){r(n())},10),!1}),e("#edit-searchfield").bind("autocompleteSelect",function(){e(this).parents(".form").trigger("submit")}).bind("focus",function(){e(this).select()}),e(document).bind("theme-ready",i).bind("init-scroller-pager",l).bind("load-scroller-pager",u).bind("view-mode-changed",v).bind("history-state-change",y)}function i(){(_()||b())&&e.event.trigger({type:"resultschanged",container:_()?"#content .actuality-items":"#content .search-results"})}function n(){return e("#materio-search-api-search-form").find('input[name*="searchfield"]').val()}function r(t){if(trace("keys",t),void 0!==t&&""!==t&&t.length>=2){t=t.replace("/"," ");var a={},i=[];e("#edit-bundles-filter","#materio-search-api-search-form").find('input[type*="checkbox"]').each(function(){$this=e(this),$this.attr("checked")&&i.push($this.val()),a[$this.val()]=$this.attr("checked")}),x||(e.event.trigger("loading-content"),x=!0,e("#materio-search-api-search-form").addClass("loading"),e.getJSON(Drupal.settings.basePath+Drupal.settings.pathPrefix+"materio_search_api_ajax/search/",{types:a,current_path:document.location.href,keys:t},function(a){e.event.trigger({type:"record-stat",categorie:"Search",action:t,label:"filters : "+i.join(" ,"),value:a.count}),a.redirect?window.location=a.redirect:(e.event.trigger("loaded-content"),x=!1,e("#materio-search-api-search-form").removeClass("loading"),s(a))}))}}function c(){if(!x){e.event.trigger("loading-content"),x=!0,e("#materio-search-api-search-form").addClass("loading");var t=Drupal.settings.basePath+Drupal.settings.pathPrefix+"materio_search_api_ajax/actuality";e.getJSON(t,function(t){e.event.trigger("loaded-content"),x=!1,e("#materio-search-api-search-form").removeClass("loading"),s(t)})}}function s(t){trace("MaterioSearchApiAjax changeContent | json",t),t.return&&(e.event.trigger("loaded-content"),e(".inner-content",j).html(t.return).find("ul.pager").hide(),o()),e.event.trigger({type:"new-history-page",path:Drupal.settings.basePath+Drupal.settings.pathPrefix+t.path,title:t.title,content:t.return});for(language in Drupal.settings.materio_search_api_ajax.languages){var a=Drupal.settings.materio_search_api_ajax.languages[language];e("#block-locale-language li."+language+" a").attr("href",Drupal.settings.basePath+a.prefix+"/"+t.search_path+"/"+t.keys)}}function o(){e.event.trigger({type:"resultschanged",container:"#content .search-results, #content .actuality-items"})}function l(e){(_()||b())&&e.pager.hide()}function u(e){x||(b()&&h(e.href),_()&&g(e.href))}function h(t){var a=t.match(/explore\/([^\/|\?]+)/),i=t.match(/\?page=([0-9]+)/),n=Drupal.settings.basePath+Drupal.settings.pathPrefix+"materio_search_api_ajax/search/"+i[1];d(n,a[1],e(".materiobase-results",j),".search-results")}function g(t){var a=t.match(/\?page=([0-9]+)/),i=Drupal.settings.basePath+Drupal.settings.pathPrefix+"materio_search_api_ajax/actuality/"+a[1];d(i,"",e(".materiobase-actuality",j),".actuality-items")}function d(t,a,i,n){x=!0,i.addClass("loading"),e.getJSON(t,{keys:a},function(e){i.removeClass("loading"),p(e,n)})}function p(t,a){if(t){var i=e(t.return),n=e(a,i).children("article"),r=e("ul.pager",i);e(a,j).append(n),e("ul.pager",j).replaceWith(r.hide()),e(a,j).children(".just-added").each(function(t){var a=e(this);setTimeout(function(){a.removeClass("just-added")},150*t)}),e.event.trigger({type:"resultscompleted",container:e(a,j)})}x=!1}function f(){e(".viewmode-link").click(function(t){return t.preventDefault(),e(this).is(".active")?e(this).trigger({type:"vm-clicked-active"}):(e(this).trigger({type:"vm-clicked"}),m(e(this).attr("rel"),e(this))),!1})}function m(t,a){x||(x=!0,e.getJSON(Drupal.settings.basePath+"materio_search_api_ajax/viewmode/change/"+t,function(i){x=!1,"saved"==i.statut&&(e.event.trigger({type:"record-stat",categorie:"Viewmode",action:t,label:_()?"Actualities":"Search results"}),e.event.trigger("view-mode-changed"),e(".viewmode-link, .viewmode-link i").removeClass("active"),a.addClass("active").find("i").addClass("active"))}))}function v(){b()&&r(n()),_()&&c()}function y(){(b()||_())&&o()}function b(){return e(".search-results","#content").length}function _(){return e(".actuality-items","#content").length}var x=!1,j=e("#content");t()},e(document).ready(function(){new MaterioSearchApiAjax})}(jQuery);
|
0
materio_didactique.info
Normal file → Executable file
0
materio_didactique.info
Normal file → Executable file
0
materio_didactique.module
Normal file → Executable file
0
materio_didactique.module
Normal file → Executable file
0
materio_didactique.pages.inc
Normal file → Executable file
0
materio_didactique.pages.inc
Normal file → Executable file
0
materio_flag.info
Normal file → Executable file
0
materio_flag.info
Normal file → Executable file
0
materio_flag.install
Normal file → Executable file
0
materio_flag.install
Normal file → Executable file
0
materio_flag.module
Normal file → Executable file
0
materio_flag.module
Normal file → Executable file
0
materio_flag.pages.inc
Normal file → Executable file
0
materio_flag.pages.inc
Normal file → Executable file
0
materio_page_title.info
Normal file → Executable file
0
materio_page_title.info
Normal file → Executable file
0
materio_page_title.module
Normal file → Executable file
0
materio_page_title.module
Normal file → Executable file
0
materio_page_title.pages.inc
Normal file → Executable file
0
materio_page_title.pages.inc
Normal file → Executable file
0
materio_search_api.admin.inc
Normal file → Executable file
0
materio_search_api.admin.inc
Normal file → Executable file
0
materio_search_api.info
Normal file → Executable file
0
materio_search_api.info
Normal file → Executable file
0
materio_search_api.module
Normal file → Executable file
0
materio_search_api.module
Normal file → Executable file
0
materio_search_api.pages.inc
Normal file → Executable file
0
materio_search_api.pages.inc
Normal file → Executable file
0
materio_search_api_ajax.info
Normal file → Executable file
0
materio_search_api_ajax.info
Normal file → Executable file
2
materio_search_api_ajax.module
Normal file → Executable file
2
materio_search_api_ajax.module
Normal file → Executable file
@ -24,7 +24,7 @@ function materio_search_api_ajax_init() {
|
||||
// ),
|
||||
'languages' => isset($languages) ? $languages[1] : array(),
|
||||
)), 'setting');
|
||||
drupal_add_js(drupal_get_path('module', 'materio_search_api_ajax').'/js/materio_search_api_ajax-ck.js');
|
||||
drupal_add_js(drupal_get_path('module', 'materio_search_api_ajax').'/js/materio_search_api_ajax.min.js');
|
||||
}
|
||||
|
||||
/**
|
||||
|
0
materio_search_api_ajax.pages.inc
Normal file → Executable file
0
materio_search_api_ajax.pages.inc
Normal file → Executable file
0
materio_taxonomy.info
Normal file → Executable file
0
materio_taxonomy.info
Normal file → Executable file
0
materio_taxonomy.module
Normal file → Executable file
0
materio_taxonomy.module
Normal file → Executable file
0
materio_user.info
Normal file → Executable file
0
materio_user.info
Normal file → Executable file
96
materio_user.module
Normal file → Executable file
96
materio_user.module
Normal file → Executable file
@ -120,9 +120,57 @@ function materio_user_form_alter(&$form, &$form_state, $form_id) {
|
||||
if( $form_id == "webform_client_form_11186" ){
|
||||
// dsm($form, '$form');
|
||||
$form['#validate'][] = "materio_user_webform_client_111186_validate";
|
||||
$form['#submit'][] = "materio_user_webform_client_111186_submit";
|
||||
}
|
||||
|
||||
|
||||
if( $form_id == "user_profile_form" ){
|
||||
//dsm($form, '$form');
|
||||
$form['account']['pass']['#type'] = "new_password_confirm";
|
||||
}
|
||||
}
|
||||
|
||||
function materio_user_element_info() {
|
||||
return array(
|
||||
"new_password_confirm" => array(
|
||||
'#input' => TRUE,
|
||||
'#process' => array('materio_user_process_new_password_confirm'),
|
||||
'#theme_wrappers' => array('form_element'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Expand a password_confirm field into two text boxes.
|
||||
*/
|
||||
function materio_user_process_new_password_confirm($element) {
|
||||
$element['pass1'] = array(
|
||||
'#type' => 'password',
|
||||
'#title' => t('New password'),
|
||||
'#value' => empty($element['#value']) ? NULL : $element['#value']['pass1'],
|
||||
'#required' => $element['#required'],
|
||||
'#attributes' => array('class' => array('password-field')),
|
||||
);
|
||||
$element['pass2'] = array(
|
||||
'#type' => 'password',
|
||||
'#title' => t('Confirm password'),
|
||||
'#value' => empty($element['#value']) ? NULL : $element['#value']['pass2'],
|
||||
'#required' => $element['#required'],
|
||||
'#attributes' => array('class' => array('password-confirm')),
|
||||
);
|
||||
$element['#element_validate'] = array('password_confirm_validate');
|
||||
$element['#tree'] = TRUE;
|
||||
|
||||
if (isset($element['#size'])) {
|
||||
$element['pass1']['#size'] = $element['pass2']['#size'] = $element['#size'];
|
||||
}
|
||||
|
||||
return $element;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function materio_user_user_register_form_submit($form, &$form_state){
|
||||
// dsm($form, 'form');
|
||||
// dsm($form_state, 'form_state');
|
||||
@ -166,6 +214,9 @@ function materio_user_webform_client_111186_validate($form, &$form_state){
|
||||
$field_name = 'submitted][collaborators]['.$coll_key.']['.$field_key;
|
||||
// dsm($field_name, 'field_name');
|
||||
|
||||
// TODO : tester si les email ne sont pas deja inscrit sur le site
|
||||
|
||||
|
||||
form_set_error($field_name, t('You must provide a value for the !name field.', array('!name'=>$human_field_name)));
|
||||
}
|
||||
}
|
||||
@ -174,6 +225,45 @@ function materio_user_webform_client_111186_validate($form, &$form_state){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function materio_user_webform_client_111186_submit($form, &$form_state){
|
||||
dsm($form, 'form');
|
||||
dsm($form_state, 'form_state');
|
||||
$values = $form_state['values']['submitted_tree'];
|
||||
if ($values['membership_options'] == 3) {
|
||||
$i = 1;
|
||||
foreach ($values['collaborators'] as $coll_key => $coll) {
|
||||
// foreach ($coll as $field_key => $field_value) {
|
||||
// if($field_value == ''){
|
||||
// $human_field_name = $form['submitted']['collaborators'][$coll_key]['#title'] . " : " . $form['submitted']['collaborators'][$coll_key][$field_key]['#title'];
|
||||
// $field_name = 'submitted][collaborators]['.$coll_key.']['.$field_key;
|
||||
// // dsm($field_name, 'field_name');
|
||||
|
||||
// form_set_error($field_name, t('You must provide a value for the !name field.', array('!name'=>$human_field_name)));
|
||||
// }
|
||||
// }
|
||||
$userinfo = array(
|
||||
'mail' => $coll['e_mail_collab_'.$i],
|
||||
'name' => user_password(),
|
||||
'pass' => user_password(), // Generate password
|
||||
// 'init' => $data['components']['username']['value'],
|
||||
'status' => 0,
|
||||
'access' => REQUEST_TIME,
|
||||
'memo' => 'from webform',
|
||||
);
|
||||
$account = drupal_anonymous_user();
|
||||
$account->is_new = TRUE;
|
||||
user_save($account, $userinfo);
|
||||
// module_invoke_all('user_insert', $edit, $account);
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// enregistrer le type d'adonnement chez les user
|
||||
|
||||
}
|
||||
/**
|
||||
* Implements hook_help().
|
||||
@ -223,7 +313,11 @@ define('MATERIO_USER_CONFIRMED_USER_ROLE', 'Utilisateur'); // add role name here
|
||||
/**
|
||||
* Implement hook_user
|
||||
*/
|
||||
function __materio_user_user_update(&$edit, $account, $category){
|
||||
function materio_user_user_update(&$edit, $account, $category){
|
||||
// dsm($edit, 'edit');
|
||||
// dsm($account, 'account');
|
||||
// dsm($category, 'category');
|
||||
|
||||
// This is only fired when a user confirms their email address, logintoboggan style
|
||||
if (isset($account->logintoboggan_email_validated) && $account->logintoboggan_email_validated == TRUE) {
|
||||
$confirmed_rid = materio_user_get_role_by_name(MATERIO_USER_CONFIRMED_USER_ROLE);
|
||||
|
0
templates/materio-didactique-home-block.tpl.php
Normal file → Executable file
0
templates/materio-didactique-home-block.tpl.php
Normal file → Executable file
0
templates/materio-didactique-page.tpl.php
Normal file → Executable file
0
templates/materio-didactique-page.tpl.php
Normal file → Executable file
0
templates/materio-flag-mybookmarks-block.tpl.php
Normal file → Executable file
0
templates/materio-flag-mybookmarks-block.tpl.php
Normal file → Executable file
0
templates/materio-flag-mylists-block.tpl.php
Normal file → Executable file
0
templates/materio-flag-mylists-block.tpl.php
Normal file → Executable file
0
templates/materio-flag-mylists-list.tpl.php
Normal file → Executable file
0
templates/materio-flag-mylists-list.tpl.php
Normal file → Executable file
0
templates/materio-flag-mylists-nav-block.tpl.php
Normal file → Executable file
0
templates/materio-flag-mylists-nav-block.tpl.php
Normal file → Executable file
0
templates/materio-search-api-actuality.tpl.php
Normal file → Executable file
0
templates/materio-search-api-actuality.tpl.php
Normal file → Executable file
0
templates/materio-search-api-filters-block.tpl.back
Normal file → Executable file
0
templates/materio-search-api-filters-block.tpl.back
Normal file → Executable file
0
templates/materio-search-api-results.tpl.php
Normal file → Executable file
0
templates/materio-search-api-results.tpl.php
Normal file → Executable file
0
templates/materio-search-api-search-block.tpl.php
Normal file → Executable file
0
templates/materio-search-api-search-block.tpl.php
Normal file → Executable file
0
templates/materio-search-api-select-viewmode-block.tpl.php
Normal file → Executable file
0
templates/materio-search-api-select-viewmode-block.tpl.php
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user