Explorar o código

Customer portal : Form adjustments on UserProfile brick

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4069 a333f486-631f-4898-b8df-5754b55c2be0
glajarige %!s(int64=9) %!d(string=hai) anos
pai
achega
2cbdf28415

+ 1 - 1
datamodels/2.x/itop-portal-base/portal/src/entities/browsebrick.class.inc.php

@@ -19,7 +19,7 @@
 
 namespace Combodo\iTop\Portal\Brick;
 
-use DOMFormatException;
+use \DOMFormatException;
 use \Combodo\iTop\DesignElement;
 use \Combodo\iTop\Portal\Brick\PortalBrick;
 

+ 1 - 0
datamodels/2.x/itop-portal-base/portal/src/views/bricks/object/mode_create.html.twig

@@ -58,6 +58,7 @@
 		});
 		
 		{% if tIsModal is defined and tIsModal == true %}
+			$('#{{ sFormId }}').closest('.modal').scrollTop(0);
 			$('#{{ sFormId }}').closest('.modal').find('.modal-footer').hide();
 		{% endif %}
 	});

+ 1 - 5
datamodels/2.x/itop-portal/index.php

@@ -27,16 +27,12 @@ else
 }
 require_once APPROOT . '/application/startup.inc.php';
 
+// Protection against setup in the following configuration : ITIL Ticket with Enhanced Portal selected but neither UserRequest or Incident. Which would crash the portal.
 if (!class_exists('UserRequest') && !class_exists('Incident'))
 {
 	die('iTop has neither been installed with User Request nor Incident tickets. Please contact your administrator.');
 }
 
-if (UserRights::GetContactId() == 0)
-{
-	die(Dict::S('Portal:ErrorNoContactForThisUser'));
-}
-
 $sDir = basename(__DIR__);
 define('PORTAL_MODULE_ID', $sDir);
 define('PORTAL_ID', $sDir);

+ 7 - 7
datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml

@@ -989,20 +989,20 @@
             <!-- Optionnal tag to specify the form layout. Fields that are not positionned in the layout will be placed at the end of the form -->
             <twig>
               <!-- data-field-id attribute must be an attribute code of the class -->
-              <div class="form_field" data-field-id="first_name">
+              <!-- data-field-flags attribute contains flags among read_only/hidden/mandatory/must_prompt/must_change -->
+              <div class="form_field" data-field-id="first_name" data-field-flags="read_only">
               </div>
-              <div class="form_field" data-field-id="name">
+              <div class="form_field" data-field-id="name" data-field-flags="read_only">
+              </div>
+              <div class="form_field" data-field-id="org_id" data-field-flags="read_only">
               </div>
-              <!-- data-field-flags attribute contains flags among read_only/hidden/mandatory/must_prompt/must_change -->
               <div class="form_field" data-field-id="email" data-field-flags="read_only">
               </div>
               <div class="form_field" data-field-id="phone">
               </div>
-              <div class="form_field" data-field-id="org_id" data-field-flags="read_only">
-              </div>
-              <div class="form_field" data-field-id="location_id" data-field-flags="read_only">
+              <div class="form_field" data-field-id="location_id">
               </div>
-              <div class="form_field" data-field-id="function" data-field-flags="read_only">
+              <div class="form_field" data-field-id="function">
               </div>
               <div class="form_field" data-field-id="manager_id" data-field-flags="read_only">
               </div>