fix category sessions CT#7539

1.10.x
aragonc 9 years ago
parent 05b73ceb75
commit 1e864a374e
  1. 317
      main/session/session_category_edit.php

@ -76,166 +76,167 @@ if (!empty($return)) {
Display::display_error_message($return,false);
}
?>
<form method="post" name="form" action="<?php echo api_get_self(); ?>?id=<?php echo $id; ?>">
<input type="hidden" name="formSent" value="1">
<legend><?php echo $tool_name;?> </legend>
<table border="0" cellpadding="5" cellspacing="0" width="550">
<tr>
<td width="30%"><?php echo get_lang('SessionName') ?>&nbsp;&nbsp;</td>
<td width="70%"><input type="text" name="name" size="50" maxlength="50" value="<?php if($formSent) echo api_htmlentities($name,ENT_QUOTES,$charset); else echo api_htmlentities($infos['name'],ENT_QUOTES,$charset); ?>"></td>
</tr>
<td colspan="2">
<a href="javascript://" onclick="if(document.getElementById('options').style.display == 'none'){document.getElementById('options').style.display = 'block';}else{document.getElementById('options').style.display = 'none';}"><?php echo get_lang('EditTimeLimit') ?></a>
<div style="display: <?php if($formSent && ($coachAccessStartDate!='0000-00-00 00:00:00' || $coachAccessEndDate!='0000-00-00 00:00:00')) echo 'block'; else echo 'none'; ?>;" id="options">
<br>
<div>
<table border="0" cellpadding="5" cellspacing="0" width="100%">
<tr><td colspan="2"><?php echo get_lang('TheTimeLimitsAreReferential');?></td>
</tr>
<tr>
<td width="20%"><?php echo get_lang('DateStart') ?>&nbsp;&nbsp;</td>
<td width="80%">
<select name="day_start">
<option value="1">01</option>
<option value="2" <?php if($day_start == 2) echo 'selected="selected"'; ?> >02</option>
<option value="3" <?php if($day_start == 3) echo 'selected="selected"'; ?> >03</option>
<option value="4" <?php if($day_start == 4) echo 'selected="selected"'; ?> >04</option>
<option value="5" <?php if($day_start == 5) echo 'selected="selected"'; ?> >05</option>
<option value="6" <?php if($day_start == 6) echo 'selected="selected"'; ?> >06</option>
<option value="7" <?php if($day_start == 7) echo 'selected="selected"'; ?> >07</option>
<option value="8" <?php if($day_start == 8) echo 'selected="selected"'; ?> >08</option>
<option value="9" <?php if($day_start == 9) echo 'selected="selected"'; ?> >09</option>
<option value="10" <?php if($day_start == 10) echo 'selected="selected"'; ?> >10</option>
<option value="11" <?php if($day_start == 11) echo 'selected="selected"'; ?> >11</option>
<option value="12" <?php if($day_start == 12) echo 'selected="selected"'; ?> >12</option>
<option value="13" <?php if($day_start == 13) echo 'selected="selected"'; ?> >13</option>
<option value="14" <?php if($day_start == 14) echo 'selected="selected"'; ?> >14</option>
<option value="15" <?php if($day_start == 15) echo 'selected="selected"'; ?> >15</option>
<option value="16" <?php if($day_start == 16) echo 'selected="selected"'; ?> >16</option>
<option value="17" <?php if($day_start == 17) echo 'selected="selected"'; ?> >17</option>
<option value="18" <?php if($day_start == 18) echo 'selected="selected"'; ?> >18</option>
<option value="19" <?php if($day_start == 19) echo 'selected="selected"'; ?> >19</option>
<option value="20" <?php if($day_start == 20) echo 'selected="selected"'; ?> >20</option>
<option value="21" <?php if($day_start == 21) echo 'selected="selected"'; ?> >21</option>
<option value="22" <?php if($day_start == 22) echo 'selected="selected"'; ?> >22</option>
<option value="23" <?php if($day_start == 23) echo 'selected="selected"'; ?> >23</option>
<option value="24" <?php if($day_start == 24) echo 'selected="selected"'; ?> >24</option>
<option value="25" <?php if($day_start == 25) echo 'selected="selected"'; ?> >25</option>
<option value="26" <?php if($day_start == 26) echo 'selected="selected"'; ?> >26</option>
<option value="27" <?php if($day_start == 27) echo 'selected="selected"'; ?> >27</option>
<option value="28" <?php if($day_start == 28) echo 'selected="selected"'; ?> >28</option>
<option value="29" <?php if($day_start == 29) echo 'selected="selected"'; ?> >29</option>
<option value="30" <?php if($day_start == 30) echo 'selected="selected"'; ?> >30</option>
<option value="31" <?php if($day_start == 31) echo 'selected="selected"'; ?> >31</option>
</select>
/
<select name="month_start">
<option value="1">01</option>
<option value="2" <?php if($month_start == 2) echo 'selected="selected"'; ?> >02</option>
<option value="3" <?php if($month_start == 3) echo 'selected="selected"'; ?> >03</option>
<option value="4" <?php if($month_start == 4) echo 'selected="selected"'; ?> >04</option>
<option value="5" <?php if($month_start == 5) echo 'selected="selected"'; ?> >05</option>
<option value="6" <?php if($month_start == 6) echo 'selected="selected"'; ?> >06</option>
<option value="7" <?php if($month_start == 7) echo 'selected="selected"'; ?> >07</option>
<option value="8" <?php if($month_start == 8) echo 'selected="selected"'; ?> >08</option>
<option value="9" <?php if($month_start == 9) echo 'selected="selected"'; ?> >09</option>
<option value="10" <?php if($month_start == 10) echo 'selected="selected"'; ?> >10</option>
<option value="11" <?php if($month_start == 11) echo 'selected="selected"'; ?> >11</option>
<option value="12" <?php if($month_start == 12) echo 'selected="selected"'; ?> >12</option>
</select>
/
<select name="year_start">
<?php
for($i=$thisYear-5;$i <= ($thisYear+5);$i++)
{ ?>
<option value="<?php echo $i; ?>" <?php if($year_start == $i) echo 'selected="selected"'; ?> ><?php echo $i; ?></option>
<?php
} ?>
</select>
</td>
</tr>
<tr>
<td width="20%"><?php echo get_lang('DateEnd') ?>&nbsp;&nbsp;</td>
<td width="80%">
<select name="day_end">
<option value="0">--</option>
<option value="1" <?php if($day_end == 1) echo 'selected="selected"'; ?> >01</option>
<option value="2" <?php if($day_end == 2) echo 'selected="selected"'; ?> >02</option>
<option value="3" <?php if($day_end == 3) echo 'selected="selected"'; ?> >03</option>
<option value="4" <?php if($day_end == 4) echo 'selected="selected"'; ?> >04</option>
<option value="5" <?php if($day_end == 5) echo 'selected="selected"'; ?> >05</option>
<option value="6" <?php if($day_end == 6) echo 'selected="selected"'; ?> >06</option>
<option value="7" <?php if($day_end == 7) echo 'selected="selected"'; ?> >07</option>
<option value="8" <?php if($day_end == 8) echo 'selected="selected"'; ?> >08</option>
<option value="9" <?php if($day_end == 9) echo 'selected="selected"'; ?> >09</option>
<option value="10" <?php if($day_end == 10) echo 'selected="selected"'; ?> >10</option>
<option value="11" <?php if($day_end == 11) echo 'selected="selected"'; ?> >11</option>
<option value="12" <?php if($day_end == 12) echo 'selected="selected"'; ?> >12</option>
<option value="13" <?php if($day_end == 13) echo 'selected="selected"'; ?> >13</option>
<option value="14" <?php if($day_end == 14) echo 'selected="selected"'; ?> >14</option>
<option value="15" <?php if($day_end == 15) echo 'selected="selected"'; ?> >15</option>
<option value="16" <?php if($day_end == 16) echo 'selected="selected"'; ?> >16</option>
<option value="17" <?php if($day_end == 17) echo 'selected="selected"'; ?> >17</option>
<option value="18" <?php if($day_end == 18) echo 'selected="selected"'; ?> >18</option>
<option value="19" <?php if($day_end == 19) echo 'selected="selected"'; ?> >19</option>
<option value="20" <?php if($day_end == 20) echo 'selected="selected"'; ?> >20</option>
<option value="21" <?php if($day_end == 21) echo 'selected="selected"'; ?> >21</option>
<option value="22" <?php if($day_end == 22) echo 'selected="selected"'; ?> >22</option>
<option value="23" <?php if($day_end == 23) echo 'selected="selected"'; ?> >23</option>
<option value="24" <?php if($day_end == 24) echo 'selected="selected"'; ?> >24</option>
<option value="25" <?php if($day_end == 25) echo 'selected="selected"'; ?> >25</option>
<option value="26" <?php if($day_end == 26) echo 'selected="selected"'; ?> >26</option>
<option value="27" <?php if($day_end == 27) echo 'selected="selected"'; ?> >27</option>
<option value="28" <?php if($day_end == 28) echo 'selected="selected"'; ?> >28</option>
<option value="29" <?php if($day_end == 29) echo 'selected="selected"'; ?> >29</option>
<option value="30" <?php if($day_end == 30) echo 'selected="selected"'; ?> >30</option>
<option value="31" <?php if($day_end == 31) echo 'selected="selected"'; ?> >31</option>
</select>
/
<select name="month_end">
<option value="0">--</option>
<option value="1" <?php if($month_end == 1) echo 'selected="selected"'; ?> >01</option>
<option value="2" <?php if($month_end == 2) echo 'selected="selected"'; ?> >02</option>
<option value="3" <?php if($month_end == 3) echo 'selected="selected"'; ?> >03</option>
<option value="4" <?php if($month_end == 4) echo 'selected="selected"'; ?> >04</option>
<option value="5" <?php if($month_end == 5) echo 'selected="selected"'; ?> >05</option>
<option value="6" <?php if($month_end == 6) echo 'selected="selected"'; ?> >06</option>
<option value="7" <?php if($month_end == 7) echo 'selected="selected"'; ?> >07</option>
<option value="8" <?php if($month_end == 8) echo 'selected="selected"'; ?> >08</option>
<option value="9" <?php if($month_end == 9) echo 'selected="selected"'; ?> >09</option>
<option value="10" <?php if($month_end == 10) echo 'selected="selected"'; ?> >10</option>
<option value="11" <?php if($month_end == 11) echo 'selected="selected"'; ?> >11</option>
<option value="12" <?php if($month_end == 12) echo 'selected="selected"'; ?> >12</option>
</select>
/
<select name="year_end">
<option value="0">----</option>
<?php
for($i=$thisYear-5;$i <= ($thisYear+5);$i++)
{ ?>
<option value="<?php echo $i; ?>" <?php if($year_end == $i) echo 'selected="selected"'; ?> ><?php echo $i; ?></option>
<?php
} ?>
</select>
</td>
</tr>
</table>
<div class="row">
<div class="col-md-12">
<form method="post" name="form" action="<?php echo api_get_self(); ?>?id=<?php echo $id; ?>" class="form-horizontal">
<input type="hidden" name="formSent" value="1">
<legend><?php echo $tool_name;?> </legend>
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo get_lang('SessionName') ?></label>
<div class="col-sm-6">
<input class="form-control" type="text" name="name" size="50" maxlength="50" value="<?php if($formSent) echo api_htmlentities($name,ENT_QUOTES,$charset); else echo api_htmlentities($infos['name'],ENT_QUOTES,$charset); ?>">
</div>
<div class="col-sm-3"></div>
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-6">
<?php echo get_lang('TheTimeLimitsAreReferential');?>
<a href="javascript://" onclick="if(document.getElementById('options').style.display == 'none'){document.getElementById('options').style.display = 'block';}else{document.getElementById('options').style.display = 'none';}"><?php echo get_lang('EditTimeLimit') ?></a>
</div>
</div>
<div style="display: <?php if($formSent && ($coachAccessStartDate!='0000-00-00 00:00:00' || $coachAccessEndDate!='0000-00-00 00:00:00')) echo 'block'; else echo 'none'; ?>;" id="options">
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo get_lang('DateStart') ?></label>
<div class="col-sm-6">
<select name="day_start">
<option value="1">01</option>
<option value="2" <?php if($day_start == 2) echo 'selected="selected"'; ?> >02</option>
<option value="3" <?php if($day_start == 3) echo 'selected="selected"'; ?> >03</option>
<option value="4" <?php if($day_start == 4) echo 'selected="selected"'; ?> >04</option>
<option value="5" <?php if($day_start == 5) echo 'selected="selected"'; ?> >05</option>
<option value="6" <?php if($day_start == 6) echo 'selected="selected"'; ?> >06</option>
<option value="7" <?php if($day_start == 7) echo 'selected="selected"'; ?> >07</option>
<option value="8" <?php if($day_start == 8) echo 'selected="selected"'; ?> >08</option>
<option value="9" <?php if($day_start == 9) echo 'selected="selected"'; ?> >09</option>
<option value="10" <?php if($day_start == 10) echo 'selected="selected"'; ?> >10</option>
<option value="11" <?php if($day_start == 11) echo 'selected="selected"'; ?> >11</option>
<option value="12" <?php if($day_start == 12) echo 'selected="selected"'; ?> >12</option>
<option value="13" <?php if($day_start == 13) echo 'selected="selected"'; ?> >13</option>
<option value="14" <?php if($day_start == 14) echo 'selected="selected"'; ?> >14</option>
<option value="15" <?php if($day_start == 15) echo 'selected="selected"'; ?> >15</option>
<option value="16" <?php if($day_start == 16) echo 'selected="selected"'; ?> >16</option>
<option value="17" <?php if($day_start == 17) echo 'selected="selected"'; ?> >17</option>
<option value="18" <?php if($day_start == 18) echo 'selected="selected"'; ?> >18</option>
<option value="19" <?php if($day_start == 19) echo 'selected="selected"'; ?> >19</option>
<option value="20" <?php if($day_start == 20) echo 'selected="selected"'; ?> >20</option>
<option value="21" <?php if($day_start == 21) echo 'selected="selected"'; ?> >21</option>
<option value="22" <?php if($day_start == 22) echo 'selected="selected"'; ?> >22</option>
<option value="23" <?php if($day_start == 23) echo 'selected="selected"'; ?> >23</option>
<option value="24" <?php if($day_start == 24) echo 'selected="selected"'; ?> >24</option>
<option value="25" <?php if($day_start == 25) echo 'selected="selected"'; ?> >25</option>
<option value="26" <?php if($day_start == 26) echo 'selected="selected"'; ?> >26</option>
<option value="27" <?php if($day_start == 27) echo 'selected="selected"'; ?> >27</option>
<option value="28" <?php if($day_start == 28) echo 'selected="selected"'; ?> >28</option>
<option value="29" <?php if($day_start == 29) echo 'selected="selected"'; ?> >29</option>
<option value="30" <?php if($day_start == 30) echo 'selected="selected"'; ?> >30</option>
<option value="31" <?php if($day_start == 31) echo 'selected="selected"'; ?> >31</option>
</select>
/
<select name="month_start">
<option value="1">01</option>
<option value="2" <?php if($month_start == 2) echo 'selected="selected"'; ?> >02</option>
<option value="3" <?php if($month_start == 3) echo 'selected="selected"'; ?> >03</option>
<option value="4" <?php if($month_start == 4) echo 'selected="selected"'; ?> >04</option>
<option value="5" <?php if($month_start == 5) echo 'selected="selected"'; ?> >05</option>
<option value="6" <?php if($month_start == 6) echo 'selected="selected"'; ?> >06</option>
<option value="7" <?php if($month_start == 7) echo 'selected="selected"'; ?> >07</option>
<option value="8" <?php if($month_start == 8) echo 'selected="selected"'; ?> >08</option>
<option value="9" <?php if($month_start == 9) echo 'selected="selected"'; ?> >09</option>
<option value="10" <?php if($month_start == 10) echo 'selected="selected"'; ?> >10</option>
<option value="11" <?php if($month_start == 11) echo 'selected="selected"'; ?> >11</option>
<option value="12" <?php if($month_start == 12) echo 'selected="selected"'; ?> >12</option>
</select>
/
<select name="year_start">
<?php
for($i=$thisYear-5;$i <= ($thisYear+5);$i++)
{ ?>
<option value="<?php echo $i; ?>" <?php if($year_start == $i) echo 'selected="selected"'; ?> ><?php echo $i; ?></option>
<?php
} ?>
</select>
</div>
<div class="col-sm-3"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo get_lang('DateEnd') ?></label>
<div class="col-sm-6">
<select name="day_end">
<option value="0">--</option>
<option value="1" <?php if($day_end == 1) echo 'selected="selected"'; ?> >01</option>
<option value="2" <?php if($day_end == 2) echo 'selected="selected"'; ?> >02</option>
<option value="3" <?php if($day_end == 3) echo 'selected="selected"'; ?> >03</option>
<option value="4" <?php if($day_end == 4) echo 'selected="selected"'; ?> >04</option>
<option value="5" <?php if($day_end == 5) echo 'selected="selected"'; ?> >05</option>
<option value="6" <?php if($day_end == 6) echo 'selected="selected"'; ?> >06</option>
<option value="7" <?php if($day_end == 7) echo 'selected="selected"'; ?> >07</option>
<option value="8" <?php if($day_end == 8) echo 'selected="selected"'; ?> >08</option>
<option value="9" <?php if($day_end == 9) echo 'selected="selected"'; ?> >09</option>
<option value="10" <?php if($day_end == 10) echo 'selected="selected"'; ?> >10</option>
<option value="11" <?php if($day_end == 11) echo 'selected="selected"'; ?> >11</option>
<option value="12" <?php if($day_end == 12) echo 'selected="selected"'; ?> >12</option>
<option value="13" <?php if($day_end == 13) echo 'selected="selected"'; ?> >13</option>
<option value="14" <?php if($day_end == 14) echo 'selected="selected"'; ?> >14</option>
<option value="15" <?php if($day_end == 15) echo 'selected="selected"'; ?> >15</option>
<option value="16" <?php if($day_end == 16) echo 'selected="selected"'; ?> >16</option>
<option value="17" <?php if($day_end == 17) echo 'selected="selected"'; ?> >17</option>
<option value="18" <?php if($day_end == 18) echo 'selected="selected"'; ?> >18</option>
<option value="19" <?php if($day_end == 19) echo 'selected="selected"'; ?> >19</option>
<option value="20" <?php if($day_end == 20) echo 'selected="selected"'; ?> >20</option>
<option value="21" <?php if($day_end == 21) echo 'selected="selected"'; ?> >21</option>
<option value="22" <?php if($day_end == 22) echo 'selected="selected"'; ?> >22</option>
<option value="23" <?php if($day_end == 23) echo 'selected="selected"'; ?> >23</option>
<option value="24" <?php if($day_end == 24) echo 'selected="selected"'; ?> >24</option>
<option value="25" <?php if($day_end == 25) echo 'selected="selected"'; ?> >25</option>
<option value="26" <?php if($day_end == 26) echo 'selected="selected"'; ?> >26</option>
<option value="27" <?php if($day_end == 27) echo 'selected="selected"'; ?> >27</option>
<option value="28" <?php if($day_end == 28) echo 'selected="selected"'; ?> >28</option>
<option value="29" <?php if($day_end == 29) echo 'selected="selected"'; ?> >29</option>
<option value="30" <?php if($day_end == 30) echo 'selected="selected"'; ?> >30</option>
<option value="31" <?php if($day_end == 31) echo 'selected="selected"'; ?> >31</option>
</select>
/
<select name="month_end">
<option value="0">--</option>
<option value="1" <?php if($month_end == 1) echo 'selected="selected"'; ?> >01</option>
<option value="2" <?php if($month_end == 2) echo 'selected="selected"'; ?> >02</option>
<option value="3" <?php if($month_end == 3) echo 'selected="selected"'; ?> >03</option>
<option value="4" <?php if($month_end == 4) echo 'selected="selected"'; ?> >04</option>
<option value="5" <?php if($month_end == 5) echo 'selected="selected"'; ?> >05</option>
<option value="6" <?php if($month_end == 6) echo 'selected="selected"'; ?> >06</option>
<option value="7" <?php if($month_end == 7) echo 'selected="selected"'; ?> >07</option>
<option value="8" <?php if($month_end == 8) echo 'selected="selected"'; ?> >08</option>
<option value="9" <?php if($month_end == 9) echo 'selected="selected"'; ?> >09</option>
<option value="10" <?php if($month_end == 10) echo 'selected="selected"'; ?> >10</option>
<option value="11" <?php if($month_end == 11) echo 'selected="selected"'; ?> >11</option>
<option value="12" <?php if($month_end == 12) echo 'selected="selected"'; ?> >12</option>
</select>
/
<select name="year_end">
<option value="0">----</option>
<?php
for($i=$thisYear-5;$i <= ($thisYear+5);$i++)
{ ?>
<option value="<?php echo $i; ?>" <?php if($year_end == $i) echo 'selected="selected"'; ?> ><?php echo $i; ?></option>
<?php
} ?>
</select>
</div>
<div class="col-sm-3"></div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-6">
<button class="btn btn-success" type="submit" value="<?php echo get_lang('ModifyThisSession') ?>">
<?php echo get_lang('ModifyThisSession') ?>
</button>
</div>
</div>
</form>
</div>
</div>
<br>
</div>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<button class="save" type="submit" value="<?php echo get_lang('ModifyThisSession') ?>">
<?php echo get_lang('ModifyThisSession') ?></button>
</td>
</tr>
</table>
</form>
<script>
<?php if($year_start=="0000") echo "setDisable(document.form.nolimit);\r\n"; ?>
function setDisable(select){

Loading…
Cancel
Save