New enhancements to the code related to the SuiteDesk configuration

This commit is contained in:
Manuel Cillero 2017-10-08 20:17:40 +02:00
parent feb393faa4
commit 6d893bfe98
4 changed files with 9 additions and 44 deletions

View file

@ -1,41 +0,0 @@
<?php
function storm_drush_command() {
$items['storm-reinstall'] = array(
'description' => dt('Disable, Uninstall, Reinstall storm modules in the correct order, in one cmd.'),
'examples' => array(
'drush storm-reinstall' => 'Disable, Unistall, and Reinstall SuiteDesk & sub modules'
),
'aliases' => array('stre'),
);
return $items;
}
function drush_storm_reinstall() {
$sub_mods = array(
'stormexpense',
'storminvoice',
'stormnote',
'stormorganization',
'stormperson',
'stormproject',
'stormtask',
'stormteam',
'stormticket',
'stormtimetracking');
drush_invoke_process(@self, 'pm-disable', array('storm'));
drush_invoke_process(@self, 'pm-uninstall', array('stormexpense', 'storminvoice', 'stormnote', 'stormteam', 'stormtimetracking'));
drush_invoke_process(@self, 'pm-uninstall', array('stormperson', 'stormticket'));
drush_invoke_process(@self, 'pm-uninstall', array('stormtask'));
drush_invoke_process(@self, 'pm-uninstall', array('stormproject'));
drush_invoke_process(@self, 'pm-uninstall', array('stormorganization'));
drush_invoke('pm-enable', $sub_mods);
}

View file

@ -365,6 +365,12 @@ function storm_init() {
'watcher_notifications_templates_body_node', 'watcher_notifications_templates_body_node',
'watcher_notifications_templates_body_cmt', 'watcher_notifications_templates_body_cmt',
'watcher_notifications_templates_body_confirm', 'watcher_notifications_templates_body_confirm',
// SuiteDesk configuration:
'storminvoice_payment_modes',
'storminvoice_cover_note_subject',
'storminvoice_cover_note',
'storminvoice_payment_terms',
'stormquicktt_default_title',
); );
// It is intended to move these calls to pages which specifically need them rather than on hook_init. // It is intended to move these calls to pages which specifically need them rather than on hook_init.
@ -571,7 +577,7 @@ function storm_menu() {
// Admin options. // Admin options.
$items['admin/settings/suitedesk'] = array( $items['admin/settings/suitedesk'] = array(
'title' => 'SuiteDesk', 'title' => 'Configuration',
'description' => 'SuiteDesk administration page', 'description' => 'SuiteDesk administration page',
'page callback' => 'drupal_get_form', 'page callback' => 'drupal_get_form',
'page arguments' => array('storm_admin_settings'), 'page arguments' => array('storm_admin_settings'),

View file

@ -863,7 +863,7 @@ function storminvoice_admin_settings() {
$form['storminvoice_cover_note_subject'] = array( $form['storminvoice_cover_note_subject'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Cover note subject'), '#title' => t('Cover note subject'),
'#default_value' => variable_get('storminvoice_cover_note_subject', t('Invoice from !site', array('!site' => variable_get('site_name', 'STORM')))), '#default_value' => variable_get('storminvoice_cover_note_subject', t('Invoice from !site', array('!site' => variable_get('site_name', 'SuiteDesk')))),
'#description' => t('Default subject for cover note.'), '#description' => t('Default subject for cover note.'),
'#size' => 50, '#size' => 50,
); );

View file

@ -10,7 +10,7 @@ function stormquicktt_settings() {
$form['stormquicktt_default_title'] = array( $form['stormquicktt_default_title'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Default title'), '#title' => t('Default title'),
'#default_value' => variable_get('stormquicktt_default_title', 'Auto-created by QuickTT'), '#default_value' => variable_get('stormquicktt_default_title', t('Auto-generated Timetracking')),
); );
$status_option_prj = array('none' => t('-none-')); $status_option_prj = array('none' => t('-none-'));
$project_status = storm_attributes_bydomain('Project status'); $project_status = storm_attributes_bydomain('Project status');