[svn r19700] form titles

form consistency
style improvement
skala
Patrick Cool 17 years ago
parent b5d160a14d
commit 73d17d023e
  1. 7
      main/document/create_document.php
  2. 25
      main/document/document.inc.php
  3. 5
      main/document/document.php
  4. 8
      main/document/quota.php
  5. 4
      main/document/slideshow.php
  6. 58
      main/document/slideshowoptions.php
  7. 158
      main/link/link.php

@ -1,4 +1,4 @@
<?php // $Id: create_document.php 19676 2009-04-09 09:14:37Z pcool $ <?php // $Id: create_document.php 19700 2009-04-10 11:07:37Z pcool $
/* /*
============================================================================== ==============================================================================
@ -551,6 +551,11 @@ else
{ {
Display :: display_header($nameTools, "Doc"); Display :: display_header($nameTools, "Doc");
//api_display_tool_title($nameTools); //api_display_tool_title($nameTools);
// actions
echo '<div class="actions">';
// link back to the documents overview
echo '<a href="document.php?curdirpath='.Security::remove_XSS($_GET['dir']).'">'.Display::return_icon('back.png').get_lang('Back').' '.get_lang('To').' '.get_lang('DocumentsOverview').'</a>';
echo '</div>';
$form->display(); $form->display();
Display :: display_footer(); Display :: display_footer();
} }

@ -1,4 +1,4 @@
<?php // $Id: document.inc.php 19677 2009-04-09 09:49:45Z pcool $ <?php // $Id: document.inc.php 19700 2009-04-10 11:07:37Z pcool $
/* /*
============================================================================== ==============================================================================
@ -368,7 +368,14 @@ function build_move_to_selector($folders,$curdirpath,$move_file,$group_dir='')
{ {
$form = '<form name="move_to" action="'.api_get_self().'" method="post">'."\n"; $form = '<form name="move_to" action="'.api_get_self().'" method="post">'."\n";
$form .= '<input type="hidden" name="move_file" value="'.$move_file.'" />'."\n"; $form .= '<input type="hidden" name="move_file" value="'.$move_file.'" />'."\n";
$form .= get_lang('MoveTo').' <select name="move_to">'."\n";
$form .= '<div class="row">';
$form .= ' <div class="label">';
$form .= get_lang('MoveTo');
$form .= ' </div>';
$form .= ' <div class="formw">';
$form .= ' <select name="move_to">'."\n";
//group documents cannot be uploaded in the root //group documents cannot be uploaded in the root
if($group_dir=='') if($group_dir=='')
@ -418,9 +425,19 @@ function build_move_to_selector($folders,$curdirpath,$move_file,$group_dir='')
} }
} }
$form .= '</select>'."\n"; $form .= ' </select>'."\n";
$form .= '<button type="submit" name="move_file_submit">'.get_lang('MoveFile').'</button>'."\n"; $form .= ' </div>';
$form .= '<div class="row">';
$form .= ' <div class="label"></div>';
$form .= ' <div class="formw">';
$form .= ' <button type="submit" name="move_file_submit">'.get_lang('MoveFile').'</button>'."\n";
$form .= ' </div>';
$form .= '</div>';
$form .= '</form>'; $form .= '</form>';
$form .= '<div style="clear: both; margin-bottom: 10px;"></div>';
return $form; return $form;
} }

@ -1,4 +1,4 @@
<?php // $Id: document.php 19694 2009-04-09 21:45:33Z ivantcholakov $ <?php // $Id: document.php 19700 2009-04-10 11:07:37Z pcool $
/* /*
============================================================================== ==============================================================================
Dokeos - elearning and course management software Dokeos - elearning and course management software
@ -382,7 +382,8 @@ if($is_allowed_to_edit || $group_member_with_upload_rights) // TEACHER ONLY
if(DocumentManager::get_document_id($_course,$_GET['move'])) if(DocumentManager::get_document_id($_course,$_GET['move']))
{ {
$folders = DocumentManager::get_all_document_folders($_course,$to_group_id,$is_allowed_to_edit || $group_member_with_upload_rights); $folders = DocumentManager::get_all_document_folders($_course,$to_group_id,$is_allowed_to_edit || $group_member_with_upload_rights);
Display::display_normal_message(build_move_to_selector($folders,$_GET['curdirpath'],$_GET['move'],$group_properties['directory']),false); echo '<div class="row"><div class="form_header">'.get_lang('Move').'</div></div>';
echo build_move_to_selector($folders,$_GET['curdirpath'],$_GET['move'],$group_properties['directory']);
} }

@ -1,4 +1,4 @@
<?php // $Id: quota.php 19676 2009-04-09 09:14:37Z pcool $ <?php // $Id: quota.php 19700 2009-04-10 11:07:37Z pcool $
/* /*
============================================================================== ==============================================================================
Dokeos - elearning and course management software Dokeos - elearning and course management software
@ -107,6 +107,12 @@ function display_quota($course_quota, $already_consumed_space)
echo $message; echo $message;
} }
// actions
echo '<div class="actions">';
// link back to the documents overview
echo '<a href="document.php">'.Display::return_icon('back.png').get_lang('Back').' '.get_lang('To').' '.get_lang('DocumentsOverview').'</a>';
echo '</div>';
// getting the course quota // getting the course quota
$course_quota = DocumentManager::get_course_quota(); $course_quota = DocumentManager::get_course_quota();

@ -1,4 +1,4 @@
<?php // $Id: slideshow.php 19656 2009-04-08 20:08:10Z iflorespaz $ <?php // $Id: slideshow.php 19700 2009-04-10 11:07:37Z pcool $
/* /*
============================================================================== ==============================================================================
@ -117,7 +117,7 @@ function MM_openBrWindow(theURL,winName,features) { //v2.0
<?php <?php
// exit the slideshow // exit the slideshow
echo '<a href="document.php?action=exit_slideshow&curdirpath='.$pathurl.'"><img src="'.api_get_path(WEB_IMG_PATH).'folder_up.gif" alt="">'.get_lang('_exit_slideshow').'</a>&nbsp;'; echo '<a href="document.php?action=exit_slideshow&curdirpath='.$pathurl.'">'.Display::return_icon('back.png').get_lang('Back').' '.get_lang('To').' '.get_lang('DocumentsOverview').'</a>&nbsp;';
// show thumbnails // show thumbnails
if ($slide_id <> "all") { if ($slide_id <> "all") {

@ -1,4 +1,4 @@
<?php // $Id: slideshowoptions.php 19616 2009-04-07 22:29:18Z iflorespaz $ <?php // $Id: slideshowoptions.php 19700 2009-04-10 11:07:37Z pcool $
/* /*
============================================================================== ==============================================================================
Dokeos - elearning and course management software Dokeos - elearning and course management software
@ -133,25 +133,38 @@ function disableresizing() { //v2.0
//--> //-->
</script> </script>
<p></p>
<?php echo '<div class="actions-title">'.ucfirst(get_lang('_slideshow_options')).'</div>'; ?> <?php
echo '<div class="actions">';
echo '<a href="document.php?action=exit_slideshow&curdirpath='.$pathurl.'">'.Display::return_icon('back.png').get_lang('Back').' '.get_lang('To').' '.get_lang('DocumentsOverview').'</a>';
echo '<a href="slideshow.php?curdirpath='.$pathurl.'">'.Display::return_icon('images_gallery.gif').get_lang('Back').' '.get_lang('To').' '.get_lang('Slideshow').'</a>';
echo '</div>';
?>
<form action="slideshow.php?curdirpath=<?php echo $pathurl; ?>" method="post" name="options" id="options"> <form action="slideshow.php?curdirpath=<?php echo $pathurl; ?>" method="post" name="options" id="options">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <div class="row"><div class="form_header"><?php echo get_lang('_slideshow_options') ?></div></div>
<td valign="top"><input class="checkbox" name="radio_resizing" type="radio" onClick="disableresizing()" value="noresizing"
<div class="row">
<div class="label">
<input class="checkbox" name="radio_resizing" type="radio" onClick="disableresizing()" value="noresizing"
<?php <?php
$image_resizing=$_SESSION["image_resizing"]; $image_resizing=$_SESSION["image_resizing"];
if($image_resizing=="noresizing" or $image_resizing=="") if($image_resizing=="noresizing" or $image_resizing=="")
{ {
echo " checked"; echo " checked";
} }
?> ?>>
></td> </div>
<td><?php echo get_lang('_no_resizing');?><br><?php echo get_lang('_no_resizing_comment');?> <div class="formw"><?php echo get_lang('_no_resizing');?><br><?php echo get_lang('_no_resizing_comment');?>
</td> </div>
</tr> </div>
<tr>
<td valign="top"><input class="checkbox" name="radio_resizing" type="radio" onClick="enableresizing()" value="resizing"
<div class="row">
<div class="label">
<input class="checkbox" name="radio_resizing" type="radio" onClick="enableresizing()" value="resizing"
<?php <?php
$image_resizing=$_SESSION["image_resizing"]; $image_resizing=$_SESSION["image_resizing"];
if($image_resizing=="resizing") if($image_resizing=="resizing")
@ -160,10 +173,12 @@ function disableresizing() { //v2.0
$width=$_SESSION["image_resizing_width"]; $width=$_SESSION["image_resizing_width"];
$height=$_SESSION["image_resizing_height"]; $height=$_SESSION["image_resizing_height"];
} }
?>></td> ?>>
<td><?php echo get_lang('_resizing');?><br><?php echo get_lang('_resizing_comment');?><br> </div>
<div class="formw">
<?php echo get_lang('_resizing');?><br><?php echo get_lang('_resizing_comment');?><br>
<?php echo get_lang('_width');?>: <?php echo get_lang('_width');?>:
<input name="width" type="text" id="width" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="width" type="text" id="width"
<?php <?php
if ($image_resizing=="resizing") if ($image_resizing=="resizing")
{ {
@ -185,14 +200,9 @@ function disableresizing() { //v2.0
else else
{echo " class=\"disabled_input\""; } {echo " class=\"disabled_input\""; }
?> ?>
></td> >
</tr> </div>
<tr> </div>
<td valign="top">&nbsp;</td>
<td><button type="submit" class="save" name="Submit" value="<?php echo get_lang('Ok'); ?>"><?php echo get_lang('Save'); ?></button></td>
</tr>
</table>
</form> </form>
<?php <?php
Display::display_footer(); Display::display_footer();

@ -1,4 +1,4 @@
<?php // $Id: link.php 19694 2009-04-09 21:45:33Z ivantcholakov $ <?php // $Id: link.php 19700 2009-04-10 11:07:37Z pcool $
/* /*
============================================================================== ==============================================================================
Dokeos - elearning and course management software Dokeos - elearning and course management software
@ -191,11 +191,16 @@ $fck_attribute = null; // Clearing this global variable immediatelly after it ha
if (is_allowed_to_edit() and isset($_GET['action'])) if (is_allowed_to_edit() and isset($_GET['action']))
{ {
echo '<div class="actions">';
echo '<a href="link.php?cidReq='.Security::remove_XSS($_GET['cidReq']).'&amp;urlview='.Security::remove_XSS($_GET['urlview']).'">'.Display::return_icon('back.png').get_lang('Back').' '.get_lang('To').' '.get_lang('LinksOverview').'</a>';
echo '</div>';
// Displaying the correct title and the form for adding a category or link. This is only shown when nothing // Displaying the correct title and the form for adding a category or link. This is only shown when nothing
// has been submitted yet, hence !isset($submitLink) // has been submitted yet, hence !isset($submitLink)
if (($_GET['action']=="addlink" or $_GET['action']=="editlink") and empty($_POST['submitLink'])) if (($_GET['action']=="addlink" or $_GET['action']=="editlink") and empty($_POST['submitLink']))
{ {
echo '<div class="actions-title">'; echo '<div class="row">';
if ($_GET['action']=="addlink") if ($_GET['action']=="addlink")
{echo '<div class="form_header">'.get_lang("LinkAdd").'</div>';} {echo '<div class="form_header">'.get_lang("LinkAdd").'</div>';}
else else
@ -209,42 +214,83 @@ if (is_allowed_to_edit() and isset($_GET['action']))
echo "<input type=\"hidden\" name=\"id\" value=\"".Security::remove_XSS($_GET['id'])."\" />"; echo "<input type=\"hidden\" name=\"id\" value=\"".Security::remove_XSS($_GET['id'])."\" />";
} }
echo "<table><tr>" echo ' <div class="row">
. "<td align=\"right\">URL<span class=\"required\">*</span> :</td>" <div class="label">
. "<td><input type=\"text\" name=\"urllink\" size=\"50\" value=\"" . (empty($urllink)?'http://':htmlentities($urllink)) . "\" /></td>" . "</tr>"; <span class="form_required">*</span> '.get_lang('Url').'
echo "<tr>" </div>
. "<td align=\"right\">" . get_lang("LinkName") . " :</td>" <div class="formw">
. "<td><input type=\"text\" name=\"title\" size=\"50\" value=\"" . htmlentities($title,ENT_QUOTES,$charset) . "\" /></td>" <input type="text" name="urllink" size="50" value="' . (empty($urllink)?'http://':htmlentities($urllink)) . '" />
. "</tr>" </div>
. "<tr>" . </div>';
"<td align=\"right\" valign=\"top\">" . get_lang("Description") . " :</td>" .
"<td><textarea rows=\"3\" cols=\"50\" name=\"description\">" . echo ' <div class="row">
htmlentities($description,ENT_QUOTES,$charset) . "</textarea></td></tr>"; <div class="label">
'.get_lang('LinkName').'
</div>
<div class="formw">
<input type="text" name="title" size="50" value="' . htmlentities($title,ENT_QUOTES,$charset) . '" />
</div>
</div>';
echo ' <div class="row">
<div class="label">
'.get_lang('Description').'
</div>
<div class="formw">
<textarea rows="3" cols="50" name="description">' . htmlentities($description,ENT_QUOTES,$charset) . '</textarea>
</div>
</div>';
$sqlcategories="SELECT * FROM ".$tbl_categories." ORDER BY display_order DESC"; $sqlcategories="SELECT * FROM ".$tbl_categories." ORDER BY display_order DESC";
$resultcategories = api_sql_query($sqlcategories)or die("Error: " . mysql_error()); $resultcategories = api_sql_query($sqlcategories)or die("Error: " . mysql_error());
if (Database::num_rows($resultcategories)) { if (Database::num_rows($resultcategories)) {
echo "<tr><td align=\"right\">".get_lang("Category")." :</td><td>", echo ' <div class="row">
"<select name=\"selectcategory\">", <div class="label">
"<option value=\"0\">--</option>"; '.get_lang('Category').'
</div>
while ($myrow = Database::fetch_array($resultcategories)) { <div class="formw">';
echo "<option value=\"".$myrow["id"]."\""; echo ' <select name="selectcategory">';
echo ' <option value="0">--</option>';
while ($myrow = Database::fetch_array($resultcategories))
{
echo " <option value=\"".$myrow["id"]."\"";
if ($myrow["id"]==$category) if ($myrow["id"]==$category)
{echo " selected";} {echo " selected";}
echo ">".$myrow["category_title"]."</option>"; echo ">".$myrow["category_title"]."</option>";
} }
echo "</select></td></tr>"; echo ' </select>';
echo ' </div>
</div>';
} }
echo "<tr><td align=\"right\">".get_lang("OnHomepage")." ? </td><td><input class=\"checkbox\" type=\"checkbox\" name=\"onhomepage\" id=\"onhomepage\" value=\"1\" $onhomepage><label for=\"onhomepage\"> ".get_lang("Yes")."</label></td></tr>"; echo ' <div class="row">
<div class="label">
'.get_lang('OnHomepage').'?
</div>
<div class="formw">
<input class="checkbox" type="checkbox" name="onhomepage" id="onhomepage" value="1"'.$onhomepage.'><label for="onhomepage"> '.get_lang('Yes').'</label>
</div>
</div>';
if(api_get_setting('search_enabled')=='true') if(api_get_setting('search_enabled')=='true')
{ {
require_once(api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php'); require_once(api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php');
$specific_fields = get_specific_field_list(); $specific_fields = get_specific_field_list();
echo '<tr><td align="right">'.get_lang("SearchFeatureDoIndexLink").' ? </td><td><input class="checkbox" type="checkbox" name="index_document" id="index_document" checked="checked"><label for="index_document">'.get_lang("Yes").'</label></td></tr>'; echo ' <div class="row">
<div class="label">
'.get_lang('SearchFeatureDoIndexLink').'?
</div>
<div class="formw">
<input class="checkbox" type="checkbox" name="index_document" id="index_document" checked="checked"><label for="index_document"> '.get_lang('Yes').'</label>
</div>';
foreach ($specific_fields as $specific_field) { foreach ($specific_fields as $specific_field) {
//Author : <input name="A" type="text" /> //Author : <input name="A" type="text" />
@ -262,19 +308,31 @@ if (is_allowed_to_edit() and isset($_GET['action']))
} }
} }
$sf_textbox = '<tr><td align="right">%s</td><td><input name="%s" type="text" value="%s"/>'; $sf_textbox = '
<div class="row">
<div class="label">%s</div>
<div class="formw">
<input name="%s" type="text" value="%s"/>
</div>
</div>';
echo sprintf($sf_textbox, $specific_field['name'], $specific_field['code'], $default_values); echo sprintf($sf_textbox, $specific_field['name'], $specific_field['code'], $default_values);
} }
} }
echo "<tr><td></td><td><button class=\"save\" type=\"Submit\" name=\"submitLink\" value=\"OK\">".get_lang('SaveLink')." </button></td></tr>", echo ' <div class="row">
<div class="label">
</div>
<div class="formw">
<button class="save" type="Submit" name="submitLink" value="OK">'.get_lang('SaveLink').'</button>
</div>
</div>';
"</table>", echo '</form>';
"</form>";
} }
elseif(($_GET['action']=="addcategory" or $_GET['action']=="editcategory") and !$submitCategory) elseif(($_GET['action']=="addcategory" or $_GET['action']=="editcategory") and !$submitCategory)
{ {
echo "<div class='actions-title'>"; echo '<div class="row">';
if ($_GET['action']=="addcategory") if ($_GET['action']=="addcategory")
{echo '<div class="form_header">'.get_lang('CategoryAdd').'</div>';} {echo '<div class="form_header">'.get_lang('CategoryAdd').'</div>';}
else else
@ -285,16 +343,34 @@ if (is_allowed_to_edit() and isset($_GET['action']))
{ {
echo "<input type=\"hidden\" name=\"id\" value=\"".$id."\" />"; echo "<input type=\"hidden\" name=\"id\" value=\"".$id."\" />";
} }
echo "<table><tr>",
"<td align=\"right\">".get_lang("CategoryName")."<span class=\"required\">*</span> :</td>", echo ' <div class="row">
"<td><input type=\"text\" name=\"category_title\" size=\"50\" value=\"",htmlentities($category_title,ENT_QUOTES,$charset)."\" /></td>", <div class="label">
"</tr>", <span class="form_required">*</span> '.get_lang('CategoryName').'
"<tr><td align=\"right\" valign=\"top\">".get_lang("Description")." :</td>", </div>
"<td><textarea rows=\"3\" cols=\"50\" name=\"description\">",htmlentities($description,ENT_QUOTES,$charset)."</textarea></td></tr>", <div class="formw">
//"<tr><td></td><td><input type=\"Submit\" name=\"submitCategory\"value=\"".get_lang("Ok")."\"/></td></tr>", <input type="text" name="category_title" size="50" value="'.htmlentities($category_title,ENT_QUOTES,$charset).'" />
"<tr><td></td><td><button class=\"save\" type=\"submit\" name=\"submitCategory\">".get_lang('CreateCategory')." </button></td></tr>", </div>
"</table>", </div>';
"</form>";
echo ' <div class="row">
<div class="label">
'.get_lang('Description').'
</div>
<div class="formw">
<textarea rows="3" cols="50" name="description">'.htmlentities($description,ENT_QUOTES,$charset).'</textarea>
</div>
</div>';
echo ' <div class="row">
<div class="label">
</div>
<div class="formw">
<button class="save" type="submit" name="submitCategory">'.get_lang('CreateCategory').' </button>
</div>
</div>';
echo "</form>";
} }
/*elseif(($_GET['action']=="importcsv") and !$submitImport) // RH start /*elseif(($_GET['action']=="importcsv") and !$submitImport) // RH start
{ {
@ -310,13 +386,13 @@ if (is_allowed_to_edit() and isset($_GET['action']))
if (!empty($down)) if (!empty($down))
{ {
movecatlink($down); movecatlink($down);
} }
if (!empty($up)) if (!empty($up))
{ {
movecatlink($up); movecatlink($up);
} }
if (empty($_GET['action']) || ($_GET['action']!='editlink' && $_GET['action']!='addcategory' && $_GET['action']!='addlink') || $link_submitted || $category_submitted) if (empty($_GET['action']) || ($_GET['action']!='editlink' && $_GET['action']!='addcategory' && $_GET['action']!='addlink') || $link_submitted || $category_submitted)
{ {

Loading…
Cancel
Save