X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;ds=sidebyside;f=mkdru.admin.inc;h=f7a1138903c6369cdec2f53fe4daeac1d00e1a7e;hb=87340d616a29be1ac456b89b601619dd11b8abb2;hp=c07ac31ec73a9085627145f9e6035baad5a9c8a3;hpb=e4a8cff5ea6f81be77a9431ac7e7aa98b20b0248;p=mkdru-moved-to-drupal.org.git diff --git a/mkdru.admin.inc b/mkdru.admin.inc index c07ac31..f7a1138 100644 --- a/mkdru.admin.inc +++ b/mkdru.admin.inc @@ -1,40 +1,15 @@ 'textfield', - '#title' => t('Maximum authors to display'), - '#default_value' => variable_get('jsdemo2_author_max', 10), - '#size' => 3, - '#maxlength' => 3, + '#title' => t('Path to Pazpar2 client library'), + '#description' => t('Absolute path to the directory containing pz2.js within the current domain. Do not include leading slash.'), + '#default_value' => variable_get('pz2_js_path', 'pazpar2/js'), + '#required' => TRUE ); - - $form['jsdemo2_source_max']=array( - '#type' => 'textfield', - '#title' => t('Maximum sources to display'), - '#default_value' => variable_get('jsdemo2_source_max', 16), - '#size' => 3, - '#maxlength' => 3, - ); - - $form['jsdemo2_subject_max']=array( - '#type' => 'textfield', - '#title' => t('Maximum subjects to display'), - '#default_value' => variable_get('jsdemo2_subject_max', 10), - '#size' => 3, - '#maxlength' => 3, - ); - return system_settings_form($form); } - -function jsdemo2_admin_settings_validate($form, $form_state) { - if (!is_numeric($form_state['values']['jsdemo2_source_max'])) { - form_set_error('jsdemo2_source_max', t('Please enter a number.')); - } - if (!is_numeric($form_state['values']['jsdemo2_author_max'])) { - form_set_error('jsdemo2_author_max', t('Please enter a number.')); - } - if (!is_numeric($form_state['values']['jsdemo2_subject_max'])) { - form_set_error('jsdemo2_subject_max', t('Please enter a number.')); - } -}