Skip to content

Commit

Permalink
SAKIII-4138 Adding validation to comments
Browse files Browse the repository at this point in the history
  • Loading branch information
croby committed Nov 11, 2011
1 parent 9ee3354 commit 9bb263c
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 163 deletions.
55 changes: 30 additions & 25 deletions devwidgets/comments/comments.html
Expand Up @@ -60,13 +60,16 @@
<div id="comments_message_${i['sakai:id']}" class="comments_message">
<p>${i.message}</p>
</div>
<div id="comments_message_editContainer_${i['sakai:id']}" style="display:none;">
<textarea id="comments_editComment_txt_${i['sakai:id']}" rows="7" cols="50" title="__MSG__EDIT_YOUR_COMMENT__">${i.messageTxt}</textarea><br/>
<div class="fl-force-right">
<button type="button" class="s3d-button s3d-link-button comments_editComment_cancel" id="comments_editComment_cancel${i['sakai:id']}">__MSG__CANCEL__</button>
<button type="button" class="s3d-button s3d-overlay-button comments_editComment_save" id="comments_editComment_save${i['sakai:id']}">__MSG__EDIT_COMMENT__</button>
</div>
<hr class="fl-push fl-hidden"/>
<div id="comments_message_editContainer_${i['sakai:id']}" class="comments_edit_form s3d-form-field-wrapper" style="display:none;">
<form>
<label for="comments_editComment_txt_${i['sakai:id']}" class="s3d-input-label s3d-input-label-above">__MSG__EDIT_YOUR_COMMENT__</label>
<textarea id="comments_editComment_txt_${i['sakai:id']}" rows="7" cols="50" name="comments_editComment_txt_${i['sakai:id']}" class="required comments_inputFields s3d-input-full-width">${i.messageTxt}</textarea><br/>
<div class="fl-force-right">
<button type="button" class="s3d-button s3d-link-button comments_editComment_cancel" id="comments_editComment_cancel${i['sakai:id']}">__MSG__CANCEL__</button>
<button type="submit" class="s3d-button s3d-overlay-button comments_editComment_save" id="comments_editComment_save${i['sakai:id']}">__MSG__EDIT_COMMENT__</button>
</div>
<hr class="fl-push fl-hidden"/>
</form>
</div>
</div>
{/for}
Expand All @@ -83,25 +86,27 @@
<div class="jq_pager comments_jqpager" style="display:none;"><!-- In this container the pager will be shown (bottom) --></div>
</div>
<div id="comments_fillInComment" style="display:none;">
<div class="comments_fillInCommentTopContainer">
<br />
<div id="comments_txtNamePoster_container" style="display:none;">
<label for="comments_txtNamePoster">__MSG__NAME__:</label>
<input type="text" class="comments_inputFields" id="comments_txtNamePoster"><br />
</div>
<div id="comments_txtMailPoster_container" style="display:none;">
<label for="comments_txtMailPoster">__MSG__EMAIL__:</label>
<input type="text" class="comments_inputFields" id="comments_txtMailPoster"><br />
</div>
<label for="comments_txtMessage">__MSG__YOUR_COMMENT__:</label>
<textarea id="comments_txtMessage" class="comments_inputFields" rows="7" cols="50" placeholder="__MSG__ENTER_YOUR_COMMENT__"></textarea><br />
<form>
<div class="comments_fillInCommentTopContainer s3d-form-field-wrapper">
<br />
<div id="comments_txtNamePoster_container" style="display:none;">
<label for="comments_txtNamePoster">__MSG__NAME__:</label>
<input type="text" class="comments_inputFields" id="comments_txtNamePoster"><br />
</div>
<div id="comments_txtMailPoster_container" style="display:none;">
<label for="comments_txtMailPoster">__MSG__EMAIL__:</label>
<input type="text" class="comments_inputFields" id="comments_txtMailPoster"><br />
</div>
<label for="comments_txtMessage" class="s3d-input-label s3d-input-label-above">__MSG__YOUR_COMMENT__:</label>
<textarea id="comments_txtMessage" name="comments_txtMessage" class="required comments_inputFields s3d-input-full-width" rows="7" cols="50" placeholder="__MSG__ENTER_YOUR_COMMENT__"></textarea><br />

<div class="fl-force-right">
<button type="button" class="s3d-button s3d-link-button comment_postCommentTopBottom" id="comments_cancelComment">__MSG__CANCEL__</button>
<button type="button" class="s3d-button s3d-overlay-button comment_postCommentTopBottom" id="comments_postComment">__MSG__SUBMIT_COMMENT__</button>
</div>
<div class="fl-push"><!-- --></div>
</div>
<div class="fl-force-right">
<button type="button" class="s3d-button s3d-link-button comment_postCommentTopBottom" id="comments_cancelComment">__MSG__CANCEL__</button>
<button type="submit" class="s3d-button s3d-overlay-button comment_postCommentTopBottom" id="comments_postComment">__MSG__SUBMIT_COMMENT__</button>
</div>
<div class="fl-push"><!-- --></div>
</div>
</form>
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions devwidgets/comments/css/comments.css
Expand Up @@ -45,11 +45,11 @@
.comments_dateComment{color:#BBB;}
.comments_topCommentBar{margin-top:20px;overflow:auto;width:100%;}
.comments_fillInCommentTopContainer input[type=text]{width:350px;}
#comments_txtMessage{height:100px;width:auto;}
#comments_txtMessage{height:100px;}
#comments_fillInComment{background-color:#EBEFF1;margin-top:15px;padding:0 15px 10px;}
#comments_fillInComment label{font-weight:bold;display:block;}
#comments_mainContainer .dialog_buttons{padding:6px;height:30px;}
#comments_mainContainer .dialog_buttons.right button{float:right;}
#comments_mainContainer .comments_message p{padding-bottom:0;margin-bottom:0;color:#000000;}
#comments_mainContainer textarea,#comments_settings textarea{margin:5px 0;width:100%;height:140px;border:#D9D9D9 solid 1px;resize:none;padding:4px;}
#comments_mainContainer textarea,#comments_settings textarea{height:140px;resize:none;}
#comments_mainContainer input[type=text].error,#comments_settings input[type=text].error,#comments_mainContainer textarea.error,#comments_settings textarea.error{border-color:#9f3333;background-color:#ffdede;}

0 comments on commit 9bb263c

Please sign in to comment.