Example #1
0
 public static function multilanguage_name_description($locales, $category = null)
 {
     $num_locales = count($locales);
     if ($num_locales > 1) {
         echo '<div class="tabber">';
     }
     foreach ($locales as $locale) {
         if ($num_locales > 1) {
             echo '<div class="tabbertab">';
         }
         if ($num_locales > 1) {
             echo '<h2>' . $locale['s_name'] . '</h2>';
         }
         echo '<div class="FormElement">';
         echo '<div class="FormElementName">' . __('Title') . '</div>';
         echo '<div class="FormElementInput">';
         parent::generic_input_text($locale['pk_c_code'] . '#s_title', isset($category['locale'][$locale['pk_c_code']]) ? $category['locale'][$locale['pk_c_code']]['s_title'] : "");
         echo '</div>';
         echo '</div>';
         echo '<div class="FormElement">';
         echo '<div class="FormElementName">' . __('Body') . '</div>';
         echo '<div class="FormElementInput">';
         parent::generic_textarea($locale['pk_c_code'] . '#s_text', isset($category['locale'][$locale['pk_c_code']]) ? htmlentities($category['locale'][$locale['pk_c_code']]['s_text']) : "");
         echo '</div>';
         echo '</div>';
         if ($num_locales > 1) {
             echo '</div>';
         }
     }
     if ($num_locales > 1) {
         echo '</div>';
     }
 }
Example #2
0
 public static function tags_input($value = NULL, $readOnly = false, $autocomplete = true)
 {
     $name = 'new_item[gn_tags]';
     $maxLength = 249;
     self::setInputValueFor('gn_tags', $value);
     parent::generic_input_text($name, $value, $maxLength, $readOnly, $autocomplete);
     return true;
 }
Example #3
0
 public static function email_text()
 {
     if (osc_logged_user_email() == '') {
         $value = self::default_email_text();
     }
     parent::generic_input_text('alert_email', $value);
     return true;
 }
Example #4
0
 public static function the_subject()
 {
     if (Session::newInstance()->_getForm("subject") != "") {
         $subject = Session::newInstance()->_getForm("subject");
         parent::generic_input_text("subject", $subject, null, false);
     } else {
         parent::generic_input_text("subject", "", null, false);
     }
     return true;
 }
Example #5
0
 public static function friend_email()
 {
     if (Session::newInstance()->_getForm("friendEmail") != "") {
         $friendEmail = Session::newInstance()->_getForm("friendEmail");
         parent::generic_input_text("friendEmail", $friendEmail, null, false);
     } else {
         parent::generic_input_text("friendEmail", "", null, false);
     }
     return true;
 }
Example #6
0
 public static function email_input_text($comment = null)
 {
     $commentAuthorEmail = '';
     if (isset($comment['s_author_email'])) {
         $commentAuthorEmail = $comment['s_author_email'];
     }
     if (Session::newInstance()->_getForm('commentAuthorEmail') != '') {
         $commentAuthorEmail = Session::newInstance()->_getForm('commentAuthorEmail');
     }
     parent::generic_input_text("authorEmail", $commentAuthorEmail, null, false);
 }
Example #7
0
 public static function multilanguage_name_description($locales, $page = null)
 {
     $num_locales = count($locales);
     if ($num_locales > 1) {
         echo '<div class="tabber">';
     }
     $aFieldsDescription = Session::newInstance()->_getForm("aFieldsDescription");
     foreach ($locales as $locale) {
         if ($num_locales > 1) {
             echo '<div class="tabbertab">';
             echo '<h2>' . $locale['s_name'] . '</h2>';
         }
         echo '<div class="FormElement">';
         echo '<div class="FormElementName">' . __('Title') . '</div>';
         echo '<div class="FormElementInput">';
         $title = '';
         if (isset($page['locale'][$locale['pk_c_code']])) {
             $title = $page['locale'][$locale['pk_c_code']]['s_title'];
         }
         if (isset($aFieldsDescription[$locale['pk_c_code']]) && isset($aFieldsDescription[$locale['pk_c_code']]['s_title']) && $aFieldsDescription[$locale['pk_c_code']]['s_title'] != '') {
             $title = $aFieldsDescription[$locale['pk_c_code']]['s_title'];
         }
         parent::generic_input_text($locale['pk_c_code'] . '#s_title', $title);
         echo '</div>';
         echo '</div>';
         echo '<div class="FormElement">';
         echo '<div class="FormElementName">' . __('Body') . '</div>';
         echo '<div class="FormElementInput">';
         $description = '';
         if (isset($page['locale'][$locale['pk_c_code']])) {
             $description = $page['locale'][$locale['pk_c_code']]['s_text'];
         }
         if (isset($aFieldsDescription[$locale['pk_c_code']]) && isset($aFieldsDescription[$locale['pk_c_code']]['s_text']) && $aFieldsDescription[$locale['pk_c_code']]['s_text'] != '') {
             $description = $aFieldsDescription[$locale['pk_c_code']]['s_text'];
         }
         parent::generic_textarea($locale['pk_c_code'] . '#s_text', $description);
         echo '</div>';
         echo '</div>';
         if ($num_locales > 1) {
             echo '</div>';
         }
     }
     if ($num_locales > 1) {
         echo '</div>';
     }
 }
