Commit c3ce9e34 authored by François Jacquet's avatar François Jacquet
Browse files

Add CSS .button-primary class to submit buttons & SubmitButton() $value parameter is optional

Format SubmitButton() calls
parent 84120734
......@@ -311,7 +311,7 @@ function GetFieldsForm( $table, $title, $RET, $extra_category_fields = array(),
ob_start();
DrawHeader( $title, $delete_button . SubmitButton( _( 'Save' ) ) );
DrawHeader( $title, $delete_button . SubmitButton() );
$form .= ob_get_clean();
......
......@@ -11,6 +11,8 @@
*
* @todo use Buttons() programwide to homogenize code
*
* @since 3.8 Add CSS .button-primary class to submit button.
*
* @param string $submit_value Submit button text.
* @param string $reset_value Reset button text (optional).
*
......@@ -18,7 +20,7 @@
*/
function Buttons( $submit_value, $reset_value = '' )
{
$buttons = '<input type="submit" value="' . $submit_value . '" />';
$buttons = '<input type="submit" value="' . $submit_value . '" class="button-primary" />';
if ( $reset_value )
{
......@@ -80,21 +82,30 @@ function button( $type, $text = '', $link = '', $class = '' )
/**
* Submit button if user Can Edit
*
* @example echo SubmitButton( _( 'Save' ) );
* @example echo SubmitButton();
*
* @param string $value Button text.
* @since 3.8 $value parameter is optional
* @since 3.8 $options parameter defaults to 'class="button-primary"'
*
* @param string $value Button text. Defaults to _( 'Save' ) (optional).
* @param string $name Button name attribute (optional).
* @param string $options Button options (optional).
* @param string $options Button options. Defaults to 'class="button-primary"' (optional).
*
* @return string Button HTML, empty string if user not allowed to edit
*/
function SubmitButton( $value, $name = '', $options = '' )
function SubmitButton( $value = '', $name = '', $options = 'class="button-primary"' )
{
if ( AllowEdit() )
{
if ( $value === '' )
{
$value = _( 'Save' );
}
$name_attr = $name ? ' name="' . $name . '" ' : '';
return '<input type="submit" value="' . $value . '"' . $name_attr . $options . ' />';
return '<input type="submit" value="' . $value . '" ' .
$name_attr . $options . ' />';
}
return '';
......
......@@ -123,7 +123,7 @@ if ( ! $_REQUEST['modfunc'] )
if ( ! $_REQUEST['print_statements'] && AllowEdit())
{
echo '<form action="Modules.php?modname='.$_REQUEST['modname'].'" method="POST">';
DrawHeader('',SubmitButton(_('Save')));
DrawHeader( '', SubmitButton() );
$options = array();
}
else
......@@ -132,7 +132,7 @@ if ( ! $_REQUEST['modfunc'] )
ListOutput($RET,$columns,'Expense','Expenses',$link,array(),$options);
if ( ! $_REQUEST['print_statements'] && AllowEdit())
echo '<div class="center">' . SubmitButton( _( 'Save' ) ) . '</div>';
echo '<div class="center">' . SubmitButton() . '</div>';
echo '<br />';
......
......@@ -118,7 +118,7 @@ if ( ! $_REQUEST['modfunc'] )
{
echo '<form action="Modules.php?modname='.$_REQUEST['modname'].'" method="POST">';
if (AllowEdit())
DrawHeader('',SubmitButton(_('Save')));
DrawHeader( '', SubmitButton() );
$options = array();
}
else
......@@ -129,7 +129,7 @@ if ( ! $_REQUEST['modfunc'] )
if ( ! $_REQUEST['print_statements']
&& AllowEdit() )
{
echo '<div class="center">' . SubmitButton( _( 'Save' ) ) . '</div>';
echo '<div class="center">' . SubmitButton() . '</div>';
}
echo '<br />';
......
......@@ -101,7 +101,7 @@ if (UserStaffID() && ! $_REQUEST['modfunc'])
{
echo '<form action="Modules.php?modname='.$_REQUEST['modname'].'" method="POST">';
if (AllowEdit())
DrawHeader('',SubmitButton(_('Save')));
DrawHeader( '', SubmitButton() );
$options = array();
}
else
......@@ -110,7 +110,7 @@ if (UserStaffID() && ! $_REQUEST['modfunc'])
ListOutput($RET,$columns,'Salary','Salaries',$link,array(),$options);
if ( ! $_REQUEST['print_statements'] && AllowEdit())
echo '<div class="center">' . SubmitButton( _( 'Save' ) ) . '</div>';
echo '<div class="center">' . SubmitButton() . '</div>';
echo '<br />';
if ( ! $_REQUEST['print_statements'] )
......
......@@ -130,7 +130,7 @@ if (UserStaffID() && ! $_REQUEST['modfunc'])
if ( ! $_REQUEST['print_statements'] && AllowEdit())
{
echo '<form action="Modules.php?modname='.$_REQUEST['modname'].'" method="POST">';
DrawHeader('',SubmitButton(_('Save')));
DrawHeader( '', SubmitButton() );
$options = array();
}
else
......@@ -139,7 +139,7 @@ if (UserStaffID() && ! $_REQUEST['modfunc'])
ListOutput($RET,$columns,'Payment','Payments',$link,array(),$options);
if ( ! $_REQUEST['print_statements'] && AllowEdit())
echo '<div class="center">' . SubmitButton( _( 'Save' ) ) . '</div>';
echo '<div class="center">' . SubmitButton() . '</div>';
echo '<br />';
......
......@@ -134,7 +134,7 @@ if ( ! $_REQUEST['modfunc'] )
if ( $_REQUEST['search_modfunc']=='list')
{
echo '<form action="Modules.php?modname='.$_REQUEST['modname'].'&modfunc=save" method="POST">';
DrawHeader('',SubmitButton(_('Add Absences to Selected Students')));
DrawHeader( '', SubmitButton( _( 'Add Absences to Selected Students' ) ) );
echo '<br />';
......@@ -214,7 +214,7 @@ if ( ! $_REQUEST['modfunc'] )
Search('student_id',$extra);
if ( $_REQUEST['search_modfunc']=='list')
echo '<br /><div class="center">' . SubmitButton(_('Add Absences to Selected Students')) . '</div></form>';
echo '<br /><div class="center">' . SubmitButton( _( 'Add Absences to Selected Students' ) ) . '</div></form>';
}
function _makeChooseCheckbox($value,$title)
......
......@@ -409,7 +409,7 @@ else
$_REQUEST['search_modfunc'] = 'list';
Search('student_id',$extra);
echo '<br /><div class="center">' . SubmitButton(_('Update')) . '</div>';
echo '<br /><div class="center">' . SubmitButton( _( 'Update' ) ) . '</div>';
echo '</form>';
}
......
......@@ -163,7 +163,7 @@ if ( ! $_REQUEST['modfunc'] )
$LO_ret = DBGet(DBQuery($sql),$functions);
echo '<form action="Modules.php?modname='.$_REQUEST['modname'].'&modfunc=update&table='.$_REQUEST['table'].'" method="POST">';
DrawHeader('',SubmitButton(_('Save')));
DrawHeader( '', SubmitButton() );
echo '<br />';
//FJ css WPadmin
......@@ -171,7 +171,7 @@ if ( ! $_REQUEST['modfunc'] )
// ListOutput($LO_ret,$LO_columns,'.','.',$link,array(),array('count'=>false,'download'=>false,'search'=>false));
ListOutput($LO_ret,$LO_columns,'.','.',$link,array(),$LO_options);
echo '<br /><div class="center">' . SubmitButton( _( 'Save' ) ) . '</div>';
echo '<br /><div class="center">' . SubmitButton() . '</div>';
echo '</form>';
}
......
......@@ -197,7 +197,7 @@ if ( $_REQUEST['search_modfunc'] || $_REQUEST['student_id'] || User('PROFILE')==
DrawHeader(
( empty( $_REQUEST['period_id'] ) ? '' : AttendanceCodesTipMessage() ),
( UserStudentID() || empty( $_REQUEST['period_id'] ) ? '' : SubmitButton( _( 'Save' ) ) )
( UserStudentID() || empty( $_REQUEST['period_id'] ) ? '' : SubmitButton() )
);
}
......@@ -381,7 +381,7 @@ else
Search( 'student_id', $extra );
echo '<br /><div class="center">' . SubmitButton( _( 'Save' ) ) . '</div>';
echo '<br /><div class="center">' . SubmitButton() . '</div>';
echo '</form>';
}
......
......@@ -202,7 +202,7 @@ if ( isset( $_REQUEST['search_modfunc'] )
echo '<form action="Modules.php?modname=Attendance/DuplicateAttendance.php&modfunc=&search_modfunc=list&next_modname=Attendance/DuplicateAttendance.php&delete=true" method="POST">';
DrawHeader('',SubmitButton(_('Delete')));
DrawHeader( '', SubmitButton( _( 'Delete' ) ) );
$num_rows = $totalrows;
......
......@@ -70,7 +70,7 @@ if ( ! $_REQUEST['modfunc'] )
echo '<form action="Modules.php?modname='.$_REQUEST['modname'].'&list_by_day='.$_REQUEST['list_by_day'].'" method="POST">';
$advanced_link = ' <a href="Modules.php?modname='.$_REQUEST['modname'].'&modfunc=search&list_by_day='.$_REQUEST['list_by_day'].'&day_start='.$_REQUEST['day_start'].'&day_end='.$_REQUEST['day_end'].'&month_start='.$_REQUEST[month_start].'&month_end='.$_REQUEST['month_end'].'&year_start='.$_REQUEST['year_start'].'&year_end='.$_REQUEST['year_end'].'">'._('Advanced').'</a>';
DrawHeader(_('Timeframe').':'.PrepareDate($start_date,'_start').' '._('to').' '.PrepareDate($end_date,'_end').$advanced_link,SubmitButton(_('Go')));
DrawHeader(_('Timeframe').':'.PrepareDate($start_date,'_start').' '._('to').' '.PrepareDate($end_date,'_end').$advanced_link,SubmitButton( _( 'Go' ) ));
echo '</form>';
if ( $_ROSARIO['SearchTerms'])
DrawHeader(str_replace('<br />','<br /> &nbsp;',mb_substr($_ROSARIO['SearchTerms'],0,-6)));
......
......@@ -263,7 +263,7 @@ if ( $attendance_reason )
echo '<form action="Modules.php?modname=' . $_REQUEST['modname'] .
'&table=' . $_REQUEST['table'] . '" method="POST">';
DrawHeader( '', SubmitButton( _( 'Save' ) ) );
DrawHeader( '', SubmitButton() );
$date_note = $date != DBDate() ? ' <span style="color:red" class="nobr">' .
_( 'The selected date is not today' ) . '</span> |' : '';
......@@ -336,7 +336,7 @@ ListOutput(
$LO_options
);
echo '<br /><div class="center">' . SubmitButton( _( 'Save' ) ) . '</div>';
echo '<br /><div class="center">' . SubmitButton() . '</div>';
echo '</form>';
function _makeRadio( $value, $title )
......
......@@ -282,7 +282,7 @@ if ( ! $_REQUEST['modfunc'] )
if ( $_REQUEST['search_modfunc']=='list')
{
echo '<br /><div class="center">' . SubmitButton(_('Create Attendance Report for Selected Students')) . '</div>';
echo '<br /><div class="center">' . SubmitButton( _( 'Create Attendance Report for Selected Students' ) ) . '</div>';
echo '</form>';
}
}
......
......@@ -58,7 +58,7 @@ if (empty($email_column))
DrawHeader('','',$select_html);
echo '<br /><div class="center">' . SubmitButton(_('Select Parents email field')) . '</div>';
echo '<br /><div class="center">' . SubmitButton( _( 'Select Parents email field' ) ) . '</div>';
echo '</form>';
}
......@@ -284,7 +284,7 @@ if (! $_REQUEST['modfunc'] && !empty($email_column))
if ( $_REQUEST['search_modfunc']=='list')
{
echo '<form action="Modules.php?modname='.$_REQUEST['modname'].'&modfunc=save" method="POST">';
$extra['header_right'] = SubmitButton(_('Create Parent Accounts for Selected Students'));
$extra['header_right'] = SubmitButton( _( 'Create Parent Accounts for Selected Students' ) );
$extra['extra_header_left'] = '<table>';
......@@ -350,7 +350,7 @@ if (! $_REQUEST['modfunc'] && !empty($email_column))
if ( $_REQUEST['search_modfunc']=='list')
{
echo '<br /><div class="center">' . SubmitButton(_('Create Parent Accounts for Selected Students')) . '</div>';
echo '<br /><div class="center">' . SubmitButton( _( 'Create Parent Accounts for Selected Students' ) ) . '</div>';
echo '</form>';
}
}
......
......@@ -124,7 +124,7 @@ if (! $_REQUEST['modfunc'] || $_REQUEST['search_modfunc']=='list')
if ( $_REQUEST['search_modfunc']=='list')
{
echo '<form action="Modules.php?modname='.$_REQUEST['modname'].'&modfunc=save" method="POST">';
$extra['header_right'] = SubmitButton(_('Notify Selected Parents'));
$extra['header_right'] = SubmitButton( _( 'Notify Selected Parents' ) );
$extra['extra_header_left'] = '<table>';
......@@ -189,7 +189,7 @@ if (! $_REQUEST['modfunc'] || $_REQUEST['search_modfunc']=='list')
if ( $_REQUEST['search_modfunc']=='list')
{
echo '<br /><div class="center">' . SubmitButton(_('Notify Selected Parents')) . '</div>';
echo '<br /><div class="center">' . SubmitButton( _( 'Notify Selected Parents' ) ) . '</div>';
echo '</form>';
}
}
......
......@@ -712,7 +712,7 @@ echo '</td></tr></table>';
echo PopTable( 'footer' );
echo '<br /><div class="center">' . SubmitButton( _( 'Save' ) ) . '</div></form>';
echo '<br /><div class="center">' . SubmitButton() . '</div></form>';
function _makeInput( $name, $title, $value = '', $extra = '' )
......
......@@ -179,10 +179,10 @@ if ( ! $_REQUEST['modfunc'] )
echo '<form action="Modules.php?modname='.$_REQUEST['modname'].'" method="POST">';
DrawHeader('',SubmitButton(_('Save')));
DrawHeader( '', SubmitButton() );
ListOutput($referrals_RET,$columns,'Referral Form Category','Referral Form Categories',$link);
echo '<div class="center">' . SubmitButton( _( 'Save' ) ) . '</div>';
echo '<div class="center">' . SubmitButton() . '</div>';
echo '</form>';
}
......
......@@ -156,7 +156,7 @@ if ( ! $_REQUEST['modfunc']
echo '<form action="Modules.php?modname='.$_REQUEST['modname'].'&referral_id='.$_REQUEST['referral_id'].'" method="POST">';
DrawHeader('',SubmitButton(_('Save')));
DrawHeader( '', SubmitButton() );
echo '<br />';
PopTable( 'header', _( 'Referral' ) );
......@@ -401,7 +401,7 @@ if ( ! $_REQUEST['modfunc']
if ( AllowEdit() )
{
echo '<br /><div class="center">' . SubmitButton( _( 'Save' ) ) . '</div>';
echo '<br /><div class="center">' . SubmitButton() . '</div>';
}
echo '</form>';
......
......@@ -95,9 +95,9 @@ if ( ! $_REQUEST['modfunc'] )
$link['remove']['variables'] = array('id' => 'ID');
echo '<form action="Modules.php?modname='.$_REQUEST['modname'].'&modfunc=update" method="POST">';
DrawHeader('',SubmitButton(_('Save')));
DrawHeader( '', SubmitButton() );
ListOutput($activities_RET,$columns,'Activity','Activities',$link);
echo '<div class="center">' . SubmitButton( _( 'Save' ) ) . '</div>';
echo '<div class="center">' . SubmitButton() . '</div>';
echo '</form>';
}
......
......@@ -39,7 +39,7 @@ echo ErrorMessage( $error );
if ( $_REQUEST['search_modfunc']=='list')
{
echo '<form action="Modules.php?modname='.$_REQUEST['modname'].'&modfunc=save" method="POST">';
DrawHeader('',SubmitButton(_('Add Activity to Selected Students')));
DrawHeader( '', SubmitButton( _( 'Add Activity to Selected Students' ) ) );
echo '<br />';
//FJ css WPadmin
......@@ -68,7 +68,7 @@ if ( $_REQUEST['search_modfunc']=='list')
Search('student_id',$extra);
if ( $_REQUEST['search_modfunc']=='list')
echo '<br /><div class="center">' . SubmitButton(_('Add Activity to Selected Students')) . '</div></form>';
echo '<br /><div class="center">' . SubmitButton( _( 'Add Activity to Selected Students' ) ) . '</div></form>';
function _makeChooseCheckbox($value,$title)
{ global $THIS_RET;
......
......@@ -81,7 +81,7 @@ echo '<form action="Modules.php?modname='.$_REQUEST['modname'].'" method="POST">
echo '<table class="cellpadding-5">';
echo '<tr><td><b>'._('From').'</b></td><td>'.SelectInput($START_DAY,'values[START_DAY]','',$day_options,false,'',false).'</td><td>'.SelectInput($START_HOUR,'values[START_HOUR]','',$hour_options,false,'',false).'</td><td><b>:</b></td><td>'.SelectInput($START_MINUTE,'values[START_MINUTE]','',$minute_options,false,'',false).'</td><td>'.SelectInput($START_M,'values[START_M]','',$m_options,false,'',false).'</td></tr>';
echo '<tr><td><b>'._('To').'</b></td><td>'.SelectInput($END_DAY,'values[END_DAY]','',$day_options,false,'',false).'</td><td>'.SelectInput($END_HOUR,'values[END_HOUR]','',$hour_options,false,'',false).'</td><td><b>:</b></td><td>'.SelectInput($END_MINUTE,'values[END_MINUTE]','',$minute_options,false,'',false).'</td><td>'.SelectInput($END_M,'values[END_M]','',$m_options,false,'',false).'</td></tr>';
echo '<tr><td colspan="6" class="center">'.SubmitButton(_('Save')).'</td></tr>';
echo '<tr><td colspan="6" class="center">' . SubmitButton() . '</td></tr>';
echo '</table>';
echo '</form>';
......
......@@ -140,7 +140,7 @@ if ( UserStudentID()
//FJ css WPadmin
// $link['add']['html']['TITLE'] = '<table class="cellspacing-0"><tr><td>'.SelectInput('','new_activity','',$activities).'</td><td><input type=submit value="'._('Add').'"></td></tr></table>';
// $link['add']['html']['remove'] = button('add');
$link['add']['html'] = array('remove' => button('add'), 'TITLE' => SelectInput('','new_activity','',$activities).SubmitButton(_('Add')), 'START_DATE' => '&nbsp;', 'END_DATE' => '&nbsp;');
$link['add']['html'] = array('remove' => button('add'), 'TITLE' => SelectInput('','new_activity','',$activities).SubmitButton( _( 'Add' ) ), 'START_DATE' => '&nbsp;', 'END_DATE' => '&nbsp;');
echo '<form action="Modules.php?modname='.$_REQUEST['modname'].'&modfunc=add&start_date='.$_REQUEST['start_date'].'" method="POST">';
$columns = array('TITLE' => _('Activity'),'START_DATE' => _('Starts'),'END_DATE' => _('Ends'));
......
......@@ -50,12 +50,12 @@ $staff_RET = DBGet( DBQuery( "SELECT fst.TRANSACTION_ID,fst.STAFF_ID,fst.SYEAR,
//echo '<pre>'; var_dump($users_RET); echo '</pre>';
echo '<form action="Modules.php?modname='.$_REQUEST['modname'].'&modfunc=update" method="POST">';
DrawHeader('',SubmitButton(_('Save')));
DrawHeader( '', SubmitButton() );
$columns = array('TRANSACTION_ID' => _('ID'),'ACCOUNT_ID' => _('Account ID'),'SYEAR' => _('School Year'),'FULL_NAME' => _('Student'),'STUDENTS' => _('Students'),'SCHOOL_ID' => _('School'));
ListOutput($students_RET,$columns,'Student Transaction w/o School','Student Transactions w/o School',false,array(),array('save'=>false,'search'=>false));
$columns = array('TRANSACTION_ID' => _('ID'),'SYEAR' => _('School Year'),'FULL_NAME' => _('User'),'SCHOOL_ID' => _('School'));
ListOutput($staff_RET,$columns,'User Transaction w/o School','User Transactions w/o School',false,array(),array('save'=>false,'search'=>false));
echo '<div class="center">' . SubmitButton( _( 'Save' ) ) . '</div>';
echo '<div class="center">' . SubmitButton() . '</div>';
echo '</form>';
function _students($value,$column)
......
......@@ -236,7 +236,22 @@ else
$LO_columns = array('ID' => _('ID'),'SCHOOL_DATE' => _('Date'),'DESCRIPTION' => _('Description'));
echo '<form action="Modules.php?modname='.$_REQUEST['modname'].'&menu_id='.$_REQUEST['menu_id'].'&month='.$_REQUEST['month'].'&year='.$_REQUEST['year'].'" method="POST">';
DrawHeader(PrepareDate(mb_strtoupper(date("d-M-y",$time)),'',false,array('M'=>1,'Y'=>1,'submit'=>true)),SubmitButton(_('Save'),'submit[save]').SubmitButton(_('Generate Menu'),'submit[print]'));
DrawHeader(
PrepareDate(
mb_strtoupper( date( "d-M-y", $time ) ),
'',
false,
array(
'M' => 1,
'Y' => 1,
'submit' => true,
)
),
SubmitButton( _( 'Save' ), 'submit[save]' ) .
SubmitButton( _( 'Generate Menu' ), 'submit[print]', '' )
);
echo '<br />';
$tabs = array();
......
......@@ -225,7 +225,7 @@ if ( ! $_REQUEST['modfunc'] )
//echo '<pre>'; var_dump($LO_ret); echo '</pre>';
echo '<form action="Modules.php?modname='.$_REQUEST['modname'].'&modfunc=update&tab_id='.$_REQUEST['tab_id'].'" method="POST">';
DrawHeader('',SubmitButton(_('Save')));
DrawHeader( '', SubmitButton() );
echo '<br />';
// FJ fix SQL bug invalid sort order
......@@ -240,7 +240,7 @@ if ( ! $_REQUEST['modfunc'] )
//FJ add translation
ListOutput($LO_ret,$LO_columns,'Meal Item','Meal Items',$link,array(),$extra);
echo '<br /><div class="center">' . SubmitButton( _( 'Save' ) ) . '</div>';
echo '<br /><div class="center">' . SubmitButton() . '</div>';
echo '</form>';
}
......
......@@ -210,7 +210,7 @@ if ( ! $_REQUEST['modfunc'] )
$LO_ret = DBGet( DBQuery( $sql ), $functions );
echo '<form action="Modules.php?modname='.$_REQUEST['modname'].'&modfunc=update&tab_id='.$_REQUEST['tab_id'].'" method="POST">';
DrawHeader('',SubmitButton(_('Save')));
DrawHeader( '', SubmitButton() );
echo '<br />';
$extra = array('save'=>false,'search'=>false,
......@@ -221,7 +221,7 @@ if ( ! $_REQUEST['modfunc'] )
//FJ add translation
ListOutput($LO_ret,$LO_columns,'Meal','Meals',$link,array(),$extra);
echo '<br /><div class="center">' . SubmitButton( _( 'Save' ) ) . '</div>';
echo '<br /><div class="center">' . SubmitButton() . '</div>';
echo '</form>';
}
......
......@@ -122,7 +122,7 @@ if (UserStudentID() && ! $_REQUEST['modfunc'])
'include_inactive',
_( 'Include Inactive Students in Shared Account' )
),
SubmitButton( _( 'Save' ) )
SubmitButton()
);
echo '<br />';
......@@ -187,6 +187,6 @@ if (UserStudentID() && ! $_REQUEST['modfunc'])
PopTable('footer');
echo '<br /><div class="center">' . SubmitButton( _( 'Save' ) ) . '</div>';
echo '<br /><div class="center">' . SubmitButton() . '</div>';
echo '</form>';
}
......@@ -129,7 +129,7 @@ if ( ! $_REQUEST['modfunc'] )
echo '<form action="Modules.php?modname='.$_REQUEST['modname'].'&modfunc=save&_ROSARIO_PDF=true" method="POST">';
//DrawHeader('',SubmitButton('Create Reminders for Selected Students'));
//FJ add translation
$extra['header_right'] = SubmitButton(_('Create Reminders for Selected Students'));
$extra['header_right'] = SubmitButton( _( 'Create Reminders for Selected Students' ) );
$extra['extra_header_left'] .= '<label>'._('Estimate for year end').'&nbsp;<input type="checkbox" name="year_end" value="Y" /></label>';
}
......@@ -167,7 +167,7 @@ if ( ! $_REQUEST['modfunc'] )
Search('student_id',$extra);
if ( $_REQUEST['search_modfunc']=='list')
{
echo '<br /><div class="center">' . SubmitButton(_('Create Reminders for Selected Students')) . '</div>';
echo '<br /><div class="center">' . SubmitButton( _( 'Create Reminders for Selected Students' ) ) . '</div>';
echo '</form>';
}
}
......
......@@ -85,7 +85,13 @@ if (UserStudentID() && ! $_REQUEST['modfunc'])
$student = $student[1];
echo '<form action="Modules.php?modname='.$_REQUEST['modname'].'&modfunc=submit&menu_id='.$_REQUEST['menu_id'].'" method="POST">';
DrawHeader('',SubmitButton(_('Cancel Sale'),'submit[cancel]').SubmitButton(_('Complete Sale'),'submit[save]'));
DrawHeader(
'',
SubmitButton( _( 'Cancel Sale' ), 'submit[cancel]', '' ) .
SubmitButton( _( 'Complete Sale' ), 'submit[save]' )
);
echo '</form>';
DrawHeader(NoInput($student['FULL_NAME'],'&nbsp;'.$student['STUDENT_ID']),'', NoInput(red($student['BALANCE']),_('Balance')));
......@@ -146,7 +152,7 @@ if (UserStudentID() && ! $_REQUEST['modfunc'])
'variables' => array('id' => 'SALE_ID'));
//FJ css WPadmin
// $link['add']['html'] = array('DESCRIPTION' => '<table class="cellspacing-0"><tr><td>'.SelectInput('','item_sn','',$items).'</td></tr></table>','ICON' => '<table class="cellspacing-0"><tr><td><input type=submit value='._('Add').'></td></tr></table>','remove'=>button('add'));
$link['add']['html'] = array('DESCRIPTION'=>SelectInput('','item_sn','',$items),'ICON'=>SubmitButton(_('Add')),'PRICE' => '&nbsp;','remove'=>button('add'));
$link['add']['html'] = array('DESCRIPTION'=>SelectInput('','item_sn','',$items),'ICON'=>SubmitButton( _( 'Add')),'PRICE' => '&nbsp;','remove'=>button('add' ) );
$columns = array('DESCRIPTION' => _('Item'),'ICON' => _('Icon'),'PRICE' => _('Price'));
$tabs = array();
......
......@@ -72,7 +72,7 @@ if ( UserStudentID()
//$PHP_tmp_SELF = PreparePHP_SELF();
echo '<form action="Modules.php?modname=' . $_REQUEST['modname'] . '&modfunc=save" method="POST">';
DrawHeader( '', ResetButton( _( 'Cancel' ) ) . SubmitButton( _( 'Save' ) ) );
DrawHeader( '', ResetButton( _( 'Cancel' ) ) . SubmitButton() );
DrawHeader(NoInput($student['FULL_NAME'],'&nbsp;'.$student['STUDENT_ID']),'', NoInput(red($student['BALANCE']),_('Balance')));
......@@ -122,7 +122,7 @@ if ( UserStudentID()
ListOutput($RET,$columns,'Earlier Transaction','Earlier Transactions',$link,false,array('save'=>false,'search'=>false));
echo '<br /><div class="center">' . SubmitButton( _( 'Save' ) ) . '</div>';
echo '<br /><div class="center">' . SubmitButton() . '</div>';
}
else
echo ErrorMessage(array(_('This student does not have a valid Meal Account.')));
......