Changeset 20254 for extensions/Piwecard/admin
- Timestamp:
- Jan 19, 2013, 12:38:40 AM (12 years ago)
- Location:
- extensions/Piwecard/admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Piwecard/admin/admin_configuration.php
r20229 r20254 10 10 $configuration = array(); 11 11 12 $configuration['nb_max_recipients'] = $_POST['ecard_nb_max_recipients']; 13 14 if (intval($configuration['nb_max_recipients']) == 0) { 15 $configuration['nb_max_recipients'] = 1; 16 $piwecard->config['nb_max_recipients'] = $configuration['nb_max_recipients']; 17 } else { 18 $piwecard->config['nb_max_recipients'] = intval($configuration['nb_max_recipients']); 19 } 20 12 21 $configuration['validity'] = $_POST['ecard_validity_list']; 13 22 $configuration['validity'] = explode(',', $configuration['validity']); … … 103 112 } 104 113 114 $template->assign('ecard_nb_max_recipients',((isset($configuration['nb_max_recipients'])) ? $configuration['nb_max_recipients'] : $piwecard->config['nb_max_recipients'])); 115 105 116 if (isset($errors['validity'])) { 106 117 $piwecard->config['validity'] = null; -
extensions/Piwecard/admin/template/admin_configuration.tpl
r20229 r20254 79 79 80 80 function piwecard_checkForm(form) { 81 var guestEmailOK = piwecard_checkField(form.ecard_default_guest_email, 1, true); 82 var subjectOK = piwecard_checkField(form.ecard_email_subject, 0); 83 var messageTextOK = piwecard_checkField(form.ecard_email_message_text, 0); 84 var messageHTMLOK = piwecard_checkField(form.ecard_email_message_html, 0); 85 86 if(guestEmailOK && subjectOK && messageTextOK && messageHTMLOK) 81 var nbMaxRecipientsOK = piwecard_checkField(form.ecard_nb_max_recipients, 2, 'inline'); 82 var guestEmailOK = piwecard_checkField(form.ecard_default_guest_email, 1, 'block', true); 83 var subjectOK = piwecard_checkField(form.ecard_email_subject, 0, 'block'); 84 var messageTextOK = piwecard_checkField(form.ecard_email_message_text, 0, 'block'); 85 var messageHTMLOK = piwecard_checkField(form.ecard_email_message_html, 0, 'block'); 86 87 if(nbMaxRecipientsOK && guestEmailOK && subjectOK && messageTextOK && messageHTMLOK) 87 88 return true; 88 89 else … … 120 121 <legend>{'piwecard_configuration'|@translate}</legend> 121 122 <div class="ecard_form_line"> 123 <label for="ecard_nb_max_recipients">{'piwecard_nb_max_recipients'|@translate} </label> 124 <input type="text" maxlength="3" size="3" name="ecard_nb_max_recipients" id="ecard_nb_max_recipients" value="{$ecard_nb_max_recipients}" /> 125 <span class="ecard_error" id="ecard_nb_max_recipients_error">{'piwecard_error'|@translate} {'piwecard_error_integer'|@translate}</span> 126 </div> 127 <div class="ecard_form_line"> 122 128 {'piwecard_validity_list'|@translate} 123 129 <span class="ecard_error" id="ecard_validity_list_error" style="{$ecard_errors.validity.style_error_text}">{'piwecard_error'|@translate} {'piwecard_error_validity_list'|@translate}</span> … … 179 185 </div> 180 186 </fieldset> 181 182 187 <fieldset> 183 188 <legend>{'piwecard_email_configuration'|@translate}</legend> … … 208 213 </div> 209 214 <div class="ecard_form_line ecard_email_config"> 210 <label for="ecard_default_guest_email">{'piwecard_default_guest_email'|@translate}</label><span class="ecard_error" id="ecard_default_guest_email_error" style="{$ecard_errors.default_guest_email.style_error_text}"> {'piwecard_error'|@translate} {'piwecard_error_email'|@translate}</span>215 <label for="ecard_default_guest_email">{'piwecard_default_guest_email'|@translate}</label><span class="ecard_error" id="ecard_default_guest_email_error" style="{$ecard_errors.default_guest_email.style_error_text}"> {'piwecard_error'|@translate} {'piwecard_error_email'|@translate}</span> 211 216 <input type="text" maxlength="50" name="ecard_default_guest_email" id="ecard_default_guest_email" {$ecard_errors.default_guest_email.style_error_input} value="{$ecard_default_guest_email}" onblur="piwecard_checkField(this, 1, true);" /> 212 217 </div> 213 218 <div class="ecard_form_line ecard_email_config"> 214 <label for="ecard_email_subject">{'piwecard_email_subject'|@translate}*</label><span class="ecard_error" id="ecard_email_subject_error" style="{$ecard_errors.email_subject.style_error_text}"> {'piwecard_error'|@translate} {'piwecard_error_text'|@translate}</span>219 <label for="ecard_email_subject">{'piwecard_email_subject'|@translate}*</label><span class="ecard_error" id="ecard_email_subject_error" style="{$ecard_errors.email_subject.style_error_text}"> {'piwecard_error'|@translate} {'piwecard_error_text'|@translate}</span> 215 220 <input type="text" maxlength="255" name="ecard_email_subject" id="ecard_email_subject" {$ecard_errors.email_subject.style_error_input} value="{$ecard_email_subject}" /> 216 221 </div> 217 222 <div class="ecard_form_line ecard_email_config"> 218 <label for="ecard_email_message_text">{'piwecard_email_message_text'|@translate}*</label><span class="ecard_error" id="ecard_email_message_text_error" style="{$ecard_errors.email_message.text.style_error_text}"> {'piwecard_error'|@translate} {'piwecard_error_text'|@translate}</span>223 <label for="ecard_email_message_text">{'piwecard_email_message_text'|@translate}*</label><span class="ecard_error" id="ecard_email_message_text_error" style="{$ecard_errors.email_message.text.style_error_text}"> {'piwecard_error'|@translate} {'piwecard_error_text'|@translate}</span> 219 224 <textarea name="ecard_email_message_text" id="ecard_email_message_text" {$ecard_errors.email_message.text.style_error_input}>{$ecard_email_message_text}</textarea> 220 225 </div> 221 226 <div class="ecard_form_line ecard_email_config"> 222 <label for="ecard_email_message_html">{'piwecard_email_message_html'|@translate}*</label><span class="ecard_error" id="ecard_email_message_html_error" style="{$ecard_errors.email_message.html.style_error_text}"> {'piwecard_error'|@translate} {'piwecard_error_text'|@translate}</span>227 <label for="ecard_email_message_html">{'piwecard_email_message_html'|@translate}*</label><span class="ecard_error" id="ecard_email_message_html_error" style="{$ecard_errors.email_message.html.style_error_text}"> {'piwecard_error'|@translate} {'piwecard_error_text'|@translate}</span> 223 228 <textarea name="ecard_email_message_html" id="ecard_email_message_html" {$ecard_errors.email_message.html.style_error_input}>{$ecard_email_message_html}</textarea> 224 229 </div> -
extensions/Piwecard/admin/template/admin_management.tpl
r20229 r20254 4 4 {literal} 5 5 function piwecard_checkForm(form) { 6 var nbPageOK = piwecard_checkField(form.ecard_nb_ecard_page, 2 );6 var nbPageOK = piwecard_checkField(form.ecard_nb_ecard_page, 2, 'inline'); 7 7 8 8 if(nbPageOK)
Note: See TracChangeset
for help on using the changeset viewer.