diff options
author | Bart Visscher <bartv@thisnet.nl> | 2011-09-14 22:26:01 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2011-09-14 23:36:23 +0200 |
commit | cb9a67906d53110f8c98ef6a8743fc2ecc8ba13f (patch) | |
tree | 63c48c776f62a917be18af166d34cb76bcf6e838 /apps | |
parent | 68758f9b2c4000056fb97fb9002e9030b97b9932 (diff) | |
download | nextcloud-server-cb9a67906d53110f8c98ef6a8743fc2ecc8ba13f.tar.gz nextcloud-server-cb9a67906d53110f8c98ef6a8743fc2ecc8ba13f.zip |
Move event form field to part.eventform template
Diffstat (limited to 'apps')
-rw-r--r-- | apps/calendar/templates/part.editevent.php | 100 | ||||
-rw-r--r-- | apps/calendar/templates/part.eventform.php | 126 | ||||
-rw-r--r-- | apps/calendar/templates/part.newevent.php | 136 |
3 files changed, 134 insertions, 228 deletions
diff --git a/apps/calendar/templates/part.editevent.php b/apps/calendar/templates/part.editevent.php index 8a85652442c..e722515c9d0 100644 --- a/apps/calendar/templates/part.editevent.php +++ b/apps/calendar/templates/part.editevent.php @@ -1,101 +1,7 @@ -<div id="editevent" title="<?php echo $l -> t("Edit an event");?>"> - <table id="editevent_table" width="100%"> - <tr> - <td width="75px"><?php echo $l -> t("Title");?>:</td> - <td> - <input type="text" style="width:350px;" size="100" placeholder="Title of the Event" maxlength="100" /> - </td> - </tr> - <tr> - <td width="75px"><?php echo $l -> t("Location");?>:</td> - <td> - <input type="text" style="width:350px;" size="100" placeholder="Location of the Event" maxlength="100" /> - </td> - </tr> - </table> - <table> - <tr> - <td width="75px"><?php echo $l -> t("Category");?>:</td> - <td> - <select class="formselect" id="formcategorie_select" style="width:140px;"> - <option>Coming soon</option><!-- - <option>Work</option> - <option>Call</option>--> - </select></td> - <td width="75px"> <?php echo $l -> t("Calendar");?>:</td> - <td> - <select class="formselect" id="formcalendar_select" style="width:140px;"> - <option>Coming soon</option><!-- - <option>Calendar 1</option> - <option>Calendar 2</option> - <option>Calendar 3</option>--> - </select></td> - </tr> - </table> - <hr> - <table> - <tr> - <td width="75px"></td> - <td> - <input onclick="lock_time();" type="checkbox" id="newcalendar_allday_checkbox"> - <label for="newcalendar_allday_checkbox"><?php echo $l -> t("All Day Event");?></label></td> - </tr> - <tr> - <?php $day = substr($_GET["d"], 0, 2); - $month = substr($_GET["d"], 2, 2); - $year = substr($_GET["d"], 4, 4); - ?> - <td width="75px"><?php echo $l -> t("From");?>:</td> - <td> - <input type="text" value="<?php echo $day . "-" . $month . "-" . $year;?>" id="from"> - - <input type="time" value="<?php echo date("H:i");?>" id="fromtime"> - </td><!--use jquery--> - </tr> - <tr> - <?php - if(date("H") == 23) {$day++; - $time = 0; - } else {$time = date("H") + 1; - } - ?> - <td width="75px"><?php echo $l -> t("To");?>:</td> - <td> - <input type="text" value="<?php echo $day . "-" . $month . "-" . $year;?>" id="to"> - - <input type="time" value="<?php echo $time . date(":i");?>" id="totime"> - </td><!--use jquery--> - </tr> - <tr> - <td width="75px"><?php echo $l -> t("Repeat");?>:</td> - <td> - <select class="formselect" id="formrepeat_select" style="width:350px;"> - <option id="doesnotrepeat" selected="selected">Does not repeat</option> - <option>Daily</option> - <option>Weekly</option> - <option>Every Weekday</option> - <option>Bi-Weekly</option> - <option>Monthly</option> - <option>Yearly</option> - </select></td> - </tr> - </table> - <hr> - <table> - <tr> - <td width="75px"><?php echo $l -> t("Attendees");?>:</td> - <td style="height: 50px;"></td> - </tr> - </table> - <hr> - <table> - <tr> - <td width="75px" style="vertical-align: top;"><?php echo $l -> t("Description");?>:</td> - <td> <textarea style="width:350px;height: 150px;"placeholder="Description of the Event"></textarea></td> - </tr> - </table> +<div id="editevent" title="<?php echo $l->t("Edit an event");?>"> +<?php echo $this->inc("part.eventform"); ?> <span id="editevent_actions"> - <input type="button" style="float: left;" value="<?php echo $l -> t("Submit");?>"> + <input type="button" style="float: left;" value="<?php echo $l->t("Submit");?>"> </span> </div> <script type="text/javascript"> diff --git a/apps/calendar/templates/part.eventform.php b/apps/calendar/templates/part.eventform.php new file mode 100644 index 00000000000..772cc2c7915 --- /dev/null +++ b/apps/calendar/templates/part.eventform.php @@ -0,0 +1,126 @@ + <table width="100%"> + <tr> + <th width="75px"><?php echo $l->t("Title");?>:</th> + <td> + <input type="text" style="width:350px;" size="100" placeholder="<?php echo $l->t("Title of the Event");?>" maxlength="100" id="newevent_title"/> + </td> + </tr> + <tr> + <th width="75px"><?php echo $l->t("Location");?>:</th> + <td> + <input type="text" style="width:350px;" size="100" placeholder="<?php echo $l->t("Location of the Event");?>" maxlength="100" id="newevent_location" /> + </td> + </tr> + </table> + <table> + <tr> + <th width="75px"><?php echo $l->t("Category");?>:</th> + <td> + <select class="formselect" id="formcategorie_select" style="width:140px;" id="newevent_cat"> + <option><?php echo $l->t("None"); ?></option> + <option><?php echo $l->t("Birthday"); ?></option> + <option><?php echo $l->t("Business"); ?></option> + <option><?php echo $l->t("Call"); ?></option> + <option><?php echo $l->t("Clients"); ?></option> + <option><?php echo $l->t("Deliverer"); ?></option> + <option><?php echo $l->t("Holidays"); ?></option> + <option><?php echo $l->t("Ideas"); ?></option> + <option><?php echo $l->t("Journey"); ?></option> + <option><?php echo $l->t("Jubilee"); ?></option> + <option><?php echo $l->t("Meeting"); ?></option> + <option><?php echo $l->t("Other"); ?></option> + <option><?php echo $l->t("Personal"); ?></option> + <option><?php echo $l->t("Projects"); ?></option> + <option><?php echo $l->t("Questions"); ?></option> + <option><?php echo $l->t("Work"); ?></option> + </select></td> + <th width="75px"> <?php echo $l->t("Calendar");?>:</th> + <td> + <select class="formselect" id="formcalendar_select" style="width:140px;" id="newevent_cal"> + <?php + $option_calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser()); + for($i = 0; $i < count($option_calendars); $i++){ + echo "<option id=\"option_" . $option_calendars[$i]["id"] . "\">" . $option_calendars[$i]["displayname"] . "</option>"; + } + ?> + </select></td> + </tr> + </table> + <hr> + <?php $day = substr($_GET["d"], 0, 2); + $month = substr($_GET["d"], 2, 2); + $year = substr($_GET["d"], 4, 4); + $time = $_GET["t"]; + if($time != "undefined" && !is_nan($_GET["t"]) && $_GET["t"] != "allday"){ + $time = $_GET["t"]; + $minutes = "00"; + }elseif($_GET["t"] == "allday"){ + $time = "0"; + $minutes = "00"; + $allday = true; + }else{ + $time = date("H"); + $minutes = date("i"); + } + ?> + <table> + <tr> + <th width="75px"></th> + <td> + <input onclick="lock_time();" type="checkbox"<?php if($allday == true){echo "checked=\"checked\"";} ?> id="newcalendar_allday_checkbox"> + <?php if($allday == true){echo "<script type=\"text/javascript\">document.getElementById(\"fromtime\").disabled = true;document.getElementById(\"totime\").disabled = true;document.getElementById(\"fromtime\").style.color = \"#A9A9A9\";document.getElementById(\"totime\").style.color = \"#A9A9A9\";</script>";}?> + <label for="newcalendar_allday_checkbox"><?php echo $l->t("All Day Event");?></label></td> + </tr> + <tr> + + <th width="75px"><?php echo $l->t("From");?>:</th> + <td> + <input type="text" value="<?php echo $day . "-" . $month . "-" . $year;?>" id="from"> + + <input type="time" value="<?php echo date("H:i");?>" id="fromtime"> + </td><!--use jquery--> + </tr> + <tr> + <?php + if(date("H") == 23) { + $day++; + $time = 0; + } else { + $time++; + } + ?> + <th width="75px"><?php echo $l->t("To");?>:</th> + <td> + <input type="text" value="<?php echo $day . "-" . $month . "-" . $year;?>" id="to"> + + <input type="time" value="<?php echo $time . ":" . $minutes;?>" id="totime"> + </td><!--use jquery--> + </tr><!-- + <tr> + <th width="75px"><?php echo $l->t("Repeat");?>:</th> + <td> + <select class="formselect" id="formrepeat_select" style="width:350px;"> + <option id="repeat_doesnotrepeat" selected="selected"><?php echo $l->t("Does not repeat");?></option> + <option id="repeat_daily"><?php echo $l->t("Daily");?></option> + <option id="repeat_weekly"><?php echo $l->t("Weekly");?></option> + <option id="repeat_weekday"><?php echo $l->t("Every Weekday");?></option> + <option id="repeat_biweekly"><?php echo $l->t("Bi-Weekly");?></option> + <option id="repeat_monthly"><?php echo $l->t("Monthly");?></option> + <option id="repeat_yearly"><?php echo $l->t("Yearly");?></option> + </select></td> + </tr>--> + </table> + <hr> + <table><!-- + <tr> + <th width="75px"><?php echo $l->t("Attendees");?>:</th> + <td style="height: 50px;"></td> + </tr> + </table> + <hr>--> + <table> + <tr> + <th width="75px" style="vertical-align: top;"><?php echo $l->t("Description");?>:</th> + <td><textarea style="width:350px;height: 150px;"placeholder="<?php echo $l->t("Description of the Event");?>" id="description"></textarea></td> + </tr> + </table> diff --git a/apps/calendar/templates/part.newevent.php b/apps/calendar/templates/part.newevent.php index 6260f2337ef..a1c48d2c22b 100644 --- a/apps/calendar/templates/part.newevent.php +++ b/apps/calendar/templates/part.newevent.php @@ -1,135 +1,9 @@ - -<div id="newevent" title="<?php echo $l -> t("Create a new event");?>"> - <form id="newevent_form"> - <table id="newevent_table" width="100%"> - <tr> - <td width="75px"><?php echo $l -> t("Title");?>:</td> - <td> - <input type="text" style="width:350px;" size="100" placeholder="<?php echo $l -> t("Title of the Event");?>" maxlength="100" id="newevent_title"/> - </td> - </tr> - <tr> - <td width="75px"><?php echo $l -> t("Location");?>:</td> - <td> - <input type="text" style="width:350px;" size="100" placeholder="<?php echo $l -> t("Location of the Event");?>" maxlength="100" id="newevent_location" /> - </td> - </tr> - </table> - <table> - <tr> - <td width="75px"><?php echo $l -> t("Category");?>:</td> - <td> - <select class="formselect" id="formcategorie_select" style="width:140px;" id="newevent_cat"> - <option><?php echo $l->t("None"); ?></option> - <option><?php echo $l->t("Birthday"); ?></option> - <option><?php echo $l->t("Business"); ?></option> - <option><?php echo $l->t("Call"); ?></option> - <option><?php echo $l->t("Clients"); ?></option> - <option><?php echo $l->t("Deliverer"); ?></option> - <option><?php echo $l->t("Holidays"); ?></option> - <option><?php echo $l->t("Ideas"); ?></option> - <option><?php echo $l->t("Journey"); ?></option> - <option><?php echo $l->t("Jubilee"); ?></option> - <option><?php echo $l->t("Meeting"); ?></option> - <option><?php echo $l->t("Other"); ?></option> - <option><?php echo $l->t("Personal"); ?></option> - <option><?php echo $l->t("Projects"); ?></option> - <option><?php echo $l->t("Questions"); ?></option> - <option><?php echo $l->t("Work"); ?></option> - </select></td> - <td width="75px"> <?php echo $l -> t("Calendar");?>:</td> - <td> - <select class="formselect" id="formcalendar_select" style="width:140px;" id="newevent_cal"> - <?php - $option_calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser()); - for($i = 0; $i < count($option_calendars); $i++){ - echo "<option id=\"option_" . $option_calendars[$i]["id"] . "\">" . $option_calendars[$i]["displayname"] . "</option>"; - } - ?> - </select></td> - </tr> - </table> - <hr> - <?php $day = substr($_GET["d"], 0, 2); - $month = substr($_GET["d"], 2, 2); - $year = substr($_GET["d"], 4, 4); - $time = $_GET["t"]; - if($time != "undefined" && !is_nan($_GET["t"]) && $_GET["t"] != "allday"){ - $time = $_GET["t"]; - $minutes = "00"; - }elseif($_GET["t"] == "allday"){ - $time = "0"; - $minutes = "00"; - $allday = true; - }else{ - $time = date("H"); - $minutes = date("i"); - } - ?> - <table> - <tr> - <td width="75px"></td> - <td> - <input onclick="lock_time();" type="checkbox"<?php if($allday == true){echo "checked=\"checked\"";} ?> id="newcalendar_allday_checkbox"> - <?php if($allday == true){echo "<script type=\"text/javascript\">document.getElementById(\"fromtime\").disabled = true;document.getElementById(\"totime\").disabled = true;document.getElementById(\"fromtime\").style.color = \"#A9A9A9\";document.getElementById(\"totime\").style.color = \"#A9A9A9\";</script>";}?> - <label for="newcalendar_allday_checkbox"><?php echo $l -> t("All Day Event");?></label></td> - </tr> - <tr> - - <td width="75px"><?php echo $l -> t("From");?>:</td> - <td> - <input type="text" value="<?php echo $day . "-" . $month . "-" . $year;?>" id="from"> - - <input type="time" value="<?php echo $time . ":" . $minutes;?>" id="fromtime"> - </td><!--use jquery--> - </tr> - <tr> - <?php - if(date("H") == 23) { - $day++; - $time = 0; - } else { - $time++; - } - ?> - <td width="75px"><?php echo $l -> t("To");?>:</td> - <td> - <input type="text" value="<?php echo $day . "-" . $month . "-" . $year;?>" id="to"> - - <input type="time" value="<?php echo $time . ":" . $minutes;?>" id="totime"> - </td><!--use jquery--> - </tr><!-- - <tr> - <td width="75px"><?php echo $l -> t("Repeat");?>:</td> - <td> - <select class="formselect" id="formrepeat_select" style="width:350px;"> - <option id="repeat_doesnotrepeat" selected="selected"><?php echo $l->t("Does not repeat");?></option> - <option id="repeat_daily"><?php echo $l->t("Daily");?></option> - <option id="repeat_weekly"><?php echo $l->t("Weekly");?></option> - <option id="repeat_weekday"><?php echo $l->t("Every Weekday");?></option> - <option id="repeat_biweekly"><?php echo $l->t("Bi-Weekly");?></option> - <option id="repeat_monthly"><?php echo $l->t("Monthly");?></option> - <option id="repeat_yearly"><?php echo $l->t("Yearly");?></option> - </select></td> - </tr>--> - </table> - <hr> - <table><!-- - <tr> - <td width="75px"><?php echo $l -> t("Attendees");?>:</td> - <td style="height: 50px;"></td> - </tr> - </table> - <hr>--> - <table> - <tr> - <td width="75px" style="vertical-align: top;"><?php echo $l -> t("Description");?>:</td> - <td><textarea style="width:350px;height: 150px;"placeholder="<?php echo $l->t("Description of the Event");?>" id="description"></textarea></td> - </tr> - </table> +<div id="newevent" title="<?php echo $l->t("Create a new event");?>"> + <form> +<?php echo $this->inc("part.eventform"); ?> <div style="width: 100%;text-align: center;color: #FF1D1D;" id="errorbox"></div> <span id="newcalendar_actions"> - <input type="button" class="submit" style="float: left;" value="<?php echo $l -> t("Submit");?>" onclick="validate_newevent_form();"> + <input type="button" class="submit" style="float: left;" value="<?php echo $l->t("Submit");?>" onclick="validate_newevent_form();"> </span> </form> </div> @@ -213,4 +87,4 @@ } },"json"); } -</script>
\ No newline at end of file +</script> |