Example #8
0
 public static function address_text($user = null)
 {
     parent::generic_input_text('address', isset($user['s_address']) ? $user['s_address'] : null);
 }
Example #9
0
 public static function options_input_text($field = null)
 {
     parent::generic_input_text("s_options", isset($field) && isset($field["s_options"]) ? $field["s_options"] : "", null, false);
     return true;
 }
Example #10
0
 public static function email_text($admin = null)
 {
     parent::generic_input_text("s_email", isset($admin['s_email']) ? $admin['s_email'] : '', null, false);
 }
 public static function city_text()
 {
     // get params GET (only manageItems)
     if (Params::getParam('city') != '') {
         $item['s_city'] = Params::getParam('city');
         $item['fk_i_city_id'] = Params::getParam('cityId');
     }
     parent::generic_input_text('city', isset($item['s_city']) ? $item['s_city'] : null, false, false);
     parent::generic_input_hidden('cityId', isset($item['fk_i_city_id']) && $item['fk_i_city_id'] != null ? $item['fk_i_city_id'] : '');
     return true;
 }
Example #12
0
 public static function position_input_text($category = null)
 {
     parent::generic_input_text("i_position", isset($category) && isset($category['i_position']) ? $category["i_position"] : "", 3);
 }
 public static function friend_email()
 {
     parent::generic_input_text("friendEmail", "", null, false);
     return true;
 }
 public static function email_input_text($comment = null)
 {
     parent::generic_input_text("s_author_email", isset($comment) ? $comment["s_author_email"] : "", null, false);
     return true;
 }
Example #15
0
 public static function contact_email_text($item = null)
 {
     if ($item == null) {
         $item = osc_item();
     }
     if (Session::newInstance()->_getForm('contactEmail') != "") {
         $item['s_contact_email'] = Session::newInstance()->_getForm('contactEmail');
     }
     parent::generic_input_text('contactEmail', isset($item['s_contact_email']) ? $item['s_contact_email'] : null);
     return true;
 }
Example #16
0
 public static function contact_email_text($item = null)
 {
     if ($item == null) {
         $item = osc_item();
     }
     parent::generic_input_text('contactEmail', isset($item['s_contact_email']) ? $item['s_contact_email'] : null);
     return true;
 }
Example #17
0
 public static function date_format_input_text($locale = null)
 {
     parent::generic_input_text("s_date_format", isset($locale) ? $locale['s_date_format'] : "");
     return true;
 }
Example #18
0
 public static function multilanguage_name_description($locales, $category = null)
 {
     echo '<div class="tabber">';
     foreach ($locales as $locale) {
         echo '<div class="tabbertab">';
         echo '<h2>' . $locale['s_name'] . '</h2>';
         echo '<div class="FormElement">';
         echo '<div class="FormElementName">' . __('Title') . '</div>';
         echo '<div class="FormElementInput">';
         parent::generic_input_text($locale['pk_c_code'] . '#s_name', isset($category['locale'][$locale['pk_c_code']]) ? htmlspecialchars($category['locale'][$locale['pk_c_code']]['s_name'], ENT_QUOTES) : "");
         echo '</div>';
         echo '</div>';
         echo '<div class="FormElement">';
         echo '<div class="FormElementName">' . __('Description') . '</div>';
         echo '<div class="FormElementInput">';
         parent::generic_textarea($locale['pk_c_code'] . '#s_description', isset($category['locale'][$locale['pk_c_code']]) ? htmlspecialchars($category['locale'][$locale['pk_c_code']]['s_description']) : "");
         echo '</div>';
         echo '</div>';
         echo '</div>';
     }
     echo '</div>';
 }
Example #19
0
 public static function zip_text($user = null)
 {
     parent::generic_input_text('zip', isset($user['s_zip']) ? $user['s_zip'] : null);
 }
 public static function the_subject()
 {
     parent::generic_input_text("subject", "", null, false);
     return true;
 }