working on new prompt form. see #12

This commit is contained in:
mic 2024-05-13 23:55:41 +02:00
parent e714547b22
commit b9790b1619
2 changed files with 69 additions and 37 deletions

View file

@ -7,11 +7,11 @@
background-color: #ffffff; background-color: #ffffff;
} }
table tr:nth-child(even) { table.prompts_list tr:nth-child(even) {
background-color: #e9e9e9; background-color: #e9e9e9;
} }
table tr:nth-child(odd) { table.prompts_list tr:nth-child(odd) {
background-color: #f3f3f3; background-color: #f3f3f3;
} }
} }
@ -33,7 +33,7 @@
border: 1px solid #ccc; border: 1px solid #ccc;
} }
table th { table.prompts_list th {
background-color: #4c4e58; background-color: #4c4e58;
border: 1px solid rgb(251, 251, 254); border: 1px solid rgb(251, 251, 254);
color: rgb(194, 194, 194); color: rgb(194, 194, 194);
@ -43,7 +43,7 @@
background-color: inherit; background-color: inherit;
} }
table tr:nth-child(even) { table.prompts_list tr:nth-child(even) {
background-color: #2E2F36; background-color: #2E2F36;
} }
} }
@ -83,7 +83,7 @@ table tr {
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
} }
table th { table.prompts_list th {
padding: 8px; padding: 8px;
text-align: left; text-align: left;
cursor: pointer; cursor: pointer;
@ -94,7 +94,7 @@ table td {
padding: 8px; padding: 8px;
} }
table td.properties{ table.prompts_list td.properties{
white-space: nowrap; white-space: nowrap;
} }
@ -104,9 +104,23 @@ table td.properties{
#formNew{ #formNew{
display: none; display: none;
width: 100%;
} }
.text_output{ .text_output{
width: 100%; width: 100%;
height: 9em; height: 9em;
}
.go_right{
float: right;
}
.width_all{
width: 100%;
}
.small_label{
font-size: small;
font-style: italic;
} }

View file

@ -16,41 +16,59 @@
<button id="btnNew">__MSG_customPrompts_btnNew__</button> <button id="btnNew">__MSG_customPrompts_btnNew__</button>
</div> </div>
<div id="formNew"> <div id="formNew">
<label for="txtIdNew">*__MSG_customPrompts_form_label_ID__:</label> <table class="width_all">
<input type="text" id="txtIdNew" name="id" class="input_new"> [__MSG_customPrompts_form_label_ID_rules__] <tr>
<br> <td>
<label for="txtNameNew">*__MSG_customPrompts_form_label_Name__:</label> <label for="txtIdNew">*__MSG_customPrompts_form_label_ID__:</label>
<input type="text" id="txtNameNew" name="name" class="input_new"> <br>
<br> <input type="text" id="txtIdNew" name="id" class="input_new">
<label for="txtTextNew">*__MSG_customPrompts_form_label_Text__:</label> <br><span class="small_label">[__MSG_customPrompts_form_label_ID_rules__]</span>
<textarea id="txtTextNew" name="text" class="input_new"></textarea> </td>
<br> <td rowspan="2">
<label for="selectTypeNew">__MSG_customPrompts_add_to_menu__:</label> <label for="txtTextNew">*__MSG_customPrompts_form_label_Text__:</label>
<select id="selectTypeNew" name="type"> <br>
<option value="0">__MSG_customPrompts_add_to_menu_always__</option> <textarea id="txtTextNew" name="text" class="input_new text_output"></textarea>
<option value="1">__MSG_customPrompts_add_to_menu_reading__</option> </td>
<option value="2">__MSG_customPrompts_add_to_menu_composing__</option> <td>
</select> <label for="selectTypeNew">__MSG_customPrompts_add_to_menu__:</label>
<br> <br>
<label for="selectActionNew">__MSG_customPrompts_form_label_Action__:</label> <select id="selectTypeNew" name="type">
<select id="selectActionNew" name="action"> <option value="0">__MSG_customPrompts_add_to_menu_always__</option>
<option value="0">__MSG_customPrompts_close_button__</option> <option value="1">__MSG_customPrompts_add_to_menu_reading__</option>
<option value="1">__MSG_customPrompts_do_reply__</option> <option value="2">__MSG_customPrompts_add_to_menu_composing__</option>
<option value="2">__MSG_customPrompts_substitute_text__</option> </select>
</select> </td>
<br> <td rowspan="2">
<input type="checkbox" id="checkboxNeedSelectedNew" name="need_selected" value="1"> <label for="checkboxNeedSelectedNew">__MSG_customPrompts_form_label_need_selected__</label> <input type="checkbox" id="checkboxNeedSelectedNew" name="need_selected" value="1"> <label for="checkboxNeedSelectedNew">__MSG_customPrompts_form_label_need_selected__</label>
<br> <br>
<input type="checkbox" id="checkboxNeedSignatureNew" name="need_signature" value="1"> <label for="checkboxNeedSignatureNew">__MSG_customPrompts_form_label_need_signature__</label> <input type="checkbox" id="checkboxNeedSignatureNew" name="need_signature" value="1"> <label for="checkboxNeedSignatureNew">__MSG_customPrompts_form_label_need_signature__</label>
<br> <br>
<input type="checkbox" id="checkboxNeedCustomTextNew" name="need_custom_text" value="1"> <label for="checkboxNeedCustomTextNew">__MSG_customPrompts_form_label_need_custom_text__</label> <input type="checkbox" id="checkboxNeedCustomTextNew" name="need_custom_text" value="1"> <label for="checkboxNeedCustomTextNew">__MSG_customPrompts_form_label_need_custom_text__</label>
<br> </td>
* __MSG_customPrompts_form_required_fields__. </tr>
<tr>
<td>
<label for="txtNameNew">*__MSG_customPrompts_form_label_Name__:</label>
<br>
<input type="text" id="txtNameNew" name="name" class="input_new">
</td>
<td>
<label for="selectActionNew">__MSG_customPrompts_form_label_Action__:</label>
<br>
<select id="selectActionNew" name="action">
<option value="0">__MSG_customPrompts_close_button__</option>
<option value="1">__MSG_customPrompts_do_reply__</option>
<option value="2">__MSG_customPrompts_substitute_text__</option>
</select>
</td>
</tr>
</table>
<div class="go_right">* __MSG_customPrompts_form_required_fields__.</div>
<br> <br>
<button id="btnAddNew" disabled>__MSG_customPrompts_btnAddNewCommit__</button> <button id="btnAddNew" disabled>__MSG_customPrompts_btnAddNewCommit__</button>
</div> </div>
<div id="all_prompts"> <div id="all_prompts">
<table> <table class="prompts_list">
<thead> <thead>
<tr> <tr>
<th class="sort" data-sort="id">__MSG_customPrompts_form_label_ID__</th> <th class="sort" data-sort="id">__MSG_customPrompts_form_label_ID__</th>